![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
31 m_checkedEventSelector(false),
32 m_overrideRunNumber(false),
35 m_evtsPerLumiBlock(0),
38 m_timeStampInterval(0),
42 bool createif =
false;
43 svcloc->getService(
"EvtIdModifierSvc",
svc, createif).ignore();
59 static const pool::Guid p4_guid(
"C634FDB6-CC4B-4BA2-B8F9-A84BE6A786C7");
60 static const pool::Guid p3_guid(
"3E240CA8-5124-405B-9059-FAFC4C5954C6");
61 static const pool::Guid p2_guid(
"22006E19-F0DA-4EFB-AF55-6FBDA421BF06");
62 static const pool::Guid p1_guid(
"A3053CD9-47F4-4C0F-B73A-A6F93F5CC7B7");
63 static const pool::Guid p0_guid(
"380D8BB9-B34F-470F-92CC-06C3D60F7BE4");
66 std::unique_ptr< EventInfo_p4 > col_vect( poolReadObject< EventInfo_p4 >() );
73 std::unique_ptr< EventInfo_p3 > col_vect( poolReadObject< EventInfo_p3 >() );
80 std::unique_ptr< EventInfo_p2 > col_vect( poolReadObject< EventInfo_p2 >() );
87 std::unique_ptr< EventInfo_p1 > col_vect( poolReadObject< EventInfo_p1 >() );
94 EventInfo* ei = poolReadObject< EventInfo >();
111 throw std::runtime_error(
"Unsupported persistent version of EventInfo");
149 MsgStream
log(
msgSvc(),
"EventInfoCnv" );
154 IProperty* propertyServer(0);
155 StatusCode sc = serviceLocator()->service(
"ApplicationMgr", propertyServer);
156 if (
sc != StatusCode::SUCCESS ) {
157 log << MSG::ERROR <<
"massageEventInfo: Cannot get ApplicationMgr " <<
endmsg;
158 throw std::runtime_error(
"Cannot get ApplicationMgr");
160 StringProperty property(
"EvtSel",
"");
161 sc = propertyServer->getProperty(&property);
162 if (!
sc.isSuccess()) {
163 log << MSG::ERROR <<
"unable to get EvtSel: found " <<
property.value() <<
endmsg;
164 throw std::runtime_error(
"Cannot get property EvtSel from the ApplicationMgr");
169 if (
sc != StatusCode::SUCCESS ) {
171 throw std::runtime_error(
"Cannot get EventSelector");
173 BooleanProperty overrideRunNumber = IntegerProperty(
"OverrideRunNumberFromInput",
false);
174 sc = propertyServer->getProperty(&overrideRunNumber);
175 if (!
sc.isSuccess()) {
177 ATH_MSG_INFO(
"massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector ");
182 IntegerProperty
runNumber = IntegerProperty(
"RunNumber", 0);
184 if (!
sc.isSuccess()) {
185 log << MSG::ERROR <<
"massageEventInfo: unable to get RunNumber from EventSelector: found "
188 throw std::runtime_error(
"Cannot get RunNumber");
195 IntegerProperty lumiBlockNumber = IntegerProperty(
"FirstLB", 0);
196 sc = propertyServer->getProperty(&lumiBlockNumber);
197 if (!
sc.isSuccess()) {
198 log << MSG::INFO <<
"massageEventInfo: unable to get FirstLB from EventSelector. Using "
206 IntegerProperty evtsPerLumiBlock = IntegerProperty(
"EventsPerLB", 0);
207 sc = propertyServer->getProperty(&evtsPerLumiBlock);
208 if (!
sc.isSuccess()) {
209 log << MSG::INFO <<
"massageEventInfo: unable to get EventsPerLB from EventSelector. Using "
217 IntegerProperty
timeStamp = IntegerProperty(
"InitialTimeStamp", 0);
219 if (!
sc.isSuccess()) {
220 log << MSG::INFO <<
"massageEventInfo: unable to get InitialTimeStamp from EventSelector. Using "
228 IntegerProperty timeStampInterval = IntegerProperty(
"TimeStampInterval", 0);
229 sc = propertyServer->getProperty(&timeStampInterval);
230 if (!
sc.isSuccess()) {
231 log << MSG::INFO <<
"massageEventInfo: unable to get TimeStampInterval from EventSelector. Using "
241 log <<
MSG::DEBUG <<
"massageEventInfo: OverrideRunNumberFromInput from EventSelector is false "
251 MsgStream
log(
msgSvc(),
"EventInfoCnv" );
252 log << MSG::ERROR <<
"massageEventInfo: trying to reset run number for data!!! " <<
endmsg;
253 log << MSG::ERROR <<
" Job option EventSelector.RunNumber should NOT be set, found it set to: " <<
m_simRunNumber <<
endmsg;
254 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 ...
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 void modify_evtid(EventID &evt_id, event_number_t eventIndex, bool consume_stream)=0
modify an EventID's content
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
AthROOTErrorHandlerSvc * svc
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...
IEvtIdModifierSvc * m_evtIdModSvc
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