Skip to content

Commit b94e9dc

Browse files
authored
[EMCAL-556] minor improvements in EMCAL DCS DP processing (#8941)
1 parent 2c56fab commit b94e9dc

12 files changed

Lines changed: 121 additions & 313 deletions

File tree

Detectors/EMCAL/calib/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,5 @@ o2_add_test_root_macro(macros/GainCalibrationFactors_CalibDBTest.C
155155
PUBLIC_LINK_LIBRARIES O2::EMCALCalib
156156
LABELS emcal COMPILE_ONLY)
157157

158-
o2_add_test_root_macro(macros/TriggerDCS_CCDBApiTest.C
159-
PUBLIC_LINK_LIBRARIES O2::EMCALCalib
160-
LABELS emcal COMPILE_ONLY)
161-
162-
o2_add_test_root_macro(macros/TriggerDCS_CalibDBTest.C
163-
PUBLIC_LINK_LIBRARIES O2::EMCALCalib
164-
LABELS emcal COMPILE_ONLY)
165-
166158
o2_data_file(COPY files DESTINATION Detectors/EMC)
167159

Detectors/EMCAL/calib/include/EMCALCalib/CalibDB.h

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ class TempCalibParamSM;
2727
class TimeCalibrationParams;
2828
class TimeCalibParamL1Phase;
2929
class GainCalibrationFactors;
30-
class TriggerDCS;
30+
class FeeDCS;
31+
class ElmbData;
3132

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

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

266-
/// \brief Find trigger DCS data in the CCDB for given timestamp
267+
/// \brief Find FEE DCS data in the CCDB for given timestamp
267268
/// \param timestamp Timestamp used in query
268269
/// \param metadata Additional metadata to be used in the query
269270
/// \throw ObjectNotFoundException if object is not found for the given timestamp
270271
/// \throw TypeMismatchException if object is present but type is different (CCDB corrupted)
271-
TriggerDCS* readTriggerDCSData(ULong_t timestamp, const std::map<std::string, std::string>& metadata);
272+
FeeDCS* readFeeDCSData(ULong_t timestamp, const std::map<std::string, std::string>& metadata);
273+
274+
/// \brief Store Temperature Sensor data in the CCDB
275+
/// \param dcs Temperature Sensor data to be stored
276+
/// \param metadata Additional metadata that can be used in the query
277+
/// \param timestart Start of the time range of the validity of the object
278+
/// \param timeend End of the time range of the validity of the object
279+
void storeTemperatureSensorData(ElmbData* dcs, const std::map<std::string, std::string>& metadata, ULong_t timestart, ULong_t timeend);
280+
281+
/// \brief Find Temperature Sensor data in the CCDB for given timestamp
282+
/// \param timestamp Timestamp used in query
283+
/// \param metadata Additional metadata to be used in the query
284+
/// \throw ObjectNotFoundException if object is not found for the given timestamp
285+
/// \throw TypeMismatchException if object is present but type is different (CCDB corrupted)
286+
ElmbData* readTemperatureSensorData(ULong_t timestamp, const std::map<std::string, std::string>& metadata);
272287

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

309-
/// \brief Get CDB path for the trigger DCS settings
310-
/// \return Path of the trigger DCS settings in the CCDB
311-
static const char* getCDBPathTriggerDCS() { return "EMC/Calib/TriggerDCS"; }
324+
/// \brief Get CDB path for the FEE DCS settings
325+
/// \return Path of the FEE DCS settings in the CCDB
326+
static const char* getCDBPathFeeDCS() { return "EMC/Calib/FeeDCS"; }
327+
328+
/// \brief Get CDB path for the Temperature Sensor data
329+
/// \return Path of the Temperature Sensor data in the CCDB
330+
static const char* getCDBPathTemperatureSensor() { return "EMC/Calib/Temperature"; }
312331

313332
private:
314333
/// \brief Initialize CCDB server (when new object is created or the server URL changes)

Detectors/EMCAL/calib/include/EMCALCalib/FeeDCS.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class FeeDCS
5555
unsigned int getSRUFWversion(int ism = 0) const { return mSRUFWversion.at(ism); }
5656
unsigned int getSRUconfig(int ism = 0) const { return mSRUcfg.at(ism); }
5757
int getNSRUbuffers(int ism = 0) const { return (mSRUcfg.at(ism) >> 1 & 0x7); }
58+
int getRunNumber() const { return mRunNumber; }
5859

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

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

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

8689
} // namespace o2
87-
#endif
90+
#endif

Detectors/EMCAL/calib/macros/TriggerDCS_CCDBApiTest.C

Lines changed: 0 additions & 124 deletions
This file was deleted.

Detectors/EMCAL/calib/macros/TriggerDCS_CalibDBTest.C

Lines changed: 0 additions & 131 deletions
This file was deleted.

0 commit comments

Comments
 (0)