ATLAS Offline Software
Loading...
Searching...
No Matches
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
21
25
27 TriggerInfo* trig_info) :
28 EventInfo(id, type, trig_info)
29{}
30
33
35 :
36 m_timeIndex(0), //FIXME why 0?
37 pSubEvt(0), pSubEvtSG(0)
38
39{}
40
43 pSubEvt(0 == rhs.pSubEvt ? 0 : new EventInfo(*rhs.pSubEvt)),
45
46{}
47
49PileUpEventInfo::SubEvent::operator = (const SubEvent& rhs) {
50 if (this != &rhs) {
52 pSubEvtSG = rhs.pSubEvtSG;
53 delete pSubEvt;
54 pSubEvt = (0 == rhs.pSubEvt ? 0 : new EventInfo(*rhs.pSubEvt));
55 }
56 return *this;
57}
58
61 pSubEvt(rhs.pSubEvt),
62 pSubEvtSG(rhs.pSubEvtSG) {
63 rhs.pSubEvt = 0;
64}
65
67PileUpEventInfo::SubEvent::operator = (SubEvent&& rhs) {
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
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) :
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
150unsigned 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}
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
This class provides information about an overlaid event.
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
Definition EventID.h:35
This class represents the "type of event" where the type is given by one or more "characteristics".
Definition EventType.h:92
virtual ~PileUpEventInfo()
The Athena Transient Store API.
This class contains trigger related information.
Definition TriggerInfo.h:77
SubEvent(int16_t time, uint16_t index, PileUpType type, const ElementLink< EventInfoContainer_v1 > &link)
Constructor giving all relevant information to the object.
static std::string release
Definition computils.h:50
Definition index.py:1
a triple allowing access to a sub-event
EventInfo * pSubEvt
redundant but handy e.g. for persist. FIXME OWNED COPY
PileUpTimeEventIndex m_timeIndex
StoreGateSvc * pSubEvtSG
the sub event store
unsigned int BCID() const
PileUpTimeEventIndex::time_type time_type
PileUpTimeEventIndex::index_type index_type