CEvent_ROOT.cc
Go to the documentation of this file.
1 #include <io/CEvent_ROOT.h>
2 #include <io/CEventSimData_ROOT.h>
3 #include <cevt/CEvent.h>
4 
5 using namespace io;
6 
7 
8 ClassImp(CEvent_ROOT)
9 
10 
12 CEvent_ROOT::operator=(const CEvent_ROOT& e)
13 {
14  if (this != &e) {
15  fStations = e.fStations;
16  DeepCopy(fSimData, e.fSimData);
17  }
18  return *this;
19 }
20 
21 
23  fStations(e.StationsBegin(), e.StationsEnd())
24 {
25  if (e.HasSimData())
27 }
28 
29 
31 {
32  delete fSimData;
33 }
34 
35 
36 void
38  const
39 {
40  for (const auto& st : fStations) {
41  e.MakeStation(st.fId);
42  st >> e.GetStation(st.fId);
43  }
44 
45  if (fSimData) {
46  if (!e.HasSimData())
47  e.MakeSimData();
48  *fSimData >> e.GetSimData();
49  }
50 }
Persistent CEvent using ROOT.
Definition: CEvent_ROOT.h:25
void ConvertCopy(T *&destination, const U &source)
CEventSimData_ROOT * fSimData
Definition: CEvent_ROOT.h:38
bool HasSimData() const
Check whether event simulated data exists.
Definition: CEvent.h:183
std::vector< cevtStation_ROOT > fStations
Definition: CEvent_ROOT.h:37
CEventSimData & GetSimData()
Get simulated data at event level.
Definition: CEvent.h:178
Station & GetStation(const int stationId)
retrieve station by id throw utl::NonExistentComponentException if n.a.
Definition: CEvent.cc:68
void DeepCopy(T *&destination, U *const source)
void MakeSimData()
Make event simulated data object.
Definition: CEvent.cc:191
void MakeStation(const int stationId)
make a station with specifying Id, throw if invalid stationId
Definition: CEvent.cc:99
Interface class to access to the SD part of an event.
Definition: CEvent.h:46
void operator>>(cevt::CEvent &e) const
Definition: CEvent_ROOT.cc:37

, generated on Tue Sep 26 2023.