Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JRuns.hh
Go to the documentation of this file.
1 #ifndef __JDB_JRUNS__
2 #define __JDB_JRUNS__
3 
4 #include <TROOT.h>
5 #include <TObject.h>
6 
7 #include <string>
8 
9 /**
10  * \author mdejong
11  */
12 namespace JDATABASE {}
13 namespace JPP { using namespace JDATABASE; }
14 
15 namespace JDATABASE {
16 
17  struct JRuns :
18  public TObject
19  {
20  static const char* const getName() { return "runs"; } //!< Table name
21 
22  int DETID; ///< constraint
23  int RUN;
24  long long int UNIXSTARTTIME;
26  std::string RUNSETUPID;
27  std::string RUNSETUPNAME;
29  std::string RUNJOBID;
30  std::string JOBTARGET;
32  long long int UNIXJOBSTART;
33  long long int UNIXJOBEND;
34 
35  /**
36  * Get start time of run.
37  *
38  * \return time [s]
39  */
40  inline double getRunStartTime() const
41  {
42  return UNIXSTARTTIME * 1.0e-3;
43  }
44 
45  ClassDef(JRuns, 1);
46  };
47 
48 
49  /**
50  * Less-than operator.
51  *
52  * \param first first run
53  * \param second second run
54  * \return true if first run less than second; else false
55  */
56  inline bool operator<(const JRuns& first,
57  const JRuns& second)
58  {
59  if (first.DETID == second.DETID)
60  return first.RUN < second.RUN;
61  else
62  return first.DETID < second.DETID;
63  }
64 }
65 
66 #endif
int T0_CALIBSETID
Definition: JRuns.hh:28
ClassDef(JRuns, 1)
bool operator<(const Head &first, const Head &second)
Less than operator.
Definition: JHead.hh:1603
Definition: JRoot.hh:19
long long int UNIXJOBSTART
Definition: JRuns.hh:32
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
double getRunStartTime() const
Get start time of run.
Definition: JRuns.hh:40
std::string RUNSETUPNAME
Definition: JRuns.hh:27
std::string JOBTARGET
Definition: JRuns.hh:30
int JOBPRIORITY
Definition: JRuns.hh:31
char STARTTIME_DEFINED
Definition: JRuns.hh:25
static const char *const getName()
Table name.
Definition: JRuns.hh:20
long long int UNIXJOBEND
Definition: JRuns.hh:33
std::string RUNJOBID
Definition: JRuns.hh:29
int DETID
constraint
Definition: JRuns.hh:22
long long int UNIXSTARTTIME
Definition: JRuns.hh:24
std::string RUNSETUPID
Definition: JRuns.hh:26