Jpp  19.0.0
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  JPP("?"),
67  nb_of_meta(0),
68  UUID("?"),
69  detector(0),
70  run(0),
71  livetime_s(0.0),
72  UTCMin_s(0.0),
73  UTCMax_s(0.0),
74  trigger3DMuon(),
77  triggerNB(),
78  writeL0(),
79  writeL1(),
80  writeL2(),
81  writeSN(),
82  JDAQTimeslice(0),
83  JDAQTimesliceL0(0),
84  JDAQTimesliceL1(0),
85  JDAQTimesliceL2(0),
86  JDAQTimesliceSN(0),
88  JDAQEvent(0),
92  JTrigger3DMuon(0),
93  JTriggerNB(0),
94  in_sync(0),
95  out_sync(0),
96  DAQ(0.0),
97  WR(0.0),
98  HRV(0.0),
99  FIFO(0.0),
100  PMTs(0.0),
101  MEAN_Rate_Hz(0.0),
102  RMS_Rate_Hz(0.0),
105  Acoustics(0),
106  AHRS(0.0),
107  name("?"),
108  value(0.0),
109  in_usync(0),
110  out_usync(0),
111  event_duration(0.0)
112  {}
113 
114  /**
115  * Constructor.
116  *
117  * \param ID detector identifier
118  * \param run run number
119  */
120  JRunQuality(const int ID,
121  const int run) :
122  JRunQuality()
123  {
124  this->detector = ID;
125  this->run = run;
126  }
127 
128  /**
129  * Put value at given key.
130  *
131  * \param key key
132  * \param value value
133  */
134  void put(const std::string& key,
135  const std::string& value);
136 
137 
138  std::string GIT; ///< GIT version used to write QA/QC data
139  std::string JPP; ///< Jpp version used to take data (see JPrintMeta.cc)
140  int nb_of_meta; ///< Number of JMeta objects (see JPrintMeta.cc)
141  std::string UUID; ///< UUID of raw data file
142  int detector; ///< detector identifier
143  int run; ///< run number
144  double livetime_s; ///< livetime of data takig run (as determined from KM3NETDAQ::JDAQSummaryslice data)
145  double UTCMin_s; ///< minimal UTC time (from "runs" table)
146  double UTCMax_s; ///< maximal UTC time (from "runs" table)
147  JEnabled trigger3DMuon; ///< enable (1) or disable (0) of 3D-muon trigger
148  JEnabled trigger3DShower; ///< enable (1) or disable (0) of 3D-shower trigger
149  JEnabled triggerMXShower; ///< enable (1) or disable (0) of L1/L0 mixed trigger
150  JEnabled triggerNB; ///< enable (1) or disable (0) of nano-beacon trigger
151  JPrescaler writeL0; ///< pre-scaling of L0 data (0 implies off)
152  JPrescaler writeL1; ///< pre-scaling of L1 data (0 implies off)
153  JPrescaler writeL2; ///< pre-scaling of L2 data (0 implies off)
154  JPrescaler writeSN; ///< pre-scaling of Supernova data (0 implies off)
155  int JDAQTimeslice; ///< number of timeslices (reserved for rejected data)
156  int JDAQTimesliceL0; ///< number of L0 timeslices
157  int JDAQTimesliceL1; ///< number of L1 timeslices
158  int JDAQTimesliceL2; ///< number of L2 timeslices
159  int JDAQTimesliceSN; ///< number of Supernova timeslices
160  int JDAQSummaryslice; ///< number of summary slices
161  int JDAQEvent; ///< number of events
162  int JTriggerReprocessor; ///< number of events following re-triggering of the data (see JTriggerReprocessor.cc)
163  int JTrigger3DShower; ///< number of 3D-muon triggers (see JTriggerMonitor.cc)
164  int JTriggerMXShower; ///< number of 3D-shower triggers (see JTriggerMonitor.cc)
165  int JTrigger3DMuon; ///< number of L1/L0 mixed triggers (see JTriggerMonitor.cc)
166  int JTriggerNB; ///< number of nano-beacon triggers (see JTriggerMonitor.cc)
167  int in_sync; ///< number of modules in synchronisation with master clock (see JTurbot.cc)
168  int out_sync; ///< number of modules out of synchronisation with master clock (see JTurbot.cc)
169  double DAQ; ///< fraction of data frames with correct DAQ status (see JSummaryMonitor.cc)
170  double WR; ///< fraction of data frames with correct White Rabbit status (see JSummaryMonitor.cc)
171  double HRV; ///< fraction of PMTs with high-rate veto (see JSummaryMonitor.cc)
172  double FIFO; ///< fraction of PMTs with FIFO (almost) full (see JSummaryMonitor.cc)
173  double PMTs; ///< average number of PMTs with valid data (see JSummaryMonitor.cc)
174  double MEAN_Rate_Hz; ///< mean rate from PMTs with valid data (see JSummaryMonitor.cc)
175  double RMS_Rate_Hz; ///< RMS of rate from PMTs with valid data (see JSummaryMonitor.cc)
176  int hrv_fifo_failures; ///< Number of PMT/timeslices with a rate > 50 kHz (after veto filter) (see JSummaryMonitor.cc)
177  int duplic_timeslices; ///< Number of duplicated timeslices (see JSummaryMonitor.cc)
178  int Acoustics; ///< number of acoustic events (see JAcousticsEventBuilder.cc)
179  double AHRS; ///< number of compass measurements (see software/JCompass/JAHRSMonitor.cc)
180  std::string name; ///< setup name (see JRunsetups)
181  double value; ///< setup identifier (see JRunsetups)
182  int in_usync; ///< number of modules in micro-synchronisation with master clock (see JSquid.cc)
183  int out_usync; ///< number of modules out of micro-synchronisation with master clock (see JSquid.cc)
184  int event_duration; ///< number of events with event duration exceeding preset value (see JMermaid.cc)
185 
186  ClassDef(JRunQuality, 4);
187  };
188 
189 
190  /**
191  * Less-than operator.
192  *
193  * \param first first run quality
194  * \param second second run quality
195  * \return true if first run quality less than second; else false
196  */
197  inline bool operator<(const JRunQuality& first,
198  const JRunQuality& second)
199  {
200  if (first.detector == second.detector)
201  return first.run < second.run;
202  else
203  return first.detector < second.detector;
204  }
205 }
206 
207 #endif
int JDAQTimeslice
number of timeslices (reserved for rejected data)
Definition: JRunQuality.hh:155
int out_sync
number of modules out of synchronisation with master clock (see JTurbot.cc)
Definition: JRunQuality.hh:168
int hrv_fifo_failures
Number of PMT/timeslices with a rate &gt; 50 kHz (after veto filter) (see JSummaryMonitor.cc)
Definition: JRunQuality.hh:176
JEnabled trigger3DMuon
enable (1) or disable (0) of 3D-muon trigger
Definition: JRunQuality.hh:147
int JDAQTimesliceL1
number of L1 timeslices
Definition: JRunQuality.hh:157
int detector
detector identifier
Definition: JRunQuality.hh:142
double PMTs
average number of PMTs with valid data (see JSummaryMonitor.cc)
Definition: JRunQuality.hh:173
bool operator<(const Head &first, const Head &second)
Less than operator.
Definition: JHead.hh:1817
int JTriggerMXShower
number of 3D-shower triggers (see JTriggerMonitor.cc)
Definition: JRunQuality.hh:164
int JTriggerReprocessor
number of events following re-triggering of the data (see JTriggerReprocessor.cc) ...
Definition: JRunQuality.hh:162
JPrescaler writeL0
pre-scaling of L0 data (0 implies off)
Definition: JRunQuality.hh:151
double WR
fraction of data frames with correct White Rabbit status (see JSummaryMonitor.cc) ...
Definition: JRunQuality.hh:170
Definition: JRoot.hh:19
int JTriggerNB
number of nano-beacon triggers (see JTriggerMonitor.cc)
Definition: JRunQuality.hh:166
JPrescaler writeL2
pre-scaling of L2 data (0 implies off)
Definition: JRunQuality.hh:153
JEnabled triggerMXShower
enable (1) or disable (0) of L1/L0 mixed trigger
Definition: JRunQuality.hh:149
int JTrigger3DShower
number of 3D-muon triggers (see JTriggerMonitor.cc)
Definition: JRunQuality.hh:163
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:154
int Acoustics
number of acoustic events (see JAcousticsEventBuilder.cc)
Definition: JRunQuality.hh:178
int event_duration
number of events with event duration exceeding preset value (see JMermaid.cc)
Definition: JRunQuality.hh:184
int run
run number
Definition: JRunQuality.hh:143
std::string name
setup name (see JRunsetups)
Definition: JRunQuality.hh:180
double FIFO
fraction of PMTs with FIFO (almost) full (see JSummaryMonitor.cc)
Definition: JRunQuality.hh:172
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DETECTOR $JPP_DATA km3net_reference detx set_variable NUMBER_OF_STRINGS set_variable ID if do_usage *then usage $script[detector file[identifier]] fi case set_variable ID
Definition: JDetector.sh:24
int JDAQEvent
number of events
Definition: JRunQuality.hh:161
JEnabled triggerNB
enable (1) or disable (0) of nano-beacon trigger
Definition: JRunQuality.hh:150
double AHRS
number of compass measurements (see software/JCompass/JAHRSMonitor.cc)
Definition: JRunQuality.hh:179
int JDAQTimesliceSN
number of Supernova timeslices
Definition: JRunQuality.hh:159
std::string JPP
Jpp version used to take data (see JPrintMeta.cc)
Definition: JRunQuality.hh:139
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:169
JRunQuality(const int ID, const int run)
Constructor.
Definition: JRunQuality.hh:120
double livetime_s
livetime of data takig run (as determined from KM3NETDAQ::JDAQSummaryslice data)
Definition: JRunQuality.hh:144
double MEAN_Rate_Hz
mean rate from PMTs with valid data (see JSummaryMonitor.cc)
Definition: JRunQuality.hh:174
int JTrigger3DMuon
number of L1/L0 mixed triggers (see JTriggerMonitor.cc)
Definition: JRunQuality.hh:165
JEnabled trigger3DShower
enable (1) or disable (0) of 3D-shower trigger
Definition: JRunQuality.hh:148
double HRV
fraction of PMTs with high-rate veto (see JSummaryMonitor.cc)
Definition: JRunQuality.hh:171
int JDAQTimesliceL0
number of L0 timeslices
Definition: JRunQuality.hh:156
int JDAQSummaryslice
number of summary slices
Definition: JRunQuality.hh:160
int duplic_timeslices
Number of duplicated timeslices (see JSummaryMonitor.cc)
Definition: JRunQuality.hh:177
double UTCMin_s
minimal UTC time (from &quot;runs&quot; table)
Definition: JRunQuality.hh:145
std::string GIT
GIT version used to write QA/QC data.
Definition: JRunQuality.hh:138
JPrescaler writeL1
pre-scaling of L1 data (0 implies off)
Definition: JRunQuality.hh:152
ClassDef(JRunQuality, 4)
int in_usync
number of modules in micro-synchronisation with master clock (see JSquid.cc)
Definition: JRunQuality.hh:182
double UTCMax_s
maximal UTC time (from &quot;runs&quot; table)
Definition: JRunQuality.hh:146
double RMS_Rate_Hz
RMS of rate from PMTs with valid data (see JSummaryMonitor.cc)
Definition: JRunQuality.hh:175
int nb_of_meta
Number of JMeta objects (see JPrintMeta.cc)
Definition: JRunQuality.hh:140
static const char *const getName()
Table name.
int out_usync
number of modules out of micro-synchronisation with master clock (see JSquid.cc)
Definition: JRunQuality.hh:183
int in_sync
number of modules in synchronisation with master clock (see JTurbot.cc)
Definition: JRunQuality.hh:167
std::string UUID
UUID of raw data file.
Definition: JRunQuality.hh:141
Auxiliary data structure for data quality.
Definition: JRunQuality.hh:34
int JDAQTimesliceL2
number of L2 timeslices
Definition: JRunQuality.hh:158
double value
setup identifier (see JRunsetups)
Definition: JRunQuality.hh:181