28 if (timestamp < maxRunNr) {
29 LOG(info) <<
"assuming input is run " << timestamp <<
" will convert it to timstamp";
30 auto [sor, eor] = ccdbMgr.getRunDuration(timestamp);
32 timestamp = eor - sixtySec;
33 LOG(info) <<
"set timestamp to " << timestamp;
37 std::map<std::string, std::string> metadata;
43 std::map<unsigned short, float> mapSMTemperature;
44 for (
unsigned short i = 0;
i < mNCells; ++
i) {
46 if (mapSMTemperature.count(iSM) == 0) {
49 float corrFac =
params->getTempCalibParamA0(
i) +
params->getTempCalibParamSlope(
i) * mapSMTemperature[iSM];
50 mGainCalibFactors[
i] = corrFac;
56 if (iSM < 0 || iSM > 20) {
57 LOG(
error) <<
"SM " << iSM <<
"does not exist!";
63 std::vector<float> vecTemperature;
64 for (
const auto& iSensor : vecSensorID) {
66 if (temp < mAcceptedTempRange[0] || temp > mAcceptedTempRange[1]) {
69 vecTemperature.push_back(temp);
72 const unsigned int nEntries = vecTemperature.size();
74 LOG(warning) <<
"No sensor data between " << mAcceptedTempRange[0] <<
" and " << mAcceptedTempRange[1] <<
"degree found... for SM " << iSM <<
" Setting to default 20 degree";
81 std::sort(vecTemperature.begin(), vecTemperature.end());
84 tempSM = (vecTemperature[
nEntries / 2 - 1] + vecTemperature[
nEntries / 2]) / 2.0;
87 tempSM = vecTemperature[
nEntries / 2];
90 float sum = std::accumulate(vecTemperature.begin(), vecTemperature.end(), 0.0);
91 tempSM =
sum / vecTemperature.size();
98 if (cellID >= mNCells) {
99 LOG(
error) <<
"cell ID" << cellID <<
" does not exist";
102 return mGainCalibFactors[cellID];
107 unsigned short nSensors = 8;
108 if (iSM == 10 || iSM == 11 || iSM == 18 || iSM == 19) {
112 std::vector<unsigned short> vecSensorID;
113 for (
unsigned short iELMBSensor = iSM * 8; iELMBSensor < iSM * 8 + nSensors; iELMBSensor++) {
114 vecSensorID.push_back(iELMBSensor);
121 mAcceptedTempRange[0] = low;
122 mAcceptedTempRange[1] = high;
std::vector< double > sum
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
char error[CURL_ERROR_SIZE]
static BasicCCDBManager & instance()
Interface to calibration data from CCDB for EMCAL.
ElmbData * readTemperatureSensorData(ULong_t timestamp, const std::map< std::string, std::string > &metadata)
Find Temperature Sensor data in the CCDB for given timestamp.
float getMean(short iSensor)
Int_t GetSuperModuleNumber(Int_t absId) const
Get cell SM, from absolute ID number.
GLenum const GLfloat * params
GLsizei const GLchar *const * path
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"