ATLAS Offline Software
PileUpEventInfoReader.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
16 #include "PileUpEventInfoReader.h"
17 
18 // Event includes
19 #include "EventInfo/EventInfo.h"
20 #include "EventInfo/EventID.h"
21 #include "EventInfo/EventType.h"
23 
24 // Constructor with parameters:
26  ISvcLocator *pSvcLocator) :
27  AthAlgorithm(name,pSvcLocator)
28 {}
29 
30 // Initialize method:
32 {
33  ATH_MSG_INFO("PileUpEventInfoReader::initialize()" );
34  return StatusCode::SUCCESS;
35 }
36 
37 // Execute method:
39 {
40  MsgStream log(msgSvc(), name());
41  ATH_MSG_DEBUG("PileUpEventInfoReader::execute()" );
42 
43  // PileupEventInfo as itself
44  const PileUpEventInfo* pevt = nullptr;
45  //sc = m_storeGate->retrieve( pevt, "OverlayEvent" );
46  ATH_CHECK( evtStore()->retrieve( pevt ) );
47 
48  ATH_MSG_DEBUG( "PileUpEventInfo" );
49  ATH_MSG_DEBUG( "Event ID: ["
50  << pevt->event_ID()->run_number() << ","
51  << pevt->event_ID()->event_number() << ":"
52  << pevt->event_ID()->time_stamp() << "] " );
53  ATH_MSG_DEBUG( "Event type: user type "
54  << pevt->event_type()->user_type() );
55 
56 
57  // Get normal event info as a sub-event info
58  ATH_MSG_DEBUG( "SubEventInfos" );
61  if (it == end) {
62  ATH_MSG_DEBUG( "None found" );
63  }
64  for (; it != end; ++it) {
65  const EventInfo* sevt = (*it).pSubEvt;
66  ATH_MSG_DEBUG( "Time, index "
67  << (*it).time() << " " << (*it).index() );
68  if (sevt) {
69  ATH_MSG_DEBUG( "Event ID: ["
70  << sevt->event_ID()->run_number() << ","
71  << sevt->event_ID()->event_number() << ":"
72  << sevt->event_ID()->time_stamp() << "] " );
73  ATH_MSG_DEBUG( "Event type: user type "
74  << sevt->event_type()->user_type() );
75  }
76  else {
77  ATH_MSG_DEBUG( "Subevent is null ptr " );
78  }
79  }
80 
81  return StatusCode::SUCCESS;
82 }
83 
84 
85 // Finalize method:
87 {
88  ATH_MSG_INFO("PileUpEventInfoReader::finalize()" );
89 
90  return StatusCode::SUCCESS;
91 }
92 
93 
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
EventType::user_type
std::string user_type(void) const
Access to user type.
Definition: EventType.cxx:94
PileUpEventInfoReader::finalize
virtual StatusCode finalize()
Algorithm finalize at end of job.
Definition: PileUpEventInfoReader.cxx:86
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
PileUpEventInfo.h
This class provides information about an overlaid event. It extends EventInfo with a list of sub-evts...
PileUpEventInfoReader::execute
virtual StatusCode execute()
Algorithm execute once per event.
Definition: PileUpEventInfoReader.cxx:38
skel.it
it
Definition: skel.GENtoEVGEN.py:396
PileUpEventInfoReader::PileUpEventInfoReader
PileUpEventInfoReader()
Avoid use of default constructor.
EventType.h
This class provides general information about an event. It extends EventInfo with a list of sub-evts ...
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
PileUpEventInfo::beginSubEvt
SubEvent::iterator beginSubEvt()
Definition: PileUpEventInfo.h:131
EventID.h
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
EventInfo::event_ID
EventID * event_ID()
the unique identification of the event.
Definition: EventInfo/EventInfo/EventInfo.h:224
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
PileUpEventInfoReader::initialize
virtual StatusCode initialize()
Algorithm initialize at begin of job.
Definition: PileUpEventInfoReader.cxx:31
AthAlgorithm
Definition: AthAlgorithm.h:47
PileUpEventInfoReader.h
Test reading of PileUpEventInfo.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
EventInfo
This class provides general information about an event. Event information is provided by the accessor...
Definition: EventInfo/EventInfo/EventInfo.h:43
PileUpEventInfo
This class provides information about an overlaid event. It extends EventInfo with a list of sub-evts...
Definition: PileUpEventInfo.h:37
PileUpEventInfo::SubEvent::const_iterator
std::list< SubEvent >::const_iterator const_iterator
Definition: PileUpEventInfo.h:97
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
EventInfo::event_type
EventType * event_type()
the type of the event, e.g. simulation, testbeam, etc
Definition: EventInfo/EventInfo/EventInfo.h:234
PileUpEventInfo::endSubEvt
SubEvent::iterator endSubEvt()
Definition: PileUpEventInfo.h:132