|
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "GaudiKernel/MsgStream.h"
17 #include "Gaudi/Property.h"
20 #include "EventInfo/EventInfo.h"
23 #include "CoralBase/AttributeListSpecification.h"
36 declareInterface<EventInfoAttListTool>(
this );
75 ATH_MSG_DEBUG(
"EventInfoAttListTool - getAttributeList() return success");
92 ATH_MSG_DEBUG(
"EventInfoAttListTool - getAttributeList() return success");
98 std::unique_ptr<AthenaAttributeList>
105 if (
sc.isFailure()) {
109 ATH_MSG_DEBUG(
"EventInfoAttListTool - getAttributeList() return success");
127 eventTag[
"IsSimulation"] .data<
bool>() = isSimulation;
128 eventTag[
"IsCalibration"].data<
bool>() = isCalibration;
129 eventTag[
"IsTestBeam"] .data<
bool>() = isTestBeam;
136 unsigned int mcChannel = 0;
138 eventTag[
"McChannel"] .data<
unsigned int>() = mcChannel;
142 eventTag[
"ConditionsRun"].data<
unsigned int>() = condRunNumber;
146 unsigned long bunchId = eventInfo.
bcid();
148 eventTag[
"EventTimeNanoSec"].data<
unsigned int>() = timeStampNS;
149 eventTag[
"BunchId"] .data<
unsigned int>() = bunchId;
155 eventTag[
"EventWeight"].data<
float>() = evweight;
157 return StatusCode::SUCCESS;
170 eventTag[
"IsSimulation"] .data<
bool>() = isSimulation;
171 eventTag[
"IsCalibration"].data<
bool>() = isCalibration;
172 eventTag[
"IsTestBeam"] .data<
bool>() = isTestBeam;
179 unsigned int mcChannel = 0;
181 eventTag[
"McChannel"] .data<
unsigned int>() = mcChannel;
185 eventTag[
"ConditionsRun"].data<
unsigned int>() = condRunNumber;
188 unsigned long timeStampNS = eventInfo.
event_ID()->time_stamp_ns_offset();
189 unsigned long bunchId = eventInfo.
event_ID()->bunch_crossing_id();
191 eventTag[
"EventTimeNanoSec"].data<
unsigned int>() = timeStampNS;
192 eventTag[
"BunchId"] .data<
unsigned int>() = bunchId;
198 eventTag[
"EventWeight"].data<
float>() = evweight;
200 return StatusCode::SUCCESS;
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
uint64_t eventNumber() const
The current event's event number.
@ IS_CALIBRATION
true: calibration, false: physics
This class provides general information about an event. It extends EventInfo with a list of sub-evts ...
uint32_t timeStampNSOffset() const
Nanosecond time offset wrt. the time stamp.
@ IS_SIMULATION
true: simulation, false: data
float mc_event_weight(unsigned int iweight=0) const
Access to MC weight.
uint32_t runNumber() const
The current event's run number.
number_type mc_channel_number() const
Access to the MC generator channel number (was used as run number for generator events)
uint32_t mcChannelNumber() const
The MC generator's channel number.
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
static const EventTypeCode IS_CALIBRATION
true: IS_CALIBRATION, false: IS_PHYSICS
::StatusCode StatusCode
StatusCode definition for legacy code.
EventID * event_ID()
the unique identification of the event.
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
uint32_t lumiBlock() const
The current event's luminosity block number.
static const EventTypeCode IS_SIMULATION
true: IS_SIMULATION, false: IS_DATA
This class provides general information about an event. Event information is provided by the accessor...
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
Class describing the basic event information.
static const EventTypeCode IS_TESTBEAM
true: IS_TESTBEAM, false: IS_FROM_ATLAS_DET
bool test(EventTypeCode type_code) const
Tests for standard characteristics.
#define ATH_MSG_WARNING(x)
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
float mcEventWeight(size_t i=0) const
The weight of one specific MC event used in the simulation.
uint32_t bcid() const
The bunch crossing ID of the event.
@ IS_TESTBEAM
true: testbeam, false: full detector
EventType * event_type()
the type of the event, e.g. simulation, testbeam, etc
bool eventType(EventType type) const
Check for one particular bitmask value.