1 #ifndef CONDCORE_RUNINFOPLUGINS_RUNINFOPAYLOADINSPECTORHELPER_H 2 #define CONDCORE_RUNINFOPLUGINS_RUNINFOPAYLOADINSPECTORHELPER_H 10 #include "TPaveText.h" 17 #define MK_P(a, b) std::make_pair(a, b) 24 constexpr std::array<int, 7>
nominalCurrents{{-1, 0, 9558, 14416, 16819, 18268, 19262}};
25 constexpr std::array<float, 7>
nominalFields{{3.8, 0., 2., 3., 3.5, 3.8, 4.}};
59 time_t start_time =
payload->m_start_time_ll;
61 time_t end_time =
payload->m_stop_time_ll;
63 return difftime(end_time, start_time) / 1.0e+6;
68 const time_t start_time =
payload->m_start_time_ll / 1.0e+6;
69 return std::asctime(std::gmtime(&start_time));
74 const time_t end_time =
payload->m_stop_time_ll / 1.0e+6;
75 return std::asctime(std::gmtime(&end_time));
88 return "start current [A]";
90 return "stop current [A]";
92 return "average current [A]";
94 return "max current [A]";
96 return "min current [A]";
98 return "run duration [s]";
102 return "B-field intensity [T]";
104 return "should never be here";
114 for (
int i = 0;
i < 20;
i++) {
116 rgb[
i][0] = 0.80 + 0.01 *
i;
117 rgb[
i][1] = 0.00 + 0.03 *
i;
120 rgb[
i][0] = 0.80 + 0.01 *
i;
121 rgb[
i][1] = 0.00 + 0.03 *
i + 0.15 + 0.10 * (
i - 17);
123 }
else if (
i == 19) {
131 gStyle->SetPalette(20, pcol);
134 obj->SetMinimum(-1.
e-15);
135 obj->SetMaximum(+1.0);
136 obj->SetOption(
"colz");
159 using FEDMAP_T = std::map<RunInfoPI::DET, std::pair<int, int> >;
FEDMAP_T buildFEDBounds()
void reportSummaryMapPalette(TH2 *obj)
float runDuration(const std::shared_ptr< RunInfo > &payload)
std::string runEndTime(const std::shared_ptr< RunInfo > &payload)
std::map< RunInfoPI::DET, std::pair< int, int > > FEDMAP_T
std::string getStringFromTypeEnum(const parameters ¶meter)
constexpr std::array< float, 7 > nominalFields
float theBField(const float current)
constexpr std::array< int, 7 > nominalCurrents
std::string runStartTime(const std::shared_ptr< RunInfo > &payload)
def rgb(r, g, b, maximum=1.)