diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx index 799078d7a6a15206f8db59ddb5e21978da0c3369..f5995d0b08c1532fe8bc99dd1f9a752e792a1feb 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx @@ -188,6 +188,14 @@ StatusCode AthenaPoolCnvSvc::createObj(IOpaqueAddress* pAddress, DataObject*& re if (m_doChronoStat) { m_chronoStatSvc->chronoStart("cObj_" + objName); } + if (m_persSvcPerInputType) { // Use separate PersistencySvc for each input data type + TokenAddress* tokAddr = dynamic_cast<TokenAddress*>(pAddress); + if (tokAddr != nullptr && tokAddr->getToken() != nullptr) { + char text[32]; + ::sprintf(text, "[CTXT=%08X]", m_poolSvc->getInputContext(tokAddr->getToken()->classID().toString())); + tokAddr->getToken()->setAuxString(text); + } + } // Forward to base class createObj StatusCode status = ::AthCnvSvc::createObj(pAddress, refpObject); if (m_doChronoStat) { @@ -827,7 +835,7 @@ Token* AthenaPoolCnvSvc::registerForWrite(Placement* placement, const void* obj, if (!m_outputStreamingTool.empty() && m_outputStreamingTool[0]->isClient() && m_parallelCompression) { placement->setFileName(placement->fileName() + m_streamPortString.value()); } - if (m_persSvcPerOutput) { + if (m_persSvcPerOutput) { // Use separate PersistencySvc for each output stream/file char text[32]; ::sprintf(text, "[CTXT=%08X]", m_poolSvc->getOutputContext(placement->fileName())); placement->setAuxString(text); diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h index 31241fbe6d89c450af9a4573a123b02e113b1ae8..276c2c755e608a57ecc9922fd854fee06235453c 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h @@ -233,9 +233,13 @@ private: // properties std::map<std::string, long long> m_databaseMaxFileSize; /// PersSvcPerOutput,boolean property to use multiple persistency services, one per output stream. - /// default = false. + /// default = true. BooleanProperty m_persSvcPerOutput{this,"PersSvcPerOutput",true}; unsigned outputContextId(const std::string& outputConnection); + + /// PersSvcPerInputType,boolean property to use multiple persistency services, one per input type. + /// default = false. + BooleanProperty m_persSvcPerInputType{this,"PersSvcPerInputType",false}; std::mutex m_mutex; /// SkipFirstChronoCommit, boolean property to skip the first commit in the chrono stats so the first