Jpp
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 UNIXJOBSTARTTIME;
33  long long int UNIXJOBENDTIME;
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
JDATABASE::JRuns::RUNSETUPNAME
std::string RUNSETUPNAME
Definition: JRuns.hh:27
JDATABASE::JRuns::getRunStartTime
double getRunStartTime() const
Get start time of run.
Definition: JRuns.hh:40
TObject
Definition: JRoot.hh:19
JDATABASE::JRuns::UNIXSTARTTIME
long long int UNIXSTARTTIME
Definition: JRuns.hh:24
JDATABASE::JRuns::RUNJOBID
std::string RUNJOBID
Definition: JRuns.hh:29
JDATABASE::JRuns::JOBPRIORITY
int JOBPRIORITY
Definition: JRuns.hh:31
JDATABASE::JRuns::STARTTIME_DEFINED
char STARTTIME_DEFINED
Definition: JRuns.hh:25
JDATABASE::JRuns::JOBTARGET
std::string JOBTARGET
Definition: JRuns.hh:30
JDATABASE
Auxiliary classes and methods for database I/O.
Definition: JAHRS.hh:12
JDATABASE::JRuns::T0_CALIBSETID
int T0_CALIBSETID
Definition: JRuns.hh:28
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JDATABASE::JRuns::UNIXJOBSTARTTIME
long long int UNIXJOBSTARTTIME
Definition: JRuns.hh:32
JDATABASE::JRuns::ClassDef
ClassDef(JRuns, 1)
JDATABASE::JRuns::getName
static const char *const getName()
Table name.
Definition: JRuns.hh:20
JDATABASE::JRuns
Definition: JRuns.hh:17
JDATABASE::operator<
bool operator<(const JRuns &first, const JRuns &second)
Less-than operator.
Definition: JRuns.hh:56
JDATABASE::JRuns::RUN
int RUN
Definition: JRuns.hh:23
JDATABASE::JRuns::UNIXJOBENDTIME
long long int UNIXJOBENDTIME
Definition: JRuns.hh:33
JDATABASE::JRuns::DETID
int DETID
constraint
Definition: JRuns.hh:22
JDATABASE::JRuns::RUNSETUPID
std::string RUNSETUPID
Definition: JRuns.hh:26