Jpp
 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 
89  return in;
90  }
91 
92  /**
93  * Put value at given key.
94  *
95  * \param key key
96  * \param value value
97  */
98  void put(const std::string& key,
99  const std::string& value);
100 
101  /**
102  * Read data quality from result set.
103  *
104  * \param rs result set
105  * \param quality quality
106  * \return true if read; else false
107  */
108  friend bool operator>>(ResultSet& rs, JRunQuality& quality);
109 
110  std::string GIT;
111  int detector;
112  int run;
113  double livetime_s;
114  double UTCMin_s;
115  double UTCMax_s;
128  int in_sync;
129  int out_sync;
130  double DAQ;
131  double WR;
132  double HRV;
133  double FIFO;
134  double PMTs;
135  double MEAN_Rate_Hz;
136  double RMS_Rate_Hz;
137 
138  ClassDef(JRunQuality, 1);
139  };
140 
141 
142  /**
143  * Less-than operator.
144  *
145  * \param first first run quaility
146  * \param second second run quaility
147  * \return true if first run quality less than second; else false
148  */
149  inline bool operator<(const JRunQuality& first,
150  const JRunQuality& second)
151  {
152  if (first.detector == second.detector)
153  return first.run < second.run;
154  else
155  return first.detector < second.detector;
156  }
157 }
158 
159 #endif
bool operator<(const Head &first, const Head &second)
Less than operator.
Definition: JHead.hh:1263
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Definition: JSirene.sh:45
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.
Auxiliary data structure for data quality.
Definition: JRunQuality.hh:31