diff --git a/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamCnvSvc.h b/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamCnvSvc.h index d303988b0b99b3239108836f29fc3ea13358e397..956e554cff2edc747a7fda0f5460bd881829a88a 100644 --- a/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamCnvSvc.h +++ b/Event/ByteStreamCnvSvc/ByteStreamCnvSvc/ByteStreamCnvSvc.h @@ -64,19 +64,19 @@ private: std::string m_ioSvcName; /// list of service names - StringArrayProperty m_ioSvcNameList; + Gaudi::Property<std::vector<std::string>> m_ioSvcNameList; /// Services for writing output std::map<std::string, ByteStreamOutputSvc*> m_ioSvcMap; /// flags for Simulation EventType - BooleanProperty m_isSimulation; + Gaudi::Property<bool> m_isSimulation; /// flags for TestBeam EventType - BooleanProperty m_isTestbeam; + Gaudi::Property<bool> m_isTestbeam; /// flags for Calibration EventType - BooleanProperty m_isCalibration; + Gaudi::Property<bool> m_isCalibration; /// flags for getting Detector Mask from COOL - BooleanProperty m_getDetectorMask; + Gaudi::Property<bool> m_getDetectorMask; /// user type std::string m_userType; diff --git a/Event/ByteStreamCnvSvc/CMakeLists.txt b/Event/ByteStreamCnvSvc/CMakeLists.txt index 49d11b52d0e5a615ddc7a4ecc81f3e2542c81633..43e44d4617115ab60153ffc0e3b9c9c358085919 100644 --- a/Event/ByteStreamCnvSvc/CMakeLists.txt +++ b/Event/ByteStreamCnvSvc/CMakeLists.txt @@ -1,4 +1,4 @@ -# $Id: CMakeLists.txt 740489 2016-04-15 09:17:00Z krasznaa $ +# $Id: CMakeLists.txt 768274 2016-08-16 19:05:07Z ssnyder $ ################################################################################ # Package: ByteStreamCnvSvc ################################################################################ @@ -29,7 +29,7 @@ atlas_depends_on_subdirs( Event/ByteStreamCnvSvcLegacy ) # External dependencies: -find_package( Boost ) +find_package( Boost COMPONENTS system ) find_package( CORAL COMPONENTS CoralBase ) find_package( tdaq-common COMPONENTS eformat_old eformat_write RawFileName DataReader DataWriter ) diff --git a/Event/ByteStreamCnvSvc/cmt/requirements b/Event/ByteStreamCnvSvc/cmt/requirements index 8493843e1a5cf2bc3d6e4fac5e45c6cf7f60d70c..47c06841e0c2d498f4e22427d76e4dac05cdb0b2 100644 --- a/Event/ByteStreamCnvSvc/cmt/requirements +++ b/Event/ByteStreamCnvSvc/cmt/requirements @@ -101,3 +101,4 @@ macro_append AtlCopyBSEvent3_utest_dependencies AtlCopyBSEvent1_utest macro_append AtlFindBSEvent4_utest_dependencies AtlCopyBSEvent3_utest macro_append AtlCopyBSEvent5_utest_dependencies AtlFindBSEvent4_utest macro_append AtlCopyBSEvent6_utest_dependencies AtlFindBSEvent4_utest + diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamAttListMetadataSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamAttListMetadataSvc.cxx index e61f4d0d0f3f01168f20da32012bab28bf3d53c0..9d9beb4ea21a0d41fea5bfb4a4456859bce968c3 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamAttListMetadataSvc.cxx +++ b/Event/ByteStreamCnvSvc/src/ByteStreamAttListMetadataSvc.cxx @@ -47,13 +47,13 @@ StatusCode ByteStreamAttListMetadataSvc::readInit(const std::vector<std::string> StatusCode sc2 = mdStore->record(attlist, *it ); if (sc2.isFailure()) { msg() << MSG::WARNING - << "Unable to store AthenaAttributeList for " << *it << endreq; + << "Unable to store AthenaAttributeList for " << *it << endmsg; allok = StatusCode::FAILURE; } } else { msg() << MSG::DEBUG << *it << " already present in " - << m_outputStoreName.toString() << endreq; + << m_outputStoreName.toString() << endmsg; } ++it; } @@ -70,7 +70,7 @@ StatusCode ByteStreamAttListMetadataSvc::serialize(const std::vector<std::string ATH_MSG_FATAL("Cannot get serial."); return(StatusCode::FAILURE); } - msg() << MSG::INFO << "ByteStreamAttListMetadataSvc::serialize" << endreq; + msg() << MSG::INFO << "ByteStreamAttListMetadataSvc::serialize" << endmsg; m_serial->reset(); @@ -82,7 +82,7 @@ StatusCode ByteStreamAttListMetadataSvc::serialize(const std::vector<std::string while (it != keys.end()) { sc = inStore->retrieve( attList, *it ); if (sc.isSuccess()) { - msg() << MSG::INFO << "Found " << *it << " in " << m_inputStoreName.toString() << endreq; + msg() << MSG::INFO << "Found " << *it << " in " << m_inputStoreName.toString() << endmsg; ByteStream::FreeMetadata* metacont = new ByteStream::FreeMetadata(); std::string cl = "AthenaAttributeList"; std::string cnvname; @@ -98,7 +98,7 @@ StatusCode ByteStreamAttListMetadataSvc::serialize(const std::vector<std::string StatusCode ByteStreamAttListMetadataSvc::toBSMetadata(const std::vector<std::string>& keys) { - msg() << MSG::INFO << "ByteStreamAttListMetadataSvc::toBSMetadata" << endreq; + msg() << MSG::INFO << "ByteStreamAttListMetadataSvc::toBSMetadata" << endmsg; const DataHandle< AthenaAttributeList > attList; StoreGateSvc* inStore; StatusCode sc = service(m_inputStoreName.toString(),inStore); @@ -107,7 +107,7 @@ StatusCode ByteStreamAttListMetadataSvc::toBSMetadata(const std::vector<std::str while (it != keys.end()) { sc = inStore->retrieve( attList, *it ); if (sc.isSuccess()) { - msg() << MSG::INFO << "Found " << *it << " in " << m_inputStoreName.toString() << endreq; + msg() << MSG::INFO << "Found " << *it << " in " << m_inputStoreName.toString() << endmsg; ByteStream::FreeMetadata* metacont = new ByteStream::FreeMetadata(); coral::AttributeList::const_iterator first1 = attList->begin(); coral::AttributeList::const_iterator last1 = attList->end(); @@ -148,7 +148,7 @@ StatusCode ByteStreamAttListMetadataSvc::toBSMetadata(const std::vector<std::str ATH_MSG_DEBUG(" name " << name << " type " << type << " value " << buf.str()); //buf << first1->data<(*first1).specification().type()>(); const std::string value = buf.str(); - msg() << MSG::INFO << "About to push back " << name << ", " << value << endreq; + msg() << MSG::INFO << "About to push back " << name << ", " << value << endmsg; metacont->push_back(ByteStreamFreeMetadataString(name+"/"+type,value)); } StoreGateSvc* outStore; @@ -156,19 +156,19 @@ StatusCode ByteStreamAttListMetadataSvc::toBSMetadata(const std::vector<std::str if (sc2.isSuccess()) { sc2 = outStore->record(metacont, *it ); if (sc2.isFailure()) { - msg() << MSG::WARNING << "Unable to store ByteStreamFreeMetadataString for " << *it << endreq; + msg() << MSG::WARNING << "Unable to store ByteStreamFreeMetadataString for " << *it << endmsg; } } else { - msg() << MSG::WARNING << "Could not find store " << m_outputStoreName.toString() << endreq; + msg() << MSG::WARNING << "Could not find store " << m_outputStoreName.toString() << endmsg; delete metacont; return StatusCode::FAILURE; } } else { msg() << MSG::WARNING << "Did NOT find " << *it << " in " - << m_inputStoreName.toString() << endreq; - msg() << MSG::DEBUG << inStore->dump() << endreq; + << m_inputStoreName.toString() << endmsg; + msg() << MSG::DEBUG << inStore->dump() << endmsg; } ++it; } @@ -188,7 +188,7 @@ StatusCode ByteStreamAttListMetadataSvc::fromBSMetadata(const std::vector<std::s sc = inStore->retrieve( metacont, *it ); if (sc.isSuccess()) { - msg() << MSG::DEBUG << "Found " << *it << " in " << m_inputStoreName.toString() << endreq; + msg() << MSG::DEBUG << "Found " << *it << " in " << m_inputStoreName.toString() << endmsg; // Check for attlist in detector store (should be there from initialize) AthenaAttributeList* attlist; @@ -212,7 +212,7 @@ StatusCode ByteStreamAttListMetadataSvc::fromBSMetadata(const std::vector<std::s std::string name = first1->first.substr(0,first1->first.find('/')); std::string type = first1->first.substr(first1->first.find('/')+1); msg() << MSG::INFO - << "name = " << name << ", type = " << type << ", value = " << first1->second << endreq; + << "name = " << name << ", type = " << type << ", value = " << first1->second << endmsg; attlist->extend(name,type); } @@ -262,12 +262,12 @@ StatusCode ByteStreamAttListMetadataSvc::fromBSMetadata(const std::vector<std::s if (!found) { sc = outStore->record(attlist, *it ); if (sc.isFailure()) { - msg() << MSG::WARNING << "Unable to store AthenaAttributeList for " << *it << endreq; + msg() << MSG::WARNING << "Unable to store AthenaAttributeList for " << *it << endmsg; } } } else { - msg() << MSG::WARNING << "Did NOT find " << *it << " in " << m_outputStoreName.toString() << endreq; + msg() << MSG::WARNING << "Did NOT find " << *it << " in " << m_outputStoreName.toString() << endmsg; } ++it; } diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamAttListMetadataSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamAttListMetadataSvc.h index d88ac629f5313f8bdd6fc40bf121283d1d3980b5..572066e0242d1d7b266c7c488b9c6bccec5c5f36 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamAttListMetadataSvc.h +++ b/Event/ByteStreamCnvSvc/src/ByteStreamAttListMetadataSvc.h @@ -70,8 +70,8 @@ protected: virtual ~ByteStreamAttListMetadataSvc() {} private: - StringProperty m_inputStoreName; - StringProperty m_outputStoreName; + Gaudi::Property<std::string> m_inputStoreName; + Gaudi::Property<std::string> m_outputStoreName; }; diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx index babbdef6f5e24475308f0ca5bd030890ee365b37..54002df894b47d752f2b0824c427f9372714afb0 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx +++ b/Event/ByteStreamCnvSvc/src/ByteStreamCnvSvc.cxx @@ -142,7 +142,7 @@ StatusCode ByteStreamCnvSvc::commitOutput(const std::string& outputConnection, b return(StatusCode::FAILURE); } // change trigger info in Header - TriggerInfo* triggerInfo = evt->trigger_info(); + const TriggerInfo* triggerInfo = evt->trigger_info(); uint32_t *l1Buff = 0; uint32_t *l2Buff = 0; uint32_t *efBuff = 0; @@ -266,7 +266,7 @@ void ByteStreamCnvSvc::writeFEA() { ATH_MSG_DEBUG("before FEAMAP size = " << m_feaMap.size()); for (std::map<std::string, FullEventAssemblerBase*>::const_iterator it = m_feaMap.begin(), itE = m_feaMap.end(); it != itE; it++) { - MsgStream log(messageService(), name()); + MsgStream log(msgSvc(), name()); (*it).second->fill(m_rawEventWrite, log); } ATH_MSG_DEBUG("after FEAMAP size = " << m_feaMap.size()); diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx index 280d2829ca2a460696fbc4636ae939c70ed8dce1..9871abb5081e74e6d06caee267d9a1ffc37d2329 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx +++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx @@ -100,7 +100,7 @@ StatusCode ByteStreamEventStorageInputSvc::initialize() { if (m_keys.size()>0) { StatusCode sc = m_attlistsvc->readInit(m_keys); if (sc.isFailure()) { - msg() << MSG::WARNING << "readInit for AttributeList service failed" << endreq; + msg() << MSG::WARNING << "readInit for AttributeList service failed" << endmsg; } } @@ -223,7 +223,7 @@ bool ByteStreamEventStorageInputSvc::loadMetadata() if (m_keys.size()>0) { StatusCode sc = m_attlistsvc->fromBSMetadata(m_keys); if (sc.isFailure()) { - msg() << MSG::WARNING << "Conversion failed for AttributeList service" << endreq; + msg() << MSG::WARNING << "Conversion failed for AttributeList service" << endmsg; } } @@ -520,7 +520,7 @@ StatusCode ByteStreamEventStorageInputSvc::generateDataHeader() if (ioc.isSuccess()) { const SG::DataProxy* ptmp = m_sgSvc->transientProxy(ClassID_traits<EventInfo>::ID(), "ByteStreamEventInfo"); if (ptmp !=0) { - DataHeaderElement DheEI(ptmp->transientAddress(),"ByteStreamEventInfo"); + DataHeaderElement DheEI(ptmp->transientAddress(), 0, "ByteStreamEventInfo"); Dh->insert(DheEI); } //else ATH_MSG_ERROR("Failed to create EventInfo proxy " << ptmp); diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.h index 733975ca48db62f877cd1684167e958d6c9a9bec..13ae68c7100880c16c579ceede0adc352b257e9e 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.h +++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.h @@ -96,11 +96,11 @@ private: // properties int m_fileCount; //!< number of files to process. std::string m_fullFile; //!< current full file name - BooleanProperty m_dump; //!< flag for Dump fragments - FloatProperty m_wait; //!< Number of seconds to wait if the input is in the wait state. - BooleanProperty m_valEvent; //!< switch on check_tree() call when reading events. - BooleanProperty m_procBadEvent; //!< DEFUNCT process bad events, which fail check_tree(). - IntegerProperty m_maxBadEvts; //!< DEFUNCT number of bad events allowed before quitting. + Gaudi::Property<bool> m_dump; //!< flag for Dump fragments + Gaudi::Property<float> m_wait; //!< Number of seconds to wait if the input is in the wait state. + Gaudi::Property<bool> m_valEvent; //!< switch on check_tree() call when reading events. + Gaudi::Property<bool> m_procBadEvent; //!< DEFUNCT process bad events, which fail check_tree(). + Gaudi::Property<int> m_maxBadEvts; //!< DEFUNCT number of bad events allowed before quitting. std::vector<std::string> m_keys; private: // internal helper functions diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx index e4986e57748b2e9d2b053d5bc69a37d4db1cd161..0ba85a2721a7ca61c26d2c709af4a34bb89e7388 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx +++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.cxx @@ -317,7 +317,7 @@ void ByteStreamEventStorageOutputSvc::checkForUserMetadata(EventStorage::freeMet if (m_keys.size()>0) { StatusCode sc = m_attlistsvc->toBSMetadata(m_keys); if (sc.isFailure()) { - msg() << MSG::WARNING << "Conversion failed for AttributeList service" << endreq; + msg() << MSG::WARNING << "Conversion failed for AttributeList service" << endmsg; } } diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h index 9622260ec9165785a0c9e4fdb186332dff61f472..bb0a42d3aa342d2a9dd551b725ee74caa42da676 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h +++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageOutputSvc.h @@ -62,26 +62,26 @@ private: // data std::unique_ptr<ByteStreamDataWriter> m_dataWriter; //!< pointer to DataWriter private: // properties - StringProperty m_inputDir; //!< directory for the data files - StringProperty m_projectTag; //!< Project Tag - StringProperty m_appName; //!< Application Name - StringProperty m_fileTag; //!< File Tag - StringProperty m_streamType; //!< stream type - StringProperty m_streamName; //!< stream name - IntegerProperty m_lumiBlockNumber;//!< luminosity block number - IntegerProperty m_run; //!< run number - - BooleanProperty m_dump; //!< Dump fragments - BooleanProperty m_writeEventless; //!< Write eventless files - BooleanProperty m_compressEvents; //!< Compress events - - UnsignedIntegerProperty m_maxFileMB; //!< number of MB per file - UnsignedIntegerProperty m_maxFileNE; //!< number of events per file - - StringProperty m_eformatVersion; //!< eformat event version to produce, "v40" for run1, or "current" - StringProperty m_eventStorageVersion; //!< EventStorage BS version to produce, "v5" for run1, or "current" - StringProperty m_bsOutputStreamName;//!< stream name for multiple output - StringProperty m_simpleFileName; //!< use this string for filename, not from the "AgreedFileName" + Gaudi::Property<std::string> m_inputDir; //!< directory for the data files + Gaudi::Property<std::string> m_projectTag; //!< Project Tag + Gaudi::Property<std::string> m_appName; //!< Application Name + Gaudi::Property<std::string> m_fileTag; //!< File Tag + Gaudi::Property<std::string> m_streamType; //!< stream type + Gaudi::Property<std::string> m_streamName; //!< stream name + Gaudi::Property<int> m_lumiBlockNumber;//!< luminosity block number + Gaudi::Property<int> m_run; //!< run number + + Gaudi::Property<bool> m_dump; //!< Dump fragments + Gaudi::Property<bool> m_writeEventless; //!< Write eventless files + Gaudi::Property<bool> m_compressEvents; //!< Compress events + + Gaudi::Property<unsigned int> m_maxFileMB; //!< number of MB per file + Gaudi::Property<unsigned int> m_maxFileNE; //!< number of events per file + + Gaudi::Property<std::string> m_eformatVersion; //!< eformat event version to produce, "v40" for run1, or "current" + Gaudi::Property<std::string> m_eventStorageVersion; //!< EventStorage BS version to produce, "v5" for run1, or "current" + Gaudi::Property<std::string> m_bsOutputStreamName;//!< stream name for multiple output + Gaudi::Property<std::string> m_simpleFileName; //!< use this string for filename, not from the "AgreedFileName" std::vector<std::string> m_keys; ServiceHandle<IByteStreamFreeMetadataSvc> m_attlistsvc; diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.h index fb8448cf207a67140ac6d5ec2be3a79efebdb759..fda0e3d78cac60168dcea2b8e44780cb61fbfb81 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.h +++ b/Event/ByteStreamCnvSvc/src/ByteStreamMergeOutputSvc.h @@ -37,12 +37,12 @@ public: private: uint32_t reducedROBid(uint32_t); - StringProperty m_inSvcName; - StringProperty m_outSvcName; + Gaudi::Property<std::string> m_inSvcName; + Gaudi::Property<std::string> m_outSvcName; ByteStreamInputSvc* m_inSvc; ByteStreamOutputSvc* m_outSvc; - StringProperty m_bsOutputStreamName; //!< stream name for multiple output - BooleanProperty m_overwriteHeader; + Gaudi::Property<std::string> m_bsOutputStreamName; //!< stream name for multiple output + Gaudi::Property<bool> m_overwriteHeader; }; #endif diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.h index b4b41ef9e339e033ad845b419c86b3aec0f87fc1..cc1e0a60e6419b40fd0ca0808daf92d3920409f6 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.h +++ b/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.h @@ -57,7 +57,7 @@ private: const RawEvent* m_rawEvent; /// type and name of the objects to create the address for. - StringArrayProperty m_typeNames; + Gaudi::Property<std::vector<std::string>> m_typeNames; typedef ServiceHandle<ActiveStoreSvc> ActiveStoreSvc_t; ActiveStoreSvc_t m_activeStoreSvc; diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamOutputStreamCopyTool.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamOutputStreamCopyTool.cxx index 26ef9178c8766b8536ab7ef5b08231e2c377d35d..f65027f2418bca5ccf76b83751271647df150b91 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamOutputStreamCopyTool.cxx +++ b/Event/ByteStreamCnvSvc/src/ByteStreamOutputStreamCopyTool.cxx @@ -34,29 +34,29 @@ ByteStreamOutputStreamCopyTool::~ByteStreamOutputStreamCopyTool() { //__________________________________________________________________________ StatusCode ByteStreamOutputStreamCopyTool::initialize() { MsgStream log(msgSvc(), name()); - log << MSG::INFO << "Initializing " << name() << " - package version " << PACKAGE_VERSION << endreq; + log << MSG::INFO << "Initializing " << name() << " - package version " << PACKAGE_VERSION << endmsg; StatusCode status = ::AlgTool::initialize(); if (!status.isSuccess()) { - log << MSG::ERROR << "Unable to initialize AlgTool base class." << endreq; + log << MSG::ERROR << "Unable to initialize AlgTool base class." << endmsg; return(status); } // retrieve services status = m_inputSvc.retrieve(); if (status.isFailure()) { - log << MSG::ERROR << "Unable to locate ByteStreamInputSvc " << endreq; + log << MSG::ERROR << "Unable to locate ByteStreamInputSvc " << endmsg; return(status); } else { - log << MSG::DEBUG << "Found ByteStreamInputSvc." << endreq; + log << MSG::DEBUG << "Found ByteStreamInputSvc." << endmsg; } status = m_outputSvc.retrieve(); if (status.isFailure()) { - log << MSG::ERROR << "Unable to locate ByteStreamOutputSvc " << endreq; + log << MSG::ERROR << "Unable to locate ByteStreamOutputSvc " << endmsg; return(status); } else { - log << MSG::DEBUG << "Found ByteStreamOutputSvc." << endreq; + log << MSG::DEBUG << "Found ByteStreamOutputSvc." << endmsg; } return(StatusCode::SUCCESS); @@ -66,7 +66,7 @@ StatusCode ByteStreamOutputStreamCopyTool::finalize() { StatusCode status = m_outputSvc.release(); if (status.isFailure()) { MsgStream log(msgSvc(), name()); - log << MSG::WARNING << "Cannot release the ByteStreamOutputSvc" << endreq; + log << MSG::WARNING << "Cannot release the ByteStreamOutputSvc" << endmsg; } return(::AlgTool::finalize()); } @@ -85,19 +85,19 @@ StatusCode ByteStreamOutputStreamCopyTool::connectOutput(const std::string& /*ou //__________________________________________________________________________ StatusCode ByteStreamOutputStreamCopyTool::commitOutput() { MsgStream log(msgSvc(), name()); - log << MSG::DEBUG << "In commitOutput" << endreq; + log << MSG::DEBUG << "In commitOutput" << endmsg; const RawEvent* re_c = m_inputSvc->currentEvent() ; if(!re_c){ - log << MSG::ERROR << " failed to get the current event from ByteStreamInputSvc " << endreq; + log << MSG::ERROR << " failed to get the current event from ByteStreamInputSvc " << endmsg; return StatusCode::FAILURE ; } RawEvent* re = const_cast<RawEvent*>(re_c); if( ! m_outputSvc->putEvent(re) ) { - log << MSG::ERROR << " failed to write event to ByteStreamOutputSvc " << endreq; + log << MSG::ERROR << " failed to write event to ByteStreamOutputSvc " << endmsg; return StatusCode::FAILURE ; } - log << MSG::DEBUG << " done in commitOutput " << endreq; + log << MSG::DEBUG << " done in commitOutput " << endmsg; return(StatusCode::SUCCESS); } //__________________________________________________________________________ @@ -108,7 +108,7 @@ StatusCode ByteStreamOutputStreamCopyTool::finalizeOutput() { StatusCode ByteStreamOutputStreamCopyTool::streamObjects(const TypeKeyPairs& typeKeys) { if (typeKeys.size() != 0){ MsgStream log(msgSvc(), name()); - log << MSG::WARNING << " Streaming objects is not supported. The whole input event is written out" << endreq; + log << MSG::WARNING << " Streaming objects is not supported. The whole input event is written out" << endmsg; } return(StatusCode::SUCCESS); } @@ -116,7 +116,7 @@ StatusCode ByteStreamOutputStreamCopyTool::streamObjects(const TypeKeyPairs& ty StatusCode ByteStreamOutputStreamCopyTool::streamObjects(const DataObjectVec& dataObjects) { if (dataObjects.size() != 0){ MsgStream log(msgSvc(), name()); - log << MSG::WARNING << " Streaming objects is not supported. The whole input event is written out" << endreq; + log << MSG::WARNING << " Streaming objects is not supported. The whole input event is written out" << endmsg; } return(StatusCode::SUCCESS); } @@ -124,7 +124,7 @@ StatusCode ByteStreamOutputStreamCopyTool::streamObjects(const DataObjectVec& da StatusCode ByteStreamOutputStreamCopyTool::fillObjectRefs(const DataObjectVec& dataObjects) { if (dataObjects.size() != 0){ MsgStream log(msgSvc(), name()); - log << MSG::WARNING << " fillObjectRefs is not supported. The whole input event is written out" << endreq; + log << MSG::WARNING << " fillObjectRefs is not supported. The whole input event is written out" << endmsg; } return(StatusCode::SUCCESS); } diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.h index 64731703fb06b86ac9ef42f2040f10d952866857..249396214b640d33e8e6315252bd3e8e9f53cfe9 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.h +++ b/Event/ByteStreamCnvSvc/src/ByteStreamRDP_OutputSvc.h @@ -43,7 +43,7 @@ private: // data ServiceHandle<IROBDataProviderSvc> m_robProvider; private: // properties - StringProperty m_bsOutputStreamName; //!< stream name for multiple output + Gaudi::Property<std::string> m_bsOutputStreamName; //!< stream name for multiple output }; #endif diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamSingleEventInputSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamSingleEventInputSvc.h index 09f6e64bff1713cb94f411e4da485ec94c2938fc..bf6e749dd9f0b0bdf63670135889ca1979ca6a08 100644 --- a/Event/ByteStreamCnvSvc/src/ByteStreamSingleEventInputSvc.h +++ b/Event/ByteStreamCnvSvc/src/ByteStreamSingleEventInputSvc.h @@ -52,7 +52,7 @@ private: // data std::string m_currentFilename; //!< name of the currently opened file private: // properties - BooleanProperty m_dump; //!< Dump fragments + Gaudi::Property<bool> m_dump; //!< Dump fragments }; #endif diff --git a/Event/ByteStreamCnvSvc/src/EventInfoByteStreamCnv.cxx b/Event/ByteStreamCnvSvc/src/EventInfoByteStreamCnv.cxx index 12304257e48ed59a8baa2d9c458da91a3bcf998b..def7ab80da674764095fa3a06130c8a0839d3f8a 100644 --- a/Event/ByteStreamCnvSvc/src/EventInfoByteStreamCnv.cxx +++ b/Event/ByteStreamCnvSvc/src/EventInfoByteStreamCnv.cxx @@ -56,29 +56,29 @@ StatusCode EventInfoByteStreamCnv::initialize() { return sc; } - MsgStream log(messageService(), "EventInfoByteStreamCnv"); - log << MSG::DEBUG << " initialize" << endreq; + MsgStream log(msgSvc(), "EventInfoByteStreamCnv"); + log << MSG::DEBUG << " initialize" << endmsg; // Check ByteStreamCnvSvc IService* svc; sc = serviceLocator()->getService("ByteStreamCnvSvc", svc); if (sc != StatusCode::SUCCESS) { - log << MSG::ERROR << " Cant get ByteStreamCnvSvc " << endreq; + log << MSG::ERROR << " Cant get ByteStreamCnvSvc " << endmsg; return sc; } m_ByteStreamCnvSvc = dynamic_cast<ByteStreamCnvSvc*>(svc); if (m_ByteStreamCnvSvc == 0) { - log << MSG::ERROR << " Cant cast to ByteStreamCnvSvc" << endreq; + log << MSG::ERROR << " Cant cast to ByteStreamCnvSvc" << endmsg; return StatusCode::FAILURE; } if (!m_robDataProvider.retrieve().isSuccess()) { - log << MSG::ERROR << " Cant get ROBDataProviderSvc" << endreq; + log << MSG::ERROR << " Cant get ROBDataProviderSvc" << endmsg; // ATH_MSG_FATAL("Cannot get ROBDataProviderSvc"); return(StatusCode::FAILURE); } if (!m_mdSvc.retrieve().isSuccess()) { - log << MSG::ERROR << " Cant get InputMetaDataStore" << endreq; + log << MSG::ERROR << " Cant get InputMetaDataStore" << endmsg; // ATH_MSG_FATAL("Cannot get InputMetaDataStore"); return(StatusCode::FAILURE); } @@ -88,9 +88,9 @@ StatusCode EventInfoByteStreamCnv::initialize() { sc = m_ByteStreamCnvSvc->getProperty(&propUserType); if (sc.isSuccess()) { m_userType = propUserType.value(); - log << MSG::INFO << "UserType : " << m_userType << endreq; + log << MSG::INFO << "UserType : " << m_userType << endmsg; } else { - log << MSG::ERROR << "could not get UserType" << endreq; + log << MSG::ERROR << "could not get UserType" << endmsg; return sc; } @@ -98,9 +98,9 @@ StatusCode EventInfoByteStreamCnv::initialize() { sc = m_ByteStreamCnvSvc->getProperty(&propIsSimulation); if (sc.isSuccess()) { m_isSimulation = propIsSimulation.value(); - log << MSG::INFO << "IsSimulation : " << m_isSimulation << endreq; + log << MSG::INFO << "IsSimulation : " << m_isSimulation << endmsg; } else { - log << MSG::ERROR << "could not get IsSimulation" << endreq; + log << MSG::ERROR << "could not get IsSimulation" << endmsg; return sc; } @@ -108,9 +108,9 @@ StatusCode EventInfoByteStreamCnv::initialize() { sc = m_ByteStreamCnvSvc->getProperty(&propIsTestbeam); if (sc.isSuccess()) { m_isTestbeam = propIsTestbeam.value(); - log << MSG::INFO << "IsTestbeam : " << m_isTestbeam << endreq; + log << MSG::INFO << "IsTestbeam : " << m_isTestbeam << endmsg; } else { - log << MSG::ERROR << "could not get IsTestbeam" << endreq; + log << MSG::ERROR << "could not get IsTestbeam" << endmsg; return sc; } @@ -118,40 +118,40 @@ StatusCode EventInfoByteStreamCnv::initialize() { sc = m_ByteStreamCnvSvc->getProperty(&propIsCalibration); if (sc.isSuccess()) { m_isCalibration = propIsCalibration.value(); - log << MSG::INFO << "IsCalibration : " << m_isCalibration << endreq; + log << MSG::INFO << "IsCalibration : " << m_isCalibration << endmsg; } else { - log << MSG::ERROR << "could not get IsCalibration" << endreq; + log << MSG::ERROR << "could not get IsCalibration" << endmsg; return sc; } return StatusCode::SUCCESS; } StatusCode EventInfoByteStreamCnv::finalize() { - MsgStream log(messageService(), "EventInfoByteStreamCnv"); - log << MSG::INFO << "finalize " << endreq; + MsgStream log(msgSvc(), "EventInfoByteStreamCnv"); + log << MSG::INFO << "finalize " << endmsg; StatusCode status = Converter::finalize(); if (status.isFailure()) { - log << MSG::WARNING << "Converter::finalize() failed" << endreq; + log << MSG::WARNING << "Converter::finalize() failed" << endmsg; } return(status); } StatusCode EventInfoByteStreamCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj) { - MsgStream log(messageService(), "EventInfoByteStreamCnv"); + MsgStream log(msgSvc(), "EventInfoByteStreamCnv"); ByteStreamAddress *pRE_Addr; pRE_Addr = dynamic_cast<ByteStreamAddress*>(pAddr); if (!pRE_Addr) { - log << MSG::ERROR << " Can not cast to ByteStreamAddress " << endreq; + log << MSG::ERROR << " Can not cast to ByteStreamAddress " << endmsg; return StatusCode::FAILURE; } - log << MSG::DEBUG << " Creating Objects" << endreq; + log << MSG::DEBUG << " Creating Objects" << endmsg; // get RawEvent const RawEvent* re = m_robDataProvider->getEvent(); if (re == 0) { - log << MSG::ERROR << " Can not get RawEvent " << endreq; + log << MSG::ERROR << " Can not get RawEvent " << endmsg; return StatusCode::FAILURE; } @@ -176,10 +176,10 @@ StatusCode EventInfoByteStreamCnv::createObj(IOpaqueAddress* pAddr, DataObject*& uint32_t temp = bc_time_ns; bc_time_ns = bc_time_sec; bc_time_sec= temp; - log << MSG::DEBUG << " bc_time second/nanosecond swapped, sec/ns = " << bc_time_sec << " " << bc_time_ns << endreq; + log << MSG::DEBUG << " bc_time second/nanosecond swapped, sec/ns = " << bc_time_sec << " " << bc_time_ns << endmsg; } else { // for later runs, the nanosecond clock sometimes is not reset, making it overrun 1e9. // round it off to 1e9 - log << MSG::WARNING << " bc_time nanosecond number larger than 1e9, it is " << bc_time_ns << ", reset it to 1 sec" << endreq; + log << MSG::WARNING << " bc_time nanosecond number larger than 1e9, it is " << bc_time_ns << ", reset it to 1 sec" << endmsg; bc_time_ns = 1000000000; } } @@ -195,7 +195,7 @@ StatusCode EventInfoByteStreamCnv::createObj(IOpaqueAddress* pAddr, DataObject*& const ByteStreamMetadata* metadata = 0; StatusCode status = m_mdSvc->retrieve(metadata, "ByteStreamMetadata"); if (!status.isSuccess()) { - log << MSG::WARNING << "Unable to retrieve Input MetaData for ByteStream" << endreq; + log << MSG::WARNING << "Unable to retrieve Input MetaData for ByteStream" << endmsg; } else { uint64_t detectorMask = metadata->getDetectorMask(); detMask0 = (unsigned int)(detectorMask & 0x00000000FFFFFFFF); @@ -287,15 +287,15 @@ StatusCode EventInfoByteStreamCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj = StoreGateSvc::asStorable(evtInfo); log << MSG::DEBUG << " New EventInfo made, run/event= " << runNumber << " " << eventNumber - << " Time stamp = " << ascTime(bc_time_sec) << endreq; + << " Time stamp = " << ascTime(bc_time_sec) << endmsg; return StatusCode::SUCCESS; } StatusCode EventInfoByteStreamCnv::createRep(DataObject* /*pObj*/, IOpaqueAddress*& /*pAddr*/) { StatusCode sc = StatusCode::SUCCESS; - MsgStream log(messageService(), "EventInfoByteStreamCnv"); - log << MSG::DEBUG << " Nothing to be done for EventInfo createReps" << endreq; + MsgStream log(msgSvc(), "EventInfoByteStreamCnv"); + log << MSG::DEBUG << " Nothing to be done for EventInfo createReps" << endmsg; return sc; } diff --git a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx index a4045094ef43011f31ffa7e5e7156e90ae334e09..8726290b915cd1e16ce73f8429bb50df4b088196 100644 --- a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx +++ b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx @@ -42,6 +42,7 @@ EventSelectorByteStream::EventSelectorByteStream(const std::string& name, ISvcLo m_evtStore( "StoreGateSvc", name ), m_firstFileFired(false), m_beginFileFired(false), + m_inputCollectionsFromIS(false), m_NumEvents(0), m_eventStreamingTool("", this), m_helperTools(this), @@ -117,6 +118,7 @@ StatusCode EventSelectorByteStream::initialize() { if ((*ii)->load(temp)) { retrieve = true; m_inputCollectionsProp.assign(temp); + m_inputCollectionsFromIS = true; ATH_MSG_INFO("Retrieved InputCollections from InputSvc"); } } @@ -262,7 +264,7 @@ StatusCode EventSelectorByteStream::reinit() { m_NumEvents = 0; bool retError = false; if (!m_helperTools.empty()) { - for (std::vector<ToolHandle<IAthenaSelectorTool> >::const_iterator iter = m_helperTools.begin(), + for (std::vector<ToolHandle<IAthenaSelectorTool> >::iterator iter = m_helperTools.begin(), last = m_helperTools.end(); iter != last; iter++) { if (!(*iter)->postInitialize().isSuccess()) { ATH_MSG_FATAL("Failed to postInitialize() " << (*iter)->name()); @@ -330,7 +332,7 @@ StatusCode EventSelectorByteStream::finalize() { ATH_MSG_WARNING("Failed to preFinalize() CounterTool"); } } - for (std::vector<ToolHandle<IAthenaSelectorTool> >::const_iterator iter = m_helperTools.begin(), + for (std::vector<ToolHandle<IAthenaSelectorTool> >::iterator iter = m_helperTools.begin(), last = m_helperTools.end(); iter != last; iter++) { if (!(*iter)->preFinalize().isSuccess()) { ATH_MSG_WARNING("Failed to preFinalize() " << (*iter)->name()); @@ -1007,6 +1009,20 @@ StatusCode EventSelectorByteStream::io_reinit() { ATH_MSG_FATAL("IoComponentMgr does not know about myself !"); return(StatusCode::FAILURE); } + if (m_inputCollectionsFromIS) { + /* MN: don't copy the FullFileName again - rely on FileSchedulingTool + to modify the EventSelector Input property directly + IProperty* propertyServer = dynamic_cast<IProperty*>(m_eventSource); + std::vector<std::string> vect; + StringArrayProperty inputFileList("FullFileName", vect); + StatusCode sc = propertyServer->getProperty(&inputFileList); + if(sc.isFailure()) { + ATH_MSG_FATAL("Unable to retrieve ByteStreamInputSvc"); + return(StatusCode::FAILURE); + } + m_inputCollectionsProp = inputFileList; + */ + } std::vector<std::string> inputCollections = m_inputCollectionsProp.value(); for (std::size_t i = 0, imax = inputCollections.size(); i != imax; ++i) { ATH_MSG_INFO("I/O reinitialization, file = " << inputCollections[i]); diff --git a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.h b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.h index a9fa0f8b71fe0357b99f9694f936cdac366a8cb9..ad8e6bddac0c5b5f94491a2ba508d332c7475836 100644 --- a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.h +++ b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.h @@ -111,7 +111,7 @@ private: // internal member functions private: // property std::string m_eventSourceName; - IntegerProperty m_maxBadEvts; //!< number of bad events allowed before quitting. + Gaudi::Property<int> m_maxBadEvts; //!< number of bad events allowed before quitting. mutable int m_fileCount; //!< number of files to process. mutable std::vector<int> m_numEvt; @@ -120,23 +120,24 @@ private: EventContextByteStream* m_beginIter; EventContextByteStream* m_endIter; ByteStreamInputSvc* m_eventSource; - StringArrayProperty m_inputCollectionsProp; + Gaudi::Property<std::vector<std::string>> m_inputCollectionsProp; mutable std::vector<std::string>::const_iterator m_inputCollectionsIterator; void inputCollectionsHandler(Property&); ServiceHandle<IIncidentSvc> m_incidentSvc; ServiceHandle<StoreGateSvc> m_evtStore; long m_SkipEvents; // Number of events to skip at the beginning - LongArrayProperty m_skipEventSequenceProp; + Gaudi::Property<std::vector<long>> m_skipEventSequenceProp; mutable std::vector<long> m_skipEventSequence; bool m_firstFileFired; bool m_beginFileFired; + bool m_inputCollectionsFromIS; mutable long m_NumEvents; // Number of Events read so far. - ToolHandle<IAthenaIPCTool> m_eventStreamingTool; + mutable ToolHandle<IAthenaIPCTool> m_eventStreamingTool; - BooleanProperty m_procBadEvent; //!< process bad events, which fail check_tree(). + Gaudi::Property<bool> m_procBadEvent; //!< process bad events, which fail check_tree(). /// HelperTools, vector of names of AlgTools that are executed by the EventSelector ToolHandleArray<IAthenaSelectorTool> m_helperTools; @@ -146,18 +147,18 @@ private: /// Flags to indicate override of run/event/time /// These are almost always false. - BooleanProperty m_overrideRunNumber; - BooleanProperty m_overrideEventNumber; - BooleanProperty m_overrideTimeStamp; - BooleanProperty m_filebased; - - IntegerProperty m_runNo; - IntegerProperty m_firstEventNo; - IntegerProperty m_eventsPerRun; - IntegerProperty m_firstLBNo; - IntegerProperty m_eventsPerLB; - IntegerProperty m_initTimeStamp; - IntegerProperty m_timeStampInterval; + Gaudi::Property<bool> m_overrideRunNumber; + Gaudi::Property<bool> m_overrideEventNumber; + Gaudi::Property<bool> m_overrideTimeStamp; + Gaudi::Property<bool> m_filebased; + + Gaudi::CheckedProperty<int> m_runNo; + Gaudi::CheckedProperty<int> m_firstEventNo; + Gaudi::CheckedProperty<int> m_eventsPerRun; + Gaudi::CheckedProperty<int> m_firstLBNo; + Gaudi::CheckedProperty<int> m_eventsPerLB; + Gaudi::CheckedProperty<int> m_initTimeStamp; + Gaudi::Property<int> m_timeStampInterval; }; #endif