ATLAS Offline Software
Loading...
Searching...
No Matches
PileUpEventInfo.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3 */
4
5/* -C++- */
6#ifndef EVENTINFO_PILEUPEVENTINFO_H
7# define EVENTINFO_PILEUPEVENTINFO_H 1
19
20
21#include "EventInfo/EventInfo.h"
23#include "GaudiKernel/ClassID.h"
24#include <list>
25#include <memory>
26
27class StoreGateSvc;
28class MsgStream;
29
37
39public:
41
43
46
47 virtual ~PileUpEventInfo();
48
54
58 struct SubEvent {
59 private:
61 public:
64
68
69 SubEvent();
70 ~SubEvent();
71 SubEvent(const SubEvent&);
75 SubEvent(time_type t, const EventInfo* pse, StoreGateSvc* psg);
77 const EventInfo* pse, StoreGateSvc* psg);
80 const EventInfo* pse, StoreGateSvc* psg);
81 SubEvent(time_type t, unsigned int BCID, index_type index,
83 const EventInfo& rse, StoreGateSvc* psg);
84
85 SubEvent(time_type t, std::unique_ptr<EventInfo> pse, StoreGateSvc* psg);
87 std::unique_ptr<EventInfo> pse, StoreGateSvc* psg);
90 std::unique_ptr<EventInfo> pse, StoreGateSvc* psg);
91 SubEvent(time_type t, unsigned int BCID, index_type index,
93 std::unique_ptr<EventInfo> pse, StoreGateSvc* psg);
94
96 time_type time() const {return m_timeIndex.time();}
97 index_type index() const {return m_timeIndex.index();}
98
99 unsigned int BCID() const;
101 pileup_type type() const {return m_timeIndex.type();}
102
103 typedef std::list<SubEvent>::const_iterator const_iterator;
104 typedef std::list<SubEvent>::iterator iterator;
105 };
106
107 typedef SubEvent::time_type time_type;
108 typedef SubEvent::index_type index_type;
111 const EventInfo* pse, StoreGateSvc* psg) {
112 m_subEvents.emplace_back(t, m_subEvents.size(), puType, pse, psg);
113 }
114
116 std::unique_ptr<EventInfo> pse, StoreGateSvc* psg) {
117 m_subEvents.emplace_back(t, m_subEvents.size(), puType, std::move(pse), psg);
118 }
119
121 void addSubEvt(time_type t, unsigned int BCID,
123 const EventInfo& rse, StoreGateSvc* psg) {
124 m_subEvents.emplace_back(t, BCID, m_subEvents.size(), puType, rse, psg);
125 }
126
127 void addSubEvt(time_type t, unsigned int BCID,
129 std::unique_ptr<EventInfo>& pse, StoreGateSvc* psg) {
130 m_subEvents.emplace_back(t, BCID, m_subEvents.size(), puType, std::move(pse), psg);
131 }
132
133 //NO INSERTIONS only push_backs in m_subEvents!
134
136
137 SubEvent::iterator beginSubEvt() {return m_subEvents.begin();}
138 SubEvent::iterator endSubEvt() {return m_subEvents.end();}
139 SubEvent::const_iterator beginSubEvt() const {return m_subEvents.begin();}
140 SubEvent::const_iterator endSubEvt() const {return m_subEvents.end();}
142private:
143 std::list<SubEvent> m_subEvents; //FIXME should become a vector
144};
145
148
149#include "AthenaKernel/BaseInfo.h"
151
152#endif // EVENTINFO_PILEUPEVENTINFO_H
#define SG_ADD_BASE(D, B)
Add a new base class B to class D.
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
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
This class provides information about an overlaid event.
PileUpEventInfo & operator=(const PileUpEventInfo &)=default
PileUpEventInfo(PileUpEventInfo &&)=default
SubEvent::const_iterator endSubEvt() const
SubEvent::time_type time_type
void addSubEvt(time_type t, unsigned int BCID, PileUpTimeEventIndex::PileUpType puType, const EventInfo &rse, StoreGateSvc *psg)
setter for the subEvt collection t=0(ns) for the original event
void addSubEvt(time_type t, PileUpTimeEventIndex::PileUpType puType, std::unique_ptr< EventInfo > pse, StoreGateSvc *psg)
void addSubEvt(time_type t, PileUpTimeEventIndex::PileUpType puType, const EventInfo *pse, StoreGateSvc *psg)
setter for the subEvt collection t=0(ns) for the original event
PileUpEventInfo(const PileUpEventInfo &)=default
PileUpEventInfo & operator=(PileUpEventInfo &&)=default
SubEvent::iterator endSubEvt()
SubEvent::const_iterator beginSubEvt() const
SubEvent::index_type index_type
SubEvent::iterator beginSubEvt()
void addSubEvt(time_type t, unsigned int BCID, PileUpTimeEventIndex::PileUpType puType, std::unique_ptr< EventInfo > &pse, StoreGateSvc *psg)
virtual ~PileUpEventInfo()
std::list< SubEvent > m_subEvents
The Athena Transient Store API.
This class contains trigger related information.
Definition TriggerInfo.h:77
Definition index.py:1
std::list< SubEvent >::const_iterator const_iterator
SubEvent & operator=(const SubEvent &)
PileUpTimeEventIndex::PileUpType pileup_type
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
std::list< SubEvent >::iterator iterator
PileUpTimeEventIndex::time_type time_type
index_type index() const
PileUpTimeEventIndex::index_type index_type
pileup_type type() const
pileup event proveance
time_type time() const
t0 wrto original event (hence original evt time == 0)
a struct encapsulating the identifier of a pile-up event