Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
DuneEventInfo Class Reference

#include <DuneEventInfo.h>

Public Types

using Index = unsigned int
 
using LongIndex = unsigned long
 

Public Member Functions

void clear ()
 
 DuneEventInfo ()=default
 
 DuneEventInfo (Index a_run, Index a_event, Index a_subRun=badIndex(), time_t a_time=0, int a_timerem=0, Index a_trigger=badIndex(), LongIndex a_triggerClock=badLongIndex(), LongIndex a_triggerTick0=badLongIndex())
 
bool isValid () const
 
bool operator< (const DuneEventInfo &rhs)
 
bool operator== (const DuneEventInfo &rhs) const
 
bool operator!= (const DuneEventInfo &rhs) const
 
std::string eventString () const
 
std::string runString (Index opt=2) const
 

Static Public Member Functions

static Index badIndex ()
 
static LongIndex badLongIndex ()
 
static const DuneEventInfobadEventInfo ()
 

Public Attributes

Index run =badIndex()
 
Index event =badIndex()
 
Index subRun =badIndex()
 
time_t time =0
 
int timerem =0
 
Index trigger =badIndex()
 
LongIndex triggerClock =badLongIndex()
 
LongIndex triggerTick0 =badLongIndex()
 

Detailed Description

Definition at line 14 of file DuneEventInfo.h.

Member Typedef Documentation

using DuneEventInfo::Index = unsigned int

Definition at line 18 of file DuneEventInfo.h.

using DuneEventInfo::LongIndex = unsigned long

Definition at line 19 of file DuneEventInfo.h.

Constructor & Destructor Documentation

DuneEventInfo::DuneEventInfo ( )
default
DuneEventInfo::DuneEventInfo ( Index  a_run,
Index  a_event,
Index  a_subRun = badIndex(),
time_t  a_time = 0,
int  a_timerem = 0,
Index  a_trigger = badIndex(),
LongIndex  a_triggerClock = badLongIndex(),
LongIndex  a_triggerTick0 = badLongIndex() 
)
inline

Definition at line 53 of file DuneEventInfo.h.

58  : run(a_run), event(a_event), subRun(a_subRun),
59  time(a_time), timerem(a_timerem),
60  trigger(a_trigger),
61  triggerClock(a_triggerClock),
62  triggerTick0(a_triggerTick0) { }
LongIndex triggerTick0
Definition: DuneEventInfo.h:28
LongIndex triggerClock
Definition: DuneEventInfo.h:27

Member Function Documentation

static const DuneEventInfo& DuneEventInfo::badEventInfo ( )
inlinestatic

Definition at line 32 of file DuneEventInfo.h.

32  {
33  static DuneEventInfo bei;
34  return bei;
35  }
static Index DuneEventInfo::badIndex ( )
inlinestatic

Definition at line 30 of file DuneEventInfo.h.

30 { return -1u; }
static LongIndex DuneEventInfo::badLongIndex ( )
inlinestatic

Definition at line 31 of file DuneEventInfo.h.

31 { return -1ul; }
void DuneEventInfo::clear ( )
inline

Definition at line 38 of file DuneEventInfo.h.

38  {
39  run = badIndex();
40  event = badIndex();
41  subRun = badIndex();
42  time = 0;
43  timerem = 0;
44  trigger = badIndex();
47  }
LongIndex triggerTick0
Definition: DuneEventInfo.h:28
static Index badIndex()
Definition: DuneEventInfo.h:30
static LongIndex badLongIndex()
Definition: DuneEventInfo.h:31
LongIndex triggerClock
Definition: DuneEventInfo.h:27
std::string DuneEventInfo::eventString ( ) const
inline

Definition at line 100 of file DuneEventInfo.h.

100  {
101  std::ostringstream ssout;
102  ssout << event;
103  return ssout.str();
104  }
bool DuneEventInfo::isValid ( ) const
inline

Definition at line 65 of file DuneEventInfo.h.

65 { return run != badIndex(); }
static Index badIndex()
Definition: DuneEventInfo.h:30
bool DuneEventInfo::operator!= ( const DuneEventInfo rhs) const
inline

Definition at line 95 of file DuneEventInfo.h.

95  {
96  return ! (*this == rhs);
97  }
bool DuneEventInfo::operator< ( const DuneEventInfo rhs)
inline

Definition at line 68 of file DuneEventInfo.h.

68  {
69  if ( run < rhs.run ) return true;
70  if ( rhs.run < run ) return false;
71  if ( subRun < rhs.subRun ) return true;
72  if ( rhs.subRun < subRun ) return false;
73  if ( event < rhs.event ) return true;
74  if ( rhs.event < event ) return false;
75  if ( triggerClock < rhs.triggerClock ) return true;
76  if ( rhs.triggerClock < triggerClock ) return false;
77  if ( triggerTick0 < rhs.triggerTick0 ) return true;
78  if ( rhs.triggerTick0 < triggerTick0 ) return false;
79  return false;
80  }
LongIndex triggerTick0
Definition: DuneEventInfo.h:28
LongIndex triggerClock
Definition: DuneEventInfo.h:27
Event finding and building.
bool DuneEventInfo::operator== ( const DuneEventInfo rhs) const
inline

Definition at line 83 of file DuneEventInfo.h.

83  {
84  if ( run != rhs.run ) return false;
85  if ( subRun != rhs.subRun ) return false;
86  if ( event != rhs.event ) return false;
87  if ( time != rhs.time ) return false;
88  if ( timerem != rhs.timerem ) return false;
89  if ( trigger != rhs.trigger ) return false;
90  if ( triggerClock != rhs.triggerClock ) return false;
91  if ( triggerTick0 != rhs.triggerTick0 ) return false;
92  return true;
93  }
LongIndex triggerTick0
Definition: DuneEventInfo.h:28
LongIndex triggerClock
Definition: DuneEventInfo.h:27
Event finding and building.
std::string DuneEventInfo::runString ( Index  opt = 2) const
inline

Definition at line 110 of file DuneEventInfo.h.

110  {
111  std::ostringstream ssout;
112  ssout << run;
113  if ( opt == 1 || (opt ==2 && subRun > 0 && subRun!=badIndex()) ) {
114  ssout << "-" << subRun;
115  }
116  return ssout.str();
117  }
static Index badIndex()
Definition: DuneEventInfo.h:30
opt
Definition: train.py:196

Member Data Documentation

Index DuneEventInfo::event =badIndex()

Definition at line 22 of file DuneEventInfo.h.

Index DuneEventInfo::run =badIndex()

Definition at line 21 of file DuneEventInfo.h.

Index DuneEventInfo::subRun =badIndex()

Definition at line 23 of file DuneEventInfo.h.

time_t DuneEventInfo::time =0

Definition at line 24 of file DuneEventInfo.h.

int DuneEventInfo::timerem =0

Definition at line 25 of file DuneEventInfo.h.

Index DuneEventInfo::trigger =badIndex()

Definition at line 26 of file DuneEventInfo.h.

LongIndex DuneEventInfo::triggerClock =badLongIndex()

Definition at line 27 of file DuneEventInfo.h.

LongIndex DuneEventInfo::triggerTick0 =badLongIndex()

Definition at line 28 of file DuneEventInfo.h.


The documentation for this class was generated from the following file: