Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions Detectors/EMCAL/calib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,5 @@ o2_add_test_root_macro(macros/GainCalibrationFactors_CalibDBTest.C
PUBLIC_LINK_LIBRARIES O2::EMCALCalib
LABELS emcal COMPILE_ONLY)

o2_add_test_root_macro(macros/TriggerDCS_CCDBApiTest.C
PUBLIC_LINK_LIBRARIES O2::EMCALCalib
LABELS emcal COMPILE_ONLY)

o2_add_test_root_macro(macros/TriggerDCS_CalibDBTest.C
PUBLIC_LINK_LIBRARIES O2::EMCALCalib
LABELS emcal COMPILE_ONLY)

o2_data_file(COPY files DESTINATION Detectors/EMC)

37 changes: 28 additions & 9 deletions Detectors/EMCAL/calib/include/EMCALCalib/CalibDB.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class TempCalibParamSM;
class TimeCalibrationParams;
class TimeCalibParamL1Phase;
class GainCalibrationFactors;
class TriggerDCS;
class FeeDCS;
class ElmbData;

/// \class CalibDB
/// \brief Interface to calibration data from CCDB for EMCAL
Expand Down Expand Up @@ -256,19 +257,33 @@ class CalibDB
/// \throw TypeMismatchException if object is present but type is different (CCDB corrupted)
GainCalibrationFactors* readGainCalibFactors(ULong_t timestamp, const std::map<std::string, std::string>& metadata);

/// \brief Store Trigger DCS data in the CCDB
/// \param dcs trigger DCS data to be stored
/// \brief Store FEE DCS data in the CCDB
/// \param dcs FEE DCS data to be stored
/// \param metadata Additional metadata that can be used in the query
/// \param timestart Start of the time range of the validity of the object
/// \param timeend End of the time range of the validity of the object
void storeTriggerDCSData(TriggerDCS* dcs, const std::map<std::string, std::string>& metadata, ULong_t timestart, ULong_t timeend);
void storeFeeDCSData(FeeDCS* dcs, const std::map<std::string, std::string>& metadata, ULong_t timestart, ULong_t timeend);
Comment on lines -264 to +265

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What will happen with the trigger DCS DP? I would guess at some point they will have to be added back. Would have been easier in this case to add new functions for the FeeDCS besides the existing ones for the trigger DCS, in case they are anyhow needed both. This interface change makes the macro tests crashing (since in O2 macros are tested at least for whether they compile).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TriggerDCS is included in FeeDCS


/// \brief Find trigger DCS data in the CCDB for given timestamp
/// \brief Find FEE DCS data in the CCDB for given timestamp
/// \param timestamp Timestamp used in query
/// \param metadata Additional metadata to be used in the query
/// \throw ObjectNotFoundException if object is not found for the given timestamp
/// \throw TypeMismatchException if object is present but type is different (CCDB corrupted)
TriggerDCS* readTriggerDCSData(ULong_t timestamp, const std::map<std::string, std::string>& metadata);
FeeDCS* readFeeDCSData(ULong_t timestamp, const std::map<std::string, std::string>& metadata);

/// \brief Store Temperature Sensor data in the CCDB
/// \param dcs Temperature Sensor data to be stored
/// \param metadata Additional metadata that can be used in the query
/// \param timestart Start of the time range of the validity of the object
/// \param timeend End of the time range of the validity of the object
void storeTemperatureSensorData(ElmbData* dcs, const std::map<std::string, std::string>& metadata, ULong_t timestart, ULong_t timeend);

/// \brief Find Temperature Sensor data in the CCDB for given timestamp
/// \param timestamp Timestamp used in query
/// \param metadata Additional metadata to be used in the query
/// \throw ObjectNotFoundException if object is not found for the given timestamp
/// \throw TypeMismatchException if object is present but type is different (CCDB corrupted)
ElmbData* readTemperatureSensorData(ULong_t timestamp, const std::map<std::string, std::string>& metadata);

/// \brief Set new CCDB server URL
/// \param server Name of the CCDB server to be used in queries
Expand Down Expand Up @@ -306,9 +321,13 @@ class CalibDB
/// \return Path of the gain calibration in the CCDB
static const char* getCDBPathGainCalibrationParams() { return "EMC/Calib/GainCalibFactors"; }

/// \brief Get CDB path for the trigger DCS settings
/// \return Path of the trigger DCS settings in the CCDB
static const char* getCDBPathTriggerDCS() { return "EMC/Calib/TriggerDCS"; }
/// \brief Get CDB path for the FEE DCS settings
/// \return Path of the FEE DCS settings in the CCDB
static const char* getCDBPathFeeDCS() { return "EMC/Calib/FeeDCS"; }

/// \brief Get CDB path for the Temperature Sensor data
/// \return Path of the Temperature Sensor data in the CCDB
static const char* getCDBPathTemperatureSensor() { return "EMC/Calib/Temperature"; }

private:
/// \brief Initialize CCDB server (when new object is created or the server URL changes)
Expand Down
5 changes: 4 additions & 1 deletion Detectors/EMCAL/calib/include/EMCALCalib/FeeDCS.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class FeeDCS
unsigned int getSRUFWversion(int ism = 0) const { return mSRUFWversion.at(ism); }
unsigned int getSRUconfig(int ism = 0) const { return mSRUcfg.at(ism); }
int getNSRUbuffers(int ism = 0) const { return (mSRUcfg.at(ism) >> 1 & 0x7); }
int getRunNumber() const { return mRunNumber; }

void setTRUDCS(Int_t iTRU, o2::emcal::TriggerTRUDCS tru) { mTrigDCS.setTRU(iTRU, tru); }
void setSTUEMCal(o2::emcal::TriggerSTUDCS stu) { mTrigDCS.setSTUEMCal(stu); }
Expand All @@ -63,13 +64,15 @@ class FeeDCS
void setDDLlist1(unsigned int a) { mLinks1 = std::bitset<14>(a); }
void setSRUFWversion(int ism, unsigned int ver) { mSRUFWversion.at(ism) = ver; }
void setSRUconfig(int ism, unsigned int ver) { mSRUcfg.at(ism) = ver; }
void setRunNumber(int rn) { mRunNumber = rn; }

bool isDDLactive(int iDDL) { return (iDDL < 32 ? mLinks0.test(iDDL) : mLinks1.test(iDDL - 32)); }
bool isSMactive(int iSM);
bool isEMCalSTUactive() { return mLinks1.test(12); } // EMCAL STU FEEID is 44
bool isDCalSTUactive() { return mLinks1.test(13); } // EMCAL STU FEEID is 45

private:
int mRunNumber = 0; ///< Run Number
o2::emcal::TriggerDCS mTrigDCS; ///< TRU and STU config
std::bitset<32> mLinks0; ///< info on first 32 DDLs included in RO, 1 means the DDL is active
std::bitset<14> mLinks1; ///< info on remining 14 DDLs included in RO, 1 means the DDL is active
Expand All @@ -84,4 +87,4 @@ std::ostream& operator<<(std::ostream& in, const FeeDCS& dcs);
} // namespace emcal

} // namespace o2
#endif
#endif
124 changes: 0 additions & 124 deletions Detectors/EMCAL/calib/macros/TriggerDCS_CCDBApiTest.C

This file was deleted.

131 changes: 0 additions & 131 deletions Detectors/EMCAL/calib/macros/TriggerDCS_CalibDBTest.C

This file was deleted.

Loading