MEvent_ROOT.cc
Go to the documentation of this file.
1 #include <io/MEvent_ROOT.h>
2 #include <mevt/MEvent.h>
3 
4 using namespace io;
5 
6 
7 ClassImp(MEvent_ROOT)
8 
9 
10 MEvent_ROOT::MEvent_ROOT(const mevt::MEvent& e) :
11  fCounters(e.CountersBegin(), e.CountersEnd()),
12  fHeader(e.GetHeader())
13 { }
14 
15 
16 void
18  const
19 {
20  mevt::Header& h = e.GetHeader();
21  fHeader >> h;
22  det::Detector::GetInstance().Update(h.GetTime());
23 
24  for (const auto& c : fCounters) {
25  const int id = c.fId;
26  e.MakeCounter(id);
27  c >> e.GetCounter(id);
28  }
29 }
std::vector< Counter_ROOT > fCounters
Definition: MEvent_ROOT.h:33
void operator>>(mevt::MEvent &e) const
Definition: MEvent_ROOT.cc:17
Persistent MEvent using ROOT.
Definition: MEvent_ROOT.h:24
Header information for muon events.
Definition: MEvent/Header.h:20
void MakeCounter(const int cId)
Definition: MEvent.h:40
Counter & GetCounter(const int cId)
Definition: MEvent.h:34
Header & GetHeader()
Definition: MEvent.h:65
Root of the Muon event hierarchy.
Definition: MEvent.h:25
mevtHeader_ROOT fHeader
Definition: MEvent_ROOT.h:34

, generated on Tue Sep 26 2023.