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.JDAQSummaryslice
75  >> object.JDAQEvent
76  >> object.JTrigger3DShower
77  >> object.JTriggerMXShower
78  >> object.JTrigger3DMuon
79  >> object.in_sync
80  >> object.out_sync
81  >> object.DAQ
82  >> object.WR
83  >> object.HRV
84  >> object.FIFO
85  >> object.PMTs
86  >> object.MEAN_Rate_Hz
87  >> object.RMS_Rate_Hz
88  >> object.Acoustics
89  >> object.AHRS;
90 
91  return in;
92  }
93 
94  /**
95  * Put value at given key.
96  *
97  * \param key key
98  * \param value value
99  */
100  void put(const std::string& key,
101  const std::string& value);
102 
103  /**
104  * Read data quality from result set.
105  *
106  * \param rs result set
107  * \param quality quality
108  * \return true if read; else false
109  */
110  friend bool operator>>(ResultSet& rs, JRunQuality& quality);
111 
112  std::string GIT;
113  int detector;
114  int run;
115  double livetime_s;
116  double UTCMin_s;
117  double UTCMax_s;
130  int in_sync;
131  int out_sync;
132  double DAQ;
133  double WR;
134  double HRV;
135  double FIFO;
136  double PMTs;
137  double MEAN_Rate_Hz;
138  double RMS_Rate_Hz;
140  double AHRS;
141 
142  ClassDef(JRunQuality, 1);
143  };
144 
145 
146  /**
147  * Less-than operator.
148  *
149  * \param first first run quaility
150  * \param second second run quaility
151  * \return true if first run quality less than second; else false
152  */
153  inline bool operator<(const JRunQuality& first,
154  const JRunQuality& second)
155  {
156  if (first.detector == second.detector)
157  return first.run < second.run;
158  else
159  return first.detector < second.detector;
160  }
161 }
162 
163 #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