diff --git a/Control/PileUpComps/CMakeLists.txt b/Control/PileUpComps/CMakeLists.txt index 6ed5998fbe9b145537180dafbecf073e9992763c..0447977975ae4d11ff038be44197cb0b6af768d4 100644 --- a/Control/PileUpComps/CMakeLists.txt +++ b/Control/PileUpComps/CMakeLists.txt @@ -12,8 +12,10 @@ atlas_depends_on_subdirs( PRIVATE Control/PileUpTools Control/StoreGate Event/EventInfo - Event/xAOD/xAODCnvInterfaces + Event/EventInfoUtils Event/xAOD/xAODEventInfo + Event/xAOD/xAODCnvInterfaces + Event/xAOD/xAODEventInfoCnv GaudiKernel ) # External dependencies: @@ -25,5 +27,9 @@ atlas_add_component( PileUpComps src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel PileUpToolsLib StoreGateLib SGtests EventInfo xAODCnvInterfaces xAODEventInfo GaudiKernel ) + LINK_LIBRARIES ${Boost_LIBRARIES} + ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel + PileUpToolsLib StoreGateLib SGtests EventInfo + EventInfoUtils xAODEventInfo xAODEventInfoCnv GaudiKernel ) + diff --git a/Control/PileUpComps/src/PileUpEventLoopMgr.cxx b/Control/PileUpComps/src/PileUpEventLoopMgr.cxx index 35d3d0b435a6f7951584e66409026904b1690f59..36dee170be3fa026554dee48499384ad96206422 100644 --- a/Control/PileUpComps/src/PileUpEventLoopMgr.cxx +++ b/Control/PileUpComps/src/PileUpEventLoopMgr.cxx @@ -13,9 +13,9 @@ #include "AthenaKernel/ExtendedEventContext.h" #include "AthenaKernel/EventContextClid.h" -#include "EventInfo/PileUpEventInfo.h" // OLD EDM #include "EventInfo/EventID.h" // OLD EDM #include "EventInfo/EventType.h" // OLD EDM +#include "EventInfo/EventInfo.h" // OLD EDM #include "EventInfo/EventIncident.h" // OLD EDM #include "PileUpTools/IBeamIntensity.h" @@ -34,6 +34,7 @@ // xAOD include(s): #include "xAODCore/tools/PrintHelpers.h" #include "xAODCnvInterfaces/IEventInfoCnvTool.h" +#include "EventInfoUtils/EventInfoFromxAOD.h" // Gaudi headers #include "GaudiKernel/IAlgorithm.h" @@ -739,7 +740,7 @@ StatusCode PileUpEventLoopMgr::executeEvent(void* par) assert(pEvent); // Make EventID for the Event Context - EventID ev_id = m_xAODCnvTool->eventIDFromXAOD( pEvent ); + EventID ev_id = eventIDFromxAOD( pEvent ); m_eventContext->setEventID( ev_id ); m_eventContext->set(m_nevt,0); @@ -757,7 +758,7 @@ StatusCode PileUpEventLoopMgr::executeEvent(void* par) } // Make EventInfo for incidents - EventInfo ei( new EventID(ev_id), new EventType( m_xAODCnvTool->eventTypeFromXAOD(pEvent) ) ); + EventInfo ei( new EventID(ev_id), new EventType( eventTypeFromxAOD(pEvent) ) ); /// Fire begin-Run incident if new run: if (m_firstRun || (m_currentRun != pEvent->runNumber()) ) diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/CMakeLists.txt b/Database/AthenaPOOL/OutputStreamAthenaPool/CMakeLists.txt index 6db64f55782f98f2c70134b6a7f7a377cccd2476..3c260a8619c927f7f3371bc7a8b5af11a15b734c 100644 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/CMakeLists.txt +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/CMakeLists.txt @@ -15,7 +15,7 @@ atlas_depends_on_subdirs( PRIVATE Database/AthenaPOOL/AthenaPoolUtilities Database/PersistentDataModel Event/EventInfo - Event/xAOD/xAODCnvInterfaces + Event/EventInfoUtils Event/xAOD/xAODEventInfo GaudiKernel ) @@ -30,7 +30,7 @@ atlas_add_component( OutputStreamAthenaPool LINK_LIBRARIES AthenaBaseComps AthenaKernel SGTools StoreGateLib SGtests AthenaPoolCnvSvcLib AthenaPoolUtilities PersistentDataModel EventInfo - xAODEventInfo xAODCnvInterfaces GaudiKernel ) + xAODEventInfo EventInfoUtils GaudiKernel ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx b/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx index e6444f6aa61d7e8393497d42dd8af1b5cb5ff87d..e9cbba5a11c68930892dd099add2a6226bbb9063 100644 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.cxx @@ -18,15 +18,14 @@ #include "EventInfo/EventID.h" #include "StoreGate/StoreGateSvc.h" #include "xAODEventInfo/EventInfo.h" -#include "xAODCnvInterfaces/IEventInfoCnvTool.h" +#include "EventInfoUtils/EventInfoFromxAOD.h" //___________________________________________________________________________ MakeEventStreamInfo::MakeEventStreamInfo(const std::string& type, const std::string& name, const IInterface* parent) : ::AthAlgTool(type, name, parent), m_metaDataStore("StoreGateSvc/MetaDataStore", name), - m_eventStore("StoreGateSvc", name), - m_xAODCnvTool("xAODMaker::EventInfoCnvTool/EventInfoCnvTool", this) + m_eventStore("StoreGateSvc", name) { // Declare IAthenaOutputStreamTool interface declareInterface<IAthenaOutputTool>(this); @@ -49,8 +48,6 @@ StatusCode MakeEventStreamInfo::initialize() { ATH_MSG_FATAL("Could not find EventStore"); return(StatusCode::FAILURE); } - // Retrieve the converter tool: - CHECK(m_xAODCnvTool.retrieve()); return(StatusCode::SUCCESS); } @@ -106,7 +103,7 @@ StatusCode MakeEventStreamInfo::postExecute() { if( xEvent ) { runN = xEvent->runNumber(); lumiN = xEvent->lumiBlock(); - evtype = m_xAODCnvTool->eventTypeFromXAOD(xEvent); + evtype = eventTypeFromxAOD(xEvent); } else { ATH_MSG_ERROR("Unable to retrieve EventInfo object"); return(StatusCode::FAILURE); diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.h b/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.h index c18217b7ce8ed7aba59f6b63598e400224517304..acd47d616abd39ebc88342b9ce49c6c55d506ebf 100644 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.h +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/MakeEventStreamInfo.h @@ -50,9 +50,5 @@ private: /// Pointer to the data stores ServiceHandle<StoreGateSvc> m_metaDataStore; ServiceHandle<StoreGateSvc> m_eventStore; - - /// Handle to the xAOD::EventInfo converter tool - ToolHandle< xAODMaker::IEventInfoCnvTool > m_xAODCnvTool; - }; #endif diff --git a/Database/IOVDbSvc/CMakeLists.txt b/Database/IOVDbSvc/CMakeLists.txt index a350757663245a7806951c19b2e4f56c28b08195..1871bfbb97e770ef8985871bbb24d8184cdb1e76 100644 --- a/Database/IOVDbSvc/CMakeLists.txt +++ b/Database/IOVDbSvc/CMakeLists.txt @@ -24,6 +24,7 @@ atlas_depends_on_subdirs( Database/IOVDbMetaDataTools DetectorDescription/GeoModel/GeoModelInterfaces Event/EventInfo + Event/EventInfoUtils Event/EventInfoMgt ) # External dependencies: @@ -44,7 +45,7 @@ atlas_add_component( IOVDbSvc INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS} LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} ${COOL_LIBRARIES} GaudiKernel AthenaBaseComps AthenaKernel CxxUtils SGTools StoreGateLib - FileCatalog AthenaPoolUtilities CoraCool IOVDbDataModel EventInfo IOVDbSvcLib ) + FileCatalog AthenaPoolUtilities CoraCool IOVDbDataModel EventInfo EventInfoUtils IOVDbSvcLib ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/Database/IOVDbSvc/src/IOVDbSvc.cxx b/Database/IOVDbSvc/src/IOVDbSvc.cxx index b7077c9547793b27a57f61f572e913da4516bf80..a9a4c5fe4a354500ede353f0faad13e763575ed0 100644 --- a/Database/IOVDbSvc/src/IOVDbSvc.cxx +++ b/Database/IOVDbSvc/src/IOVDbSvc.cxx @@ -21,7 +21,7 @@ #include "EventInfoMgt/ITagInfoMgr.h" #include "EventInfo/TagInfo.h" -#include "SGTools/EventIDFromStore.h" +#include "EventInfoUtils/EventIDFromStore.h" #include "IOVDbParser.h" diff --git a/Event/EventInfoMgt/CMakeLists.txt b/Event/EventInfoMgt/CMakeLists.txt index d51eef10d87ea4527e212ced8a7751d040e46b15..33f3d19dd85b6f768f0b3bbde925a0fc9ca6fb09 100644 --- a/Event/EventInfoMgt/CMakeLists.txt +++ b/Event/EventInfoMgt/CMakeLists.txt @@ -16,13 +16,17 @@ atlas_depends_on_subdirs( PUBLIC Control/AthenaBaseComps Database/AthenaPOOL/AthenaPoolUtilities Database/IOVDbMetaDataTools - Event/EventInfo ) + Event/EventInfo + Event/EventInfoUtils + ) # Component(s) in the package: atlas_add_component( EventInfoMgt src/TagInfoMgr.cxx src/EventInfoMgt_entries.cxx - LINK_LIBRARIES AthenaKernel GaudiKernel CxxUtils SGTools StoreGateLib SGtests AthenaBaseComps AthenaPoolUtilities EventInfo ) + LINK_LIBRARIES AthenaKernel GaudiKernel CxxUtils + SGTools StoreGateLib SGtests AthenaBaseComps + AthenaPoolUtilities EventInfo EventInfoUtils ) # Install files from the package: atlas_install_headers( EventInfoMgt ) diff --git a/Event/EventInfoMgt/src/TagInfoMgr.cxx b/Event/EventInfoMgt/src/TagInfoMgr.cxx index 19de7369ab6a7688610e5b4472719a2df5b25bc9..d62b8c129bae7a7e8763437607ffe052d53983d7 100755 --- a/Event/EventInfoMgt/src/TagInfoMgr.cxx +++ b/Event/EventInfoMgt/src/TagInfoMgr.cxx @@ -17,12 +17,13 @@ #include "TagInfoMgr.h" // Event includes +#include "EventInfo/EventID.h" #include "EventInfo/EventInfo.h" #include "EventInfo/EventType.h" #include "EventInfo/EventIncident.h" #include "EventInfo/TriggerInfo.h" -#include "SGTools/EventIDFromStore.h" +#include "EventInfoUtils/EventIDFromStore.h" // IOVDbSvc #include "AthenaKernel/IIOVDbSvc.h" @@ -495,6 +496,13 @@ TagInfoMgr::fillMetaData (const TagInfo* tagInfo, const CondAttrListCollection // Get run number for IOV unsigned int runNumber = 0; const EventIDBase* evid = EventIDFromStore( m_storeGate ); + + auto proxies = m_storeGate->proxies(); + cout << "MN: Store: " << m_storeGate->name() << endl; + for(auto prox : proxies) { + cout << "MN: CLID=" << prox->clID() << " key=" << prox->name() << endl; + } + if( evid ) { runNumber = evid->run_number(); } else { diff --git a/Event/EventInfoUtils/CMakeLists.txt b/Event/EventInfoUtils/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..4aafaf0e65a7d8a02858c0f9a64b3796a8854859 --- /dev/null +++ b/Event/EventInfoUtils/CMakeLists.txt @@ -0,0 +1,23 @@ +################################################################################ +# Package: EventInfoUtils +################################################################################ + +# Declare the package name: +atlas_subdir( EventInfoUtils ) + +# Declare the package's dependencies: +atlas_depends_on_subdirs( PUBLIC + GaudiKernel + Control/StoreGate + PRIVATE + Control/SGTools + Event/Eventinfo + Event/xAOD/xAODEventInfo + ) + +# Libraries(s) in the package: +atlas_add_library( EventInfoUtils + src/*.cxx + PUBLIC_HEADERS EventInfoUtils + LINK_LIBRARIES EventInfo xAODEventInfo + ) diff --git a/Control/SGTools/SGTools/EventIDFromStore.h b/Event/EventInfoUtils/EventInfoUtils/EventIDFromStore.h similarity index 61% rename from Control/SGTools/SGTools/EventIDFromStore.h rename to Event/EventInfoUtils/EventInfoUtils/EventIDFromStore.h index e6dca6ca7ec367874baacedd6a8a067d3d67cb1b..11b24d672ef5f551b604284e1d82608ed2032514 100644 --- a/Control/SGTools/SGTools/EventIDFromStore.h +++ b/Event/EventInfoUtils/EventInfoUtils/EventIDFromStore.h @@ -14,12 +14,10 @@ #ifndef SGTOOLS_EVENTIDFROMSTORE_H #define SGTOOLS_EVENTIDFROMSTORE_H -#include "EventInfo/EventID.h" -#include "GaudiKernel/EventContext.h" -#include "AthenaKernel/IProxyDict.h" -#include "SGTools/DataProxy.h" #include "StoreGate/StoreGateSvc.h" -#include "AthenaKernel/EventContextClid.h" + +class IProxyDict; +class EventIDBase; /** * @brief Retrieve the EventID from EventContext saved in store STORE. @@ -27,19 +25,7 @@ * * If there is no context recorded in the store, return nullptr */ -const EventIDBase* EventIDFromStore( IProxyDict* store ) -{ - if( store ) { - //MN: FIX: is this OK to have it static in case of multiple Stores? - static const SG::sgkey_t ctxkey = store->stringToKey( "EventContext", ClassID_traits<EventContext>::ID() ); - SG::DataProxy* proxy = store->proxy_exact(ctxkey); - if( proxy && proxy->object() ) { - return & SG::DataProxy_cast<EventContext>( proxy )->eventID(); - } - } - return nullptr; -} - +const EventIDBase* EventIDFromStore( IProxyDict* store ); // variation accepting a ServiceHandle to StoreGate const EventIDBase* EventIDFromStore( const ServiceHandle<StoreGateSvc>& storeH ) diff --git a/Event/EventInfoUtils/EventInfoUtils/EventInfoFromxAOD.h b/Event/EventInfoUtils/EventInfoUtils/EventInfoFromxAOD.h new file mode 100644 index 0000000000000000000000000000000000000000..2771184596dfeab00a065fba1e4927354a22c73b --- /dev/null +++ b/Event/EventInfoUtils/EventInfoUtils/EventInfoFromxAOD.h @@ -0,0 +1,25 @@ +// Dear emacs, this is -*- c++ -*- + +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +// $Id: EventInfoCnvTool.h 793565 2017-01-23 22:00:14Z leggett $ +#ifndef EVENTINFOFROMXAOD_H +#define EVENTINFOFROMXAOD_H + +#include "EventInfo/EventID.h" +#include "EventInfo/EventType.h" +#include "xAODEventInfo/EventInfo.h" + + +/// Create EventID object from xAOD::EventInfo +EventID eventIDFromxAOD( const xAOD::EventInfo* xaod ); + +/// Create EventType object from xAOD::EventInfo +EventType eventTypeFromxAOD( const xAOD::EventInfo* xaod ); + + +#endif + + diff --git a/Event/EventInfoUtils/src/EventIDFromStore.cxx b/Event/EventInfoUtils/src/EventIDFromStore.cxx new file mode 100644 index 0000000000000000000000000000000000000000..3c1d39b218da3e19a4d3e2585debc584cfb7db95 --- /dev/null +++ b/Event/EventInfoUtils/src/EventIDFromStore.cxx @@ -0,0 +1,34 @@ + +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "EventInfoUtils/EventIDFromStore.h" + +#include "GaudiKernel/EventContext.h" +#include "AthenaKernel/EventContextClid.h" +#include "AthenaKernel/IProxyDict.h" +#include "SGTools/DataProxy.h" +#include "EventInfo/EventID.h" +#include "EventInfo/EventInfo.h" + +const EventIDBase* EventIDFromStore( IProxyDict* store ) +{ + if( store ) { + //MN: FIX: is this OK to have it static in case of multiple Stores? + static const SG::sgkey_t ctxkey = store->stringToKey( "EventContext", ClassID_traits<EventContext>::ID() ); + SG::DataProxy* proxy = store->proxy_exact(ctxkey); + if( proxy && proxy->object() ) { + return & SG::DataProxy_cast<EventContext>( proxy )->eventID(); + } + + // Check for EventInfo + proxy = store->proxy( ClassID_traits<EventInfo>::ID(), "" ); + if( proxy && proxy->object() ) { + return SG::DataProxy_cast<EventInfo>( proxy )->event_ID(); + } + + } + return nullptr; +} + diff --git a/Event/EventInfoUtils/src/EventInfoFromxAOD.cxx b/Event/EventInfoUtils/src/EventInfoFromxAOD.cxx new file mode 100644 index 0000000000000000000000000000000000000000..2f3d21c2813923910fadb3c357c5e346159c288c --- /dev/null +++ b/Event/EventInfoUtils/src/EventInfoFromxAOD.cxx @@ -0,0 +1,63 @@ + +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "EventInfoUtils/EventInfoFromxAOD.h" + + +/** + * Create EventID object from xAOD::EventInfo + * + * @param xaod The xAOD::EventInfo object + * @returns <code>EventID</code> + */ + +EventID eventIDFromxAOD( const xAOD::EventInfo* xaod ) +{ + return EventID( xaod->runNumber(), + xaod->eventNumber(), + xaod->timeStamp(), + xaod->timeStampNSOffset(), + xaod->lumiBlock(), + xaod->bcid() ); +} + + +/** + * Create EventType object from xAOD::EventInfo + * + * @param xaod The xAOD::EventInfo object + * @returns <code>EventType</code> + */ + +EventType eventTypeFromxAOD( const xAOD::EventInfo* xaod ) +{ + EventType et; + // Copy DetDescr tags + std::string ddtags; + for( const auto& ddtag: xaod->detDescrTags() ) { + //MN FIX: this is only my guess how it should look like + ddtags += '#' + ddtag.first + '#' + ddtag.second; + } + et.set_user_type( ddtags ); + + if( xaod->eventType(xAOD::EventInfo::IS_TESTBEAM) ) { + et.add_type(EventType::IS_TESTBEAM); + } + if( xaod->eventType(xAOD::EventInfo::IS_CALIBRATION) ) { + et.add_type(EventType::IS_CALIBRATION); + } + if( xaod->eventType(xAOD::EventInfo::IS_SIMULATION) ) { + et.add_type(EventType::IS_SIMULATION); + + et.set_mc_channel_number( xaod->mcChannelNumber() ); + et.set_mc_event_number( xaod->mcEventNumber() ); + for( size_t i=0; i< xaod->mcEventWeights().size(); i++ ) { + et.set_mc_event_weight( xaod->mcEventWeight(i), i, xaod->mcEventWeights().size() ); + } + } + + return et; +} + diff --git a/Event/xAOD/xAODCnvInterfaces/xAODCnvInterfaces/IEventInfoCnvTool.h b/Event/xAOD/xAODCnvInterfaces/xAODCnvInterfaces/IEventInfoCnvTool.h index b5d0e3342723d00c16fc3793a7b444500293c66e..8776f99f3451ebe87a4a4d612cbfe35df6e6a274 100644 --- a/Event/xAOD/xAODCnvInterfaces/xAODCnvInterfaces/IEventInfoCnvTool.h +++ b/Event/xAOD/xAODCnvInterfaces/xAODCnvInterfaces/IEventInfoCnvTool.h @@ -17,8 +17,6 @@ namespace xAOD { typedef EventInfo_v1 EventInfo; } class EventInfo; -class EventID; -class EventType; namespace xAODMaker { @@ -47,12 +45,6 @@ namespace xAODMaker { bool pileUpInfo = false, bool copyPileUpLinks = true ) const = 0; - /// Create EventID object from xAOD::EventInfo - virtual EventID eventIDFromXAOD( const xAOD::EventInfo* xaod ) const = 0; - - /// Create EventType object from xAOD::EventInfo - virtual EventType eventTypeFromXAOD( const xAOD::EventInfo* xaod ) const = 0; - /// Gaudi interface definition static const InterfaceID& interfaceID() { return IID_IEventInfoCnvTool; diff --git a/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvAlg.cxx b/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvAlg.cxx index 38ea14b665c30939e783e681af7deb5dd770ec5c..9ad9029219a1501730a4441811651b1387c45c52 100644 --- a/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvAlg.cxx +++ b/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvAlg.cxx @@ -61,8 +61,6 @@ namespace xAODMaker { StatusCode EventInfoCnvAlg::execute (const EventContext& ctx) const { - ATH_MSG_WARNING( "MN: EventInfoCnvAlg::execute_r" ); - // Check if anything needs to be done: // FIXME: Job configuration should be fixed so we don't need this test. if( evtStore()->contains< xAOD::EventInfo >( m_xaodKey.key() ) ) { diff --git a/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvTool.cxx b/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvTool.cxx index 6c52c3f32dbe114984830628bce4731d339889b3..6a017fd2adf5c9a39fddbf25b740edf37f399ec7 100644 --- a/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvTool.cxx +++ b/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvTool.cxx @@ -127,61 +127,6 @@ namespace xAODMaker { return StatusCode::SUCCESS; } - /** - * Create EventID object from xAOD::EventInfo - * - * @param xaod The xAOD::EventInfo object - * @returns <code>EventID</code> - */ - - EventID EventInfoCnvTool::eventIDFromXAOD( const xAOD::EventInfo* xaod ) const - { - return EventID( xaod->runNumber(), - xaod->eventNumber(), - xaod->timeStamp(), - xaod->timeStampNSOffset(), - xaod->lumiBlock(), - xaod->bcid() ); - } - - - /** - * Create EventType object from xAOD::EventInfo - * - * @param xaod The xAOD::EventInfo object - * @returns <code>EventType</code> - */ - - EventType EventInfoCnvTool::eventTypeFromXAOD( const xAOD::EventInfo* xaod ) const - { - EventType et; - // Copy DetDescr tags - std::string ddtags; - for( const auto& ddtag: xaod->detDescrTags() ) { - //MN FIX: this is only my guess how it should look like - ddtags += '#' + ddtag.first + '#' + ddtag.second; - } - et.set_user_type( ddtags ); - - if( xaod->eventType(xAOD::EventInfo::IS_TESTBEAM) ) { - et.add_type(EventType::IS_TESTBEAM); - } - if( xaod->eventType(xAOD::EventInfo::IS_CALIBRATION) ) { - et.add_type(EventType::IS_CALIBRATION); - } - if( xaod->eventType(xAOD::EventInfo::IS_SIMULATION) ) { - et.add_type(EventType::IS_SIMULATION); - - et.set_mc_channel_number( xaod->mcChannelNumber() ); - et.set_mc_event_number( xaod->mcEventNumber() ); - for( size_t i=0; i< xaod->mcEventWeights().size(); i++ ) { - et.set_mc_event_weight( xaod->mcEventWeight(i), i, xaod->mcEventWeights().size() ); - } - } - - return et; - } - /** * This is the important function of the tool. It takes the EventInfo object * available in Athena, and fills an xAOD::EventInfo object with its contents. diff --git a/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvTool.h b/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvTool.h index b2d09be5c2181f05de38916bd6e2e2a0a0af8896..4130bea4d3f6d3c1379f2b2ad9bc47aaa0530980 100644 --- a/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvTool.h +++ b/Event/xAOD/xAODEventInfoCnv/src/EventInfoCnvTool.h @@ -54,12 +54,6 @@ namespace xAODMaker { bool pileUpInfo = false, bool copyPileUpLinks = true ) const; - /// Create EventID object from xAOD::EventInfo - virtual EventID eventIDFromXAOD( const xAOD::EventInfo* xaod ) const override; - - /// Create EventType object from xAOD::EventInfo - virtual EventType eventTypeFromXAOD( const xAOD::EventInfo* xaod ) const override; - private: #ifndef XAOD_ANALYSIS /// Connection to the beam spot service diff --git a/LArCalorimeter/LArDigitization/CMakeLists.txt b/LArCalorimeter/LArDigitization/CMakeLists.txt index 2f5f12c3d6d3f69376f5f7d2b154bbcce4875755..6029001d1e2944ef2aed286e6ca519015f76f8c2 100644 --- a/LArCalorimeter/LArDigitization/CMakeLists.txt +++ b/LArCalorimeter/LArDigitization/CMakeLists.txt @@ -23,6 +23,7 @@ atlas_depends_on_subdirs( PUBLIC LArCalorimeter/LArSimEvent LArCalorimeter/LArRecConditions LArCalorimeter/LArRawConditions + Event/EventInfoUtils PRIVATE Generators/GeneratorObjects ) @@ -37,7 +38,11 @@ atlas_add_library( LArDigitizationLib PUBLIC_HEADERS LArDigitization PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES CaloIdentifier AthenaBaseComps AthenaKernel Identifier xAODEventInfo GaudiKernel LArIdentifier LArRawEvent LArSimEvent LArRecConditions LArRawConditions CaloDetDescrLib PileUpToolsLib StoreGateLib SGtests LArCablingLib + LINK_LIBRARIES CaloIdentifier AthenaBaseComps + AthenaKernel Identifier xAODEventInfo GaudiKernel + LArIdentifier LArRawEvent LArSimEvent + LArRecConditions LArRawConditions CaloDetDescrLib + PileUpToolsLib StoreGateLib SGtests LArCablingLib EventInfoUtils PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} GeneratorObjects ) atlas_add_component( LArDigitization diff --git a/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx b/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx index c28a2ced9b374c36cf50fce95e512ba43de03822..6f8bc2403d672bd824e4e8b3ef409bae5b14487d 100755 --- a/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx +++ b/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx @@ -27,7 +27,7 @@ #include "LArSimEvent/LArHit.h" #include "LArSimEvent/LArHitContainer.h" #include "PileUpTools/PileUpMergeSvc.h" -#include "SGTools/EventIDFromStore.h" +#include "EventInfoUtils/EventIDFromStore.h" #include <CLHEP/Random/Randomize.h> diff --git a/Trigger/TrigT1/TrigT1CaloSim/CMakeLists.txt b/Trigger/TrigT1/TrigT1CaloSim/CMakeLists.txt index 9219ae4446a236b0ddfd0c57ef3778262d03d2e7..b2021e4367547882713e6571b4ac7ab12ba7cada 100644 --- a/Trigger/TrigT1/TrigT1CaloSim/CMakeLists.txt +++ b/Trigger/TrigT1/TrigT1CaloSim/CMakeLists.txt @@ -36,6 +36,7 @@ atlas_depends_on_subdirs( Control/AthenaKernel Control/CxxUtils Event/EventInfo + Event/EventInfoUtils Event/xAOD/xAODEventInfo LumiBlock/LumiBlockComps Tools/PathResolver @@ -56,7 +57,8 @@ atlas_add_library( TrigT1CaloSimLib TrigT1CaloCalibToolInterfaces TrigT1CaloToolInterfaces TrigT1Interfaces CaloDetDescrLib PileUpToolsLib StoreGateLib SGtests LArCablingLib TileConditionsLib TrigT1CaloEventLib TrigT1CaloUtilsLib LumiBlockCompsLib - PRIVATE_LINK_LIBRARIES AthenaKernel CxxUtils EventInfo xAODEventInfo + PRIVATE_LINK_LIBRARIES AthenaKernel CxxUtils EventInfo + xAODEventInfo EventInfoUtils PathResolver TrigT1CaloCondSvcLib ) atlas_add_component( TrigT1CaloSim diff --git a/Trigger/TrigT1/TrigT1CaloSim/src/TriggerTowerMaker.cxx b/Trigger/TrigT1/TrigT1CaloSim/src/TriggerTowerMaker.cxx index e0f1a7e594df4764f1c6eb9646ad148bae575955..1ae7ca14944a259f5a6aaee33c4aba9daf4e81ea 100755 --- a/Trigger/TrigT1/TrigT1CaloSim/src/TriggerTowerMaker.cxx +++ b/Trigger/TrigT1/TrigT1CaloSim/src/TriggerTowerMaker.cxx @@ -32,7 +32,7 @@ #include "LumiBlockComps/ILumiBlockMuTool.h" // Utilities -#include "SGTools/EventIDFromStore.h" +#include "EventInfoUtils/EventIDFromStore.h" #include "PathResolver/PathResolver.h" #include <sys/types.h>