diff --git a/Event/EventBookkeeperTools/src/CutFlowSvc.cxx b/Event/EventBookkeeperTools/src/CutFlowSvc.cxx index 3300d9e757e76f7b836162a82c42bb650bfba0ad..b4aad64355a1f776c72befe385c9dc9d68d88cf9 100644 --- a/Event/EventBookkeeperTools/src/CutFlowSvc.cxx +++ b/Event/EventBookkeeperTools/src/CutFlowSvc.cxx @@ -84,8 +84,7 @@ CutFlowSvc::initialize() incSvc->addListener(this, "MetaDataStop", 50); // Create bookkeeper container for bookkeepers in _this_ processing - xAOD::CutBookkeeperContainer* fileBook(NULL); - fileBook = new xAOD::CutBookkeeperContainer(); + auto fileBook = new xAOD::CutBookkeeperContainer(); ATH_CHECK( recordCollection( fileBook, m_fileCollName) ); // Determine the skimming cycle number that we should use now from the input file @@ -134,6 +133,7 @@ CutIdentifier CutFlowSvc::registerFilter( const std::string& name, { ATH_MSG_DEBUG("calling registerFilter(" << name << ", " << description << ")" ); + // *FIXME* This should probably be a unique_ptr, but requires changes in xAODCutFlow as well xAOD::CutBookkeeper* tmpEBK = new xAOD::CutBookkeeper(); tmpEBK->setName(name); tmpEBK->setDescription(description); @@ -259,8 +259,8 @@ CutIdentifier CutFlowSvc::declareUsedOtherFilter( const std::string& name, } // Create a temporary CutBookkeeper object + // *FIXME* This should probably be a unique_ptr, but requires changes in xAODCutFlow as well xAOD::CutBookkeeper* tmpEBK = new xAOD::CutBookkeeper(); - // tmpEBK->makePrivateStore(); tmpEBK->setName(name); tmpEBK->setInputStream(m_inputStream); tmpEBK->setCycle(m_skimmingCycle); @@ -321,9 +321,9 @@ CutFlowSvc::addEvent( CutIdentifier cutID ) double evtWeight=1.0; - const xAOD::EventInfo* evtInfo = 0; + const xAOD::EventInfo* evtInfo = nullptr; StatusCode sc = m_eventStore->retrieve(evtInfo); - if ( sc.isFailure() || NULL == evtInfo ) { + if ( sc.isFailure() || nullptr == evtInfo ) { ATH_MSG_WARNING("Could not retrieve EventInfo from StoreGate "); evtWeight=-1000.; } else { @@ -349,8 +349,7 @@ CutFlowSvc::addEvent( CutIdentifier cutID, double weight) DataHandle<xAOD::CutBookkeeperContainer> fileBook; if (m_outMetaDataStore->retrieve(fileBook,m_fileCollName).isFailure()) { ATH_MSG_WARNING("Could not retrieve handle to cutflowsvc bookkeeper " << m_fileCollName << " creating new one"); - xAOD::CutBookkeeperContainer* fileBook(NULL); - fileBook = new xAOD::CutBookkeeperContainer(); + auto fileBook = new xAOD::CutBookkeeperContainer(); if( recordCollection( fileBook, m_fileCollName).isFailure() ) { ATH_MSG_ERROR("Could not create empty " << m_fileCollName << " CutBookkeeperContainer"); } @@ -534,7 +533,7 @@ CutFlowSvc::recordCollection( xAOD::CutBookkeeperContainer * coll, // Take care of the peculiarities of the new xAOD EDM, i.e., create the needed AuxStore - xAOD::CutBookkeeperAuxContainer* auxCont = new xAOD::CutBookkeeperAuxContainer; + auto auxCont = new xAOD::CutBookkeeperAuxContainer; coll->setStore( auxCont ); //gives it a new associated aux container // Record the aux container diff --git a/Event/EventBookkeeperTools/src/CutFlowSvc.h b/Event/EventBookkeeperTools/src/CutFlowSvc.h index 2e16d8e43d4957fd60fe85a906f6c9aa7ff6d463..0f96f2f46671ff382ae9916e98a9a71fe4088526 100644 --- a/Event/EventBookkeeperTools/src/CutFlowSvc.h +++ b/Event/EventBookkeeperTools/src/CutFlowSvc.h @@ -169,9 +169,6 @@ private: /// The name of the currently used input file stream std::string m_inputStream; - /// A flag to say if the input file is currently open or not - //bool m_fileCurrentlyOpened; - /// Declare a simple typedef for the internal map typedef MAP_NS::unordered_map<CutIdentifier, xAOD::CutBookkeeper*> CutIDMap_t;