From e757aef7345cd9943b23a744ef609492e18c3059 Mon Sep 17 00:00:00 2001 From: wbuttinger <mypost@gmail.com> Date: Tue, 25 Apr 2017 13:32:46 +0100 Subject: [PATCH] remade the update of these packages Former-commit-id: 6939e7e9d49cfb90325ecb808d99d02cb8566f01 --- .../AthenaRootComps/python/ReadAthenaRoot.py | 53 ++++++------ .../AthenaRootComps/python/ReadAthenaxAOD.py | 56 +++++-------- .../python/ReadAthenaxAODHybrid.py | 83 ++++++++----------- .../src/RootNtupleEventSelector.cxx | 34 ++++++-- .../AthenaRootComps/src/xAODEventSelector.cxx | 70 +++++++++++++--- .../AthenaRootComps/src/xAODEventSelector.h | 2 + .../POOLRootAccess/test/POOLRootAccess.xml | 13 ++- 7 files changed, 179 insertions(+), 132 deletions(-) diff --git a/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaRoot.py b/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaRoot.py index 69a6aae4c01..b526d9410a1 100644 --- a/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaRoot.py +++ b/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaRoot.py @@ -15,51 +15,48 @@ def _configure(): from AthenaCommon.AppMgr import theApp from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaCommon.Logging import logging + from AthenaCommon.AthenaCommonFlags import athenaCommonFlags msg = logging.getLogger( 'ReadAthenaRoot' ) msg.debug("Configuring Athena for reading ROOT files (via TChain)...") - if not hasattr(svcMgr, 'THistSvc'): - svcMgr += CfgMgr.THistSvc() - + if hasattr(svcMgr, 'EventSelector'): err = "svcMgr already configured with another EventSelector: [%s]"%\ svcMgr.EventSelector.getFullJobOptName() msg.error( err ) raise RuntimeError( err ) - # disable the event loop heartbeat as it is somewhat I/O hungry for + + #Setup our EventSelector + svcMgr += CfgMgr.Athena__RootNtupleEventSelector( "EventSelector" ) + + + #for historical reasons, we now add configurables of a bunch of services + #this could be gotten rid of in the future, just here to save existing jobo from errors + if not hasattr(svcMgr, 'THistSvc'): svcMgr += CfgMgr.THistSvc() + if not hasattr(svcMgr, 'ProxyProviderSvc'): svcMgr += CfgMgr.ProxyProviderSvc() + if not hasattr(svcMgr, 'Athena::NtupleCnvSvc'): svcMgr += CfgMgr.Athena__NtupleCnvSvc() + + + #Here we set various properties of things + theApp.ExtSvc += [ svcMgr.EventSelector.getFullName() ] + theApp.EvtSel = "EventSelector" + #default the input collections to the FilesInput from AthenaCommonFlags + #this is so that the eventselector picks up input files in grid jobs + svcMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() + + + # suppress the event loop heartbeat as it is somewhat I/O hungry for # no real gain in n-tuple reading/writing scenarii - if not hasattr(svcMgr, theApp.EventLoop): - svcMgr += getattr(CfgMgr, theApp.EventLoop)() + if not hasattr(svcMgr, theApp.EventLoop): svcMgr += getattr(CfgMgr, theApp.EventLoop)() evtloop = getattr(svcMgr, theApp.EventLoop) try: - msg.info('disabling event loop heartbeat...') - evtloop.EventPrintoutInterval = 0 - msg.info('disabling event loop heartbeat... [done]') + evtloop.EventPrintoutInterval = 10000 except Exception, err: msg.info('disabling event loop heartbeat... [failed]') msg.info('performances might be sub-par... sorry.') pass - - # Load ProxyProviderSvc - if not hasattr (svcMgr, 'ProxyProviderSvc'): - svcMgr += CfgMgr.ProxyProviderSvc() - pass - # from Configurables import Athena__RootNtupleEventSelector - evtsel = CfgMgr.Athena__RootNtupleEventSelector( "EventSelector" ) - svcMgr += evtsel - theApp.ExtSvc += [ evtsel.getFullName() ] - theApp.EvtSel = "EventSelector" - svcMgr.ProxyProviderSvc.ProviderNames += [evtsel.getFullName()] - del evtsel - - # configure the cnvsvc - svcMgr += CfgMgr.Athena__NtupleCnvSvc() - if not hasattr(svcMgr, 'EventPersistencySvc'): - svcMgr += CfgMgr.EvtPersistencySvc( "EventPersistencySvc" ) - svcMgr.EventPersistencySvc.CnvServices += [ "Athena::NtupleCnvSvc" ] - msg.debug("Configuring Athena for reading ROOT files (via TChain)... [OK]") return diff --git a/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaxAOD.py b/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaxAOD.py index 2b492469e6c..75dfec20855 100644 --- a/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaxAOD.py +++ b/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaxAOD.py @@ -14,22 +14,39 @@ def _configure(): from AthenaCommon.AppMgr import theApp from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaCommon.Logging import logging + from AthenaCommon.AthenaCommonFlags import athenaCommonFlags msg = logging.getLogger( 'ReadAthenaxAOD' ) msg.debug("Configuring Athena for reading xAOD files (via TEvent)...") - if not hasattr(svcMgr, 'THistSvc'): - svcMgr += CfgMgr.THistSvc() - + #check if we already have a selector set up if hasattr(svcMgr, 'EventSelector'): err = "svcMgr already configured with another EventSelector: [%s]"%\ svcMgr.EventSelector.getFullJobOptName() msg.error( err ) raise RuntimeError( err ) + + + #Setup our EventSelector + svcMgr += CfgMgr.Athena__xAODEventSelector( "EventSelector" ) + + #for historical reasons, we now add configurables of a bunch of services + if not hasattr(svcMgr, 'THistSvc'): svcMgr += CfgMgr.THistSvc() + if not hasattr (svcMgr, 'ProxyProviderSvc'): svcMgr += CfgMgr.ProxyProviderSvc() + if not hasattr (svcMgr, 'InputMetaDataStore'): svcMgr += CfgMgr.StoreGateSvc("InputMetaDataStore") + if not hasattr (svcMgr, 'Athena::xAODCnvSvc'): svcMgr += CfgMgr.Athena__xAODCnvSvc() + + #Here we set various properties of things + theApp.ExtSvc += [ svcMgr.EventSelector.getFullName() ] + theApp.EvtSel = "EventSelector" + #default the input collections to the FilesInput from AthenaCommonFlags + #this is so that the eventselector picks up input files in grid jobs + svcMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() + + # suppress the event loop heartbeat as it is somewhat I/O hungry for # no real gain in n-tuple reading/writing scenarii - if not hasattr(svcMgr, theApp.EventLoop): - svcMgr += getattr(CfgMgr, theApp.EventLoop)() + if not hasattr(svcMgr, theApp.EventLoop): svcMgr += getattr(CfgMgr, theApp.EventLoop)() evtloop = getattr(svcMgr, theApp.EventLoop) try: evtloop.EventPrintoutInterval = 10000 @@ -37,35 +54,6 @@ def _configure(): msg.info('disabling event loop heartbeat... [failed]') msg.info('performances might be sub-par... sorry.') pass - - # Load ProxyProviderSvc - if not hasattr (svcMgr, 'ProxyProviderSvc'): - svcMgr += CfgMgr.ProxyProviderSvc() - pass - - # Load a InputMetaDataStore - if not hasattr (svcMgr, 'InputMetaDataStore'): - svcMgr += CfgMgr.StoreGateSvc("InputMetaDataStore") - - # from Configurables import Athena__RootNtupleEventSelector - evtsel = CfgMgr.Athena__xAODEventSelector( "EventSelector" ) - svcMgr += evtsel - theApp.ExtSvc += [ evtsel.getFullName() ] - theApp.EvtSel = "EventSelector" - #svcMgr.ProxyProviderSvc.ProviderNames += [evtsel.getFullName()] - del evtsel - - #default the input collections to the FilesInput from AthenaCommonFlags - #this is so that the eventselector picks up input files in grid jobs - from AthenaCommon.AthenaCommonFlags import athenaCommonFlags - svcMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() - - # configure the cnvsvc - svcMgr += CfgMgr.Athena__xAODCnvSvc() - if not hasattr(svcMgr, 'EventPersistencySvc'): - svcMgr += CfgMgr.EvtPersistencySvc( "EventPersistencySvc" ) - svcMgr.EventPersistencySvc.CnvServices += [ "Athena::xAODCnvSvc" ] - diff --git a/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaxAODHybrid.py b/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaxAODHybrid.py index bd2dedf449c..58d34c74663 100644 --- a/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaxAODHybrid.py +++ b/Database/AthenaRoot/AthenaRootComps/python/ReadAthenaxAODHybrid.py @@ -8,29 +8,56 @@ def _configure(): - """Install the Athena-based TTree event selector and correctly configure + """Install the Athena-based xAOD event selector and correctly configure a few other services. """ from AthenaCommon import CfgMgr from AthenaCommon.AppMgr import theApp from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaCommon.Logging import logging + from AthenaCommon.AthenaCommonFlags import athenaCommonFlags + from AthenaCommon.Constants import ERROR + + msg = logging.getLogger( 'ReadAthenaxAODHybrid' ) msg.debug("Configuring Athena for reading xAOD files (via TEvent, with POOL for Metadata)...") - if not hasattr(svcMgr, 'THistSvc'): - svcMgr += CfgMgr.THistSvc() - + + #check if we already have a selector set up if hasattr(svcMgr, 'EventSelector'): err = "svcMgr already configured with another EventSelector: [%s]"%\ svcMgr.EventSelector.getFullJobOptName() msg.error( err ) raise RuntimeError( err ) + + + #Setup our EventSelector + svcMgr += CfgMgr.Athena__xAODEventSelector( "EventSelector" ) + + #for historical reasons, we now add configurables of a bunch of services + if not hasattr(svcMgr, 'THistSvc'): svcMgr += CfgMgr.THistSvc() + if not hasattr (svcMgr, 'ProxyProviderSvc'): svcMgr += CfgMgr.ProxyProviderSvc() + if not hasattr (svcMgr, 'InputMetaDataStore'): svcMgr += CfgMgr.StoreGateSvc("InputMetaDataStore") + if not hasattr (svcMgr, 'Athena::xAODCnvSvc'): svcMgr += CfgMgr.Athena__xAODCnvSvc() + if not hasattr(svcMgr, 'EventPersistencySvc'): svcMgr += CfgMgr.EvtPersistencySvc( "EventPersistencySvc" ) + if not hasattr (svcMgr, 'MetaDataSvc'): svcMgr += CfgMgr.MetaDataSvc ("MetaDataSvc") + if not hasattr(svcMgr, 'PoolSvc'): svcMgr += CfgMgr.PoolSvc() + + #Here we set various properties of things + theApp.ExtSvc += [ svcMgr.EventSelector.getFullName() ] + theApp.EvtSel = "EventSelector" + svcMgr.MetaDataSvc.MetaDataContainer = "MetaDataHdr" #this really should be the default for this property :-( + svcMgr.PoolSvc.OutputLevel = ERROR + svcMgr.EventSelector.ReadMetaDataWithPool=True + #default the input collections to the FilesInput from AthenaCommonFlags + #this is so that the eventselector picks up input files in grid jobs + svcMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() + + # suppress the event loop heartbeat as it is somewhat I/O hungry for # no real gain in n-tuple reading/writing scenarii - if not hasattr(svcMgr, theApp.EventLoop): - svcMgr += getattr(CfgMgr, theApp.EventLoop)() + if not hasattr(svcMgr, theApp.EventLoop): svcMgr += getattr(CfgMgr, theApp.EventLoop)() evtloop = getattr(svcMgr, theApp.EventLoop) try: evtloop.EventPrintoutInterval = 10000 @@ -38,52 +65,8 @@ def _configure(): msg.info('disabling event loop heartbeat... [failed]') msg.info('performances might be sub-par... sorry.') pass - - # Load ProxyProviderSvc - if not hasattr (svcMgr, 'ProxyProviderSvc'): - svcMgr += CfgMgr.ProxyProviderSvc() - pass - - # Load a InputMetaDataStore - if not hasattr (svcMgr, 'InputMetaDataStore'): - svcMgr += CfgMgr.StoreGateSvc("InputMetaDataStore") - - # from Configurables import Athena__RootNtupleEventSelector - evtsel = CfgMgr.Athena__xAODEventSelector( "EventSelector" ) - svcMgr += evtsel - theApp.ExtSvc += [ evtsel.getFullName() ] - theApp.EvtSel = "EventSelector" - #svcMgr.ProxyProviderSvc.ProviderNames += [evtsel.getFullName()] - del evtsel - - #default the input collections to the FilesInput from AthenaCommonFlags - #this is so that the eventselector picks up input files in grid jobs - from AthenaCommon.AthenaCommonFlags import athenaCommonFlags - svcMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() - - # configure the cnvsvc - svcMgr += CfgMgr.Athena__xAODCnvSvc() - if not hasattr(svcMgr, 'EventPersistencySvc'): - svcMgr += CfgMgr.EvtPersistencySvc( "EventPersistencySvc" ) - svcMgr.EventPersistencySvc.CnvServices += [ "Athena::xAODCnvSvc" ] - #Reading metadata using POOL - # Add in MetaDataSvc - if not hasattr (svcMgr, 'MetaDataSvc'): - svcMgr += CfgMgr.MetaDataSvc ("MetaDataSvc") - svcMgr.ProxyProviderSvc.ProviderNames = [ "MetaDataSvc" ] #+ svcMgr.ProxyProviderSvc.ProviderNames - ## Enable IOVDbSvc to read MetaData - svcMgr.MetaDataSvc.MetaDataContainer = "MetaDataHdr" - #svcMgr.MetaDataSvc.MetaDataTools += [ "IOVDbMetaDataTool" ] - svcMgr.EventPersistencySvc.CnvServices += [ "AthenaPoolCnvSvc" ] - if not hasattr(svcMgr, 'PoolSvc'): - svcMgr += CfgMgr.PoolSvc() - from AthenaCommon.Constants import ERROR - svcMgr.PoolSvc.OutputLevel = ERROR - - svcMgr.EventSelector.ReadMetaDataWithPool=True - msg.debug("Configuring Athena for reading ROOT files (via TEvent, with POOL for Metadata)... [OK]") return diff --git a/Database/AthenaRoot/AthenaRootComps/src/RootNtupleEventSelector.cxx b/Database/AthenaRoot/AthenaRootComps/src/RootNtupleEventSelector.cxx index 35946e0dbb8..e22543c0d03 100644 --- a/Database/AthenaRoot/AthenaRootComps/src/RootNtupleEventSelector.cxx +++ b/Database/AthenaRoot/AthenaRootComps/src/RootNtupleEventSelector.cxx @@ -269,7 +269,7 @@ RootNtupleEventSelector::RootNtupleEventSelector( const std::string& name, ( &RootNtupleEventSelector::setupInputCollection, this ); declareProperty( "TupleName", - m_tupleName = "", + m_tupleName = "CollectionTree", "Name of the TTree to load/read from input file(s)" ); declareProperty( "SkipEvents", @@ -325,7 +325,7 @@ StatusCode RootNtupleEventSelector::initialize() ATH_MSG_INFO ("Selector configured to read [" << nbrInputFiles << "] file(s)..." << endmsg - << " tuple [" << m_tupleName.value() << "]"); + << " TTree [" << m_tupleName.value() << "]"); } { @@ -366,6 +366,7 @@ StatusCode RootNtupleEventSelector::initialize() // as our branches (which need a valid m_ntuple pointer) // may be asked to be registered as we are a ProxyProvider. // retrieving the event store will poke the ProxyProviderSvc... + /* if ( !m_dataStore.retrieve().isSuccess() ) { ATH_MSG_ERROR ("Could not retrieve [" << m_dataStore.typeAndName() << "] !!"); @@ -385,6 +386,27 @@ StatusCode RootNtupleEventSelector::initialize() ("Could not retrieve [" << m_ometaStore.typeAndName() << "] !!"); return StatusCode::FAILURE; } + */ + + //ensure the Athena::NtupleCnvSvc is in the EventPersistencySvc + ServiceHandle<IProperty> epSvc("EventPersistencySvc",name()); + std::vector<std::string> propVal; + CHECK( Gaudi::Parsers::parse( propVal , epSvc->getProperty("CnvServices").toString() ) ); + bool foundSvc(false); + for(auto s : propVal) { + if(s=="Athena::xAODCnvSvc") { foundSvc=true; break; } + } + if(!foundSvc) { + propVal.push_back("Athena::NtupleCnvSvc"); + CHECK( epSvc->setProperty("CnvServices", Gaudi::Utils::toString( propVal ) )); + } + + //we should also add ourself as a proxy provider + ServiceHandle<IProxyProviderSvc> ppSvc("ProxyProviderSvc",name()); + CHECK( ppSvc.retrieve() ); + ppSvc->addProvider( this ); + + return StatusCode::SUCCESS; } @@ -860,9 +882,9 @@ RootNtupleEventSelector::createRootBranchAddresses(StoreID::type storeID, TClassEdit::kDropAllDefault); if (!m_clidsvc->getIDOfTypeInfoName(ti_typename, id) .isSuccess()) { - ATH_MSG_INFO("** could not find a CLID from type-info [" + ATH_MSG_DEBUG("** could not find a CLID from type-info [" << System::typeinfoName(*ti) << "]"); - ATH_MSG_INFO("** could not find a CLID from type-info-alias [" + ATH_MSG_DEBUG("** could not find a CLID from type-info-alias [" << ti_typename << "]"); continue; } @@ -871,13 +893,13 @@ RootNtupleEventSelector::createRootBranchAddresses(StoreID::type storeID, // probably a built-in type... if (!m_clidsvc->getIDOfTypeName(::root_typename(type_name), id) .isSuccess()) { - ATH_MSG_INFO("** could not find a CLID for type-name [" + ATH_MSG_DEBUG("** could not find a CLID for type-name [" << type_name << "]"); continue; } } if (id == 0) { - ATH_MSG_INFO("** could not find a CLID for type-name [" + ATH_MSG_DEBUG("** could not find a CLID for type-name [" << type_name << "]"); continue; } diff --git a/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.cxx b/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.cxx index f5976038699..7f015a34964 100644 --- a/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.cxx +++ b/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.cxx @@ -113,6 +113,7 @@ xAODEventSelector::xAODEventSelector( const std::string& name, m_dictsvc ( "AthDictLoaderSvc", name ), m_incsvc ( "IncidentSvc", name ), m_poolSvc ( "PoolSvc" , name ), + m_ppSvc ( "ProxyProviderSvc" , name ), m_nbrEvts ( 0 ), m_curEvt ( 0 ), m_collIdx ( 0 ), @@ -132,6 +133,7 @@ xAODEventSelector::xAODEventSelector( const std::string& name, //Expert Properties: declareProperty( "EvtStore", m_dataStore, "Store where to publish data"); + declareProperty( "ProxyProviderSvc" , m_ppSvc , "The ProxyProviderSvc that we should register ourself in and connect the EvtStore to"); declareProperty( "InputMetaStore",m_imetaStore, "Store where to publish (input) metadata"); declareProperty( "MetaStore",m_ometaStore, "Store where to publish (output) metadata"); declareProperty( "TreeName",m_tupleName = "CollectionTree","Name of the TTree to load/read from input file(s)" ); @@ -258,25 +260,53 @@ StatusCode xAODEventSelector::initialize() std::vector<std::string> propVal; CHECK( Gaudi::Parsers::parse( propVal , epSvc->getProperty("CnvServices").toString() ) ); - bool foundSvc(false); + bool foundSvc(false); bool foundPoolSvc(false); for(auto s : propVal) { - if(s=="Athena::xAODCnvSvc") { foundSvc=true; break; } + if(s=="Athena::xAODCnvSvc") { foundSvc=true; } + if(s=="AthenaPoolCnvSvc") { foundPoolSvc=true; } //only need this if in hybrid mode } - if(!foundSvc) { - propVal.push_back("Athena::xAODCnvSvc"); + if(!foundSvc) propVal.push_back("Athena::xAODCnvSvc"); + if(!foundPoolSvc && m_readMetadataWithPool) propVal.push_back("AthenaPoolCnvSvc"); + + if(!foundSvc || (!foundPoolSvc && m_readMetadataWithPool)) { CHECK( epSvc->setProperty("CnvServices", Gaudi::Utils::toString( propVal ) )); } //we should also add ourself as a proxy provider - ServiceHandle<IProxyProviderSvc> ppSvc("ProxyProviderSvc",name()); - CHECK( ppSvc.retrieve() ); - ppSvc->addProvider( this ); + CHECK( m_ppSvc.retrieve() ); + + //ensure the MetaDataSvc is added as a provider first, if we are in hybrid mode + if(m_readMetadataWithPool) { + std::vector<std::string> propVal; + CHECK( Gaudi::Parsers::parse( propVal , dynamic_cast<IProperty*>(&*m_ppSvc)->getProperty("ProviderNames").toString() ) ); + bool foundSvc(false); + for(auto s : propVal) { + if(s=="MetaDataSvc") { foundSvc=true; break; } + } + if(!foundSvc) { + propVal.push_back("MetaDataSvc"); + CHECK( dynamic_cast<IProperty*>(&*m_ppSvc)->setProperty("ProviderNames", Gaudi::Utils::toString( propVal ) )); + } + } + + //now we add ourself as a provider + m_ppSvc->addProvider( this ); //trigger a reload of proxies in the storegate, which will poke the proxyprovidersvc //not actually needed //CHECK( m_dataStore->loadEventProxies() ); - CHECK( ppSvc.release() ); + + //finally ensure the storegate has our proxy set in it + //FIXME: this doesnt seem to allow multi storegates on the fly ??? + //m_dataStore->setProxyProviderSvc( &*m_ppSvc ); + + CHECK( m_ppSvc.release() ); + + + //load the first file .. this is so metadata can be read even if no events present + //checked above that there's at least one file + CHECK( setFile(m_inputCollectionsName.value()[0]) ); return StatusCode::SUCCESS; @@ -699,15 +729,29 @@ xAODEventSelector::createRootBranchAddresses(StoreID::type storeID, for( auto itr = m_tevent->inputEventFormat()->begin(); itr!=m_tevent->inputEventFormat()->end();++itr) { //ATH_MSG_DEBUG("EFE:" << itr->first << " branchName = " << itr->second.branchName() << " className=" << itr->second.className()); CLID id = 0; - if( m_clidsvc->getIDOfTypeInfoName(itr->second.className(), id).isFailure() ) { + if( m_clidsvc->getIDOfTypeInfoName(itr->second.className(), id).isFailure() && + m_clidsvc->getIDOfTypeName(itr->second.className(), id).isFailure()) { //if this is an AuxStore (infer if key ends in Aux.), its possible we schema-evolved away from the version in the input file, but that this evolution is actually 'ok' in some cases. So don't print an error if the CLID is missing for an Aux, but we will print a warning at the end for these aux stores if(itr->second.branchName().compare(itr->second.branchName().length()-4,4,"Aux.")==0) { - missingAux.insert( itr->second.className() ); + missingAux.insert( itr->second.className() );continue; } else { - ATH_MSG_WARNING("No CLID for class " << itr->second.className() << " , cannot read " << itr->second.branchName()); + //vectors can be missing their std:: prefix, so add that and retry before failing + TString className = itr->second.className(); + ///className.ReplaceAll("vector","std::vector"); + //ALT solution to this is do what RootNtupleEventSelector does: uses TClass:GetClass + //and GetTypeInfo() method to get the proper type info + TClass *cls = TClass::GetClass(className); + if(cls) { + const std::type_info *ti = cls->GetTypeInfo(); + if(ti) className = System::typeinfoName(*ti); + } + + if( m_clidsvc->getIDOfTypeInfoName(className.Data(), id).isFailure() && + m_clidsvc->getIDOfTypeName(className.Data(), id).isFailure()) { + ATH_MSG_WARNING("No CLID for class " << itr->second.className() << " , cannot read " << itr->second.branchName()); + continue; + } } - continue; - } const std::string br_name = itr->second.branchName(); diff --git a/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.h b/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.h index 9f67bcc5be2..19a2b6b0881 100644 --- a/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.h +++ b/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.h @@ -177,6 +177,8 @@ class xAODEventSelector : ServiceHandle<IIncidentSvc> m_incsvc; /// Handle to the PoolSvc (used in Hybrid mode when user is reading metadata with pool) ServiceHandle<IPoolSvc> m_poolSvc; + /// Handle to the proxy provider svc + ServiceHandle<IProxyProviderSvc> m_ppSvc; /// List of input files containing @c TTree StringArrayProperty m_inputCollectionsName; diff --git a/PhysicsAnalysis/POOLRootAccess/test/POOLRootAccess.xml b/PhysicsAnalysis/POOLRootAccess/test/POOLRootAccess.xml index 669f5b90ca4..f5fb4bbd27b 100644 --- a/PhysicsAnalysis/POOLRootAccess/test/POOLRootAccess.xml +++ b/PhysicsAnalysis/POOLRootAccess/test/POOLRootAccess.xml @@ -13,7 +13,7 @@ <errorMessage>FAILURE (ERROR)</errorMessage> <returnValue>0</returnValue> </expectations> - <postscript>rootmonitor.py --lower='{"speed1":50,"speed2":2800}' --html ut_basicxAODRead_test.results.root</postscript> + <postscript>rootmonitor.py --lower='{"speed1":50,"speed2":3200}' --html ut_basicxAODRead_test.results.root</postscript> </TEST> <TEST name="POOLRootAccess_python_basicRead_test" type="script" suite="ASG"> @@ -27,6 +27,17 @@ </expectations> </TEST> + <TEST name="POOLRootAccess_python_elementLink_test" type="script" suite="ASG"> + <options_atn>python ${ATN_PACKAGE}/test/ut_elementLink_test.py</options_atn> + <timelimit>10</timelimit> + <author> Will Buttinger </author> + <mailto> will@cern.ch </mailto> + <expectations> + <errorMessage>FAILURE (ERROR)</errorMessage> + <returnValue>0</returnValue> + </expectations> + </TEST> + </atn> </unifiedTestConfiguration> -- GitLab