ATLAS Offline Software
Loading...
Searching...
No Matches
PileUpEventInfo.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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#include <cassert>
21#include "EventInfo/EventInfo.h"
23#include "GaudiKernel/ClassID.h"
24
25#include <list>
26class StoreGateSvc;
27class MsgStream;
28
36
38public:
40
42
45
46 virtual ~PileUpEventInfo();
47
53
57 struct SubEvent {
58 private:
60 public:
63
67
68 SubEvent();
69 ~SubEvent();
70 SubEvent(const SubEvent&);
74 SubEvent(time_type t, const EventInfo* pse, StoreGateSvc* psg);
76 const EventInfo* pse, StoreGateSvc* psg);
79 const EventInfo* pse, StoreGateSvc* psg);
80 SubEvent(time_type t, unsigned int BCID, index_type index,
82 const EventInfo& rse, StoreGateSvc* psg);
83
84 SubEvent(time_type t, std::unique_ptr<EventInfo> pse, StoreGateSvc* psg);
86 std::unique_ptr<EventInfo> pse, StoreGateSvc* psg);
89 std::unique_ptr<EventInfo> pse, StoreGateSvc* psg);
90 SubEvent(time_type t, unsigned int BCID, index_type index,
92 std::unique_ptr<EventInfo> pse, StoreGateSvc* psg);
93
95 time_type time() const {return m_timeIndex.time();}
96 index_type index() const {return m_timeIndex.index();}
97
98 unsigned int BCID() const;
100 pileup_type type() const {return m_timeIndex.type();}
101
102 typedef std::list<SubEvent>::const_iterator const_iterator;
103 typedef std::list<SubEvent>::iterator iterator;
104 };
105
106 typedef SubEvent::time_type time_type;
107 typedef SubEvent::index_type index_type;
110 const EventInfo* pse, StoreGateSvc* psg) {
111 m_subEvents.emplace_back(t, m_subEvents.size(), puType, pse, psg);
112 }
113
115 std::unique_ptr<EventInfo> pse, StoreGateSvc* psg) {
116 m_subEvents.emplace_back(t, m_subEvents.size(), puType, std::move(pse), psg);
117 }
118
120 void addSubEvt(time_type t, unsigned int BCID,
122 const EventInfo& rse, StoreGateSvc* psg) {
123 m_subEvents.emplace_back(t, BCID, m_subEvents.size(), puType, rse, psg);
124 }
125
126 void addSubEvt(time_type t, unsigned int BCID,
128 std::unique_ptr<EventInfo>& pse, StoreGateSvc* psg) {
129 m_subEvents.emplace_back(t, BCID, m_subEvents.size(), puType, std::move(pse), psg);
130 }
131
132 //NO INSERTIONS only push_backs in m_subEvents!
133
135
136 SubEvent::iterator beginSubEvt() {return m_subEvents.begin();}
137 SubEvent::iterator endSubEvt() {return m_subEvents.end();}
138 SubEvent::const_iterator beginSubEvt() const {return m_subEvents.begin();}
139 SubEvent::const_iterator endSubEvt() const {return m_subEvents.end();}
141private:
142 std::list<SubEvent> m_subEvents; //FIXME should become a vector
143};
144
147
148#include "AthenaKernel/BaseInfo.h"
150
151#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