Skip to content
This repository has been archived by the owner on Jan 31, 2022. It is now read-only.

Commit

Permalink
Removing uhal dependency from gemhardware/devices Makefile, fixing in…
Browse files Browse the repository at this point in the history
…cludes in hw devices
  • Loading branch information
mexanick committed Apr 6, 2020
1 parent 2c7a526 commit ba2bc52
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 24 deletions.
4 changes: 1 addition & 3 deletions gemhardware/devices/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ IncludeDirs =$(XDAQ_ROOT)/include
IncludeDirs+=$(BUILD_HOME)/$(Package)/include
IncludeDirs+=$(BUILD_HOME)/gemhardware/utils/include
IncludeDirs+=$(BUILD_HOME)/gemutils/include
IncludeDirs+=$(uHALROOT)/include
IncludeDirs+=$(XHAL_ROOT)/include
IncludeDirs+=$(CTP7_ROOT)/include

Expand All @@ -56,11 +55,10 @@ DependentLibraryDirs+=$(XHAL_ROOT)/lib

LibraryDirs+=$(BUILD_HOME)/gemhardware/utils/lib/$(XDAQ_OS)/$(XDAQ_PLATFORM)
LibraryDirs+=$(BUILD_HOME)/gemutils/lib/$(XDAQ_OS)/$(XDAQ_PLATFORM)
LibraryDirs+=$(uHALROOT)/lib
LibraryDirs+=$(XHAL_ROOT)/lib

#FIXME hacky linking of xhal-base
DependentLibraries =cactus_uhal_uhal xhal-client xhal-base
DependentLibraries =xhal-client xhal-base
DependentLibraries+=gemutils gemhwutils

include $(XDAQ_ROOT)/$(BUILD_SUPPORT)/Makefile.rules
Expand Down
27 changes: 12 additions & 15 deletions gemhardware/devices/include/gem/hw/devices/amc/HwGenericAMC.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
#define GEM_HW_HWGENERICAMC_H

#include "gem/hw/devices/GEMHwDevice.h"
#include "ctp7_modules/common/amc.h"
#include "ctp7_modules/common/amc/daq.h"
#include "ctp7_modules/common/amc/ttc.h"

#include "gem/hw/devices/exception/Exception.h"
#include "gem/hw/devices/amc/GenericAMCSettingsEnums.h"
Expand Down Expand Up @@ -38,37 +35,37 @@ namespace gem {
* @brief Read the board ID register (should be reimplemented in derived HW, e.g., GLIB)
* @returns the AMC board ID as a std::string
*/
virtual std::string getBoardIDString();
std::string getBoardIDString();

/**
* @brief Read the board ID register (should be reimplemented in derived HW, e.g., GLIB)
* @returns the AMC board ID as 32 bit unsigned value
*/
virtual uint32_t getBoardID();
uint32_t getBoardID();

/**
* @brief Read the board type register (should be reimplemented in derived HW, e.g., GLIB)
* @returns the AMC board type as a std::string
*/
virtual std::string getBoardTypeString();
std::string getBoardTypeString();

/**
* @brief Read the board type register (should be reimplemented in derived HW, e.g., GLIB)
* @returns the AMC board type as 32 bit unsigned value
*/
virtual uint32_t getBoardType();
uint32_t getBoardType();

/**
* @brief Read the system ID register (should be reimplemented in derived HW, e.g., GLIB)
* @returns the AMC system ID as a std::string
*/
virtual std::string getSystemIDString();
std::string getSystemIDString();

/**
* @brief Read the system ID register (should be reimplemented in derived HW, e.g., GLIB)
* @returns the AMC system ID as 32 bit unsigned value
*/
virtual uint32_t getSystemID();
uint32_t getSystemID();

/**
* @brief Check how many OptoHybrids the AMC FW can support
Expand All @@ -87,43 +84,43 @@ namespace gem {
* @param system determines whether to read the system (default) or user FW register
* @returns a string corresponding to AMC FW version
*/
virtual std::string getFirmwareVerString(bool const& system=true);
std::string getFirmwareVerString(bool const& system=true);

/**
* Read the AMC FW register
* @param system determines whether to read the system (default) or user FW register
* @returns the AMC FW version as a 32 bit unsigned
*/
virtual uint32_t getFirmwareVer(bool const& system=true);
uint32_t getFirmwareVer(bool const& system=true);

/**
* Read the AMC FW register
* @param system determines whether to read the system (default) or user FW register
* @returns a string corresponding to the build date dd-mm-yyyy
*/
virtual std::string getFirmwareDateString(bool const& system=true);
std::string getFirmwareDateString(bool const& system=true);

/**
* Read the AMC FW register
* @param system determines whether to read the system (default) or user FW register
* @returns the build date as a 32 bit unsigned
*/
virtual uint32_t getFirmwareDate(bool const& system=true);
uint32_t getFirmwareDate(bool const& system=true);

//user core functionality
/**
* Read the user AMC FW register
* @returns the user FW build date as a 32-bit unsigned value
* OBSOLETE in V2 AMC FW
*/
virtual uint32_t getUserFirmware();
uint32_t getUserFirmware();

/**
* Read the user AMC FW register
* @returns the user FW build date as a std::string
* OBSOLETE in V2 AMC FW
*/
virtual std::string getUserFirmwareDate();
std::string getUserFirmwareDate();

private:
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@

#include "gem/hw/devices/GEMHwDevice.h"

#include "ctp7_modules/common/gbt.h"
#include "ctp7_modules/common/vfat3.h"
#include "ctp7_modules/common/optohybrid.h"

#include "gem/hw/devices/exception/Exception.h"
#include "gem/hw/devices/optohybrid/OptoHybridSettingsEnums.h"

Expand Down
3 changes: 3 additions & 0 deletions gemhardware/devices/src/common/amc/HwGenericAMC.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#include "gem/hw/devices/amc/HwGenericAMC.h"
#include "ctp7_modules/common/amc.h"
#include "ctp7_modules/common/amc/daq.h"
#include "ctp7_modules/common/amc/ttc.h"

#include <iomanip>

Expand Down
4 changes: 3 additions & 1 deletion gemhardware/devices/src/common/optohybrid/HwOptoHybrid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
#include <functional>

#include "gem/hw/devices/optohybrid/HwOptoHybrid.h"
#include "gem/hw/devices/amc/HwGenericAMC.h"
#include "ctp7_modules/common/gbt.h"
#include "ctp7_modules/common/vfat3.h"
#include "ctp7_modules/common/optohybrid.h"

gem::hw::optohybrid::HwOptoHybrid::HwOptoHybrid(std::string const& optohybridDevice) :
gem::hw::GEMHwDevice::GEMHwDevice(optohybridDevice),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ void gem::hw::optohybrid::OptoHybridManager::startAction()
OptoHybridInfo& info = m_optohybridInfo[index].bag;
if (!info.present)
continue;

CMSGEMOS_DEBUG("OptoHybridManager::startAction::grabbing pointer to hardware device");
auto&& optohybrid = m_optohybrids.at(slot).at(link);

Expand Down

0 comments on commit ba2bc52

Please sign in to comment.