Public Member Functions | Private Attributes | List of all members
om::RawEventList Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-25/OnlineMonitoring/producer/RawEventList.h"

Public Member Functions

 RawEventList ()
 
 ~RawEventList ()
 
void AddEventToRawEventList (const RawEventSummary &evtsum)
 
bool ContainsIncompleteEvents ()
 
unsigned long int EventEndTime (const RawEventSummary &evtsum)
 
unsigned long int EventEndTime ()
 
long int TimeDiffBetweenEvents (const RawEventSummary &evtFirst, const RawEventSummary &evtSecond)
 
long int TimeDiffBetweenEvents ()
 
bool IsEventContinuousInTime (const RawEventSummary &evtFirst, const RawEventSummary &evtSecond)
 
bool IsEventContinuousInTime ()
 
int Size ()
 

Private Attributes

std::vector< RawEventSummaryfEventList
 List of raw events. More...
 

Detailed Description

Definition at line 16 of file RawEventList.h.

Constructor & Destructor Documentation

RawEventList::RawEventList ( )

Definition at line 20 of file RawEventList.cxx.

20 { }
RawEventList::~RawEventList ( )

Definition at line 24 of file RawEventList.cxx.

24 { }

Member Function Documentation

void RawEventList::AddEventToRawEventList ( const RawEventSummary evtsum)

Definition at line 28 of file RawEventList.cxx.

References fEventList.

Referenced by om::TriggerPlots::GetRawEventSummary().

29 {
30  fEventList.push_back(evtsum);
31 }
std::vector< RawEventSummary > fEventList
List of raw events.
Definition: RawEventList.h:34
bool RawEventList::ContainsIncompleteEvents ( )

Definition at line 35 of file RawEventList.cxx.

References fEventList, and it.

36 {
37  std::vector<RawEventSummary>::iterator it;
38  for (it = fEventList.begin(); it != fEventList.end(); ++it){
39  if (it->fEventIncomplete) return true;
40  }
41  return false;
42 }
set< int >::iterator it
std::vector< RawEventSummary > fEventList
List of raw events.
Definition: RawEventList.h:34
unsigned long int RawEventList::EventEndTime ( const RawEventSummary evtsum)

Definition at line 46 of file RawEventList.cxx.

References om::RawEventSummary::fRange, om::RawEventSummary::fT0, kNS_PER_RANGE_TICK, kNSEC_PER_USEC, and kUSEC_PER_TDC.

47 {
48  double startTimeInNanoSeconds = (evtsum.fT0 * kUSEC_PER_TDC) * kNSEC_PER_USEC;
49  double duration = evtsum.fRange * kNS_PER_RANGE_TICK;
50  double endTimeInNanoSeconds = startTimeInNanoSeconds + duration;
51  double endTimeInTDC = endTimeInNanoSeconds / kNSEC_PER_USEC / kUSEC_PER_TDC;
52  return endTimeInTDC;
53 }
unsigned long int fT0
Trigger time in nova time units (64 Mhz ticks)
unsigned int fRange
Trigger length in units of 500 nsec.
::xsd::cxx::tree::duration< char, simple_type > duration
Definition: Database.h:188
static const int kNS_PER_RANGE_TICK
static const double kUSEC_PER_TDC
Definition: RawEventList.cxx:9
static const int kNSEC_PER_USEC
unsigned long int RawEventList::EventEndTime ( )

Definition at line 57 of file RawEventList.cxx.

References fEventList.

Referenced by IsEventContinuousInTime(), and TimeDiffBetweenEvents().

58 {
59  return this->EventEndTime(fEventList.back());
60 }
std::vector< RawEventSummary > fEventList
List of raw events.
Definition: RawEventList.h:34
unsigned long int EventEndTime()
bool RawEventList::IsEventContinuousInTime ( const RawEventSummary evtFirst,
const RawEventSummary evtSecond 
)

Definition at line 83 of file RawEventList.cxx.

References EventEndTime(), om::RawEventSummary::fT0, and kTIME_CONT_THRESHOLD.

Referenced by om::TriggerPlots::GetRawEventSummary().

85 {
86  long int differenceInTime = evtSecond.fT0 - this->EventEndTime(evtFirst);
87  if (differenceInTime < kTIME_CONT_THRESHOLD) return true;
88  return false;
89 }
unsigned long int fT0
Trigger time in nova time units (64 Mhz ticks)
static const int kTIME_CONT_THRESHOLD
unsigned long int EventEndTime()
bool RawEventList::IsEventContinuousInTime ( )

Definition at line 93 of file RawEventList.cxx.

References fEventList, Size(), and gen_flatrecord::size.

94 {
95  int size = this->Size();
96  if (size > 1) {
97  bool eventsContinuous = this->IsEventContinuousInTime(fEventList[size - 2],
98  fEventList[size - 1]);
99  if (!eventsContinuous) return false;
100  }
101  return true;
102 }
std::vector< RawEventSummary > fEventList
List of raw events.
Definition: RawEventList.h:34
bool IsEventContinuousInTime()
int RawEventList::Size ( )

Definition at line 106 of file RawEventList.cxx.

References fEventList.

Referenced by IsEventContinuousInTime(), and TimeDiffBetweenEvents().

107 {
108  return fEventList.size();
109 }
std::vector< RawEventSummary > fEventList
List of raw events.
Definition: RawEventList.h:34
long int RawEventList::TimeDiffBetweenEvents ( const RawEventSummary evtFirst,
const RawEventSummary evtSecond 
)

Definition at line 63 of file RawEventList.cxx.

References EventEndTime(), and om::RawEventSummary::fT0.

Referenced by om::TriggerPlots::GetRawEventSummary().

65 {
66  return evtSecond.fT0 - this->EventEndTime(evtFirst);
67 }
unsigned long int fT0
Trigger time in nova time units (64 Mhz ticks)
unsigned long int EventEndTime()
long int RawEventList::TimeDiffBetweenEvents ( )

Definition at line 70 of file RawEventList.cxx.

References release_diff::diff, fEventList, Size(), and gen_flatrecord::size.

71 {
72  int size = this->Size();
73  if (size > 1) {
74  long int diff = this->TimeDiffBetweenEvents(fEventList[size - 2],
75  fEventList[size - 1]);
76  return diff;
77  }
78  return 0;
79 }
long int TimeDiffBetweenEvents()
std::vector< RawEventSummary > fEventList
List of raw events.
Definition: RawEventList.h:34

Member Data Documentation

std::vector<RawEventSummary> om::RawEventList::fEventList
private

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