ATLAS Offline Software
PileUpEventInfo.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3  */
4 
12 #include "GaudiKernel/ClassID.h"
13 #include "GaudiKernel/MsgStream.h"
14 #include "EventInfo/EventID.h"
16 #include <utility>
17 
19  EventInfo()
20 {}
21 
23  EventInfo(id, type)
24 {}
25 
27  TriggerInfo* trig_info) :
28  EventInfo(id, type, trig_info)
29 {}
30 
32 {}
33 
35  :
36  m_timeIndex(0), //FIXME why 0?
37  pSubEvt(0), pSubEvtSG(0)
38 
39 {}
40 
42  m_timeIndex(rhs.m_timeIndex),
43  pSubEvt(0 == rhs.pSubEvt ? 0 : new EventInfo(*rhs.pSubEvt)),
44  pSubEvtSG(rhs.pSubEvtSG)
45 
46 {}
47 
50  if (this != &rhs) {
51  m_timeIndex = rhs.m_timeIndex;
52  pSubEvtSG = rhs.pSubEvtSG;
53  delete pSubEvt;
54  pSubEvt = (0 == rhs.pSubEvt ? 0 : new EventInfo(*rhs.pSubEvt));
55  }
56  return *this;
57 }
58 
60  m_timeIndex(rhs.m_timeIndex),
61  pSubEvt(rhs.pSubEvt),
62  pSubEvtSG(rhs.pSubEvtSG) {
63  rhs.pSubEvt = 0;
64 }
65 
68  if (this != &rhs) {
69  m_timeIndex = rhs.m_timeIndex;
70  pSubEvtSG = rhs.pSubEvtSG;
71  delete pSubEvt;
72  pSubEvt = rhs.pSubEvt;
73  rhs.pSubEvt = 0;
74  }
75  return *this;
76 }
77 
79  delete pSubEvt;
80 }
81 
83  const EventInfo* pse,
84  StoreGateSvc* psg) :
85  m_timeIndex(t),
86  pSubEvt(0 == pse ? 0 : new EventInfo(*pse)),
87  pSubEvtSG(psg)
88 {}
89 
91  const EventInfo* pse,
92  StoreGateSvc* psg) :
93  m_timeIndex(t, index),
94  pSubEvt(0 == pse ? 0 : new EventInfo(*pse)),
95  pSubEvtSG(psg)
96 {}
99  const EventInfo* pse,
100  StoreGateSvc* psg) :
101  m_timeIndex(t, index, typ),
102  pSubEvt(0 == pse ? 0 : new EventInfo(*pse)),
103  pSubEvtSG(psg)
104 {}
108  const EventInfo& rse,
109  StoreGateSvc* psg) :
110  m_timeIndex(t, index, typ),
111  pSubEvt(new EventInfo(rse)),
112  pSubEvtSG(psg) {
113  pSubEvt->event_ID()->set_bunch_crossing_id(BCID);
114 }
115 
117  std::unique_ptr<EventInfo> pse,
118  StoreGateSvc* psg) :
119  m_timeIndex(t),
120  pSubEvt(pse.release()),
121  pSubEvtSG(psg)
122 {}
123 
125  std::unique_ptr<EventInfo> pse,
126  StoreGateSvc* psg) :
127  m_timeIndex(t, index),
128  pSubEvt(pse.release()),
129  pSubEvtSG(psg)
130 {}
133  std::unique_ptr<EventInfo> pse,
134  StoreGateSvc* psg) :
135  m_timeIndex(t, index, typ),
136  pSubEvt(pse.release()),
137  pSubEvtSG(psg)
138 {}
142  std::unique_ptr<EventInfo> pse,
143  StoreGateSvc* psg) :
144  m_timeIndex(t, index, typ),
145  pSubEvt(pse.release()),
146  pSubEvtSG(psg) {
147  pSubEvt->event_ID()->set_bunch_crossing_id(BCID);
148 }
149 
150 unsigned int
152  // Be sure to call const methods to avoid checker warnings.
153  return(0 == pSubEvt ? 0 : std::as_const(*pSubEvt).event_ID()->bunch_crossing_id());
154 }
PileUpEventInfo::PileUpEventInfo
PileUpEventInfo()
Definition: PileUpEventInfo.cxx:18
PileUpEventInfo::SubEvent::pSubEvt
EventInfo * pSubEvt
redundant but handy e.g. for persist. FIXME OWNED COPY
Definition: PileUpEventInfo.h:56
PileUpEventInfo.h
This class provides information about an overlaid event. It extends EventInfo with a list of sub-evts...
index
Definition: index.py:1
EventType
This class represents the "type of event" where the type is given by one or more "characteristics".
Definition: EventType.h:92
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
PileUpTimeEventIndex::PileUpType
PileUpType
Definition: PileUpTimeEventIndex.h:14
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
PileUpEventInfo::SubEvent::time_type
PileUpTimeEventIndex::time_type time_type
Definition: PileUpEventInfo.h:59
PixelByteStreamErrors::BCID
@ BCID
Definition: PixelByteStreamErrors.h:13
PileUpEventInfo::SubEvent::operator=
SubEvent & operator=(const SubEvent &)
Definition: PileUpEventInfo.cxx:49
PileUpEventInfo::SubEvent::BCID
unsigned int BCID() const
Definition: PileUpEventInfo.cxx:151
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
EventID.h
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
PileUpEventInfo::~PileUpEventInfo
virtual ~PileUpEventInfo()
Definition: PileUpEventInfo.cxx:31
PileUpEventInfo::SubEvent::index_type
PileUpTimeEventIndex::index_type index_type
Definition: PileUpEventInfo.h:60
EventInfo::event_ID
EventID * event_ID()
the unique identification of the event.
Definition: EventInfo/EventInfo/EventInfo.h:210
EventInfo::EventInfo
EventInfo()
Definition: EventInfo.cxx:20
PileUpEventInfo::SubEvent::m_timeIndex
PileUpTimeEventIndex m_timeIndex
Definition: PileUpEventInfo.h:54
TriggerInfo
This class contains trigger related information.
Definition: TriggerInfo.h:77
python.EventInfoMgtInit.release
release
Definition: EventInfoMgtInit.py:24
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
PileUpEventInfo::SubEvent::SubEvent
SubEvent()
Definition: PileUpEventInfo.cxx:34
EventInfo
This class provides general information about an event. Event information is provided by the accessor...
Definition: EventInfo/EventInfo/EventInfo.h:42
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
EventID
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
Definition: EventID.h:35
PileUpEventInfo::SubEvent
a triple allowing access to a sub-event
Definition: PileUpEventInfo.h:52
PileUpEventInfo::SubEvent::~SubEvent
~SubEvent()
Definition: PileUpEventInfo.cxx:78
PileUpEventInfo::SubEvent::pSubEvtSG
StoreGateSvc * pSubEvtSG
the sub event store
Definition: PileUpEventInfo.h:57