Jpp - 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  struct JRunQuality :
32  public TObject
33  {
34  static const char* const getName() { return JRunSummaryNumbers::getName(); } //!< Table name
35 
36  struct JPrescaler :
37  public TObject
38  {
39  int prescale;
40 
41  ClassDef(JPrescaler, 1);
42  };
43 
44  struct JEnabled :
45  public TObject
46  {
47  int enabled;
48 
49  ClassDef(JEnabled, 1);
50  };
51 
52  /**
53  * Read quality data from input stream.
54  *
55  * \param in input stream
56  * \param object quality data
57  * \return input stream
58  */
59  friend inline std::istream& operator>>(std::istream& in, JRunQuality& object)
60  {
61  in >> object.GIT
62  >> object.detector
63  >> object.run
64  >> object.livetime_s
65  >> object.UTCMin_s
66  >> object.UTCMax_s
67  >> object.trigger3DMuon .enabled
68  >> object.trigger3DShower.enabled
69  >> object.triggerMXShower.enabled
70  >> object.writeL0.prescale
71  >> object.writeL1.prescale
72  >> object.writeL2.prescale
73  >> object.writeSN.prescale
74  >> object.JDAQTimesliceL0
75  >> object.JDAQTimesliceL1
76  >> object.JDAQTimesliceL2
77  >> object.JDAQTimesliceSN
78  >> object.JDAQSummaryslice
79  >> object.JDAQEvent
80  >> object.JTrigger3DShower
81  >> object.JTriggerMXShower
82  >> object.JTrigger3DMuon
83  >> object.in_sync
84  >> object.out_sync
85  >> object.DAQ
86  >> object.WR
87  >> object.HRV
88  >> object.FIFO
89  >> object.PMTs
90  >> object.MEAN_Rate_Hz
91  >> object.RMS_Rate_Hz
92  >> object.Acoustics
93  >> object.AHRS;
94 
95  return in;
96  }
97 
98  /**
99  * Put value at given key.
100  *
101  * \param key key
102  * \param value value
103  */
104  void put(const std::string& key,
105  const std::string& value);
106 
107  /**
108  * Read data quality from result set.
109  *
110  * \param rs result set
111  * \param quality quality
112  * \return true if read; else false
113  */
114  friend bool operator>>(ResultSet& rs, JRunQuality& quality);
115 
116  std::string GIT;
117  int detector;
118  int run;
119  double livetime_s;
120  double UTCMin_s;
121  double UTCMax_s;
138  int in_sync;
139  int out_sync;
140  double DAQ;
141  double WR;
142  double HRV;
143  double FIFO;
144  double PMTs;
145  double MEAN_Rate_Hz;
146  double RMS_Rate_Hz;
148  double AHRS;
149 
150  ClassDef(JRunQuality, 1);
151  };
152 
153 
154  /**
155  * Less-than operator.
156  *
157  * \param first first run quaility
158  * \param second second run quaility
159  * \return true if first run quality less than second; else false
160  */
161  inline bool operator<(const JRunQuality& first,
162  const JRunQuality& second)
163  {
164  if (first.detector == second.detector)
165  return first.run < second.run;
166  else
167  return first.detector < second.detector;
168  }
169 }
170 
171 #endif
bool operator<(const Head &first, const Head &second)
Less than operator.
Definition: JHead.hh:1603
Definition: JRoot.hh:19
ClassDef(JRunQuality, 1)
static const char *const getName()
Table name.
Definition: JRunQuality.hh:34
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
friend std::istream & operator>>(std::istream &in, JRunQuality &object)
Read quality data from input stream.
Definition: JRunQuality.hh:59
void put(const std::string &key, const std::string &value)
Put value at given key.
Definition: JRunQuality.cc:25
then for DETECTOR in Antares KM3NeT
Definition: JMultiPMT.sh:42
static const char *const getName()
Table name.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:38
Auxiliary data structure for data quality.
Definition: JRunQuality.hh:31