|
ATLAS Offline Software
|
Go to the documentation of this file.
11 #include "GaudiKernel/ConcurrencyFlags.h"
14 #include "EventInfo/EventInfo.h"
29 m_cnvTool(
"xAODMaker::EventInfoCnvTool/EventInfoCnvTool", this ) {
52 return StatusCode::SUCCESS;
61 <<
"\" is already in StoreGate; "
62 <<
"EventInfoCnvAlg should not be scheduled.");
63 return StatusCode::SUCCESS;
80 auto ei = std::make_unique<xAOD::EventInfo>();
81 auto ei_aux = std::make_unique<xAOD::EventAuxInfo>();
82 ei->setStore (ei_aux.get());
89 auto puei = std::make_unique<xAOD::EventInfoContainer>();
90 auto puei_aux = std::make_unique<xAOD::EventInfoAuxContainer>();
91 puei->setStore (puei_aux.get());
94 std::vector< xAOD::EventInfo::SubEvent > subEvents;
102 for( ; pu_itr != pu_end; ++pu_itr ) {
105 puei->push_back( ei );
107 CHECK(
m_cnvTool->convert( pu_itr->pSubEvt, ei,
true,
false, ctx ) );
110 switch (pu_itr->type()) {
132 subEvents.emplace_back( pu_itr->time(),
141 ei->setSubEvents( subEvents );
145 CHECK( puei_h.
record (std::move(puei), std::move(puei_aux)) );
153 CHECK( ei_h.
record (std::move(ei), std::move (ei_aux)) );
156 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
virtual StatusCode initialize() override
Function initialising the algorithm.
EventInfo_v1 EventInfo
Definition of the latest event info version.
SG::WriteHandleKey< xAOD::EventInfo > m_xaodKey
Key for the output object.
const_pointer_type cptr()
Dereference the pointer.
This class provides information about an overlaid event. It extends EventInfo with a list of sub-evts...
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
@ HighPtMinimumBias
High pT Minimum bias pileup event.
@ MinimumBias
(Low pT) Minimum bias pileup event
PileUpType
Enumerator describing the types of pileup events.
@ ZeroBias
Zero bias pileup event.
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool empty() const
Test if the key is blank.
An algorithm that can be simultaneously executed in multiple threads.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
SubEvent::iterator beginSubEvt()
SG::ReadHandleKey< EventInfo > m_aodKey
Key for the input object If blank, we do a keyless retrieve from SG instead!
SG::WriteHandleKey< xAOD::EventInfoContainer > m_pileupKey
For pileup.
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
@ Unknown
Type not known/specified.
::StatusCode StatusCode
StatusCode definition for legacy code.
@ HaloGas
Halo-gas non-collision background.
#define CHECK(...)
Evaluate an expression and check for errors.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
ElementLink implementation for ROOT usage.
EventInfoCnvAlg(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
Helpers for checking error return status codes and reporting errors.
This class provides general information about an event. Event information is provided by the accessor...
Class describing the basic event information.
@ Signal
The signal event.
This class provides information about an overlaid event. It extends EventInfo with a list of sub-evts...
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
std::list< SubEvent >::const_iterator const_iterator
@ Cavern
Cavern background pileup event.
ToolHandle< IEventInfoCnvTool > m_cnvTool
Handle to the converter tool.
SubEvent::iterator endSubEvt()