Jpp test-rotations-old-533-g2bdbdb559
the software that should make you happy
Loading...
Searching...
No Matches
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 */
15namespace JDATABASE {}
16namespace JPP { using namespace JDATABASE; }
17
18namespace KM3NeT {
19 namespace DB {
20 class ResultSet;
21 }
22}
23
24namespace 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
47
49 };
50
51 struct JEnabled :
52 public TObject
53 {
55 enabled(0)
56 {}
57
59
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),
77 triggerNB(),
78 writeL0(),
79 writeL1(),
80 writeL2(),
81 writeSN(),
88 JDAQEvent(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 zero_AHRS(0),
108 mean_AHRS(0.0),
109 name("?"),
110 value(0.0),
111 in_usync(0),
112 out_usync(0),
113 event_duration(0.0),
114 HV_check(0)
115 {}
116
117 /**
118 * Constructor.
119 *
120 * \param ID detector identifier
121 * \param run run number
122 */
123 JRunQuality(const int ID,
124 const int run) :
126 {
127 this->detector = ID;
128 this->run = run;
129 }
130
131 /**
132 * Put value at given key.
133 *
134 * \param key key
135 * \param value value
136 */
137 void put(const std::string& key,
138 const std::string& value);
139
140
141 std::string GIT; ///< GIT version used to write QA/QC data
142 std::string JPP; ///< Jpp version used to take data (see JPrintMeta.cc)
143 int nb_of_meta; ///< Number of JMeta objects (see JPrintMeta.cc)
144 std::string UUID; ///< UUID of raw data file
145 int detector; ///< detector identifier
146 int run; ///< run number
147 double livetime_s; ///< livetime of data takig run (as determined from KM3NETDAQ::JDAQSummaryslice data)
148 double UTCMin_s; ///< minimal UTC time (from "runs" table)
149 double UTCMax_s; ///< maximal UTC time (from "runs" table)
150 JEnabled trigger3DMuon; ///< enable (1) or disable (0) of 3D-muon trigger
151 JEnabled trigger3DShower; ///< enable (1) or disable (0) of 3D-shower trigger
152 JEnabled triggerMXShower; ///< enable (1) or disable (0) of L1/L0 mixed trigger
153 JEnabled triggerNB; ///< enable (1) or disable (0) of nano-beacon trigger
154 JPrescaler writeL0; ///< pre-scaling of L0 data (0 implies off)
155 JPrescaler writeL1; ///< pre-scaling of L1 data (0 implies off)
156 JPrescaler writeL2; ///< pre-scaling of L2 data (0 implies off)
157 JPrescaler writeSN; ///< pre-scaling of Supernova data (0 implies off)
158 int JDAQTimeslice; ///< number of timeslices (reserved for rejected data)
159 int JDAQTimesliceL0; ///< number of L0 timeslices
160 int JDAQTimesliceL1; ///< number of L1 timeslices
161 int JDAQTimesliceL2; ///< number of L2 timeslices
162 int JDAQTimesliceSN; ///< number of Supernova timeslices
163 int JDAQSummaryslice; ///< number of summary slices
164 int JDAQEvent; ///< number of events
165 int JTriggerReprocessor; ///< number of events following re-triggering of the data (see JTriggerReprocessor.cc)
166 int JTrigger3DShower; ///< number of 3D-muon triggers (see JTriggerMonitor.cc)
167 int JTriggerMXShower; ///< number of 3D-shower triggers (see JTriggerMonitor.cc)
168 int JTrigger3DMuon; ///< number of L1/L0 mixed triggers (see JTriggerMonitor.cc)
169 int JTriggerNB; ///< number of nano-beacon triggers (see JTriggerMonitor.cc)
170 int in_sync; ///< number of modules in synchronisation with master clock (see JTurbot.cc)
171 int out_sync; ///< number of modules out of synchronisation with master clock (see JTurbot.cc)
172 double DAQ; ///< fraction of data frames with correct DAQ status (see JSummaryMonitor.cc)
173 double WR; ///< fraction of data frames with correct White Rabbit status (see JSummaryMonitor.cc)
174 double HRV; ///< fraction of PMTs with high-rate veto (see JSummaryMonitor.cc)
175 double FIFO; ///< fraction of PMTs with FIFO (almost) full (see JSummaryMonitor.cc)
176 double PMTs; ///< average number of PMTs with valid data (see JSummaryMonitor.cc)
177 double MEAN_Rate_Hz; ///< mean rate from PMTs with valid data (see JSummaryMonitor.cc)
178 double RMS_Rate_Hz; ///< RMS of rate from PMTs with valid data (see JSummaryMonitor.cc)
179 int hrv_fifo_failures; ///< Number of PMT/timeslices with a rate > 50 kHz (after veto filter) (see JSummaryMonitor.cc)
180 int duplic_timeslices; ///< Number of duplicated timeslices (see JSummaryMonitor.cc)
181 int Acoustics; ///< number of acoustic events (see JAcousticsEventBuilder.cc)
182 double AHRS; ///< number of compass measurements per working compass (see software/JCompass/JAHRSMonitor.cc)
183 int zero_AHRS; ///< number of non-working compass (see software/JCompass/JAHRSMonitor.cc)
184 double mean_AHRS; ///< mean number of compass measurements per working compass (see software/JCompass/JAHRSMonitor.cc)
185 std::string name; ///< setup name (see JRunsetups)
186 double value; ///< setup identifier (see JRunsetups)
187 int in_usync; ///< number of modules in micro-synchronisation with master clock (see JSquid.cc)
188 int out_usync; ///< number of modules out of micro-synchronisation with master clock (see JSquid.cc)
189 int event_duration; ///< number of events with event duration exceeding preset value (see JMermaid.cc)
190 int HV_check; ///< number of inconsistencies between HV from runsetup and database (see JCheckHV.cc)
191
193 };
194
195
196 /**
197 * Less-than operator.
198 *
199 * \param first first run quality
200 * \param second second run quality
201 * \return true if first run quality less than second; else false
202 */
203 inline bool operator<(const JRunQuality& first,
204 const JRunQuality& second)
205 {
206 if (first.detector == second.detector)
207 return first.run < second.run;
208 else
209 return first.detector < second.detector;
210 }
211}
212
213#endif
Auxiliary classes and methods for database I/O.
Definition JAHRS.hh:14
bool operator<(const JRunQuality &first, const JRunQuality &second)
Less-than operator.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for data quality.
double UTCMin_s
minimal UTC time (from "runs" table)
int nb_of_meta
Number of JMeta objects (see JPrintMeta.cc)
double value
setup identifier (see JRunsetups)
int JTriggerMXShower
number of 3D-shower triggers (see JTriggerMonitor.cc)
double PMTs
average number of PMTs with valid data (see JSummaryMonitor.cc)
int in_usync
number of modules in micro-synchronisation with master clock (see JSquid.cc)
int HV_check
number of inconsistencies between HV from runsetup and database (see JCheckHV.cc)
int JDAQTimesliceSN
number of Supernova timeslices
int Acoustics
number of acoustic events (see JAcousticsEventBuilder.cc)
int duplic_timeslices
Number of duplicated timeslices (see JSummaryMonitor.cc)
JRunQuality(const int ID, const int run)
Constructor.
int hrv_fifo_failures
Number of PMT/timeslices with a rate > 50 kHz (after veto filter) (see JSummaryMonitor....
int out_usync
number of modules out of micro-synchronisation with master clock (see JSquid.cc)
JPrescaler writeSN
pre-scaling of Supernova data (0 implies off)
std::string UUID
UUID of raw data file.
ClassDef(JRunQuality, 5)
int JDAQTimeslice
number of timeslices (reserved for rejected data)
double RMS_Rate_Hz
RMS of rate from PMTs with valid data (see JSummaryMonitor.cc)
double mean_AHRS
mean number of compass measurements per working compass (see software/JCompass/JAHRSMonitor....
int JDAQEvent
number of events
int JTriggerReprocessor
number of events following re-triggering of the data (see JTriggerReprocessor.cc)
void put(const std::string &key, const std::string &value)
Put value at given key.
int JTriggerNB
number of nano-beacon triggers (see JTriggerMonitor.cc)
int in_sync
number of modules in synchronisation with master clock (see JTurbot.cc)
int event_duration
number of events with event duration exceeding preset value (see JMermaid.cc)
std::string JPP
Jpp version used to take data (see JPrintMeta.cc)
int JTrigger3DMuon
number of L1/L0 mixed triggers (see JTriggerMonitor.cc)
double MEAN_Rate_Hz
mean rate from PMTs with valid data (see JSummaryMonitor.cc)
int zero_AHRS
number of non-working compass (see software/JCompass/JAHRSMonitor.cc)
double UTCMax_s
maximal UTC time (from "runs" table)
double DAQ
fraction of data frames with correct DAQ status (see JSummaryMonitor.cc)
int JDAQTimesliceL2
number of L2 timeslices
double AHRS
number of compass measurements per working compass (see software/JCompass/JAHRSMonitor....
int JDAQSummaryslice
number of summary slices
double HRV
fraction of PMTs with high-rate veto (see JSummaryMonitor.cc)
JEnabled triggerMXShower
enable (1) or disable (0) of L1/L0 mixed trigger
std::string name
setup name (see JRunsetups)
JEnabled trigger3DMuon
enable (1) or disable (0) of 3D-muon trigger
double livetime_s
livetime of data takig run (as determined from KM3NETDAQ::JDAQSummaryslice data)
JEnabled trigger3DShower
enable (1) or disable (0) of 3D-shower trigger
int JTrigger3DShower
number of 3D-muon triggers (see JTriggerMonitor.cc)
JEnabled triggerNB
enable (1) or disable (0) of nano-beacon trigger
JPrescaler writeL2
pre-scaling of L2 data (0 implies off)
double FIFO
fraction of PMTs with FIFO (almost) full (see JSummaryMonitor.cc)
JPrescaler writeL0
pre-scaling of L0 data (0 implies off)
int out_sync
number of modules out of synchronisation with master clock (see JTurbot.cc)
static const char *const getName()
Table name.
std::string GIT
GIT version used to write QA/QC data.
double WR
fraction of data frames with correct White Rabbit status (see JSummaryMonitor.cc)
int JDAQTimesliceL0
number of L0 timeslices
int JDAQTimesliceL1
number of L1 timeslices
int detector
detector identifier
JPrescaler writeL1
pre-scaling of L1 data (0 implies off)
static const char *const getName()
Table name.