REvent_ROOT.cc
Go to the documentation of this file.
1 #include <io/REvent_ROOT.h>
2 #include <io/revtEventTrigger_ROOT.h>
3 #include <io/StreamerUtilities.h>
4 #include <det/Detector.h>
5 
6 using namespace io;
7 
8 
9 ClassImp(REvent_ROOT)
10 
11 
13 {
14  delete fTrigger;
15 }
16 
17 
20 {
21  if (this != &e) {
22  fStations = e.fStations;
24  fHeader = e.fHeader;
29  }
30  return *this;
31 }
32 
33 
35  fStations(e.StationsBegin(), e.StationsEnd()),
36  fTrigger(e.HasTrigger() ? new revtEventTrigger_ROOT(e.GetTrigger()) : nullptr),
37  fHeader(e.GetHeader()),
38  fAERARootIoSourceFileName(e.GetAERARootIoSourceFileName()),
39  fChannelResponseApplied(e.GetChannelResponseApplied()),
40  fRejectionStatus(e.GetRejectionStatus())
41 { }
42 
43 
44 void
46  const
47 {
48  auto& h = e.GetHeader();
49  fHeader >> h;
50  det::Detector::GetInstance().Update(h.GetTime());
51 
52  for (const auto& s : fStations) {
53  const auto id = s.fId;
54  e.MakeStation(id);
55  s >> e.GetStation(id);
56  }
57 
58  if (fTrigger) {
59  if (!e.HasTrigger())
60  e.MakeTrigger();
61  *fTrigger >> e.GetTrigger();
62  }
63 
69 }
bool HasTrigger() const
check whether the central trigger object exists
Definition: REvent.h:236
bool fChannelResponseApplied
Definition: REvent_ROOT.h:43
Interface class to access to the Radio part of an event.
Definition: REvent.h:42
void SetChannelResponseApplied(const bool parFlag)
Definition: REvent.h:274
EventTrigger & GetTrigger()
Get the object with central trigger data, throw if n.a.
Definition: REvent.h:229
void SetAERARootIoEventId(const double parEventId)
Definition: REvent.h:270
REvent_ROOT & operator=(const REvent_ROOT &e)
Definition: REvent_ROOT.cc:19
Station & GetStation(const int stationId)
retrieve station by id throw utl::NonExistentComponentException if n.a.
Definition: REvent.h:190
std::string fAERARootIoSourceFileName
Definition: REvent_ROOT.h:41
void SetAERARootIoSourceFileName(const std::string &parFileName)
Definition: REvent.h:266
void ClearRejectionStatus()
Definition: REvent.h:245
double fAERARootIoEventId
Definition: REvent_ROOT.h:42
constexpr double s
Definition: AugerUnits.h:163
void DeepCopy(T *&destination, U *const source)
void SetRejected(const unsigned long long int reason)
Definition: REvent.h:243
void MakeTrigger()
Create the central trigger object.
Definition: REvent.cc:174
Header & GetHeader()
access to REvent Header
Definition: REvent.h:239
std::vector< revtStation_ROOT > fStations
Definition: REvent_ROOT.h:38
revtHeader_ROOT fHeader
Definition: REvent_ROOT.h:40
Persistent REvent using ROOT.
Definition: REvent_ROOT.h:27
unsigned long long int fRejectionStatus
Definition: REvent_ROOT.h:44
Persistent EventTrigger using ROOT.
void operator>>(revt::REvent &e) const
Definition: REvent_ROOT.cc:45
void MakeStation(const int stationId)
make a station with specifying Id, throw if invalid stationId
Definition: REvent.cc:94
revtEventTrigger_ROOT * fTrigger
Definition: REvent_ROOT.h:39

, generated on Tue Sep 26 2023.