11 {
"mod_2",
"vmon_1"}, {
"mod_2",
"vmon_2"}, {
"mod_2",
"vmon_3"}, {
"mod_2",
"vmon_4"}, {
"mod_2",
"vmon_5"},
12 {
"mod_2",
"vmon_6"}, {
"mod_2",
"vmon_7"}, {
"mod_0",
"vmon_1"}, {
"mod_0",
"vmon_2"}, {
"mod_0",
"vmon_3"},
13 {
"mod_0",
"vmon_4"}, {
"mod_0",
"vmon_5"}, {
"mod_0",
"vmon_6"}, {
"mod_0",
"vmon_7"}};
15void tango_gem_trip(
int period = 6,
int run = 1529,
bool isShowOnlyTrip =
false)
19 if (pRun ==
nullptr) {
20 cout <<
"Macro finished with errors: no experimental run was found for period = " << period <<
", run = " << run
27 if (endDate ==
nullptr) {
28 cout <<
"Macro finished with errors: no end datetime in the database for period = " << period
29 <<
", run = " << run << endl;
39 const char* detector_name =
"gem";
40 vector<TangoData*> vecTangoData;
46 current_channel.second, current_channel.first);
47 vecTangoData.push_back(db_tango);
49 cout <<
"Macro finished with errors" << endl;
59 for (
const auto& tango_data : vecTangoData)
66 cout <<
"Period " << period <<
" is not supported" << endl;
71 const char* detector_name =
"gem";
72 const char* parameter_name =
"trip";
73 vector<int>* map_channel =
nullptr;
86 cout <<
"Macro finished with errors: no channel map was found for the period " << period << endl;
91 bool condition_value = 1;
93 TangoData db_tango(strStartDate.
Data(), strEndDate.
Data(), detector_name, parameter_name);
95 cout <<
"Macro finished with errors" << endl;
103 if (tango_intervals ==
nullptr) {
104 cout <<
"Macro finished with errors" << endl;
109 cout <<
"Information on " << parameter_name <<
" parameter for " << detector_name <<
" (period = " << period
110 <<
", run = " << run <<
"):" << endl;
114 delete tango_intervals;
125 for (
int i = 0;
i < run_count;
i++)
126 tango_gem_trip(run_numbers[
i].period_number, run_numbers[
i].run_number, isShowOnlyTrip);
128 cout <<
"Macro finished successfully" << endl;
const char * AsSQLString() const
const char * Data() const
TObjArray * SearchTangoIntervals(enumConditions condition=conditionEqual, double value=1, std::vector< int > *mapChannel=nullptr)
Function SearchTangoIntervals gets time intervals for defined condition on the parameter values (e....
static void PrintTangoArrayConsole(std::vector< TangoData * > vecTangoData)
TObjArray * GetTangoData()
static int PrintTangoArrayMultiGraph(std::vector< TangoData * > vecTangoData, const char *y_axis="parameter", bool is3D=false)
void PrintTangoIntervalConsole(TObjArray *tango_intervals, TString channel_name="Channel", bool isShowOnlyExists=false)
Function displays (in console) time intervals obtained from Tango for a defined condition Parameters:...
static int GetRunNumbers(UniqueRunNumber *&run_numbers, int period_number)
get numbers of runs existing in the Database for a selected period
UniRun.h Class for the table: run_.
static UniRun * GetRun(int period_number, int run_number)
get run from the database
TDatime * GetEndDatetime()
get end datetime of the current run
TDatime GetStartDatetime()
get start datetime of the current run
vector< pair< const char *, const char * > > map_channel_run8
vector< int > map_channel_run6_a1529
vector< int > map_channel_run5
void tango_gem_trip(int period=6, int run=1529, bool isShowOnlyTrip=false)
vector< int > map_channel_run6_b1529