|
ATLAS Offline Software
|
Go to the documentation of this file.
29 m_checkedEventSelector(false),
30 m_overrideRunNumber(false),
33 m_evtsPerLumiBlock(0),
36 m_timeStampInterval(0)
50 static const pool::Guid p4_guid(
"C634FDB6-CC4B-4BA2-B8F9-A84BE6A786C7");
51 static const pool::Guid p3_guid(
"3E240CA8-5124-405B-9059-FAFC4C5954C6");
52 static const pool::Guid p2_guid(
"22006E19-F0DA-4EFB-AF55-6FBDA421BF06");
53 static const pool::Guid p1_guid(
"A3053CD9-47F4-4C0F-B73A-A6F93F5CC7B7");
54 static const pool::Guid p0_guid(
"380D8BB9-B34F-470F-92CC-06C3D60F7BE4");
57 std::unique_ptr< EventInfo_p4 > col_vect( poolReadObject< EventInfo_p4 >() );
64 std::unique_ptr< EventInfo_p3 > col_vect( poolReadObject< EventInfo_p3 >() );
71 std::unique_ptr< EventInfo_p2 > col_vect( poolReadObject< EventInfo_p2 >() );
78 std::unique_ptr< EventInfo_p1 > col_vect( poolReadObject< EventInfo_p1 >() );
85 EventInfo* ei = poolReadObject< EventInfo >();
102 throw std::runtime_error(
"Unsupported persistent version of EventInfo");
140 MsgStream
log(
msgSvc(),
"EventInfoCnv" );
145 SmartIF<IProperty> appMgr{serviceLocator()->service(
"ApplicationMgr")};
147 log << MSG::ERROR <<
"massageEventInfo: Cannot get ApplicationMgr " <<
endmsg;
148 throw std::runtime_error(
"Cannot get ApplicationMgr");
150 StringProperty property(
"EvtSel",
"");
152 if (!
sc.isSuccess()) {
153 log << MSG::ERROR <<
"unable to get EvtSel: found " <<
property.value() <<
endmsg;
154 throw std::runtime_error(
"Cannot get property EvtSel from the ApplicationMgr");
158 SmartIF<IProperty> evtSel{serviceLocator()->service(
eventSelector)};
161 throw std::runtime_error(
"Cannot get EventSelector");
163 BooleanProperty overrideRunNumber = IntegerProperty(
"OverrideRunNumberFromInput",
false);
164 sc = evtSel->getProperty(&overrideRunNumber);
165 if (!
sc.isSuccess()) {
167 ATH_MSG_INFO(
"massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector ");
172 IntegerProperty
runNumber = IntegerProperty(
"RunNumber", 0);
174 if (!
sc.isSuccess()) {
175 log << MSG::ERROR <<
"massageEventInfo: unable to get RunNumber from EventSelector: found "
178 throw std::runtime_error(
"Cannot get RunNumber");
185 IntegerProperty lumiBlockNumber = IntegerProperty(
"FirstLB", 0);
186 sc = evtSel->getProperty(&lumiBlockNumber);
187 if (!
sc.isSuccess()) {
188 log << MSG::INFO <<
"massageEventInfo: unable to get FirstLB from EventSelector. Using "
196 IntegerProperty evtsPerLumiBlock = IntegerProperty(
"EventsPerLB", 0);
197 sc = evtSel->getProperty(&evtsPerLumiBlock);
198 if (!
sc.isSuccess()) {
199 log << MSG::INFO <<
"massageEventInfo: unable to get EventsPerLB from EventSelector. Using "
207 IntegerProperty
timeStamp = IntegerProperty(
"InitialTimeStamp", 0);
209 if (!
sc.isSuccess()) {
210 log << MSG::INFO <<
"massageEventInfo: unable to get InitialTimeStamp from EventSelector. Using "
218 IntegerProperty timeStampInterval = IntegerProperty(
"TimeStampInterval", 0);
219 sc = evtSel->getProperty(&timeStampInterval);
220 if (!
sc.isSuccess()) {
221 log << MSG::INFO <<
"massageEventInfo: unable to get TimeStampInterval from EventSelector. Using "
231 log <<
MSG::DEBUG <<
"massageEventInfo: OverrideRunNumberFromInput from EventSelector is false "
241 MsgStream
log(
msgSvc(),
"EventInfoCnv" );
242 log << MSG::ERROR <<
"massageEventInfo: trying to reset run number for data!!! " <<
endmsg;
243 log << MSG::ERROR <<
" Job option EventSelector.RunNumber should NOT be set, found it set to: " <<
m_simRunNumber <<
endmsg;
244 throw std::runtime_error(
"Trying to reset run number for DATA!!!");
virtual EventInfo * createTransientConst(const EventInfo_p3 *persObj, MsgStream &log) const override
void set_mc_channel_number(number_type chan)
Add in the MC generator channel number (aka gen run number)
unsigned int m_timeStampInterval
This class contains trigger related information.
This class provides general information about an event. It extends EventInfo with a list of sub-evts ...
SmartIF< IEvtIdModifierSvc > m_evtIdModSvc
unsigned int m_evtsPerLumiBlock
float mc_event_weight(unsigned int iweight=0) const
Access to MC weight.
number_type mc_channel_number() const
Access to the MC generator channel number (was used as run number for generator events)
unsigned int m_lumiBlockNumber
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
virtual EventInfo * createTransientConst(const EventInfo_p1 *persObj, MsgStream &log) const override
msgSvc
Provide convenience handles for various services.
Compatibility for old converter classes that don't get passed the key.
::StatusCode StatusCode
StatusCode definition for legacy code.
EventID * event_ID()
the unique identification of the event.
EventInfo * massageEventInfo(EventInfo *ei)
This class is the persistent representation of EventInfo.
virtual PERS * createPersistentConst(const TRANS *transObj, MsgStream &log) const
virtual EventInfo * createTransientConst(const EventInfo_p4 *persObj, MsgStream &log) const override
EventInfoCnv(ISvcLocator *svcloc)
static const EventTypeCode IS_SIMULATION
true: IS_SIMULATION, false: IS_DATA
virtual EventInfo_PERS * createPersistent(EventInfo *transObj)
bool m_checkedEventSelector
virtual EventInfo * createTransient()
This class provides general information about an event. Event information is provided by the accessor...
void set_mc_event_weight(float weight, unsigned int iweight=0, unsigned int nWeightsMax=0)
Add in MC weight. For more than 1 weight, add with iweight > 0.
void set_mc_event_number(uint64_t evt)
Add in the MC generator event number.
const std::vector< number_type > & eventFilterInfo() const
get event filter trigger info
virtual EventInfo * createTransientConst(const EventInfo_p2 *persObj, MsgStream &log) const override
bool test(EventTypeCode type_code) const
Tests for standard characteristics.
TriggerInfo * trigger_info()
trigger information (ptr may be NULL)
unsigned int m_simRunNumber
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
unsigned int m_lbEvtCounter
AthenaPool converter for EventInfo.
EventType * event_type()
the type of the event, e.g. simulation, testbeam, etc
thread_local event_number_t eventIndex