Jpp  15.0.3
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JRunQuality.hh
Go to the documentation of this file.
1 #ifndef __JDB_JRUNQUALITY__
2 #define __JDB_JRUNQUALITY__
3 
4 #include <TROOT.h>
5 #include <TObject.h>
6 
7 #include <string>
8 #include <istream>
9 
11 
12 /**
13  * \author mdejong
14  */
15 namespace JDATABASE {}
16 namespace JPP { using namespace JDATABASE; }
17 
18 namespace KM3NeT {
19  namespace DB {
20  class ResultSet;
21  }
22 }
23 
24 namespace JDATABASE {
25 
26  using KM3NeT::DB::ResultSet;
27 
28  /**
29  * Auxiliary data structure for data quality.
30  *
31  * For ASCII I/O, the number, order and type of the data members of this data structure
32  * should be compatible with the output of the script JQAQC.sh.
33  */
34  struct JRunQuality :
35  public TObject
36  {
37  static const char* const getName() { return JRunSummaryNumbers::getName(); } //!< Table name
38 
39  struct JPrescaler :
40  public TObject
41  {
43  prescale(0)
44  {}
45 
46  int prescale;
47 
48  ClassDef(JPrescaler, 1);
49  };
50 
51  struct JEnabled :
52  public TObject
53  {
55  enabled(0)
56  {}
57 
58  int enabled;
59 
60  ClassDef(JEnabled, 1);
61  };
62 
63 
65  GIT(),
66  UUID(),
67  detector(0),
68  run(0),
69  livetime_s(0.0),
70  UTCMin_s(0.0),
71  UTCMax_s(0.0),
72  trigger3DMuon(),
75  triggerNB(),
76  writeL0(),
77  writeL1(),
78  writeL2(),
79  writeSN(),
80  JDAQTimeslice(0),
81  JDAQTimesliceL0(0),
82  JDAQTimesliceL1(0),
83  JDAQTimesliceL2(0),
84  JDAQTimesliceSN(0),
86  JDAQEvent(0),
90  JTrigger3DMuon(0),
91  JTriggerNB(0),
92  in_sync(0),
93  out_sync(0),
94  DAQ(0.0),
95  WR(0.0),
96  HRV(0.0),
97  FIFO(0.0),
98  PMTs(0.0),
99  MEAN_Rate_Hz(0.0),
100  RMS_Rate_Hz(0.0),
101  Acoustics(0),
102  AHRS(0.0),
103  name(),
104  value(0.0)
105  {}
106 
107  /**
108  * Put value at given key.
109  *
110  * \param key key
111  * \param value value
112  */
113  void put(const std::string& key,
114  const std::string& value);
115 
116 
117  std::string GIT; ///< GIT version used to write QA/QC data
118  std::string UUID; ///< UUID of raw data file
119  int detector; ///< detector identifier
120  int run; ///< run number
121  double livetime_s; ///< livetime of data takig run (as determined from KM3NETDAQ::JDAQSummaryslice data)
122  double UTCMin_s; ///< minimal UTC time (from "runs" table)
123  double UTCMax_s; ///< maximal UTC time (from "runs" table)
124  JEnabled trigger3DMuon; ///< enable (1) or disable (0) of 3D-muon trigger
125  JEnabled trigger3DShower; ///< enable (1) or disable (0) of 3D-shower trigger
126  JEnabled triggerMXShower; ///< enable (1) or disable (0) of L1/L0 mixed trigger
127  JEnabled triggerNB; ///< enable (1) or disable (0) of nano-beacon trigger
128  JPrescaler writeL0; ///< pre-scaling of L0 data (0 implies off)
129  JPrescaler writeL1; ///< pre-scaling of L1 data (0 implies off)
130  JPrescaler writeL2; ///< pre-scaling of L2 data (0 implies off)
131  JPrescaler writeSN; ///< pre-scaling of Supernova data (0 implies off)
132  int JDAQTimeslice; ///< number of timeslices (reserved for rejected data)
133  int JDAQTimesliceL0; ///< number of L0 timeslices
134  int JDAQTimesliceL1; ///< number of L1 timeslices
135  int JDAQTimesliceL2; ///< number of L2 timeslices
136  int JDAQTimesliceSN; ///< number of Supernova timeslices
137  int JDAQSummaryslice; ///< number of summary slices
138  int JDAQEvent; ///< number of events
139  int JTriggerReprocessor; ///< number of events following re-triggering of the data (see JTriggerReprocessor.cc)
140  int JTrigger3DShower; ///< number of 3D-muon triggers (see JTriggerMonitor.cc)
141  int JTriggerMXShower; ///< number of 3D-shower triggers (see JTriggerMonitor.cc)
142  int JTrigger3DMuon; ///< number of L1/L0 mixed triggers (see JTriggerMonitor.cc)
143  int JTriggerNB; ///< number of nano-beacon triggers (see JTriggerMonitor.cc)
144  int in_sync; ///< number of modules in synchronisation with master clock (see JTurbot.cc)
145  int out_sync; ///< number of modules out of synchronisation with master clock (see JTurbot.cc)
146  double DAQ; ///< fraction of data frames with correct DAQ status (see JSummaryMonitor.cc)
147  double WR; ///< fraction of data frames with correct White Rabbit status (see JSummaryMonitor.cc)
148  double HRV; ///< fraction of PMTs with high-rate veto (see JSummaryMonitor.cc)
149  double FIFO; ///< fraction of PMTs with FIFO (almost) full (see JSummaryMonitor.cc)
150  double PMTs; ///< number of PMTs with valid data (see JSummaryMonitor.cc)
151  double MEAN_Rate_Hz; ///< mean rate from PMTs with valid data (see JSummaryMonitor.cc)
152  double RMS_Rate_Hz; ///< RMS of rate from PMTs with valid data (see JSummaryMonitor.cc)
153  int Acoustics; ///< number of acoustic events (see JAcousticsEventBuilder.cc)
154  double AHRS; ///< number of compass measurements (see software/JCompass/JAHRSMonitor.cc)
155  std::string name; ///< setup name (see JRunsetups)
156  double value; ///< setup identifier (see JRunsetups)
157 
158  ClassDef(JRunQuality, 3);
159  };
160 
161 
162  /**
163  * Less-than operator.
164  *
165  * \param first first run quality
166  * \param second second run quality
167  * \return true if first run quality less than second; else false
168  */
169  inline bool operator<(const JRunQuality& first,
170  const JRunQuality& second)
171  {
172  if (first.detector == second.detector)
173  return first.run < second.run;
174  else
175  return first.detector < second.detector;
176  }
177 }
178 
179 #endif
int JDAQTimeslice
number of timeslices (reserved for rejected data)
Definition: JRunQuality.hh:132
int out_sync
number of modules out of synchronisation with master clock (see JTurbot.cc)
Definition: JRunQuality.hh:145
JEnabled trigger3DMuon
enable (1) or disable (0) of 3D-muon trigger
Definition: JRunQuality.hh:124
int JDAQTimesliceL1
number of L1 timeslices
Definition: JRunQuality.hh:134
int detector
detector identifier
Definition: JRunQuality.hh:119
double PMTs
number of PMTs with valid data (see JSummaryMonitor.cc)
Definition: JRunQuality.hh:150
bool operator<(const Head &first, const Head &second)
Less than operator.
Definition: JHead.hh:1678
int JTriggerMXShower
number of 3D-shower triggers (see JTriggerMonitor.cc)
Definition: JRunQuality.hh:141
int JTriggerReprocessor
number of events following re-triggering of the data (see JTriggerReprocessor.cc) ...
Definition: JRunQuality.hh:139
JPrescaler writeL0
pre-scaling of L0 data (0 implies off)
Definition: JRunQuality.hh:128
double WR
fraction of data frames with correct White Rabbit status (see JSummaryMonitor.cc) ...
Definition: JRunQuality.hh:147
Definition: JRoot.hh:19
int JTriggerNB
number of nano-beacon triggers (see JTriggerMonitor.cc)
Definition: JRunQuality.hh:143
JPrescaler writeL2
pre-scaling of L2 data (0 implies off)
Definition: JRunQuality.hh:130
JEnabled triggerMXShower
enable (1) or disable (0) of L1/L0 mixed trigger
Definition: JRunQuality.hh:126
int JTrigger3DShower
number of 3D-muon triggers (see JTriggerMonitor.cc)
Definition: JRunQuality.hh:140
static const char *const getName()
Table name.
Definition: JRunQuality.hh:37
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
JPrescaler writeSN
pre-scaling of Supernova data (0 implies off)
Definition: JRunQuality.hh:131
int Acoustics
number of acoustic events (see JAcousticsEventBuilder.cc)
Definition: JRunQuality.hh:153
int run
run number
Definition: JRunQuality.hh:120
std::string name
setup name (see JRunsetups)
Definition: JRunQuality.hh:155
double FIFO
fraction of PMTs with FIFO (almost) full (see JSummaryMonitor.cc)
Definition: JRunQuality.hh:149
int JDAQEvent
number of events
Definition: JRunQuality.hh:138
JEnabled triggerNB
enable (1) or disable (0) of nano-beacon trigger
Definition: JRunQuality.hh:127
double AHRS
number of compass measurements (see software/JCompass/JAHRSMonitor.cc)
Definition: JRunQuality.hh:154
int JDAQTimesliceSN
number of Supernova timeslices
Definition: JRunQuality.hh:136
void put(const std::string &key, const std::string &value)
Put value at given key.
Definition: JRunQuality.cc:25
double DAQ
fraction of data frames with correct DAQ status (see JSummaryMonitor.cc)
Definition: JRunQuality.hh:146
double livetime_s
livetime of data takig run (as determined from KM3NETDAQ::JDAQSummaryslice data)
Definition: JRunQuality.hh:121
double MEAN_Rate_Hz
mean rate from PMTs with valid data (see JSummaryMonitor.cc)
Definition: JRunQuality.hh:151
then for DETECTOR in Antares KM3NeT
Definition: JMultiPMT.sh:45
int JTrigger3DMuon
number of L1/L0 mixed triggers (see JTriggerMonitor.cc)
Definition: JRunQuality.hh:142
JEnabled trigger3DShower
enable (1) or disable (0) of 3D-shower trigger
Definition: JRunQuality.hh:125
double HRV
fraction of PMTs with high-rate veto (see JSummaryMonitor.cc)
Definition: JRunQuality.hh:148
int JDAQTimesliceL0
number of L0 timeslices
Definition: JRunQuality.hh:133
int JDAQSummaryslice
number of summary slices
Definition: JRunQuality.hh:137
double UTCMin_s
minimal UTC time (from &quot;runs&quot; table)
Definition: JRunQuality.hh:122
std::string GIT
GIT version used to write QA/QC data.
Definition: JRunQuality.hh:117
JPrescaler writeL1
pre-scaling of L1 data (0 implies off)
Definition: JRunQuality.hh:129
ClassDef(JRunQuality, 3)
double UTCMax_s
maximal UTC time (from &quot;runs&quot; table)
Definition: JRunQuality.hh:123
double RMS_Rate_Hz
RMS of rate from PMTs with valid data (see JSummaryMonitor.cc)
Definition: JRunQuality.hh:152
static const char *const getName()
Table name.
int in_sync
number of modules in synchronisation with master clock (see JTurbot.cc)
Definition: JRunQuality.hh:144
std::string UUID
UUID of raw data file.
Definition: JRunQuality.hh:118
Auxiliary data structure for data quality.
Definition: JRunQuality.hh:34
int JDAQTimesliceL2
number of L2 timeslices
Definition: JRunQuality.hh:135
double value
setup identifier (see JRunsetups)
Definition: JRunQuality.hh:156