diff --git a/Calorimeter/CaloRec/src/CaloBCIDAvgAlg.cxx b/Calorimeter/CaloRec/src/CaloBCIDAvgAlg.cxx index 16498e7f658ec201507288d4a01348034cbf9e2e..e5bbb37e9f7e52ee1fe1882ee19f216659088d1e 100644 --- a/Calorimeter/CaloRec/src/CaloBCIDAvgAlg.cxx +++ b/Calorimeter/CaloRec/src/CaloBCIDAvgAlg.cxx @@ -66,8 +66,12 @@ StatusCode CaloBCIDAvgAlg::execute(const EventContext& ctx) const { const float xlumiMC = ei->averageInteractionsPerCrossing()*0.158478605; // Calculate Luminosity values ONLY around the places Luminosity will be needed - for(int i=std::max(0,bcid-38);i<std::min(bcid+38,(int)m_bcidMax);++i) { - lumiVec[i]=bcData->isFilled(i)*xlumiMC; + int ii = bcid-38; + if (ii < 0) ii += m_bcidMax; + for (int i=bcid-38; i<bcid+38; ++i) { + lumiVec[ii]=bcData->isFilled(ii)*xlumiMC; + ++ii; + if (ii >= static_cast<int>(m_bcidMax)) ii -= m_bcidMax; } } else { diff --git a/Control/AthContainers/AthContainers/dataVectorAsELV.h b/Control/AthContainers/AthContainers/dataVectorAsELV.h index 2c49194c5c6875631753ab2fcf0376fded703342..1e21105b176ce80e21deabe3fb5e3dcd18f8ab7b 100644 --- a/Control/AthContainers/AthContainers/dataVectorAsELV.h +++ b/Control/AthContainers/AthContainers/dataVectorAsELV.h @@ -1,7 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -29,6 +29,11 @@ namespace SG { +#ifdef XAOD_STANDALONE +using AthContainers::IProxyDict; +#endif // XAOD_STANDALONE + + /** * @brief Helper for @c dataVectorViewAsELV. Don't call this directly. * diff --git a/Control/AthContainers/AthContainers/tools/CurrentEventStore.h b/Control/AthContainers/AthContainers/tools/CurrentEventStore.h index 859dd582e90662475d0fb211f7220073f2636c34..a2ba6186f6571a265feb5ba006df1c04253e14ff 100644 --- a/Control/AthContainers/AthContainers/tools/CurrentEventStore.h +++ b/Control/AthContainers/AthContainers/tools/CurrentEventStore.h @@ -22,12 +22,14 @@ #include "xAODRootAccessInterfaces/TVirtualEvent.h" #include "xAODRootAccessInterfaces/TActiveEvent.h" +namespace AthContainers { typedef xAOD::TVirtualEvent IProxyDict; +} namespace SG { class CurrentEventStore { public: - static IProxyDict* store() + static AthContainers::IProxyDict* store() { return xAOD::TActiveEvent::event(); } diff --git a/Control/xAODRootAccess/CMakeLists.txt b/Control/xAODRootAccess/CMakeLists.txt index f642debafa066b2f26af0d2e6600e85c2914833f..d772046da7ec7ad7b05feb4b5920a9fc231a851e 100644 --- a/Control/xAODRootAccess/CMakeLists.txt +++ b/Control/xAODRootAccess/CMakeLists.txt @@ -1,29 +1,14 @@ -# $Id: CMakeLists.txt 796624 2017-02-10 17:17:23Z ssnyder $ -# -# Build configuration for the xAODRootAccess package. -# +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # The name of the package: atlas_subdir( xAODRootAccess ) # Extra dependencies, based on the build environment: -set( extra_deps ) set( extra_libs ) if( NOT XAOD_STANDALONE ) - set( extra_deps Control/SGTools Control/AthenaKernel ) set( extra_libs SGTools AthenaKernel ) endif() -# The dependencies of the package: -atlas_depends_on_subdirs( - PUBLIC - Control/CxxUtils - Control/AthContainersInterfaces - Control/AthContainers - Event/xAOD/xAODCore - Event/xAOD/xAODEventFormat - Control/xAODRootAccessInterfaces ) - # External dependencies: find_package( ROOT COMPONENTS Core Tree RIO Net MathCore ) @@ -42,7 +27,7 @@ atlas_add_root_dictionary( xAODRootAccess xAODRootAccessDictSource atlas_add_library( xAODRootAccess xAODRootAccess/*.h xAODRootAccess/*.icc xAODRootAccess/tools/*.h xAODRootAccess/tools/*.icc - Root/*.cxx ${xAODRootAccessDictSource} + Root/*.h Root/*.cxx ${xAODRootAccessDictSource} PUBLIC_HEADERS xAODRootAccess INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers xAODCore xAODEventFormat @@ -55,9 +40,15 @@ atlas_add_dictionary( xAODRootAccessDict LINK_LIBRARIES xAODRootAccess ) # Install the Python modules of the package: -atlas_install_python_modules( python/*.py +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) +# Install the checkxAOD.py script, only for the standalone analysis release. +# Athena based releases have a different implementation available to them. +if( XAOD_STANDALONE ) + atlas_install_scripts( scripts/checkxAOD.py ) +endif() + # Build the executables of the package: foreach( exec xAODChecker xAODMerge xAODFileReadTest ) atlas_add_executable( ${exec} util/${exec}.cxx @@ -70,37 +61,45 @@ macro( _add_test name ) atlas_add_test( ${name} SOURCES test/${name}.cxx INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} CxxUtils AthContainers xAODCore xAODRootAccess + LINK_LIBRARIES ${ROOT_LIBRARIES} CxxUtils AthContainers xAODCore + xAODRootAccess PROPERTIES TIMEOUT 600 LOG_IGNORE_PATTERN "Opened file:|find dictionary for type|is already in|[0-9]+ bytes" ) endmacro( _add_test ) # Build/run unit tests for the package: +if( NOT SIMULATIONBASE AND NOT GENERATIONBASE ) + _add_test( ut_xaodrootaccess_metadata_test ) + _add_test( ut_xaodrootaccess_athenaMode_test ) +endif() +_add_test( ut_xaodrootaccess_remap_test ) +_add_test( ut_xaodrootaccess_slimming_test ) +_add_test( ut_xaodrootaccess_stats_test ) _add_test( ut_xaodrootaccess_tauxvector_test ) _add_test( ut_xaodrootaccess_tauxstore_test ) _add_test( ut_xaodrootaccess_tauxstore_insertmove_test ) +_add_test( ut_xaodrootaccess_tchain_test ) +_add_test( ut_xaodrootaccess_tfileaccesstracer_test ) _add_test( ut_xaodrootaccess_tfilemerger_test ) _add_test( ut_xaodrootaccess_tstore_test ) +atlas_add_test( ut_xaodrootaccess_tpystore_test + SCRIPT python + ${CMAKE_CURRENT_SOURCE_DIR}/test/ut_xaodrootaccess_tpystore_test.py ) -# These require code from AtlasEvent, and so cannot run in ATN for AtlasCore. -# Re-enable them once we've gone to a single-project build. -#_add_test( ut_xaodrootaccess_metadata_test ) -#_add_test( ut_xaodrootaccess_remap_test ) -#_add_test( ut_xaodrootaccess_slimming_test ) -#_add_test( ut_xaodrootaccess_stats_test ) -#_add_test( ut_xaodrootaccess_tchain_test ) -#_add_test( ut_xaodrootaccess_tevent_test ) -#_add_test( ut_xaodrootaccess_transtree_test ) - -# Needs network access; problematic outside CERN. -#_add_test( ut_xaodrootaccess_tfileaccesstracer_test ) +if( XAOD_ANALYSIS ) + _add_test( ut_xaodrootaccess_tevent_test ) + _add_test( ut_xaodrootaccess_tevent_copy_test ) + _add_test( ut_xaodrootaccess_transtree_test ) + atlas_add_test( ut_xaodrootaccess_tpyevent_test + SCRIPT python + ${CMAKE_CURRENT_SOURCE_DIR}/test/ut_xaodrootaccess_tpyevent_test.py + PROPERTIES TIMEOUT 600 ) + atlas_add_test( ut_xaodrootaccess_transtree2_test + SCRIPT python + ${CMAKE_CURRENT_SOURCE_DIR}/test/ut_xaodrootaccess_transtree2_test.py + PROPERTIES TIMEOUT 600 ) +endif() -# Run the scripted tests for the package: -# These also can't run with just AtlasCore. -#atlas_add_test( ut_xaodrootaccess_tpyevent_test -# SCRIPT test/ut_xaodrootaccess_tpyevent_test.py PROPERTIES TIMEOUT 600 -# LOG_IGNORE_PATTERN "/Root/TAuxStore" ) -#atlas_add_test( ut_xaodrootaccess_tpystore_test -# SCRIPT test/ut_xaodrootaccess_tpystore_test.py PROPERTIES TIMEOUT 600 ) -#atlas_add_test( ut_xaodrootaccess_transtree2_test -# SCRIPT test/ut_xaodrootaccess_transtree2_test.py PROPERTIES TIMEOUT 600 ) +if( NOT XAOD_STANDALONE ) + _add_test( ut_xaodrootaccess_proxydict_test ) +endif() diff --git a/Control/xAODRootAccess/Root/Init.cxx b/Control/xAODRootAccess/Root/Init.cxx index 0eb6bbdb19871ea00339fa0b5c625fb33827d16c..059eb2b2fe91d3b967cd2af95c85e9cabf0883f8 100644 --- a/Control/xAODRootAccess/Root/Init.cxx +++ b/Control/xAODRootAccess/Root/Init.cxx @@ -1,8 +1,4 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: Init.cxx 796983 2017-02-14 05:09:12Z ssnyder $ +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration // System include(s): #include <iostream> @@ -20,18 +16,6 @@ // Local include(s): #include "xAODRootAccess/Init.h" -// Integrate with Apple's crash reporter. Taken directly from ROOT's TError.cxx. -// Disabled for now, as it doesn't seem to make any difference on top of 6.02/12 -// on MacOS X 10.10.4. -#ifdef __APPLE__ -/* -extern "C" { - static const char* __crashreporter_info__ = 0; - asm( ".desc ___crashreporter_info__, 0x10" ); -} -*/ -#endif // __APPLE__ - namespace xAOD { /// Pointer to the original error handler function if there was one @@ -122,6 +106,19 @@ namespace xAOD { return; } +#if ROOT_VERSION_CODE == ROOT_VERSION( 6, 14, 4 ) + // Hide error messages coming from TFormula::Streamer. This is discussed + // in the ROOT-9693 and ROOT-9703 Jira tickets. + static const char* TFORMULA_ERROR_MESSAGE_PREFIX = + "number of dimension computed"; + if( ( level == kError ) && + ( ! strcmp( location, "TFormula::Streamer" ) ) && + ( ! strncmp( message, TFORMULA_ERROR_MESSAGE_PREFIX, + strlen( TFORMULA_ERROR_MESSAGE_PREFIX ) ) ) ) { + return; + } +#endif // ROOT_VERSION + // Construct a string version of the message's level: const char* msgLevel = 0; if( level >= kFatal ) { @@ -154,15 +151,6 @@ namespace xAOD { return; } -#ifdef __APPLE__ - /* - if( __crashreporter_info__ ) { - delete[] __crashreporter_info__; - } - __crashreporter_info__ = StrDup( output.str().c_str() ); - */ -#endif // __APPLE__ - // Abort with a stack trace if possible: std::cout << std::endl << "Aborting..." << std::endl; if( gSystem ) { diff --git a/Control/xAODRootAccess/Root/MakeTransientTree.cxx b/Control/xAODRootAccess/Root/MakeTransientTree.cxx index f8aea8811db03acca1669d6535211006dfe18196..1394488e4c85aa23784daafe7eca0c5f976792c4 100644 --- a/Control/xAODRootAccess/Root/MakeTransientTree.cxx +++ b/Control/xAODRootAccess/Root/MakeTransientTree.cxx @@ -1,8 +1,4 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: MakeTransientTree.cxx 796518 2017-02-10 05:11:37Z ssnyder $ +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration // System include(s): #include <cstring> @@ -45,9 +41,6 @@ namespace { /// /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> /// - /// $Revision: 796518 $ - /// $Date: 2017-02-10 06:11:37 +0100 (Fri, 10 Feb 2017) $ - /// class TEventNotifier : public ::TObject { public: @@ -104,9 +97,6 @@ namespace { /// /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> /// - /// $Revision: 796518 $ - /// $Date: 2017-02-10 06:11:37 +0100 (Fri, 10 Feb 2017) $ - /// class TTransObjectHolder { private: @@ -255,12 +245,10 @@ namespace xAOD { // Go back to the original directory: dir->cd(); - // It can happen with a TChain input that at this point the TEvent - // object doesn't actually have the correct file open. This should address - // the issue: - if( ( ! event.m_inTree ) && ( event.getEntry( 0 ) < 0 ) ) { + // Make sure that the first file/event is loaded at this point. + if( event.getEntry( 0 ) < 0 ) { ::Error( "xAOD::MakeTransientTree", - XAOD_MESSAGE( "Internal logic error detected" ) ); + XAOD_MESSAGE( "Couldn't load first event" ) ); return 0; } diff --git a/Control/xAODRootAccess/Root/TAuxBranchManager.cxx b/Control/xAODRootAccess/Root/TAuxBranchManager.cxx index a46187e7b4725e12ec1da348406d59bc07e7d8e0..6d31f7e13996f210a3effd658f047814cacbd95e 100644 --- a/Control/xAODRootAccess/Root/TAuxBranchManager.cxx +++ b/Control/xAODRootAccess/Root/TAuxBranchManager.cxx @@ -1,8 +1,4 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TAuxBranchManager.cxx 783066 2016-11-08 19:39:32Z ssnyder $ +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration // ROOT include(s): #include <TBranch.h> @@ -19,20 +15,23 @@ namespace xAOD { TAuxBranchManager::TAuxBranchManager( auxid_t auxid, ::TBranch* br, THolder* holder ) : m_branch( br ), m_holder( holder ), m_entry( -1 ), - m_isSet( kTRUE ), m_auxId( auxid ), m_vector( 0 ) { + m_isSet( kTRUE ), m_auxId( auxid ), m_vector( nullptr ) { } TAuxBranchManager::TAuxBranchManager( const TAuxBranchManager& parent ) - : TVirtualManager(), m_branch( parent.m_branch ), m_holder( 0 ), + : TVirtualManager(), m_branch( parent.m_branch ), m_holder( nullptr ), m_entry( parent.m_entry ), m_isSet( parent.m_isSet ), - m_auxId( parent.m_auxId ), m_vector( 0 ) { + m_auxId( parent.m_auxId ), m_vector( nullptr ) { if( parent.m_holder ) { m_holder = new THolder( *parent.m_holder ); } if( parent.m_vector ) { - m_vector = SG::AuxTypeRegistry::instance().makeVector( m_auxId, (size_t)0, (size_t)0 ).release(); + m_vector = + SG::AuxTypeRegistry::instance().makeVector( m_auxId, + ( size_t ) 0, + ( size_t ) 0 ).release(); } } @@ -66,7 +65,10 @@ namespace xAOD { m_auxId = rhs.m_auxId; if( m_vector ) delete m_vector; if( rhs.m_vector ) { - m_vector = SG::AuxTypeRegistry::instance().makeVector( m_auxId, (size_t)0, (size_t)0 ).release(); + m_vector = + SG::AuxTypeRegistry::instance().makeVector( m_auxId, + ( size_t ) 0, + ( size_t ) 0 ).release(); } else { m_vector = 0; } @@ -132,7 +134,10 @@ namespace xAOD { // Otherwise let's create a default object: m_isSet = kTRUE; if( ! m_vector ) { - m_vector = SG::AuxTypeRegistry::instance().makeVector( m_auxId, (size_t)0, (size_t)0 ).release(); + m_vector = + SG::AuxTypeRegistry::instance().makeVector( m_auxId, + ( size_t ) 0, + ( size_t ) 0 ).release(); } // ...and use it to fill the current event: m_holder->setOwner( kFALSE ); diff --git a/Control/xAODRootAccess/Root/TAuxStore.cxx b/Control/xAODRootAccess/Root/TAuxStore.cxx index d15078d17fca07a4a790b8a270c38d3dc7238a17..c28951eec915a0abec3aba2c3c06a181ca2dacaf 100644 --- a/Control/xAODRootAccess/Root/TAuxStore.cxx +++ b/Control/xAODRootAccess/Root/TAuxStore.cxx @@ -1,8 +1,4 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TAuxStore.cxx 796624 2017-02-10 17:17:23Z ssnyder $ +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration // System include(s): #include <string.h> diff --git a/Control/xAODRootAccess/Root/TAuxVector.cxx b/Control/xAODRootAccess/Root/TAuxVector.cxx index d2f38ed09cd44520536611bc45a55237be254e8d..32f87337ee1f6c84f1033f3e35a2484104b37e4a 100644 --- a/Control/xAODRootAccess/Root/TAuxVector.cxx +++ b/Control/xAODRootAccess/Root/TAuxVector.cxx @@ -1,8 +1,4 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TAuxVector.cxx 793778 2017-01-25 04:06:29Z ssnyder $ +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration // ROOT include(s): #include <TClass.h> @@ -102,9 +98,9 @@ namespace xAOD { return *this; } - std::unique_ptr<SG::IAuxTypeVector> TAuxVector::clone() const { + std::unique_ptr< SG::IAuxTypeVector > TAuxVector::clone() const { - return std::make_unique<TAuxVector>( *this ); + return std::make_unique< TAuxVector >( *this ); } void* TAuxVector::toPtr() { diff --git a/Control/xAODRootAccess/Root/TAuxVectorFactory.cxx b/Control/xAODRootAccess/Root/TAuxVectorFactory.cxx index b4739380b237593243df28b389568afbbbebac4f..a8a9cbb2afb874db4d161cfbce65fc9a163593cf 100644 --- a/Control/xAODRootAccess/Root/TAuxVectorFactory.cxx +++ b/Control/xAODRootAccess/Root/TAuxVectorFactory.cxx @@ -1,8 +1,4 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TAuxVectorFactory.cxx 793319 2017-01-21 16:21:46Z ssnyder $ +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration // ROOT include(s): #include <TClass.h> @@ -54,14 +50,15 @@ namespace xAOD { } } - std::unique_ptr<SG::IAuxTypeVector> + std::unique_ptr< SG::IAuxTypeVector > TAuxVectorFactory::create( size_t size, size_t capacity ) const { - return std::make_unique<TAuxVector>( this, m_class, size, capacity ); + return std::make_unique< TAuxVector >( this, m_class, size, capacity ); } - std::unique_ptr<SG::IAuxTypeVector> - TAuxVectorFactory::createFromData( void* /*data*/, bool /*isPacked*/, bool ) const { + std::unique_ptr< SG::IAuxTypeVector > + TAuxVectorFactory::createFromData( void* /*data*/, bool /*isPacked*/, + bool /*ownFlag*/ ) const { std::abort(); } @@ -92,12 +89,16 @@ namespace xAOD { return; } - void TAuxVectorFactory::copyForOutput( void* dst, size_t dst_index, - const void* src, size_t src_index ) const { - copy (dst, dst_index, src, src_index); + void TAuxVectorFactory::copyForOutput( void* dst, size_t dst_index, + const void* src, + size_t src_index ) const { + + // Do a "regular" copy. + copy( dst, dst_index, src, src_index ); - ::Warning( "xAOD::TAuxVectorFactory::TAuxVectorFactory", - XAOD_MESSAGE( "copyForOutput called; should only be used with pool converters." ) ); + ::Warning( "xAOD::TAuxVectorFactory::TAuxVectorFactory", + XAOD_MESSAGE( "copyForOutput called; should only be used " + "with pool converters." ) ); } void TAuxVectorFactory::swap( void* a, size_t aindex, diff --git a/Control/xAODRootAccess/Root/TDestructorRegistry.cxx b/Control/xAODRootAccess/Root/TDestructorRegistry.cxx index bb14b2fd25c8408bb4b63479e3795409c26f060e..966d392351c828094968a20d163acdf5843a9fed 100644 --- a/Control/xAODRootAccess/Root/TDestructorRegistry.cxx +++ b/Control/xAODRootAccess/Root/TDestructorRegistry.cxx @@ -1,8 +1,4 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TDestructorRegistry.cxx 649954 2015-02-26 13:28:38Z krasznaa $ +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration // ROOT include(s): #include <TError.h> @@ -31,7 +27,7 @@ namespace xAOD { // Look for this type: Map_t::const_iterator itr = m_types.find( &ti ); if( itr != m_types.end() ) { - return itr->second.m_destructor; + return itr->second.get(); } // We didn't find it: @@ -46,16 +42,4 @@ namespace xAOD { } - TDestructorRegistry::TDestructorHolder:: - TDestructorHolder( TVirtualDestructor* d ) - : m_destructor( d ) { - - } - - TDestructorRegistry::TDestructorHolder:: - ~TDestructorHolder() { - - if( m_destructor ) delete m_destructor; - } - } // namespace xAOD diff --git a/Control/xAODRootAccess/Root/TEvent.cxx b/Control/xAODRootAccess/Root/TEvent.cxx index ddd3c9be616af8f2daea8c921428768fe509399f..82e5023ffea750f03b5741ccf240fd95f452824a 100644 --- a/Control/xAODRootAccess/Root/TEvent.cxx +++ b/Control/xAODRootAccess/Root/TEvent.cxx @@ -1,6 +1,4 @@ -/* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -*/ +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration // System include(s): #include <cassert> @@ -28,6 +26,7 @@ #ifndef XAOD_STANDALONE # include "SGTools/CurrentEventStore.h" #endif // not XAOD_STANDALONE +#include "CxxUtils/no_sanitize_undefined.h" // Interface include(s): #include "xAODRootAccessInterfaces/TActiveEvent.h" @@ -57,8 +56,6 @@ #include "xAODRootAccess/tools/TChainStateTracker.h" #include "xAODRootAccess/tools/TFileAccessTracer.h" -#include "CxxUtils/no_sanitize_undefined.h" - namespace { /// Simple helper function for removing the _vX postfixes from type @@ -97,20 +94,22 @@ namespace { return; } - class ForceTrackIndices - : public SG::AuxVectorBase - { + /// Helper class for exposing the @c SG::AuxVectorBase::initAuxVectorBase + /// function + class ForceTrackIndices : public SG::AuxVectorBase { public: - using SG::AuxVectorBase::initAuxVectorBase; - }; - - void forceTrackIndices NO_SANITIZE_UNDEFINED (SG::AuxVectorBase& vec) - { - ForceTrackIndices& xvec = static_cast<ForceTrackIndices&> (vec); - xvec.initAuxVectorBase<DataVector<SG::IAuxElement> > (SG::OWN_ELEMENTS, SG::ALWAYS_TRACK_INDICES); + using SG::AuxVectorBase::initAuxVectorBase; + }; // class ForceTrackIndices + + /// Helper function for calling @c SG::AuxVectorBase::initAuxVectorBase + void forceTrackIndices NO_SANITIZE_UNDEFINED ( SG::AuxVectorBase& vec ) { + // Treat the received object like it would be of type @c ForceTrackIndices + ForceTrackIndices& xvec = static_cast< ForceTrackIndices& >( vec ); + xvec.initAuxVectorBase< DataVector< SG::IAuxElement > >( SG::OWN_ELEMENTS, + SG::ALWAYS_TRACK_INDICES ); + return; } - } // private namespace namespace xAOD { @@ -118,7 +117,7 @@ namespace xAOD { // // Initialise the static data: // - const ::Int_t TEvent::CACHE_SIZE = 30000000; + const ::Int_t TEvent::CACHE_SIZE = -1; const char* TEvent::EVENT_TREE_NAME = "CollectionTree"; const char* TEvent::METADATA_TREE_NAME = "MetaData"; @@ -129,13 +128,13 @@ namespace xAOD { TEvent::TEvent( EAuxMode mode ) : m_auxMode( mode ), - m_inTree( 0 ), m_inTreeMissing( kFALSE ), - m_inChain( 0 ), m_inChainTracker( 0 ), - m_inTreeNumber( -1 ), m_inMetaTree( 0 ), - m_entry( 0 ), m_outTree( 0 ), + m_inTree( nullptr ), m_inTreeMissing( kFALSE ), + m_inChain( nullptr ), m_inChainTracker( nullptr ), + m_inTreeNumber( -1 ), m_inMetaTree( nullptr ), + m_entry( -1 ), m_outTree( nullptr ), m_inputObjects(), m_outputObjects(), m_inputMetaObjects(), m_outputMetaObjects(), - m_inputEventFormat(), m_outputEventFormat( 0 ), + m_inputEventFormat(), m_outputEventFormat( nullptr ), m_auxItemList(), m_listeners(), m_nameRemapping() { // Make sure that the I/O monitoring is active: @@ -162,13 +161,13 @@ namespace xAOD { TEvent::TEvent( ::TFile* file, EAuxMode mode ) : m_auxMode( mode ), - m_inTree( 0 ), m_inTreeMissing( kFALSE ), - m_inChain( 0 ), m_inChainTracker( 0 ), - m_inTreeNumber( -1 ), m_inMetaTree( 0 ), - m_entry( 0 ), m_outTree( 0 ), + m_inTree( nullptr ), m_inTreeMissing( kFALSE ), + m_inChain( nullptr ), m_inChainTracker( nullptr ), + m_inTreeNumber( -1 ), m_inMetaTree( nullptr ), + m_entry( -1 ), m_outTree( nullptr ), m_inputObjects(), m_outputObjects(), m_inputMetaObjects(), m_outputMetaObjects(), - m_inputEventFormat(), m_outputEventFormat( 0 ), + m_inputEventFormat(), m_outputEventFormat( nullptr ), m_auxItemList(), m_listeners(), m_nameRemapping() { // Make sure that the I/O monitoring is active: @@ -198,13 +197,13 @@ namespace xAOD { TEvent::TEvent( ::TTree* tree, EAuxMode mode ) : m_auxMode( mode ), - m_inTree( 0 ), m_inTreeMissing( kFALSE ), - m_inChain( 0 ), m_inChainTracker( 0 ), - m_inTreeNumber( -1 ), m_inMetaTree( 0 ), - m_entry( 0 ), m_outTree( 0 ), + m_inTree( nullptr ), m_inTreeMissing( kFALSE ), + m_inChain( nullptr ), m_inChainTracker( nullptr ), + m_inTreeNumber( -1 ), m_inMetaTree( nullptr ), + m_entry( -1 ), m_outTree( nullptr ), m_inputObjects(), m_outputObjects(), m_inputMetaObjects(), m_outputMetaObjects(), - m_inputEventFormat(), m_outputEventFormat( 0 ), + m_inputEventFormat(), m_outputEventFormat( nullptr ), m_auxItemList(), m_listeners(), m_nameRemapping() { // Make sure that the I/O monitoring is active: @@ -383,8 +382,9 @@ namespace xAOD { } m_inputMetaObjects.clear(); - // Reset the internal flag: + // Reset the internal flags: m_inTreeMissing = kFALSE; + m_entry = -1; // Make sure we return to the current directory: TDirectoryReset dr; @@ -680,8 +680,8 @@ namespace xAOD { // Create the only branch in it: metatree->Branch( "EventFormat", - ClassName< xAOD::EventFormat >::name().c_str(), - &m_outputEventFormat ); + SG::normalizedTypeinfoName( typeid( xAOD::EventFormat ) ).c_str(), + &m_outputEventFormat ); // Create a copy of the m_outputMetaObjects variable. This is necessary // because the putAux(...) function will modify this variable while we @@ -1048,8 +1048,7 @@ namespace xAOD { // Check if a name re-mapping should be applied or not: std::string keyToUse = key; - std::map< std::string, std::string >::const_iterator remap_itr = - m_nameRemapping.find( key ); + auto remap_itr = m_nameRemapping.find( key ); if( ( remap_itr != m_nameRemapping.end() ) && ( ! m_inputEventFormat.exists( key ) ) && m_inputEventFormat.exists( remap_itr->second ) ) { @@ -1088,8 +1087,7 @@ namespace xAOD { // Check if we have a filtering rule for the store: const std::set< std::string >* filter = 0; - std::map< std::string, std::set< std::string > >::const_iterator fitr = - m_auxItemList.find( key + "Aux." ); + auto fitr = m_auxItemList.find( key + "Aux." ); if( fitr != m_auxItemList.end() ) { filter = &( fitr->second ); } @@ -1252,8 +1250,8 @@ namespace xAOD { // If we have a chain as input: if( m_inChain ) { // Make sure that the correct tree is loaded: - m_entry = m_inChain->LoadTree( entry ); - if( m_entry < 0 ) { + const ::Long64_t fileEntry = m_inChain->LoadTree( entry ); + if( fileEntry < 0 ) { ::Error( "xAOD::TEvent::getEntry", XAOD_MESSAGE( "Failure in loading entry %i from the " "input chain" ), @@ -1278,6 +1276,8 @@ namespace xAOD { return -1; } } + // Restore the previously received entry number. + m_entry = fileEntry; } // If we have a regular file/tree as input: else { @@ -1920,8 +1920,7 @@ namespace xAOD { // Check if a name remapping should be applied or not: std::string keyToUse = key; - std::map< std::string, std::string >::const_iterator remap_itr = - m_nameRemapping.find( key ); + auto remap_itr = m_nameRemapping.find( key ); if( ( remap_itr != m_nameRemapping.end() ) && ( ! m_inputEventFormat.exists( key ) ) && m_inputEventFormat.exists( remap_itr->second ) ) { @@ -1938,7 +1937,8 @@ namespace xAOD { } // A sanity check before checking for an object from the input file: - if( ( ! m_inTree ) && ( ! metadata ) ) { + if( ( ( ! m_inTree ) || ( m_entry < 0 ) ) && + ( ! metadata ) ) { return 0; } if( ( ! m_inMetaTree ) && metadata ) { @@ -2906,94 +2906,94 @@ namespace xAOD { Object_t& objects = ( metadata ? m_inputMetaObjects : m_inputObjects ); - // If it's an auxiliary store, then all we need to do is to make sure that - // its dynamic store is updated as well. - if( ( ! metadata ) && isAuxStore( mgr ) ) { - Object_t::const_iterator dynAuxMgr = - objects.find( key + "Dynamic" ); - if( dynAuxMgr != objects.end() ) { - dynAuxMgr->second->getEntry( m_entry ); - } - return TReturnCode::kSuccess; - } // Look up the auxiliary object's manager: - Object_t::const_iterator auxMgr = objects.find( key + "Aux." ); - if( auxMgr == objects.end() ) { - // Apparently there's no auxiliary object for this DV, so let's - // give up: - return TReturnCode::kSuccess; + TVirtualManager* auxMgr = nullptr; + std::string auxKey; + if( isAuxStore( mgr ) ) { + auxMgr = &mgr; + auxKey = key; + } else { + auto itr = objects.find( key + "Aux." ); + if( itr == objects.end() ) { + // Apparently there's no auxiliary object for this DV, so let's + // give up: + return TReturnCode::kSuccess; + } + auxMgr = itr->second; + auxKey = key + "Aux."; } if( ! metadata ) { // Make sure the auxiliary object is up to date: - ::Int_t readBytes = auxMgr->second->getEntry( m_entry ); + ::Int_t readBytes = auxMgr->getEntry( m_entry ); // Check if there is a separate auxiliary object for the dynamic // variables: - Object_t::const_iterator dynAuxMgr = - objects.find( key + "Aux.Dynamic" ); - if( dynAuxMgr != objects.end() ) { - if( readBytes ) { - // Do different things based on the access mode: - if( m_auxMode != kAthenaAccess ) { - // In "normal" access modes just tell the dynamic store object - // to switch to a new event. - dynAuxMgr->second->getEntry( m_entry ); - } else { - // In "Athena mode" this object has already been deleted when - // the main auxiliary store object was switched to the new - // event. So let's re-create it: - xAOD::TObjectManager& auxMgrRef = - dynamic_cast< xAOD::TObjectManager& >( *( auxMgr->second ) ); - RETURN_CHECK( "xAOD::TEvent::setAuxStore", - setUpDynamicStore( auxMgrRef, - ( metadata ? - m_inMetaTree : - m_inTree ) ) ); - // Now tell the newly created dynamic store object which event - // it should be looking at: - Object_t::const_iterator dynAuxMgr = - objects.find( key + "Aux.Dynamic" ); - if( dynAuxMgr == objects.end() ) { - ::Error( "xAOD::TEvent::setAuxStore", - XAOD_MESSAGE( "Internal logic error detected" ) ); - return TReturnCode::kFailure; - } - dynAuxMgr->second->getEntry( m_entry ); + const std::string dynAuxKey = auxKey + "Dynamic"; + auto dynAuxMgr = objects.find( dynAuxKey ); + + if( ( dynAuxMgr != objects.end() ) && + ( readBytes || ( m_auxMode == kAthenaAccess ) || + ( auxMgr == &mgr ) ) ) { + // Do different things based on the access mode: + if( m_auxMode != kAthenaAccess ) { + // In "normal" access modes just tell the dynamic store object + // to switch to a new event. + dynAuxMgr->second->getEntry( m_entry ); + } else { + // In "Athena mode" this object has already been deleted when + // the main auxiliary store object was switched to the new + // event. So let's re-create it: + xAOD::TObjectManager& auxMgrRef = + dynamic_cast< xAOD::TObjectManager& >( *auxMgr ); + RETURN_CHECK( "xAOD::TEvent::setAuxStore", + setUpDynamicStore( auxMgrRef, + ( metadata ? + m_inMetaTree : + m_inTree ) ) ); + // Now tell the newly created dynamic store object which event + // it should be looking at: + auto dynAuxMgr = objects.find( dynAuxKey ); + if( dynAuxMgr == objects.end() ) { + ::Error( "xAOD::TEvent::setAuxStore", + XAOD_MESSAGE( "Internal logic error detected" ) ); + return TReturnCode::kFailure; } + dynAuxMgr->second->getEntry( m_entry ); } } } + // Stop here if we've set up an auxiliary store. + if( auxMgr == &mgr ) { + return TReturnCode::kSuccess; + } + // Access the auxiliary base class of the object/vector: SG::AuxVectorBase* vec = 0; SG::AuxElement* aux = 0; - switch (mgr.holder()->typeKind()) { - case THolder::DATAVECTOR: { - void* vvec = mgr.holder()->getAs( typeid( SG::AuxVectorBase ) ); - vec = reinterpret_cast< SG::AuxVectorBase* >( vvec ); + switch( mgr.holder()->typeKind() ) { + case THolder::DATAVECTOR: + { + void* vvec = mgr.holder()->getAs( typeid( SG::AuxVectorBase ) ); + vec = reinterpret_cast< SG::AuxVectorBase* >( vvec ); + } break; - } - case THolder::AUXELEMENT: { - void* vaux = mgr.holder()->getAs( typeid( SG::AuxElement ) ); - aux = reinterpret_cast< SG::AuxElement* >( vaux ); + case THolder::AUXELEMENT: + { + void* vaux = mgr.holder()->getAs( typeid( SG::AuxElement ) ); + aux = reinterpret_cast< SG::AuxElement* >( vaux ); + } break; - } default: - break; + break; } - // Check whether index tracking is enabled for the type. If not, let's not - // get any further: + // Check whether index tracking is enabled for the type. If not, then + // we need to fix it... if( vec && ( ! vec->trackIndices() ) ) { - /* - ::Warning( "xAOD::TEvent::setAuxStore", "Can't associate auxiliary " - "store to container %s, as it's not tracking its indices", - key.c_str() ); - return TReturnCode::kSuccess; - */ - forceTrackIndices (*vec); + forceTrackIndices( *vec ); } // Check if we were successful: @@ -3008,11 +3008,11 @@ namespace xAOD { const SG::IConstAuxStore* store = 0; if( m_auxMode == kBranchAccess ) { // Get the concrete auxiliary manager: - TAuxManager* amgr = dynamic_cast< TAuxManager* >( auxMgr->second ); + TAuxManager* amgr = dynamic_cast< TAuxManager* >( auxMgr ); if( ! amgr ) { ::Fatal( "xAOD::TEvent::setAuxStore", XAOD_MESSAGE( "Auxiliary manager for \"%s\" is not of the " - "right type" ), auxMgr->first.c_str() ); + "right type" ), auxKey.c_str() ); } store = amgr->getConstStore(); // If the store still doesn't know its type, help it now: @@ -3026,11 +3026,11 @@ namespace xAOD { } else if( m_auxMode == kClassAccess || m_auxMode == kAthenaAccess ) { // Get the concrete auxiliary manager: TObjectManager* omgr = - dynamic_cast< TObjectManager* >( auxMgr->second ); + dynamic_cast< TObjectManager* >( auxMgr ); if( ! omgr ) { ::Fatal( "xAOD::TEvent::setAuxStore", XAOD_MESSAGE( "Auxiliary manager for \"%s\" is not of the " - "right type" ), auxMgr->first.c_str() ); + "right type" ), auxKey.c_str() ); } void* p = omgr->holder()->getAs( typeid( SG::IConstAuxStore ) ); store = reinterpret_cast< const SG::IConstAuxStore* >( p ); @@ -3098,8 +3098,7 @@ namespace xAOD { // Check if we have rules defined for which auxiliary properties // to write out: if( ! metadata ) { - std::map< std::string, std::set< std::string > >::const_iterator - item_itr = m_auxItemList.find( mgr->branch()->GetName() ); + auto item_itr = m_auxItemList.find( mgr->branch()->GetName() ); if( item_itr != m_auxItemList.end() ) { aux->selectAux( item_itr->second ); } @@ -3122,18 +3121,22 @@ namespace xAOD { // Select which container to add the variables to: Object_t& objects = ( metadata ? m_outputMetaObjects : m_outputObjects ); - // Extract all the dynamic variables from the object: // This iteration will determine the ordering of branches within // the tree, so sort auxids by name. const SG::AuxTypeRegistry& r = SG::AuxTypeRegistry::instance(); - typedef std::pair<std::string, SG::auxid_t> AuxVarSort_t; - std::vector<AuxVarSort_t> varsort; - varsort.reserve (auxids.size()); - for (SG::auxid_t id : auxids) - varsort.emplace_back (r.getName(id), id); - std::sort (varsort.begin(), varsort.end()); - for (const auto& p : varsort) { - SG::auxid_t id = p.second; + typedef std::pair< std::string, SG::auxid_t > AuxVarSort_t; + std::vector< AuxVarSort_t > varsort; + varsort.reserve( auxids.size() ); + for( SG::auxid_t id : auxids ) { + varsort.emplace_back( r.getName( id ), id ); + } + std::sort( varsort.begin(), varsort.end() ); + + // Extract all the dynamic variables from the object: + for( const auto& p : varsort ) { + + // The auxiliary ID: + const SG::auxid_t id = p.second; // Construct a name for the branch that we will write: const std::string brName = dynNamePrefix + p.first; @@ -3146,6 +3149,12 @@ namespace xAOD { // Construct the full type name of the variable: const std::type_info* brType = aux->getIOType( id ); + if( ! brType ) { + ::Error( "xAOD::TEvent::putAux", + XAOD_MESSAGE( "No I/O type found for variable %s" ), + brName.c_str() ); + return TReturnCode::kFailure; + } const std::string brTypeName = Utils::getTypeName( *brType ); std::string brProperTypeName = "<unknown>"; diff --git a/Control/xAODRootAccess/Root/TEventProxyDict.cxx b/Control/xAODRootAccess/Root/TEventProxyDict.cxx index f448372dd73b170463f7200a74679a1c74a4e900..45e1247272f4468cc0a36c5a5bbf8a01da6046b5 100644 --- a/Control/xAODRootAccess/Root/TEventProxyDict.cxx +++ b/Control/xAODRootAccess/Root/TEventProxyDict.cxx @@ -1,8 +1,4 @@ -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TEventProxyDict.cxx 796514 2017-02-10 04:33:07Z ssnyder $ +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration // // File holding the implementation of the xAOD::TEvent functions that implement // the IProxyDict interface. Just to make TEvent.cxx a little smaller. @@ -162,7 +158,7 @@ namespace xAODPrivate { }; -StatusCode TLoader::createObj(IOpaqueAddress* /*addr*/, DataObject*& obj) + StatusCode TLoader::createObj(IOpaqueAddress* /*addr*/, DataObject*& obj) { static const bool SILENT = true; static const bool METADATA = false; @@ -180,7 +176,6 @@ StatusCode TLoader::createObj(IOpaqueAddress* /*addr*/, DataObject*& obj) return StatusCode::SUCCESS; } - } // xAODPrivate namespace #endif // not XAOD_STANDALONE @@ -269,33 +264,51 @@ namespace xAOD { const xAOD::EventFormatElement* efe = getEventFormatElement( sgkey ); if( ! efe ) { // Apparently this key is not known: - return 0; + return nullptr; } - // Get the dictionary for the type: - const std::string& className = efe->className(); - bi.m_class = TClass::GetClass( className.c_str() ); - if( ! bi.m_class ) { - ::Warning( "xAOD::TEvent::getBranchInfo", - "Can't find TClass for `%s'", - className.c_str() ); - return 0; + // Helper variable(s). + static const bool SILENT = true; + static const bool METADATA = false; + + // The name of the requested object. + const std::string& name = getName( sgkey ); + // This is a bit perverse... In order to let the "base class" figure + // out the exact type of this object, we ask for it with a TEvent + // pointer. I use that type because I need something that has a + // dictionary, and which should always be available when this code + // runs. In the end it doesn't matter that the object can't be + // retrieved as that type (of course...), it only matters that it gets + // "set up" following these calls. + TEvent* nc_this = const_cast< TEvent* >( this ); + static const std::type_info& dummy = typeid( TEvent ); + nc_this->getInputObject( name, dummy, SILENT, METADATA ); + auto itr = m_outputObjects.find( name ); + if( itr == m_outputObjects.end() ) { + itr = m_inputObjects.find( name ); + if( itr == m_inputObjects.end() ) { + // We didn't find this object in the store... + return nullptr; + } } - if( ! bi.m_class->GetTypeInfo() ) { - ::Warning( "xAOD::TEvent::getBranchInfo", - "No type_info available for `%s'", - className.c_str() ); - return 0; + const TObjectManager* mgr = + dynamic_cast< const TObjectManager* >( itr->second ); + if( ! mgr ) { + ::Error( "xAOD::TEvent::getBranchInfo", + XAOD_MESSAGE( "Internal logic error found" ) ); + return nullptr; } + bi.m_class = mgr->holder()->getClass(); + // There's no need to check whether this is a "proper" dictionary + // at this point, since if TEvent is holding on to it, the type + // must have a proper compiled dictionary. #ifndef XAOD_STANDALONE // Create a proper proxy for the input branch: SG::TransientAddress* taddr = - new SG::TransientAddress( CLID_NULL, - efe->branchName(), + new SG::TransientAddress( CLID_NULL, efe->branchName(), new GenericAddress() ); taddr->setSGKey( sgkey ); - TEvent* nc_this = const_cast<TEvent*>(this); xAODPrivate::TLoader* loader = new xAODPrivate::TLoader (*nc_this, getName( sgkey ), @@ -340,7 +353,7 @@ namespace xAOD { /// @param proxy The proxy to take posession of. Not used for anything /// useful. /// - StatusCode TEvent::addToStore( CLID /*clid*/, SG::DataProxy* proxy ) { + StatusCode TEvent::addToStore( CLID clid, SG::DataProxy* proxy ) { // Warn the user that the function got called: static bool warningPrinted = false; @@ -351,14 +364,13 @@ namespace xAOD { warningPrinted = true; } + // Hold on to the proxy with some non-existent, hopefully unique key: + const ::TString uniqueKey = ::TString::Format( "NonExistentKey_%lu", + m_branches.size() ); BranchInfo bi; bi.m_proxy.reset( proxy ); - m_branches.insert( std::make_pair( -#ifdef XAOD_STANDALONE - 0, -#else - proxy->sgkey(), -#endif // XAOD_STANDALONE + m_branches.insert( std::make_pair( stringToKey( uniqueKey.Data(), + clid ), std::move( bi ) ) ); // Return gracefully: diff --git a/Control/xAODRootAccess/Root/TFileAccessTracer.cxx b/Control/xAODRootAccess/Root/TFileAccessTracer.cxx index 1067db1d39a378ae969e6d472a5e8bc5612dab02..7df0244c560ca9a816fcbb66bc5b633364446174 100644 --- a/Control/xAODRootAccess/Root/TFileAccessTracer.cxx +++ b/Control/xAODRootAccess/Root/TFileAccessTracer.cxx @@ -1,10 +1,7 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TFileAccessTracer.cxx 781356 2016-10-31 14:03:28Z krasznaa $ +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration // System include(s): +#include <atomic> #include <memory> #include <cstdlib> @@ -28,12 +25,11 @@ namespace xAOD { // Initialise the static variable(s): - ::Bool_t TFileAccessTracer::m_enableDataSumbission = kTRUE; + static std::atomic_bool s_enableDataSumbission( true ); TFileAccessTracer::TFileAccessTracer() : m_accessedFiles(), m_serverAddress( "http://rucio-lb-prod.cern.ch:18762/traces/" ), - //m_serverAddress( "http://rucio-lb-int.cern.ch:18762/traces/" ), m_serverInetAddress(), m_monitoredFraction( 1.0 ), m_readStats( &( IOStats::instance().stats() ) ) { @@ -52,7 +48,7 @@ namespace xAOD { TFileAccessTracer::~TFileAccessTracer() { // If the user turned off the data submission, then stop already here... - if( ! m_enableDataSumbission ) { + if( ! s_enableDataSumbission ) { return; } @@ -284,11 +280,7 @@ namespace xAOD { /// void TFileAccessTracer::enableDataSubmission( ::Bool_t value ) { - // Protect this call: - static std::mutex s_mutex; - std::lock_guard< std::mutex > lock( s_mutex ); - - m_enableDataSumbission = value; + s_enableDataSumbission = value; return; } diff --git a/Control/xAODRootAccess/Root/THolder.cxx b/Control/xAODRootAccess/Root/THolder.cxx index 7f3b518ccf0bbdf928fcd2f6d8d90d838f65a658..6397b6fe1a2c84f7b034930695b54284cde6a0cc 100644 --- a/Control/xAODRootAccess/Root/THolder.cxx +++ b/Control/xAODRootAccess/Root/THolder.cxx @@ -1,8 +1,4 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: THolder.cxx 796983 2017-02-14 05:09:12Z ssnyder $ +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration // ROOT include(s): #include <TClass.h> @@ -19,18 +15,41 @@ #include "xAODRootAccess/tools/TDestructorRegistry.h" #include "THolderCache.h" +namespace { + + /// Function for getting @c xAOD::THolder::TypeKind from a @c TClass + xAOD::THolder::TypeKind getTypeKind( TClass* type ) { + + static const TClass* dvClass = + TClass::GetClass( typeid( SG::AuxVectorBase ) ); + static const TClass* aeClass = + TClass::GetClass( typeid( SG::AuxElement ) ); + + if( type ) { + if( type->InheritsFrom( dvClass ) ) { + return xAOD::THolder::DATAVECTOR; + } + if( type->InheritsFrom( aeClass ) ) { + return xAOD::THolder::AUXELEMENT; + } + } + return xAOD::THolder::OTHER; + } + +} // private namespace + namespace xAOD { THolder::THolder() - : m_typeKind (OTHER), - m_object( 0 ), m_type( 0 ), m_typeInfo( 0 ), m_owner( kFALSE ) { + : m_object( 0 ), m_type( 0 ), m_typeInfo( 0 ), m_owner( kFALSE ), + m_typeKind( OTHER ) { } THolder::THolder( void* object, ::TClass* type, ::Bool_t owner ) - : m_typeKind( setTypeKind(type) ), - m_object( object ), m_type( type ), - m_typeInfo( type ? m_type->GetTypeInfo() : 0 ), m_owner( owner ) { + : m_object( object ), m_type( type ), + m_typeInfo( type ? m_type->GetTypeInfo() : 0 ), m_owner( owner ), + m_typeKind( getTypeKind( type ) ) { // Complain if the passed dictionary will be unusable later on: if( m_type && ( ! m_type->IsLoaded() ) ) { @@ -45,8 +64,8 @@ namespace xAOD { } THolder::THolder( void* object, const std::type_info& type, ::Bool_t owner ) - : m_typeKind (OTHER), - m_object( object ), m_type( 0 ), m_typeInfo( &type ), m_owner( owner ) { + : m_object( object ), m_type( 0 ), m_typeInfo( &type ), m_owner( owner ), + m_typeKind( OTHER ) { // Increase the object count: if( m_object && m_owner ) { @@ -61,10 +80,9 @@ namespace xAOD { /// @param parent The parent object that should be copied /// THolder::THolder( const THolder& parent ) - : m_typeKind( parent.m_typeKind ), - m_object( parent.m_object ), m_type( parent.m_type ), - m_typeInfo (parent.m_typeInfo), - m_owner( parent.m_owner ) { + : m_object( parent.m_object ), m_type( parent.m_type ), + m_typeInfo( parent.m_typeInfo ), m_owner( parent.m_owner ), + m_typeKind( parent.m_typeKind ) { // Increase the object count: if( m_object && m_owner ) { @@ -83,10 +101,9 @@ namespace xAOD { /// @param parent The parent object that should be moved /// THolder::THolder( THolder&& parent ) - : m_typeKind( parent.m_typeKind ), - m_object( parent.m_object ), m_type( parent.m_type ), - m_typeInfo (parent.m_typeInfo), - m_owner( parent.m_owner ) { + : m_object( parent.m_object ), m_type( parent.m_type ), + m_typeInfo( parent.m_typeInfo ), m_owner( parent.m_owner ), + m_typeKind( parent.m_typeKind ) { // Tell the parent that it no longer owns the object: parent.m_owner = kFALSE; @@ -120,10 +137,10 @@ namespace xAOD { // Do the copy: m_object = rhs.m_object; - m_typeKind = rhs.m_typeKind; m_type = rhs.m_type; m_typeInfo = rhs.m_typeInfo; m_owner = rhs.m_owner; + m_typeKind = rhs.m_typeKind; // Increase the object count: if( m_object && m_owner ) { @@ -156,10 +173,10 @@ namespace xAOD { // Do the copy: m_object = rhs.m_object; - m_typeKind = rhs.m_typeKind; m_type = rhs.m_type; m_typeInfo = rhs.m_typeInfo; m_owner = rhs.m_owner; + m_typeKind = rhs.m_typeKind; // Instead of doing anything with the shared count here, just make the // parent not own the object anymore. The logic is the same as discussed @@ -263,15 +280,15 @@ namespace xAOD { } // Check if we already know about this type: - ::TClass* userClass = Internal::THolderCache::instance().getClass( tid ); + auto userClass = Internal::THolderCache::instance().getClass( tid ); // If not, look for it now: - if( ! userClass ) { - userClass = ::TClass::GetClass( tid ); - Internal::THolderCache::instance().addClass( tid, userClass ); + if( ! userClass.first ) { + userClass.second = ::TClass::GetClass( tid ); + Internal::THolderCache::instance().addClass( tid, userClass.second ); } // If we still don't have a dictionary, that's an issue: - if( ! userClass ) { + if( ! userClass.second ) { if( ! silent ) { ::Error( "xAOD::THolder::getAs", XAOD_MESSAGE( "Couldn't access the dictionary for user " @@ -282,7 +299,7 @@ namespace xAOD { } // Check if the user requested a valid base class for the held type: - const Int_t offset = m_type->GetBaseClassOffset( userClass ); + const Int_t offset = m_type->GetBaseClassOffset( userClass.second ); if( offset < 0 ) { if( ! silent ) { ::Warning( "xAOD::THolder::getAs", @@ -381,23 +398,4 @@ namespace xAOD { return; } - - THolder::TypeKind THolder::setTypeKind( const TClass* type ) - { - static const TClass* dvClass = - TClass::GetClass( typeid( SG::AuxVectorBase ) ); - static const TClass* aeClass = - TClass::GetClass( typeid( SG::AuxElement ) ); - - if (type) { - if (type->InheritsFrom( dvClass )) { - return DATAVECTOR; - } - if (type->InheritsFrom( aeClass )) { - return AUXELEMENT; - } - } - return OTHER; - } - } // namespace xAOD diff --git a/Control/xAODRootAccess/Root/THolderCache.cxx b/Control/xAODRootAccess/Root/THolderCache.cxx index a8e28c652677613029465671933e64981ce763f4..a23b37e4bcdc78e01423fe7d424aa4494701c06e 100644 --- a/Control/xAODRootAccess/Root/THolderCache.cxx +++ b/Control/xAODRootAccess/Root/THolderCache.cxx @@ -1,6 +1,4 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration // Local include(s): #include "THolderCache.h" @@ -9,6 +7,17 @@ namespace xAOD { namespace Internal { + // These mutex and lock types were chosen to provide good performance for + // reading the "type map" and "reference map" variables very often, while + // only writing to them sparingly. + // + // This is especially true for the "type map", which is not modified in + // a typical job after the first event. The "reference map" is a bit + // different, that does get modified throughout the whole job. It just + // seemed easier to use the same mutex/lock types for both variable. But + // The mutex/lock for the "reference map" could be re-visited if + // performance tests show contention for it. + /// Helper type definition typedef std::shared_lock< std::shared_timed_mutex > shared_lock_t; /// Helper type definition @@ -20,7 +29,8 @@ namespace xAOD { return cache; } - ::TClass* THolderCache::getClass( const std::type_info& ti ) const { + std::pair< bool, ::TClass* > + THolderCache::getClass( const std::type_info& ti ) const { // Get a "read lock": shared_lock_t lock( m_typeMapMutex ); @@ -28,9 +38,9 @@ namespace xAOD { // Look for the type in the cache: auto itr = m_typeMap.find( &ti ); if( itr != m_typeMap.end() ) { - return itr->second; + return std::pair< bool, ::TClass* >( true, itr->second ); } else { - return nullptr; + return std::pair< bool, ::TClass* >( false, nullptr ); } } diff --git a/Control/xAODRootAccess/Root/THolderCache.h b/Control/xAODRootAccess/Root/THolderCache.h index 39fd4850dce7ca83b8fc9be4cc4c978d6a260001..f6d70a1068b08b93b98b040af603c4c4c429005d 100644 --- a/Control/xAODRootAccess/Root/THolderCache.h +++ b/Control/xAODRootAccess/Root/THolderCache.h @@ -1,15 +1,14 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_THOLDERCACHE_H #define XAODROOTACCESS_THOLDERCACHE_H // System include(s): #include <map> #include <shared_mutex> +#include <utility> // Forward declaration(s): namespace std { @@ -36,7 +35,8 @@ namespace xAOD { static THolderCache& instance(); /// Get the dictionary for a given type info - ::TClass* getClass( const std::type_info& ti ) const; + std::pair< bool, ::TClass* > + getClass( const std::type_info& ti ) const; /// Add the dictionary for a given type void addClass( const std::type_info& ti, ::TClass* cl ); diff --git a/Control/xAODRootAccess/Root/TPyEvent.cxx b/Control/xAODRootAccess/Root/TPyEvent.cxx index abaec19929f526da1bb2dd15fde6a923e7d02ba2..187fd2b37618f4d858fff10c373677ff37eab926 100644 --- a/Control/xAODRootAccess/Root/TPyEvent.cxx +++ b/Control/xAODRootAccess/Root/TPyEvent.cxx @@ -1,8 +1,4 @@ -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TPyEvent.cxx 649835 2015-02-26 08:19:01Z krasznaa $ +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration // ROOT include(s): #include <TClass.h> @@ -75,6 +71,9 @@ namespace xAOD { /// created by the Python interpreter are garbage collected by the Python /// interpreter. And we don't want to run into double-deletes. /// + /// @param dummy Necessary to make sure that this function's signature is + /// distinct from @c xAOD::TEvent::record. So that PyROOT would + /// not mistake them for each other. /// @param obj Typeless pointer to the object that is to be recorded /// @param key The key with which the object is to be recorded /// @param type The type name of the object being recorded @@ -82,10 +81,8 @@ namespace xAOD { /// @param splitLevel The split level of the branch created /// @returns The usual xAOD::TReturnCode types /// - /// The dum argument is to ensure that the calling signature for this method - /// is distinct from TEvent::record. Otherwise, pyroot may call the wrong one. - /// - TReturnCode TPyEvent::record( int /*dum*/, void* obj, const std::string& key, + TReturnCode TPyEvent::record( int /*dummy*/, void* obj, + const std::string& key, const std::string& type, ::Int_t basketSize, ::Int_t splitLevel ) { diff --git a/Control/xAODRootAccess/Root/TReturnCode.cxx b/Control/xAODRootAccess/Root/TReturnCode.cxx index 2196aee89462fc6393bd88c0d7e581407ceaa3ae..baa84e2ad5d081e6b6c0aaca9f6cc6c43d8d2729 100644 --- a/Control/xAODRootAccess/Root/TReturnCode.cxx +++ b/Control/xAODRootAccess/Root/TReturnCode.cxx @@ -1,8 +1,4 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TReturnCode.cxx 796983 2017-02-14 05:09:12Z ssnyder $ +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration // System include(s): #include <iostream> diff --git a/Control/xAODRootAccess/Root/TStore.cxx b/Control/xAODRootAccess/Root/TStore.cxx index 50ed2d13fe3605745cef0557c485cf171d94dd34..ca87dd71f953a679972a9a2889913f531e6ba82a 100644 --- a/Control/xAODRootAccess/Root/TStore.cxx +++ b/Control/xAODRootAccess/Root/TStore.cxx @@ -1,6 +1,4 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration // ROOT include(s): #include <TError.h> @@ -79,8 +77,8 @@ namespace xAOD { // Yes, it is... delete itr->second; - m_keys.erase( Utils::hash( itr->first ) ); m_objects.erase( itr ); + m_keys.erase( Utils::hash( itr->first ) ); return TReturnCode::kSuccess; } diff --git a/Control/xAODRootAccess/Root/TTreeMgr.cxx b/Control/xAODRootAccess/Root/TTreeMgr.cxx index d07d20598243a049705996ee46963a746ee40e6d..6a2f4673d4b9d481a3661f0216be93fa8544b2e6 100644 --- a/Control/xAODRootAccess/Root/TTreeMgr.cxx +++ b/Control/xAODRootAccess/Root/TTreeMgr.cxx @@ -1,13 +1,10 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TTreeMgr.cxx 752002 2016-06-03 07:55:49Z krasznaa $ +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration // ROOT include(s): #include <TTree.h> #include <TClass.h> #include <TDirectory.h> +#include <TFile.h> #include <TROOT.h> #include <TRegexp.h> @@ -37,6 +34,13 @@ namespace xAOD { // Give the file to the TEvent object: RETURN_CHECK( "xAOD::TTreeMgr::readFrom", m_event.readFrom( file, useTreeCache, treeName ) ); + // Load the first event from the file. + if( m_event.getEntry( 0 ) < 0 ) { + ::Error( "xAOD::TTreeMgr::readFrom", + "Couldn't load the first event from file \"%s\"", + file->GetName() ); + return TReturnCode::kFailure; + } // Remember the event tree name: m_eventTreeName = treeName; diff --git a/Control/xAODRootAccess/python/ClassNameManips.py b/Control/xAODRootAccess/python/ClassNameManips.py new file mode 100644 index 0000000000000000000000000000000000000000..66e0fad165bfa917c6a3e01b87617e544aace485 --- /dev/null +++ b/Control/xAODRootAccess/python/ClassNameManips.py @@ -0,0 +1,27 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +# Helper functions for class name manipulations + +# For some of the finding +import re + +# For logging errors and warnings +from AthenaCommon import Logging +cnm_log = Logging.logging.getLogger('ClassNameManips') + +def pers_to_trans_name(p): + # Baseline: transient name is identical + t = p + # Let's look for a version in the name + vers = re.findall( r'_v\d+',t ) + if len(vers)>1: + cnm_log.warning('Input name '+p+' seems to have multiple version numbers: '+str(vers)+' - will wipe them all') + for v in vers: + # Wipe out the version + t = t.replace(v,'') + # Now convert data vectors + if 'DataVector<' in t: + t = t.replace('DataVector<','').replace('>','') + t = 'Container#'.join(t.split('#')) + cnm_log.debug('Translated '+p+' to '+t) + return t diff --git a/Control/xAODRootAccess/python/GenerateDVIterators.py b/Control/xAODRootAccess/python/GenerateDVIterators.py index 5663893489736b1b3647a785a64d816aa487feee..707341ccad96dbca0887b07d82def4cd69130b44 100644 --- a/Control/xAODRootAccess/python/GenerateDVIterators.py +++ b/Control/xAODRootAccess/python/GenerateDVIterators.py @@ -1,6 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - -# $Id: GenerateDVIterators.py 728645 2016-03-09 12:19:46Z krasznaa $ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # # Module used to generate proper Python iterators for all the known # DataVector container types. diff --git a/Control/xAODRootAccess/python/TPyEvent.py b/Control/xAODRootAccess/python/TPyEvent.py index 0699f90c93235f82111be68631e4cace960d4e94..e6fa88b42ff16ccea82b605bf7b10ac507f914f0 100644 --- a/Control/xAODRootAccess/python/TPyEvent.py +++ b/Control/xAODRootAccess/python/TPyEvent.py @@ -1,6 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - -# $Id: TPyEvent.py 790263 2016-12-16 21:24:02Z ssnyder $ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # # Module holding the TPyEvent Python class # @@ -8,9 +6,6 @@ # Pull in ROOT: import ROOT -def _typename(t): - return getattr (t, '__cppname__', t.__name__) - ## A Python wrapper around xAOD::TPyEvent # # In order to make the semi-templated functions of xAOD::TPyEvent more @@ -19,9 +14,6 @@ def _typename(t): # # @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> # -# $Revision: 790263 $ -# $Date: 2016-12-16 22:24:02 +0100 (Fri, 16 Dec 2016) $ -# class TPyEvent( ROOT.xAOD.TPyEvent ): ## Constructor for the class @@ -46,7 +38,13 @@ class TPyEvent( ROOT.xAOD.TPyEvent ): # <code>False</code> if it's not # def contains( self, key, type ): - return super( TPyEvent, self ).contains( key, _typename(type) ) + # Determine the class name: + clname = type.__name__ + if hasattr( type, "__cppname__" ): + clname = type.__cppname__ + pass + # Call the parent class's function: + return super( TPyEvent, self ).contains( key, clname ) ## Convenient version of the base class's transientContains function # @@ -64,8 +62,14 @@ class TPyEvent( ROOT.xAOD.TPyEvent ): # modifyable form, <code>False</code> if it's not # def transientContains( self, key, type ): + # Determine the class name: + clname = type.__name__ + if hasattr( type, "__cppname__" ): + clname = type.__cppname__ + pass + # Call the parent class's function: return super( TPyEvent, - self ).transientContains( key, _typename (type) ) + self ).transientContains( key, clname ) ## Convenient version of the base class's record function # @@ -85,7 +89,11 @@ class TPyEvent( ROOT.xAOD.TPyEvent ): # or <code>xAOD::TReturnCode::kFailure</code> if not # def record( self, obj, key, basketSize = 32000, splitLevel = 0 ): - return super( TPyEvent, self ).record( 0, obj, key, - _typename (obj.__class__), - basketSize, + # Determine the class name: + clname = obj.__class__.__name__ + if hasattr( obj.__class__, "__cppname__" ): + clname = obj.__class__.__cppname__ + pass + # Call the parent class's function: + return super( TPyEvent, self ).record( 0, obj, key, clname, basketSize, splitLevel ) diff --git a/Control/xAODRootAccess/python/TPyStore.py b/Control/xAODRootAccess/python/TPyStore.py index d33d35d5a053e4d7a300ecbda2f37ce7e617d225..8cd3b8d3074b75be9f5537f553ddece7e2feab6f 100644 --- a/Control/xAODRootAccess/python/TPyStore.py +++ b/Control/xAODRootAccess/python/TPyStore.py @@ -1,6 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# $Id: TPyStore.py 790263 2016-12-16 21:24:02Z ssnyder $ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # # Module holding the TPyStore Python class # @@ -8,9 +6,6 @@ # Pull in ROOT: import ROOT -def _typename(t): - return getattr (t, '__cppname__', t.__name__) - ## A Python wrapper around xAOD::TPyStore # # In order to make the semi-templated functions of xAOD::TPyStore more @@ -19,9 +14,6 @@ def _typename(t): # # @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> # -# $Revision: 790263 $ -# $Date: 2016-12-16 22:24:02 +0100 (Fri, 16 Dec 2016) $ -# class TPyStore( ROOT.xAOD.TPyStore ): ## Constructor for the class @@ -46,7 +38,13 @@ class TPyStore( ROOT.xAOD.TPyStore ): # <code>False</code> if it's not # def contains( self, key, type ): - return super( TPyStore, self ).contains( key, _typename (type) ) + # Determine the class name: + clname = type.__name__ + if hasattr( type, "__cppname__" ): + clname = type.__cppname__ + pass + # Call the parent class's function: + return super( TPyStore, self ).contains( key, clname ) ## Convenient version of the base class's isConst function # @@ -63,7 +61,13 @@ class TPyStore( ROOT.xAOD.TPyStore ): # <code>False</code> if it's not # def isConst( self, key, type ): - return super( TPyStore, self ).isConst( key, _typename (type) ) + # Determine the class name: + clname = type.__name__ + if hasattr( type, "__cppname__" ): + clname = type.__cppname__ + pass + # Call the parent class's function: + return super( TPyStore, self ).isConst( key, clname ) ## Convenient version of the base class's record function # @@ -81,5 +85,10 @@ class TPyStore( ROOT.xAOD.TPyStore ): # or <code>xAOD::TReturnCode::kFailure</code> if not # def record( self, obj, key ): - return super( TPyStore, self ).record( obj, key, - _typename (obj.__class__) ) + # Determine the class name: + clname = obj.__class__.__name__ + if hasattr( obj.__class__, "__cppname__" ): + clname = obj.__class__.__cppname__ + pass + # Call the parent class's function: + return super( TPyStore, self ).record( obj, key, clname ) diff --git a/Control/xAODRootAccess/scripts/checkxAOD.py b/Control/xAODRootAccess/scripts/checkxAOD.py index 1329bdebc2618c00baec54794f8b5b3da10e1eeb..b747b2b7b63d1836196e6fb14337ab6591b23377 100755 --- a/Control/xAODRootAccess/scripts/checkxAOD.py +++ b/Control/xAODRootAccess/scripts/checkxAOD.py @@ -1,16 +1,16 @@ #!/usr/bin/env python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# $Id: checkxAOD.py 717307 2016-01-12 10:48:33Z schaffer $ +# +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # # This is a standalone implementation of the xAOD checking script. It just needs # a functional ROOT installation to work. # # @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> # -# $Revision: 717307 $ -# $Date: 2016-01-12 11:48:33 +0100 (Tue, 12 Jan 2016) $ -# + +# Import(s): +import os, re, operator, ROOT +from optparse import OptionParser ## C(++) style main function # @@ -21,7 +21,6 @@ def main(): # Set up the command line option parser: - from optparse import OptionParser parser = OptionParser( usage = "usage: %prog [-f] xAOD.pool.root" ) parser.add_option( "-f", "--file", dest = "fileName", @@ -42,7 +41,7 @@ def main(): "InDet" : ["^InDet", "^PrimaryVertices", "^ComTime_TRT", "^Pixel", "^TRT", "^SCT", "^BCM", "^CTP", "^Tracks", "^ResolvedForwardTracks", "^SplitClusterAmbiguityMap"], "Jet" : ["^CamKt", "^AntiKt", "^Jet"], "CaloTopo" : ["CaloCalTopoCluster"], - "Calo" : ["^LAr", "^AllCalo", "^AODCellContainer", "^MBTSContainer", "^CaloCompactCellContainer", "^E4prContainer", "^TileCellVec", "^TileDigits"], + "Calo" : ["^LAr", "^AODCellContainer", "^MBTSContainer", "^CaloCompactCellContainer", "^E4prContainer", "^TileCellVec", "^TileDigits"], "Truth" : ["^Truth", "Truth$", "TruthMap$", "TruthCollection$", "^PRD_MultiTruth", "TracksTruth$", ".*TrackTruth$", "TrackTruthCollection"] } # Get the file name(s), taking all options into account: @@ -60,7 +59,6 @@ def main(): fileNames = set( fileNames ) # Set up ROOT: - import ROOT ROOT.gErrorIgnoreLevel = ROOT.kError # Loop over the files: @@ -115,7 +113,6 @@ class ContainerInfo( object ): def printFileInfo( fileName, categoryStrings ): # Open the file: - import ROOT f = ROOT.TFile.Open( fileName, "READ" ) if not f or f.IsZombie(): raise "Couldn't open file %s" % fileName @@ -143,7 +140,6 @@ def printFileInfo( fileName, categoryStrings ): ( branch.GetEntries(), branch.GetName(), entries ) # "Decode" the name of the branch: brName = branch.GetName() - import re # Check if this is a static auxiliary branch: m = re.match( "(.*)Aux\..*", branch.GetName() ) if m: @@ -171,7 +167,6 @@ def printFileInfo( fileName, categoryStrings ): for cName in infoForCont.keys(): orderedData += [ infoForCont[ cName ] ] pass - import operator orderedData.sort( key = operator.attrgetter( "_diskSize" ) ) # Finally, print the collected information: @@ -253,7 +248,6 @@ def printFileInfo( fileName, categoryStrings ): for br in categData.keys(): categorizedData += [ categData[ br ] ] pass - import operator categorizedData.sort( key = operator.attrgetter( "_diskSize" ) ) print( "=" * 80 ) @@ -294,7 +288,6 @@ def printFileInfo( fileName, categoryStrings ): print( "=" * 80 ) print( "" ) - return # Run the main function in "normal mode": diff --git a/Control/xAODRootAccess/share/ut_xaodrootaccess_metadata_test.ref b/Control/xAODRootAccess/share/ut_xaodrootaccess_metadata_test.ref deleted file mode 100644 index 7f540e70cf954b62c02da3a9a2f985bc3eedafa4..0000000000000000000000000000000000000000 --- a/Control/xAODRootAccess/share/ut_xaodrootaccess_metadata_test.ref +++ /dev/null @@ -1,14 +0,0 @@ -xAOD::Init INFO Environment initialised for data access -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -ut_xaodrootaccess_meta... INFO Opened file: /home/sss/nobackup/referencefiles/xAODs/r5597/data12_8TeV.00204158.physics_JetTauEtmiss.recon.AOD.r5597/AOD.01495682._003054.pool.root.1 -xAOD::TEvent::record ERROR ../Root/TEvent.cxx:2048 Didn't find dictionary for type: ClassA -ut_xaodrootaccess_meta... INFO All tests succeeded diff --git a/Control/xAODRootAccess/share/ut_xaodrootaccess_remap_test.ref b/Control/xAODRootAccess/share/ut_xaodrootaccess_remap_test.ref deleted file mode 100644 index 40e40d94007de8fe875dcf738a581f34f8af30d0..0000000000000000000000000000000000000000 --- a/Control/xAODRootAccess/share/ut_xaodrootaccess_remap_test.ref +++ /dev/null @@ -1,437 +0,0 @@ -/cvmfs/sft.cern.ch/lcg/contrib/gcc/4.9.3/x86_64-slc6/include/c++/4.9.3/bits/regex.h:1545:11: runtime error: load of value 240, which is not a valid value for type 'bool' -/cvmfs/sft.cern.ch/lcg/contrib/gcc/4.9.3/x86_64-slc6/include/c++/4.9.3/bits/regex.h:1545:11: runtime error: load of value 176, which is not a valid value for type 'bool' -TInterpreter::ReadRoot... WARNING class CP::IPileupReweightingTool found in libAsgAnalysisInterfacesDict.so is already in libPileupReweightingDict.so -ut_xaodrootaccess_rema... INFO Environment initialised for data access -xAOD::TEvent::printNam... INFO Name remapping rules: -xAOD::TEvent::printNam... INFO "ElectronCollection" -> "Electrons" -xAOD::TEvent::printNam... INFO "TauJetCollection" -> "Taus" -****************************************************************************** -*Tree :CollectionTree: xAOD event tree * -*Entries : 1 : Total = 89480 bytes File Size = 27342 * -* : : Tree compression factor = 1.18 * -****************************************************************************** -*Br 0 :Electrons : DataVector<xAOD::Electron_v1> * -*Entries : 1 : Total Size= 608 bytes File Size = 114 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Branch :ElectronsAux. * -*Entries : 1 : BranchElement (see below) * -*............................................................................* -*Br 1 :ElectronsAux.xAOD::AuxContainerBase : BASE * -*Entries : 1 : Total Size= 782 bytes File Size = 184 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 2 :ElectronsAux.caloClusterLinks : * -* | vector<vector<ElementLink<DataVector<xAOD::CaloCluster_v1> > > > * -*Entries : 1 : Total Size= 1342 bytes File Size = 233 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 3.30 * -*............................................................................* -*Br 3 :ElectronsAux.pt : vector<float> * -*Entries : 1 : Total Size= 712 bytes File Size = 194 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 4 :ElectronsAux.eta : vector<float> * -*Entries : 1 : Total Size= 717 bytes File Size = 195 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 5 :ElectronsAux.phi : vector<float> * -*Entries : 1 : Total Size= 717 bytes File Size = 195 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 6 :ElectronsAux.m : vector<float> * -*Entries : 1 : Total Size= 707 bytes File Size = 132 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.46 * -*............................................................................* -*Br 7 :ElectronsAux.EgammaCovarianceMatrix : vector<vector<float> > * -*Entries : 1 : Total Size= 2092 bytes File Size = 854 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.75 * -*............................................................................* -*Br 8 :ElectronsAux.author : vector<unsigned short> * -*Entries : 1 : Total Size= 692 bytes File Size = 141 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.12 * -*............................................................................* -*Br 9 :ElectronsAux.OQ : vector<unsigned int> * -*Entries : 1 : Total Size= 712 bytes File Size = 147 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.32 * -*............................................................................* -*Br 10 :ElectronsAux.e011 : vector<float> * -*Entries : 1 : Total Size= 722 bytes File Size = 189 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.04 * -*............................................................................* -*Br 11 :ElectronsAux.e033 : vector<float> * -*Entries : 1 : Total Size= 722 bytes File Size = 190 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.03 * -*............................................................................* -*Br 12 :ElectronsAux.e132 : vector<float> * -*Entries : 1 : Total Size= 722 bytes File Size = 196 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 13 :ElectronsAux.e1152 : vector<float> * -*Entries : 1 : Total Size= 727 bytes File Size = 197 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 14 :ElectronsAux.ethad1 : vector<float> * -*Entries : 1 : Total Size= 732 bytes File Size = 198 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 15 :ElectronsAux.ethad : vector<float> * -*Entries : 1 : Total Size= 727 bytes File Size = 197 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 16 :ElectronsAux.ehad1 : vector<float> * -*Entries : 1 : Total Size= 727 bytes File Size = 197 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 17 :ElectronsAux.f1 : vector<float> * -*Entries : 1 : Total Size= 712 bytes File Size = 194 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 18 :ElectronsAux.f3 : vector<float> * -*Entries : 1 : Total Size= 712 bytes File Size = 194 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 19 :ElectronsAux.f1core : vector<float> * -*Entries : 1 : Total Size= 732 bytes File Size = 198 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 20 :ElectronsAux.f3core : vector<float> * -*Entries : 1 : Total Size= 732 bytes File Size = 198 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 21 :ElectronsAux.e233 : vector<float> * -*Entries : 1 : Total Size= 722 bytes File Size = 196 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 22 :ElectronsAux.e235 : vector<float> * -*Entries : 1 : Total Size= 722 bytes File Size = 196 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 23 :ElectronsAux.e255 : vector<float> * -*Entries : 1 : Total Size= 722 bytes File Size = 196 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 24 :ElectronsAux.e237 : vector<float> * -*Entries : 1 : Total Size= 722 bytes File Size = 196 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 25 :ElectronsAux.e277 : vector<float> * -*Entries : 1 : Total Size= 722 bytes File Size = 196 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 26 :ElectronsAux.e333 : vector<float> * -*Entries : 1 : Total Size= 722 bytes File Size = 193 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.02 * -*............................................................................* -*Br 27 :ElectronsAux.e335 : vector<float> * -*Entries : 1 : Total Size= 722 bytes File Size = 194 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.01 * -*............................................................................* -*Br 28 :ElectronsAux.e337 : vector<float> * -*Entries : 1 : Total Size= 722 bytes File Size = 196 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 29 :ElectronsAux.e377 : vector<float> * -*Entries : 1 : Total Size= 722 bytes File Size = 196 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 30 :ElectronsAux.weta1 : vector<float> * -*Entries : 1 : Total Size= 727 bytes File Size = 197 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 31 :ElectronsAux.weta2 : vector<float> * -*Entries : 1 : Total Size= 727 bytes File Size = 197 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 32 :ElectronsAux.e2ts1 : vector<float> * -*Entries : 1 : Total Size= 727 bytes File Size = 192 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.03 * -*............................................................................* -*Br 33 :ElectronsAux.e2tsts1 : vector<float> * -*Entries : 1 : Total Size= 737 bytes File Size = 195 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.02 * -*............................................................................* -*Br 34 :ElectronsAux.fracs1 : vector<float> * -*Entries : 1 : Total Size= 732 bytes File Size = 198 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 35 :ElectronsAux.widths1 : vector<float> * -*Entries : 1 : Total Size= 737 bytes File Size = 199 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 36 :ElectronsAux.widths2 : vector<float> * -*Entries : 1 : Total Size= 737 bytes File Size = 133 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.50 * -*............................................................................* -*Br 37 :ElectronsAux.poscs1 : vector<float> * -*Entries : 1 : Total Size= 732 bytes File Size = 198 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 38 :ElectronsAux.poscs2 : vector<float> * -*Entries : 1 : Total Size= 732 bytes File Size = 198 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 39 :ElectronsAux.asy1 : vector<float> * -*Entries : 1 : Total Size= 722 bytes File Size = 196 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 40 :ElectronsAux.pos : vector<float> * -*Entries : 1 : Total Size= 717 bytes File Size = 195 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 41 :ElectronsAux.pos7 : vector<float> * -*Entries : 1 : Total Size= 722 bytes File Size = 196 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 42 :ElectronsAux.barys1 : vector<float> * -*Entries : 1 : Total Size= 732 bytes File Size = 198 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 43 :ElectronsAux.wtots1 : vector<float> * -*Entries : 1 : Total Size= 732 bytes File Size = 198 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 44 :ElectronsAux.emins1 : vector<float> * -*Entries : 1 : Total Size= 732 bytes File Size = 190 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.04 * -*............................................................................* -*Br 45 :ElectronsAux.emaxs1 : vector<float> * -*Entries : 1 : Total Size= 732 bytes File Size = 197 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.01 * -*............................................................................* -*Br 46 :ElectronsAux.r33over37allcalo : vector<float> * -*Entries : 1 : Total Size= 782 bytes File Size = 208 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 47 :ElectronsAux.ecore : vector<float> * -*Entries : 1 : Total Size= 727 bytes File Size = 197 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 48 :ElectronsAux.zvertex : vector<float> * -*Entries : 1 : Total Size= 737 bytes File Size = 133 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.50 * -*............................................................................* -*Br 49 :ElectronsAux.errz : vector<float> * -*Entries : 1 : Total Size= 722 bytes File Size = 130 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.51 * -*............................................................................* -*Br 50 :ElectronsAux.etap : vector<float> * -*Entries : 1 : Total Size= 722 bytes File Size = 130 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.51 * -*............................................................................* -*Br 51 :ElectronsAux.depth : vector<float> * -*Entries : 1 : Total Size= 727 bytes File Size = 131 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.50 * -*............................................................................* -*Br 52 :ElectronsAux.etcone : vector<float> * -*Entries : 1 : Total Size= 732 bytes File Size = 132 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.50 * -*............................................................................* -*Br 53 :ElectronsAux.etcone15 : vector<float> * -*Entries : 1 : Total Size= 742 bytes File Size = 134 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.49 * -*............................................................................* -*Br 54 :ElectronsAux.etcone20 : vector<float> * -*Entries : 1 : Total Size= 742 bytes File Size = 200 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 55 :ElectronsAux.etcone25 : vector<float> * -*Entries : 1 : Total Size= 742 bytes File Size = 134 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.49 * -*............................................................................* -*Br 56 :ElectronsAux.etcone30 : vector<float> * -*Entries : 1 : Total Size= 742 bytes File Size = 200 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 57 :ElectronsAux.etcone35 : vector<float> * -*Entries : 1 : Total Size= 742 bytes File Size = 134 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.49 * -*............................................................................* -*Br 58 :ElectronsAux.etcone40 : vector<float> * -*Entries : 1 : Total Size= 742 bytes File Size = 200 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 59 :ElectronsAux.ptcone20 : vector<float> * -*Entries : 1 : Total Size= 742 bytes File Size = 200 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 60 :ElectronsAux.ptcone30 : vector<float> * -*Entries : 1 : Total Size= 742 bytes File Size = 200 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 61 :ElectronsAux.ptcone40 : vector<float> * -*Entries : 1 : Total Size= 742 bytes File Size = 200 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 62 :ElectronsAux.nucone20 : vector<float> * -*Entries : 1 : Total Size= 742 bytes File Size = 174 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.15 * -*............................................................................* -*Br 63 :ElectronsAux.nucone30 : vector<float> * -*Entries : 1 : Total Size= 742 bytes File Size = 176 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.14 * -*............................................................................* -*Br 64 :ElectronsAux.nucone40 : vector<float> * -*Entries : 1 : Total Size= 742 bytes File Size = 181 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.10 * -*............................................................................* -*Br 65 :ElectronsAux.etcone15_ptcorrected : vector<float> * -*Entries : 1 : Total Size= 802 bytes File Size = 212 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 66 :ElectronsAux.etcone20_ptcorrected : vector<float> * -*Entries : 1 : Total Size= 802 bytes File Size = 212 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 67 :ElectronsAux.etcone25_ptcorrected : vector<float> * -*Entries : 1 : Total Size= 802 bytes File Size = 212 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 68 :ElectronsAux.etcone30_ptcorrected : vector<float> * -*Entries : 1 : Total Size= 802 bytes File Size = 212 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 69 :ElectronsAux.etcone35_ptcorrected : vector<float> * -*Entries : 1 : Total Size= 802 bytes File Size = 212 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 70 :ElectronsAux.etcone40_ptcorrected : vector<float> * -*Entries : 1 : Total Size= 802 bytes File Size = 212 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 71 :ElectronsAux.etcone20_corrected : vector<float> * -*Entries : 1 : Total Size= 792 bytes File Size = 144 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.46 * -*............................................................................* -*Br 72 :ElectronsAux.etcone30_corrected : vector<float> * -*Entries : 1 : Total Size= 792 bytes File Size = 144 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.46 * -*............................................................................* -*Br 73 :ElectronsAux.etcone40_corrected : vector<float> * -*Entries : 1 : Total Size= 792 bytes File Size = 144 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.46 * -*............................................................................* -*Br 74 :ElectronsAux.topoetcone20 : vector<float> * -*Entries : 1 : Total Size= 762 bytes File Size = 204 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 75 :ElectronsAux.topoetcone30 : vector<float> * -*Entries : 1 : Total Size= 762 bytes File Size = 204 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 76 :ElectronsAux.topoetcone40 : vector<float> * -*Entries : 1 : Total Size= 762 bytes File Size = 204 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 77 :ElectronsAux.topoetcone40_ptcorrected : vector<float> * -*Entries : 1 : Total Size= 822 bytes File Size = 216 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 78 :ElectronsAux.topoetcone40_corrected : vector<float> * -*Entries : 1 : Total Size= 812 bytes File Size = 148 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.45 * -*............................................................................* -*Br 79 :ElectronsAux.trackParticleLinks : * -* | vector<vector<ElementLink<DataVector<xAOD: * -* | :TrackParticle_v1> > > > * -*Entries : 1 : Total Size= 1856 bytes File Size = 312 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 4.08 * -*............................................................................* -*Br 80 :ElectronsAux.charge : vector<float> * -*Entries : 1 : Total Size= 732 bytes File Size = 153 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.29 * -*............................................................................* -*Br 81 :ElectronsAux.deltaEta0 : vector<float> * -*Entries : 1 : Total Size= 747 bytes File Size = 201 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 82 :ElectronsAux.deltaEta1 : vector<float> * -*Entries : 1 : Total Size= 747 bytes File Size = 201 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 83 :ElectronsAux.deltaEta2 : vector<float> * -*Entries : 1 : Total Size= 747 bytes File Size = 201 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 84 :ElectronsAux.deltaEta3 : vector<float> * -*Entries : 1 : Total Size= 747 bytes File Size = 201 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 85 :ElectronsAux.deltaPhi0 : vector<float> * -*Entries : 1 : Total Size= 747 bytes File Size = 201 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 86 :ElectronsAux.deltaPhi1 : vector<float> * -*Entries : 1 : Total Size= 747 bytes File Size = 201 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 87 :ElectronsAux.deltaPhi2 : vector<float> * -*Entries : 1 : Total Size= 747 bytes File Size = 201 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 88 :ElectronsAux.deltaPhi3 : vector<float> * -*Entries : 1 : Total Size= 747 bytes File Size = 201 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 89 :ElectronsAux.deltaPhiFromLastMeasurement : vector<float> * -*Entries : 1 : Total Size= 837 bytes File Size = 219 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 90 :ElectronsAux.deltaPhiRescaled0 : vector<float> * -*Entries : 1 : Total Size= 787 bytes File Size = 209 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 91 :ElectronsAux.deltaPhiRescaled1 : vector<float> * -*Entries : 1 : Total Size= 787 bytes File Size = 209 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 92 :ElectronsAux.deltaPhiRescaled2 : vector<float> * -*Entries : 1 : Total Size= 787 bytes File Size = 209 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 93 :ElectronsAux.deltaPhiRescaled3 : vector<float> * -*Entries : 1 : Total Size= 787 bytes File Size = 209 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 94 :ElectronsAuxDyn.Loose : vector<char> * -*Entries : 1 : Total Size= 682 bytes File Size = 139 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.01 * -*............................................................................* -*Br 95 :ElectronsAuxDyn.Medium : vector<char> * -*Entries : 1 : Total Size= 687 bytes File Size = 135 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.04 * -*............................................................................* -*Br 96 :ElectronsAuxDyn.Tight : vector<char> * -*Entries : 1 : Total Size= 682 bytes File Size = 134 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.04 * -*............................................................................* -*Br 97 :ElectronsAuxDyn.truthOrigin : vector<int> * -*Entries : 1 : Total Size= 772 bytes File Size = 147 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.40 * -*............................................................................* -*Br 98 :ElectronsAuxDyn.truthParticleLink : * -* | Int_t ElectronsAuxDyn.truthParticleLink_ * -*Entries : 1 : Total Size= 2812 bytes File Size = 126 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 99 :ElectronsAuxDyn.truthParticleLink.m_persKey : * -* | UInt_t m_persKey[ElectronsAuxDyn.truthParticleLink_] * -*Entries : 1 : Total Size= 974 bytes File Size = 161 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.32 * -*............................................................................* -*Br 100 :ElectronsAuxDyn.truthParticleLink.m_persIndex : * -* | UInt_t m_persIndex[ElectronsAuxDyn.truthParticleLink_] * -*Entries : 1 : Total Size= 984 bytes File Size = 182 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.18 * -*............................................................................* -*Br 101 :ElectronsAuxDyn.truthType : vector<int> * -*Entries : 1 : Total Size= 762 bytes File Size = 152 * -*Baskets : 1 : Basket Size= 32000 bytes Compression= 1.34 * -*............................................................................* -xAOD::TEvent::getEvent... WARNING Can't find EventFormatElement for hashed SG key 233808463 -xAOD::TEvent::proxy_exact WARNING Can't find BranchInfo for 233808463. -xAOD::TEvent::addToStore WARNING Function should only be called through an invalid ElementLink -xAOD::TEvent::getEvent... WARNING Can't find EventFormatElement for hashed SG key 776133387 -xAOD::TEvent::proxy_exact WARNING Can't find BranchInfo for 776133387. -xAOD::TEvent::connectB... WARNING No metadata available for branch: ElectronCollection -xAOD::TEvent::connectB... WARNING Branch "ElectronCollection" not available on input -xAOD::TEvent::retrieve WARNING Couldn't (const) retrieve "SG::AuxVectorBase/ElectronCollection" diff --git a/Control/xAODRootAccess/share/ut_xaodrootaccess_slimming_test.ref b/Control/xAODRootAccess/share/ut_xaodrootaccess_slimming_test.ref deleted file mode 100644 index e9c788185b0b38343f18de48e82482a052dc6f73..0000000000000000000000000000000000000000 --- a/Control/xAODRootAccess/share/ut_xaodrootaccess_slimming_test.ref +++ /dev/null @@ -1,20 +0,0 @@ -ut_xaodrootaccess_slim... INFO Environment initialised for data access -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -ut_xaodrootaccess_slim... INFO Slimming in xAOD::TEvent::copy(...) seems correct -xAOD::AuxSelection WARNING Selected dynamic Aux atribute "bar" not found in the registry -xAOD::AuxSelection WARNING Selected dynamic Aux atribute "foo" not found in the registry -ut_xaodrootaccess_slim... INFO Slimming in xAOD::TEvent::recordAux(...) seems correct diff --git a/Control/xAODRootAccess/share/ut_xaodrootaccess_stats_test.ref b/Control/xAODRootAccess/share/ut_xaodrootaccess_stats_test.ref deleted file mode 100644 index 890e510f1da00dbc655fc74d984ab4835e5892c0..0000000000000000000000000000000000000000 --- a/Control/xAODRootAccess/share/ut_xaodrootaccess_stats_test.ref +++ /dev/null @@ -1,39 +0,0 @@ -/cvmfs/sft.cern.ch/lcg/contrib/gcc/4.9.3/x86_64-slc6/include/c++/4.9.3/bits/regex.h:1545:11: runtime error: load of value 144, which is not a valid value for type 'bool' -/cvmfs/sft.cern.ch/lcg/contrib/gcc/4.9.3/x86_64-slc6/include/c++/4.9.3/bits/regex.h:1545:11: runtime error: load of value 80, which is not a valid value for type 'bool' -TInterpreter::ReadRoot... WARNING class CP::IPileupReweightingTool found in libAsgAnalysisInterfacesDict.so is already in libPileupReweightingDict.so -ut_xaodrootaccess_stat... INFO Environment initialised for data access -ut_xaodrootaccess_stat... INFO Processing entry 0 / 907 -ut_xaodrootaccess_stat... INFO Processing entry 100 / 907 -ut_xaodrootaccess_stat... INFO Processing entry 200 / 907 -ut_xaodrootaccess_stat... INFO Processing entry 300 / 907 -ut_xaodrootaccess_stat... INFO Processing entry 400 / 907 -ut_xaodrootaccess_stat... INFO Processing entry 500 / 907 -ut_xaodrootaccess_stat... INFO Processing entry 600 / 907 -ut_xaodrootaccess_stat... INFO Processing entry 700 / 907 -ut_xaodrootaccess_stat... INFO Processing entry 800 / 907 -ut_xaodrootaccess_stat... INFO Processing entry 900 / 907 -xAOD::ReadStats::Print INFO Printing xAOD I/O statistics -xAOD::ReadStats::Print INFO -xAOD::ReadStats::Print INFO Smart Slimming Statistics -xAOD::ReadStats::Print INFO -xAOD::ReadStats::Print INFO Processed 907 events from 907 (100%) -xAOD::ReadStats::Print INFO Number of containers in on the input: 59 -xAOD::ReadStats::Print INFO Number of branches on the input: 1931 -xAOD::ReadStats::Print INFO -xAOD::ReadStats::Print INFO Accessed containers: -xAOD::ReadStats::Print INFO -xAOD::BranchStats::Print INFO Branch name "ElectronCollectionAux.", type "CONTAINER", read 908 times -xAOD::BranchStats::Print INFO Branch name "MuonsAux.", type "CONTAINER", read 908 times -xAOD::BranchStats::Print INFO Branch name "ElectronCollection", type "CONTAINER", read 907 times -xAOD::BranchStats::Print INFO Branch name "Muons", type "CONTAINER", read 907 times -xAOD::ReadStats::Print INFO -xAOD::ReadStats::Print INFO Accessed branches: -xAOD::ReadStats::Print INFO -xAOD::BranchStats::Print INFO Branch name "MuonsAux.pt", type "float", read 907 times -xAOD::BranchStats::Print INFO Branch name "ElectronCollectionAux.pt", type "float", read 907 times -xAOD::ReadStats::Print INFO -xAOD::ReadStats::print... INFO ItemList to use: -xAOD::ReadStats::print... INFO ElectronCollection -xAOD::ReadStats::print... INFO ElectronCollectionAux.pt -xAOD::ReadStats::print... INFO Muons -xAOD::ReadStats::print... INFO MuonsAux.pt diff --git a/Control/xAODRootAccess/share/ut_xaodrootaccess_tauxstore_insertmove_test.ref b/Control/xAODRootAccess/share/ut_xaodrootaccess_tauxstore_insertmove_test.ref deleted file mode 100644 index a5bce3fd2565d8f458555a0c6f42d0504a848bd5..0000000000000000000000000000000000000000 --- a/Control/xAODRootAccess/share/ut_xaodrootaccess_tauxstore_insertmove_test.ref +++ /dev/null @@ -1 +0,0 @@ -test1 diff --git a/Control/xAODRootAccess/share/ut_xaodrootaccess_tauxstore_test.ref b/Control/xAODRootAccess/share/ut_xaodrootaccess_tauxstore_test.ref deleted file mode 100644 index d764c97bba7b353e38028a9d09c51c25d1f873da..0000000000000000000000000000000000000000 --- a/Control/xAODRootAccess/share/ut_xaodrootaccess_tauxstore_test.ref +++ /dev/null @@ -1,31 +0,0 @@ -ut_xaodrootaccess_taux... INFO Environment initialised for data access -****************************************************************************** -*Tree :InputTree : Input Tree * -*Entries : 1 : Total = 1913 bytes File Size = 0 * -* : : Tree compression factor = 1.00 * -****************************************************************************** -*Br 0 :PrefixAuxDyn.var1 : vector<float> * -*Entries : 1 : Total Size= 758 bytes One basket in memory * -*Baskets : 0 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -*Br 1 :PrefixAuxDyn.var2 : vector<float> * -*Entries : 1 : Total Size= 758 bytes One basket in memory * -*Baskets : 0 : Basket Size= 32000 bytes Compression= 1.00 * -*............................................................................* -ut_xaodrootaccess_taux... INFO Created transient input TTree for the test -ut_xaodrootaccess_taux... INFO Auxiliary variables found on the input: -ut_xaodrootaccess_taux... INFO - name: var1, type: float -ut_xaodrootaccess_taux... INFO - name: var2, type: float -****************************************************************************** -*Tree :OutputTree: Output Tree * -*Entries : 1 : Total = 1953 bytes File Size = 0 * -* : : Tree compression factor = 1.00 * -****************************************************************************** -*Br 0 :PrefixAuxDyn.var1 : vector<float> * -*Entries : 1 : Total Size= 760 bytes One basket in memory * -*Baskets : 0 : Basket Size= 2048 bytes Compression= 1.00 * -*............................................................................* -*Br 1 :PrefixAuxDyn.decoration : vector<int> * -*Entries : 1 : Total Size= 796 bytes One basket in memory * -*Baskets : 0 : Basket Size= 2048 bytes Compression= 1.00 * -*............................................................................* diff --git a/Control/xAODRootAccess/share/ut_xaodrootaccess_tauxvector_test.ref b/Control/xAODRootAccess/share/ut_xaodrootaccess_tauxvector_test.ref deleted file mode 100644 index a5bce3fd2565d8f458555a0c6f42d0504a848bd5..0000000000000000000000000000000000000000 --- a/Control/xAODRootAccess/share/ut_xaodrootaccess_tauxvector_test.ref +++ /dev/null @@ -1 +0,0 @@ -test1 diff --git a/Control/xAODRootAccess/share/ut_xaodrootaccess_tchain_test.ref b/Control/xAODRootAccess/share/ut_xaodrootaccess_tchain_test.ref deleted file mode 100644 index dacad19043eb1ee5d3c3557af2195772afe583e7..0000000000000000000000000000000000000000 --- a/Control/xAODRootAccess/share/ut_xaodrootaccess_tchain_test.ref +++ /dev/null @@ -1,171 +0,0 @@ -ut_xaodrootaccess_tcha... INFO Environment initialised for data access -ut_xaodrootaccess_tcha... INFO Processing mc14_8TeV chain... -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -process INFO Processed 0 / 1000 events -process INFO Processed 100 / 1000 events -process INFO Processed 200 / 1000 events -process INFO Processed 300 / 1000 events -process INFO Processed 400 / 1000 events -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -process INFO Processed 500 / 1000 events -process INFO Processed 600 / 1000 events -process INFO Processed 700 / 1000 events -process INFO Processed 800 / 1000 events -process INFO Processed 900 / 1000 events -ut_xaodrootaccess_tcha... INFO Processing mc14_13TeV chain... -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -process INFO Processed 0 / 10000 events -process INFO Processed 100 / 10000 events -process INFO Processed 200 / 10000 events -process INFO Processed 300 / 10000 events -process INFO Processed 400 / 10000 events -process INFO Processed 500 / 10000 events -process INFO Processed 600 / 10000 events -process INFO Processed 700 / 10000 events -process INFO Processed 800 / 10000 events -process INFO Processed 900 / 10000 events -process INFO Processed 1000 / 10000 events -process INFO Processed 1100 / 10000 events -process INFO Processed 1200 / 10000 events -process INFO Processed 1300 / 10000 events -process INFO Processed 1400 / 10000 events -process INFO Processed 1500 / 10000 events -process INFO Processed 1600 / 10000 events -process INFO Processed 1700 / 10000 events -process INFO Processed 1800 / 10000 events -process INFO Processed 1900 / 10000 events -process INFO Processed 2000 / 10000 events -process INFO Processed 2100 / 10000 events -process INFO Processed 2200 / 10000 events -process INFO Processed 2300 / 10000 events -process INFO Processed 2400 / 10000 events -process INFO Processed 2500 / 10000 events -process INFO Processed 2600 / 10000 events -process INFO Processed 2700 / 10000 events -process INFO Processed 2800 / 10000 events -process INFO Processed 2900 / 10000 events -process INFO Processed 3000 / 10000 events -process INFO Processed 3100 / 10000 events -process INFO Processed 3200 / 10000 events -process INFO Processed 3300 / 10000 events -process INFO Processed 3400 / 10000 events -process INFO Processed 3500 / 10000 events -process INFO Processed 3600 / 10000 events -process INFO Processed 3700 / 10000 events -process INFO Processed 3800 / 10000 events -process INFO Processed 3900 / 10000 events -process INFO Processed 4000 / 10000 events -process INFO Processed 4100 / 10000 events -process INFO Processed 4200 / 10000 events -process INFO Processed 4300 / 10000 events -process INFO Processed 4400 / 10000 events -process INFO Processed 4500 / 10000 events -process INFO Processed 4600 / 10000 events -process INFO Processed 4700 / 10000 events -process INFO Processed 4800 / 10000 events -process INFO Processed 4900 / 10000 events -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETComponentMap_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -xAOD::TEvent::initStats WARNING Couldn't find dictionary for type "xAOD::MissingETContainer_v1" -process INFO Processed 5000 / 10000 events -process INFO Processed 5100 / 10000 events -process INFO Processed 5200 / 10000 events -process INFO Processed 5300 / 10000 events -process INFO Processed 5400 / 10000 events -process INFO Processed 5500 / 10000 events -process INFO Processed 5600 / 10000 events -process INFO Processed 5700 / 10000 events -process INFO Processed 5800 / 10000 events -process INFO Processed 5900 / 10000 events -process INFO Processed 6000 / 10000 events -process INFO Processed 6100 / 10000 events -process INFO Processed 6200 / 10000 events -process INFO Processed 6300 / 10000 events -process INFO Processed 6400 / 10000 events -process INFO Processed 6500 / 10000 events -process INFO Processed 6600 / 10000 events -process INFO Processed 6700 / 10000 events -process INFO Processed 6800 / 10000 events -process INFO Processed 6900 / 10000 events -process INFO Processed 7000 / 10000 events -process INFO Processed 7100 / 10000 events -process INFO Processed 7200 / 10000 events -process INFO Processed 7300 / 10000 events -process INFO Processed 7400 / 10000 events -process INFO Processed 7500 / 10000 events -process INFO Processed 7600 / 10000 events -process INFO Processed 7700 / 10000 events -process INFO Processed 7800 / 10000 events -process INFO Processed 7900 / 10000 events -process INFO Processed 8000 / 10000 events -process INFO Processed 8100 / 10000 events -process INFO Processed 8200 / 10000 events -process INFO Processed 8300 / 10000 events -process INFO Processed 8400 / 10000 events -process INFO Processed 8500 / 10000 events -process INFO Processed 8600 / 10000 events -process INFO Processed 8700 / 10000 events -process INFO Processed 8800 / 10000 events -process INFO Processed 8900 / 10000 events -process INFO Processed 9000 / 10000 events -process INFO Processed 9100 / 10000 events -process INFO Processed 9200 / 10000 events -process INFO Processed 9300 / 10000 events -process INFO Processed 9400 / 10000 events -process INFO Processed 9500 / 10000 events -process INFO Processed 9600 / 10000 events -process INFO Processed 9700 / 10000 events -process INFO Processed 9800 / 10000 events -process INFO Processed 9900 / 10000 events diff --git a/Control/xAODRootAccess/share/ut_xaodrootaccess_tevent_test.ref b/Control/xAODRootAccess/share/ut_xaodrootaccess_tevent_test.ref deleted file mode 100644 index 3220268ef91f9fa8ba899e24a148e02d34e5ce37..0000000000000000000000000000000000000000 --- a/Control/xAODRootAccess/share/ut_xaodrootaccess_tevent_test.ref +++ /dev/null @@ -1,469 +0,0 @@ -/cvmfs/sft.cern.ch/lcg/contrib/gcc/4.9.3/x86_64-slc6/include/c++/4.9.3/bits/regex.h:1545:11: runtime error: load of value 240, which is not a valid value for type 'bool' -/cvmfs/sft.cern.ch/lcg/contrib/gcc/4.9.3/x86_64-slc6/include/c++/4.9.3/bits/regex.h:1545:11: runtime error: load of value 176, which is not a valid value for type 'bool' -TInterpreter::ReadRoot... WARNING class CP::IPileupReweightingTool found in libAsgAnalysisInterfacesDict.so is already in libPileupReweightingDict.so -ut_xaodrootaccess_teve... INFO Environment initialised for data access -xAOD::TEvent::getEvent... WARNING Can't find EventFormatElement for hashed SG key 971500411 -xAOD::TEvent::proxy_exact WARNING Can't find BranchInfo for 971500411. -xAOD::TEvent::addToStore WARNING Function should only be called through an invalid ElementLink -xAOD::TEvent::getEvent... WARNING Can't find EventFormatElement for hashed SG key 981452424 -xAOD::TEvent::proxy_exact WARNING Can't find BranchInfo for 981452424. -xAOD::TEvent::getEvent... WARNING Can't find EventFormatElement for hashed SG key 311645381 -xAOD::TEvent::proxy_exact WARNING Can't find BranchInfo for 311645381. -xAOD::TEvent::getEvent... WARNING Can't find EventFormatElement for hashed SG key 582965710 -xAOD::TEvent::proxy_exact WARNING Can't find BranchInfo for 582965710. -xAOD::TEvent::getEvent... WARNING Can't find EventFormatElement for hashed SG key 243728388 -xAOD::TEvent::proxy_exact WARNING Can't find BranchInfo for 243728388. -ut_xaodrootaccess_teve... INFO TEvent contents: - -<<<<<<<<<<<<<<<<<<<< xAOD::TEvent Dump >>>>>>>>>>>>>>>>>>>> - Hash: 0x2227acc2 Key: "AntiKt10LCTopoJets" - type: DataVector<xAOD::Jet> - isConst: Yes - Data: 0x1b3ac9c0 - Hash: 0x2412e184 Key: "AntiKt10LCTopoJetsAux." - type: xAOD::JetAuxContainer - isConst: Yes - Data: 0x1b3aec20 - Hash: 0x174fd55e Key: "AntiKt3PV0TrackJets" - type: DataVector<xAOD::Jet> - isConst: Yes - Data: 0x1c67cc80 - Hash: 0x2d80f0ec Key: "AntiKt3PV0TrackJetsAux." - type: xAOD::JetAuxContainer - isConst: Yes - Data: 0x1d18fba0 - Hash: 0x1cacd31a Key: "AntiKt3ZTrackJets" - type: DataVector<xAOD::Jet> - isConst: Yes - Data: 0x1e66ada0 - Hash: 0x2ed388dd Key: "AntiKt3ZTrackJetsAux." - type: xAOD::JetAuxContainer - isConst: Yes - Data: 0x1bcfd390 - Hash: 0x2bb14ea6 Key: "AntiKt4EMTopoJets" - type: DataVector<xAOD::Jet> - isConst: Yes - Data: 0x1bd0a9a0 - Hash: 0x275970f2 Key: "AntiKt4EMTopoJetsAux." - type: xAOD::JetAuxContainer - isConst: Yes - Data: 0x1c7bc900 - Hash: 0x0108c856 Key: "AntiKt4LCTopoJets" - type: DataVector<xAOD::Jet> - isConst: Yes - Data: 0x1bd32210 - Hash: 0x000f8247 Key: "AntiKt4LCTopoJetsAux." - type: xAOD::JetAuxContainer - isConst: Yes - Data: 0x1ce49650 - Hash: 0x2b9a1762 Key: "AntiKt4PV0TrackJets" - type: DataVector<xAOD::Jet> - isConst: Yes - Data: 0x1cc84c90 - Hash: 0x275900a6 Key: "AntiKt4PV0TrackJetsAux." - type: xAOD::JetAuxContainer - isConst: Yes - Data: 0x19619500 - Hash: 0x26c698d7 Key: "AntiKt4ZTrackJets" - type: DataVector<xAOD::Jet> - isConst: Yes - Data: 0x1cccea40 - Hash: 0x22a53f38 Key: "AntiKt4ZTrackJetsAux." - type: xAOD::JetAuxContainer - isConst: Yes - Data: 0x1c78c630 - Hash: 0x3a553049 Key: "BTagging_AntiKt10LCTopo" - type: DataVector<xAOD::BTagging> - isConst: Yes - Data: 0x1bd42dc0 - Hash: 0x3ca25d10 Key: "BTagging_AntiKt10LCTopoAux." - type: xAOD::BTaggingAuxContainer - isConst: Yes - Data: 0x1cf489a0 - Hash: 0x07292635 Key: "BTagging_AntiKt4EMTopo" - type: DataVector<xAOD::BTagging> - isConst: Yes - Data: 0x1bd7cca0 - Hash: 0x3eaf6477 Key: "BTagging_AntiKt4EMTopoAux." - type: xAOD::BTaggingAuxContainer - isConst: Yes - Data: 0x1e45d640 - Hash: 0x050a16a6 Key: "BTagging_AntiKt4LCTopo" - type: DataVector<xAOD::BTagging> - isConst: Yes - Data: 0x1e240b80 - Hash: 0x1416e287 Key: "BTagging_AntiKt4LCTopoAux." - type: xAOD::BTaggingAuxContainer - isConst: Yes - Data: 0x1e8bf4b0 - Hash: 0x11d293c8 Key: "CaloCalTopoCluster" - type: DataVector<xAOD::CaloCluster> - isConst: Yes - Data: 0x1e4a65b0 - Hash: 0x274cdfe4 Key: "CaloCalTopoClusterAux." - type: xAOD::CaloClusterAuxContainer - isConst: Yes - Data: 0x1ede5ba0 - Hash: 0x367ee0b0 Key: "CamKt12LCTopoJets" - type: DataVector<xAOD::Jet> - isConst: Yes - Data: 0x1e89d770 - Hash: 0x013af561 Key: "CamKt12LCTopoJetsAux." - type: xAOD::JetAuxContainer - isConst: Yes - Data: 0x1e3f8eb0 - Hash: 0x340d9196 Key: "CombinedMuonTrackParticles" - type: DataVector<xAOD::TrackParticle> - isConst: Yes - Data: 0x1d2b40d0 - Hash: 0x32b4ce28 Key: "CombinedMuonTrackParticlesAux." - type: xAOD::TrackParticleAuxContainer - isConst: Yes - Data: 0x1e5bbb40 - Hash: 0x31fe446d Key: "ElectronCollection" - type: DataVector<xAOD::Electron> - isConst: Yes - Data: 0x1e4fd720 - Hash: 0x09bb047f Key: "ElectronCollectionAux." - type: xAOD::ElectronAuxContainer - isConst: Yes - Data: 0x1a3f1ce0 - Hash: 0x02484a8b Key: "EventInfo" - type: xAOD::EventInfo - isConst: Yes - Data: 0x1eb7b280 - Hash: 0x19c9cefe Key: "EventInfoAux." - type: xAOD::EventAuxInfo - isConst: Yes - Data: 0x1eb7c850 - Hash: 0x14e35e9f Key: "ExtrapolatedMuonTrackParticles" - type: DataVector<xAOD::TrackParticle> - isConst: Yes - Data: 0x1e43b9c0 - Hash: 0x2459d6e8 Key: "ExtrapolatedMuonTrackParticlesAux." - type: xAOD::TrackParticleAuxContainer - isConst: Yes - Data: 0x1e41ef40 - Hash: 0x1ef0f37f Key: "FwdElectrons" - type: DataVector<xAOD::Electron> - isConst: Yes - Data: 0x1e954150 - Hash: 0x35f7ce20 Key: "FwdElectronsAux." - type: xAOD::ElectronAuxContainer - isConst: Yes - Data: 0x1e954640 - Hash: 0x1f3e85c9 Key: "GSFConversionVertices" - type: DataVector<xAOD::Vertex> - isConst: Yes - Data: 0x1ee51d00 - Hash: 0x2d676284 Key: "GSFConversionVerticesAux." - type: xAOD::VertexAuxContainer - isConst: Yes - Data: 0x1ec9c940 - Hash: 0x2e42db0b Key: "GSFTrackParticles" - type: DataVector<xAOD::TrackParticle> - isConst: Yes - Data: 0x1ee54ca0 - Hash: 0x34297d8b Key: "GSFTrackParticlesAux." - type: xAOD::TrackParticleAuxContainer - isConst: Yes - Data: 0x1ea10810 - Hash: 0x1d3890db Key: "InDetTrackParticles" - type: DataVector<xAOD::TrackParticle> - isConst: Yes - Data: 0x1e7c0820 - Hash: 0x33f4b550 Key: "InDetTrackParticlesAux." - type: xAOD::TrackParticleAuxContainer - isConst: Yes - Data: 0x1e7c0cc0 - Hash: 0x2599fe6a Key: "InDetTrackParticlesForward" - type: DataVector<xAOD::TrackParticle> - isConst: Yes - Data: 0x1e789970 - Hash: 0x26f693e1 Key: "InDetTrackParticlesForwardAux." - type: xAOD::TrackParticleAuxContainer - isConst: Yes - Data: 0x1e3be020 - Hash: 0x304f6802 Key: "LArClusterEMFrwd" - type: DataVector<xAOD::CaloCluster> - isConst: Yes - Data: 0x1e1f6210 - Hash: 0x2851c708 Key: "LArClusterEMFrwdAux." - type: xAOD::CaloClusterAuxContainer - isConst: Yes - Data: 0x1e1f66f0 - Hash: 0x14cd97f8 Key: "LVL1EmTauRoIs" - type: DataVector<xAOD::EmTauRoI> - isConst: Yes - Data: 0x1e203830 - Hash: 0x34b8ec50 Key: "LVL1EmTauRoIsAux." - type: xAOD::EmTauRoIAuxContainer - isConst: Yes - Data: 0x1eb57790 - Hash: 0x28ccc319 Key: "LVL1EnergySumRoI" - type: xAOD::EnergySumRoI - isConst: Yes - Data: 0x13cead90 - Hash: 0x38eb6661 Key: "LVL1EnergySumRoIAux." - type: xAOD::EnergySumRoIAuxInfo - isConst: Yes - Data: 0x1ee6e130 - Hash: 0x1317aa50 Key: "LVL1JetEtRoI" - type: xAOD::JetEtRoI - isConst: Yes - Data: 0x1e84af60 - Hash: 0x0ac36047 Key: "LVL1JetEtRoIAux." - type: xAOD::JetEtRoIAuxInfo - isConst: Yes - Data: 0x1e858080 - Hash: 0x319a0330 Key: "LVL1JetRoIs" - type: DataVector<xAOD::JetRoI> - isConst: Yes - Data: 0x2000e970 - Hash: 0x39b6c738 Key: "LVL1JetRoIsAux." - type: xAOD::JetRoIAuxContainer - isConst: Yes - Data: 0x20041b90 - Hash: 0x241a2dd5 Key: "LVL1MuonRoIs" - type: DataVector<xAOD::MuonRoI> - isConst: Yes - Data: 0x1ebc7320 - Hash: 0x14b1aecd Key: "LVL1MuonRoIsAux." - type: xAOD::MuonRoIAuxContainer - isConst: Yes - Data: 0x1eaa1a40 - Hash: 0x14655f2e Key: "METMap_LocHadTopo" - type: xAOD::MissingETComponentMap - isConst: Yes - Data: 0x1e1afd60 - Hash: 0x16f4592d Key: "METMap_LocHadTopoAux." - type: xAOD::MissingETAuxComponentMap - isConst: Yes - Data: 0x1e992610 - Hash: 0x2cf94457 Key: "METMap_LocHadTopoRegions" - type: xAOD::MissingETComponentMap - isConst: Yes - Data: 0x1e9e6380 - Hash: 0x09fa4793 Key: "METMap_LocHadTopoRegionsAux." - type: xAOD::MissingETAuxComponentMap - isConst: Yes - Data: 0x203928f0 - Hash: 0x1e61ada5 Key: "METMap_RefFinal" - type: xAOD::MissingETComponentMap - isConst: Yes - Data: 0x139f6280 - Hash: 0x2a6037e7 Key: "METMap_RefFinalAux." - type: xAOD::MissingETAuxComponentMap - isConst: Yes - Data: 0x20175c90 - Hash: 0x357237a1 Key: "METMap_RefFinalRegions" - type: xAOD::MissingETComponentMap - isConst: Yes - Data: 0x1e9a3850 - Hash: 0x361d5365 Key: "METMap_RefFinalRegionsAux." - type: xAOD::MissingETAuxComponentMap - isConst: Yes - Data: 0x1ecf0a60 - Hash: 0x368d51cd Key: "METMap_Track" - type: xAOD::MissingETComponentMap - isConst: Yes - Data: 0x20135f90 - Hash: 0x0d6ccdf8 Key: "METMap_TrackAux." - type: xAOD::MissingETAuxComponentMap - isConst: Yes - Data: 0x1b37ccd0 - Hash: 0x283ffdf0 Key: "MET_LocHadTopo" - type: xAOD::MissingETContainer - isConst: Yes - Data: 0x20346a30 - Hash: 0x04122a8c Key: "MET_LocHadTopoAux." - type: xAOD::MissingETAuxContainer - isConst: Yes - Data: 0x202a7400 - Hash: 0x2119c18d Key: "MET_LocHadTopoRegions" - type: xAOD::MissingETContainer - isConst: Yes - Data: 0x20381be0 - Hash: 0x073fecef Key: "MET_LocHadTopoRegionsAux." - type: xAOD::MissingETAuxContainer - isConst: Yes - Data: 0x201be9f0 - Hash: 0x10ad48d0 Key: "MET_RefFinal" - type: xAOD::MissingETContainer - isConst: Yes - Data: 0x20353f50 - Hash: 0x392ea45d Key: "MET_RefFinalAux." - type: xAOD::MissingETAuxContainer - isConst: Yes - Data: 0x2029e460 - Hash: 0x2fb70ce7 Key: "MET_RefFinalRegions" - type: xAOD::MissingETContainer - isConst: Yes - Data: 0x201abfa0 - Hash: 0x03029811 Key: "MET_RefFinalRegionsAux." - type: xAOD::MissingETAuxContainer - isConst: Yes - Data: 0x20173750 - Hash: 0x34a2d246 Key: "MET_Track" - type: xAOD::MissingETContainer - isConst: Yes - Data: 0x2022bd50 - Hash: 0x372adc68 Key: "MET_TrackAux." - type: xAOD::MissingETAuxContainer - isConst: Yes - Data: 0x201e8d60 - Hash: 0x025d6c54 Key: "MuonSegments" - type: DataVector<xAOD::MuonSegment> - isConst: Yes - Data: 0x1b278550 - Hash: 0x21067705 Key: "MuonSegmentsAux." - type: xAOD::MuonSegmentAuxContainer - isConst: Yes - Data: 0x1b277110 - Hash: 0x21748eec Key: "Muons" - type: DataVector<xAOD::Muon> - isConst: Yes - Data: 0x20168fe0 - Hash: 0x03c9285a Key: "MuonsAux." - type: xAOD::MuonAuxContainer - isConst: Yes - Data: 0x1b37f060 - Hash: 0x2564a80c Key: "PhotonCollection" - type: DataVector<xAOD::Photon> - isConst: Yes - Data: 0x2016b100 - Hash: 0x2d63c16b Key: "PhotonCollectionAux." - type: xAOD::PhotonAuxContainer - isConst: Yes - Data: 0x2017a0d0 - Hash: 0x37d14597 Key: "PrimaryVertices" - type: DataVector<xAOD::Vertex> - isConst: Yes - Data: 0x200bfd30 - Hash: 0x0693b198 Key: "PrimaryVerticesAux." - type: xAOD::VertexAuxContainer - isConst: Yes - Data: 0x202ae1f0 - Hash: 0x2c0062c1 Key: "TauPi0ChargedPFOContainer" - type: DataVector<xAOD::PFO> - isConst: Yes - Data: 0x201d3f80 - Hash: 0x3f7b09cb Key: "TauPi0ChargedPFOContainerAux." - type: xAOD::PFOAuxContainer - isConst: Yes - Data: 0x200c0810 - Hash: 0x0d6e8c91 Key: "TauPi0NeutralPFOContainer" - type: DataVector<xAOD::PFO> - isConst: Yes - Data: 0x203d67c0 - Hash: 0x0857b733 Key: "TauPi0NeutralPFOContainerAux." - type: xAOD::PFOAuxContainer - isConst: Yes - Data: 0x20739d10 - Hash: 0x3f146726 Key: "TauRecContainer" - type: DataVector<xAOD::TauJet> - isConst: Yes - Data: 0x20324d30 - Hash: 0x35fd2985 Key: "TauRecContainerAux." - type: xAOD::TauJetAuxContainer - isConst: Yes - Data: 0x207f52b0 - Hash: 0x1c4d8e40 Key: "TauSecondaryVertexContainer" - type: DataVector<xAOD::Vertex> - isConst: Yes - Data: 0x213d4930 - Hash: 0x26e88a79 Key: "TauSecondaryVertexContainerAux." - type: xAOD::VertexAuxContainer - isConst: Yes - Data: 0x214ca560 - Hash: 0x01309c76 Key: "TauShotPFOContainer" - type: DataVector<xAOD::PFO> - isConst: Yes - Data: 0x215dda20 - Hash: 0x361cf529 Key: "TauShotPFOContainerAux." - type: xAOD::PFOAuxContainer - isConst: Yes - Data: 0x2161f9e0 - Hash: 0x1c09cf12 Key: "TrigConfKeys" - type: xAOD::TrigConfKeys - isConst: Yes - Data: 0x213701c0 - Hash: 0x32c7ac69 Key: "chargedJetETMissPFO_eflowRec" - type: DataVector<xAOD::PFO> - isConst: Yes - Data: 0x21543ee0 - Hash: 0x0a3711fa Key: "chargedJetETMissPFO_eflowRecAux." - type: xAOD::PFOAuxContainer - isConst: Yes - Data: 0x215259c0 - Hash: 0x3c338e6d Key: "chargedTauPFO_eflowRec" - type: DataVector<xAOD::PFO> - isConst: Yes - Data: 0x215ac3d0 - Hash: 0x0eb5c2d3 Key: "chargedTauPFO_eflowRecAux." - type: xAOD::PFOAuxContainer - isConst: Yes - Data: 0x21543080 - Hash: 0x0defa24f Key: "egClusterCollection" - type: DataVector<xAOD::CaloCluster> - isConst: Yes - Data: 0x214781d0 - Hash: 0x16507339 Key: "egClusterCollectionAux." - type: xAOD::CaloClusterAuxContainer - isConst: Yes - Data: 0x215dacf0 - Hash: 0x06d58ada Key: "neutralJetETMissPFO_eflowRec" - type: DataVector<xAOD::PFO> - isConst: Yes - Data: 0x2151ea50 - Hash: 0x3a2fa8ee Key: "neutralJetETMissPFO_eflowRecAux." - type: xAOD::PFOAuxContainer - isConst: Yes - Data: 0x214ac640 - Hash: 0x1ed46fcb Key: "neutralJetETMiss_LCPFO_NonModified_eflowRec" - type: DataVector<xAOD::PFO> - isConst: Yes - Data: 0x1e6b3dd0 - Hash: 0x1daa3653 Key: "neutralJetETMiss_LCPFO_NonModified_eflowRecAux." - type: xAOD::PFOAuxContainer - isConst: Yes - Data: 0x1e6b4150 - Hash: 0x18c103ac Key: "neutralJetETMiss_LCPFO_eflowRec" - type: DataVector<xAOD::PFO> - isConst: Yes - Data: 0x21725a80 - Hash: 0x1332c40c Key: "neutralJetETMiss_LCPFO_eflowRecAux." - type: xAOD::PFOAuxContainer - isConst: Yes - Data: 0x21725b90 - Hash: 0x31fa7a64 Key: "neutralTauPFO_eflowRec" - type: DataVector<xAOD::PFO> - isConst: Yes - Data: 0x2177eb70 - Hash: 0x336e7f0c Key: "neutralTauPFO_eflowRecAux." - type: xAOD::PFOAuxContainer - isConst: Yes - Data: 0x2177f090 - Hash: 0x08e0ace8 Key: "xTrigDecision" - type: xAOD::TrigDecision - isConst: Yes - Data: 0x21791ac0 - Hash: 0x26664450 Key: "xTrigDecisionAux." - type: xAOD::TrigDecisionAuxInfo - isConst: Yes - Data: 0x21740e10 -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - - -xAOD::TEvent::getInput... WARNING Key 0x00001234 unknown -xAOD::TVirtualEvent::r... WARNING Couldn't retrieve 6ClassA/0x00001234 -xAOD::TEvent::getName WARNING Didn't find object with pointer 0x12345678 in the event -xAOD::TEvent::connectB... WARNING No metadata available for branch: MyObjB -xAOD::TEvent::connectB... WARNING Branch "MyObjB" not available on input -xAOD::TEvent::retrieve WARNING Couldn't (const) retrieve "ClassA/MyObjB" -xAOD::TEvent::connectB... WARNING No metadata available for branch: MyObjB -xAOD::TEvent::connectB... WARNING Branch "MyObjB" not available on input -xAOD::TEvent::retrieve WARNING Couldn't (const) retrieve "ClassB/MyObjB" -xAOD::TEvent::retrieve WARNING Couldn't (non-const) retrieve "DataVector<ClassA>/ConstDataVector" -xAOD::TEvent::fill ERROR /afs/cern.ch/user/s/ssnyder/atlas-work3e/Control/xAODRootAccess/Root/TEvent.cxx:1452 The following objects were not set in the current event: "Container2Aux.", "FloatVec" -xAOD::TEvent::record ERROR /afs/cern.ch/user/s/ssnyder/atlas-work3e/Control/xAODRootAccess/Root/TEvent.cxx:2087 Didn't find dictionary for type: ClassA diff --git a/Control/xAODRootAccess/share/ut_xaodrootaccess_tfilemerger_test.ref b/Control/xAODRootAccess/share/ut_xaodrootaccess_tfilemerger_test.ref deleted file mode 100644 index b4f997e80f7d89552a408f7fc1e3f6fc829a7614..0000000000000000000000000000000000000000 --- a/Control/xAODRootAccess/share/ut_xaodrootaccess_tfilemerger_test.ref +++ /dev/null @@ -1,37 +0,0 @@ -xAOD::Init INFO Environment initialised for data access -xAOD::TFileMerger::set... INFO Opened "merged.root" for writing -xAOD::TFileMerger::add... INFO Opened "test_file1.root" for reading -xAOD::TFileMerger::add... INFO Opened "test_file2.root" for reading -xAOD::TEvent::initStats WARNING Couldn't find interface object/container "Container" belonging to branch "ContainerAux." -xAOD::TFileMerger::mer... INFO Copying xAOD tree "CollectionTree" -xAOD::TFileMerger::mer... INFO Copied 0 / 10 entries -xAOD::TEvent::initStats WARNING Couldn't find interface object/container "Container" belonging to branch "ContainerAux." -xAOD::TFileMerger::mer... INFO Copying xAOD tree "CollectionTree" -xAOD::TFileMerger::mer... INFO Copied 0 / 10 entries -ut_xaodrootaccess_tfil... INFO Test 1 passed -xAOD::TFileMerger::set... INFO Opened "merged.root" for writing -xAOD::TFileMerger::add... INFO Opened "test_file2.root" for reading -xAOD::TFileMerger::add... INFO Opened "test_file1.root" for reading -xAOD::TEvent::initStats WARNING Couldn't find interface object/container "Container" belonging to branch "ContainerAux." -xAOD::TFileMerger::mer... INFO Copying xAOD tree "CollectionTree" -xAOD::TFileMerger::mer... INFO Copied 0 / 10 entries -xAOD::TEvent::initStats WARNING Couldn't find interface object/container "Container" belonging to branch "ContainerAux." -xAOD::TFileMerger::mer... INFO Copying xAOD tree "CollectionTree" -xAOD::TFileMerger::mer... INFO Copied 0 / 10 entries -ut_xaodrootaccess_tfil... INFO Test 2 passed -xAOD::TFileMerger::set... INFO Opened "merged.root" for writing -xAOD::TFileMerger::add... INFO Opened "test_file1.root" for reading -xAOD::TFileMerger::add... INFO Opened "test_file2.root" for reading -xAOD::TEvent::initStats WARNING Couldn't find interface object/container "Container" belonging to branch "ContainerAux." -xAOD::TFileMerger::mer... INFO Copying xAOD tree "CollectionTree" -xAOD::TEvent::initStats WARNING Couldn't find interface object/container "Container" belonging to branch "ContainerAux." -xAOD::TFileMerger::mer... INFO Copying xAOD tree "CollectionTree" -ut_xaodrootaccess_tfil... INFO Test 3 passed -xAOD::TFileMerger::set... INFO Opened "merged.root" for writing -xAOD::TFileMerger::add... INFO Opened "test_file2.root" for reading -xAOD::TFileMerger::add... INFO Opened "test_file1.root" for reading -xAOD::TEvent::initStats WARNING Couldn't find interface object/container "Container" belonging to branch "ContainerAux." -xAOD::TFileMerger::mer... INFO Copying xAOD tree "CollectionTree" -xAOD::TEvent::initStats WARNING Couldn't find interface object/container "Container" belonging to branch "ContainerAux." -xAOD::TFileMerger::mer... INFO Copying xAOD tree "CollectionTree" -ut_xaodrootaccess_tfil... INFO Test 4 passed diff --git a/Control/xAODRootAccess/share/ut_xaodrootaccess_tpyevent_test.ref b/Control/xAODRootAccess/share/ut_xaodrootaccess_tpyevent_test.ref deleted file mode 100644 index c4279c922ef09b9fe80800977d1364abf3e4fabf..0000000000000000000000000000000000000000 --- a/Control/xAODRootAccess/share/ut_xaodrootaccess_tpyevent_test.ref +++ /dev/null @@ -1,52 +0,0 @@ -Warning in <TInterpreter::ReadRootmapFile>: class CP::IPileupReweightingTool found in libAsgAnalysisInterfacesDict.so is already in libPileupReweightingDict.so -/cvmfs/sft.cern.ch/lcg/contrib/gcc/4.9.3/x86_64-slc6/include/c++/4.9.3/bits/regex.h:1545:11: runtime error: load of value 192, which is not a valid value for type 'bool' -/cvmfs/sft.cern.ch/lcg/contrib/gcc/4.9.3/x86_64-slc6/include/c++/4.9.3/bits/regex.h:1545:11: runtime error: load of value 128, which is not a valid value for type 'bool' -[?1034hut_xaodrootaccess_tpye... INFO Environment initialised for data access -xAOD::TEvent::getEvent... WARNING Can't find EventFormatElement for hashed SG key 971500411 -xAOD::TEvent::proxy_exact WARNING Can't find BranchInfo for 971500411. -xAOD::TEvent::addToStore WARNING Function should only be called through an invalid ElementLink -xAOD::TEvent::getEvent... WARNING Can't find EventFormatElement for hashed SG key 981452424 -xAOD::TEvent::proxy_exact WARNING Can't find BranchInfo for 981452424. -xAOD::TEvent::getEvent... WARNING Can't find EventFormatElement for hashed SG key 311645381 -xAOD::TEvent::proxy_exact WARNING Can't find BranchInfo for 311645381. -xAOD::TEvent::getEvent... WARNING Can't find EventFormatElement for hashed SG key 582965710 -xAOD::TEvent::proxy_exact WARNING Can't find BranchInfo for 582965710. -xAOD::TEvent::getEvent... WARNING Can't find EventFormatElement for hashed SG key 243728388 -xAOD::TEvent::proxy_exact WARNING Can't find BranchInfo for 243728388. -xAOD::MakeTransientTree INFO Created transient tree "CollectionTree" in ROOT's common memory -ut_xaodrootaccess_tpyevent_test INFO Processing entry 0 -xAOD::TEvent::getEvent... WARNING Can't find EventFormatElement for hashed SG key 542073698 -xAOD::TEvent::proxy_exact WARNING Can't find BranchInfo for 542073698. -xAOD::TAuxStore::isCon... ERROR /afs/cern.ch/user/s/ssnyder/atlas-work3e/Control/xAODRootAccess/Root/TAuxStore.cxx:1731 Couldn't determine if branch describes a single object or a container -xAOD::TAuxStore::isCon... ERROR /afs/cern.ch/user/s/ssnyder/atlas-work3e/Control/xAODRootAccess/Root/TAuxStore.cxx:1733 ROOT type : std::vector<unsigned short> -xAOD::TAuxStore::isCon... ERROR /afs/cern.ch/user/s/ssnyder/atlas-work3e/Control/xAODRootAccess/Root/TAuxStore.cxx:1736 Object type: std::vector<short> -xAOD::TAuxStore::isCon... ERROR /afs/cern.ch/user/s/ssnyder/atlas-work3e/Control/xAODRootAccess/Root/TAuxStore.cxx:1739 Vector type: std::vector<std::vector<short> > -ut_xaodrootaccess_tpyevent_test INFO Number of electrons: 4 -ut_xaodrootaccess_tpyevent_test INFO Number of central electrons: 4 -ut_xaodrootaccess_tpyevent_test INFO Processing entry 1 -ut_xaodrootaccess_tpyevent_test INFO Number of electrons: 3 -ut_xaodrootaccess_tpyevent_test INFO Number of central electrons: 2 -ut_xaodrootaccess_tpyevent_test INFO Processing entry 2 -ut_xaodrootaccess_tpyevent_test INFO Number of electrons: 3 -ut_xaodrootaccess_tpyevent_test INFO Number of central electrons: 1 -ut_xaodrootaccess_tpyevent_test INFO Processing entry 3 -ut_xaodrootaccess_tpyevent_test INFO Number of electrons: 2 -ut_xaodrootaccess_tpyevent_test INFO Number of central electrons: 2 -ut_xaodrootaccess_tpyevent_test INFO Processing entry 4 -ut_xaodrootaccess_tpyevent_test INFO Number of electrons: 6 -ut_xaodrootaccess_tpyevent_test INFO Number of central electrons: 2 -ut_xaodrootaccess_tpyevent_test INFO Processing entry 5 -ut_xaodrootaccess_tpyevent_test INFO Number of electrons: 3 -ut_xaodrootaccess_tpyevent_test INFO Number of central electrons: 0 -ut_xaodrootaccess_tpyevent_test INFO Processing entry 6 -ut_xaodrootaccess_tpyevent_test INFO Number of electrons: 3 -ut_xaodrootaccess_tpyevent_test INFO Number of central electrons: 3 -ut_xaodrootaccess_tpyevent_test INFO Processing entry 7 -ut_xaodrootaccess_tpyevent_test INFO Number of electrons: 4 -ut_xaodrootaccess_tpyevent_test INFO Number of central electrons: 2 -ut_xaodrootaccess_tpyevent_test INFO Processing entry 8 -ut_xaodrootaccess_tpyevent_test INFO Number of electrons: 4 -ut_xaodrootaccess_tpyevent_test INFO Number of central electrons: 1 -ut_xaodrootaccess_tpyevent_test INFO Processing entry 9 -ut_xaodrootaccess_tpyevent_test INFO Number of electrons: 5 -ut_xaodrootaccess_tpyevent_test INFO Number of central electrons: 1 diff --git a/Control/xAODRootAccess/share/ut_xaodrootaccess_tpystore_test.ref b/Control/xAODRootAccess/share/ut_xaodrootaccess_tpystore_test.ref deleted file mode 100644 index ec14fb4851627c2c5259ee2e482cdd9ccb9d6e60..0000000000000000000000000000000000000000 --- a/Control/xAODRootAccess/share/ut_xaodrootaccess_tpystore_test.ref +++ /dev/null @@ -1,6 +0,0 @@ -Warning in <TInterpreter::ReadRootmapFile>: class CP::IPileupReweightingTool found in libAsgAnalysisInterfacesDict.so is already in libPileupReweightingDict.so -/cvmfs/sft.cern.ch/lcg/contrib/gcc/4.9.3/x86_64-slc6/include/c++/4.9.3/bits/regex.h:1545:11: runtime error: load of value 192, which is not a valid value for type 'bool' -/cvmfs/sft.cern.ch/lcg/contrib/gcc/4.9.3/x86_64-slc6/include/c++/4.9.3/bits/regex.h:1545:11: runtime error: load of value 128, which is not a valid value for type 'bool' -[?1034hut_xaodrootaccess_tpys... INFO Environment initialised for data access -ut_xaodrootaccess_tpystore_test INFO AuxContainerBase/AuxInfoBase containment tests succeeded -ut_xaodrootaccess_tpystore_test INFO All tests succeeded diff --git a/Control/xAODRootAccess/share/ut_xaodrootaccess_transtree2_test.ref b/Control/xAODRootAccess/share/ut_xaodrootaccess_transtree2_test.ref deleted file mode 100644 index 05f5d53f049bad6973748423448245bde77616b2..0000000000000000000000000000000000000000 --- a/Control/xAODRootAccess/share/ut_xaodrootaccess_transtree2_test.ref +++ /dev/null @@ -1,85 +0,0 @@ -Warning in <TInterpreter::ReadRootmapFile>: class CP::IPileupReweightingTool found in libAsgAnalysisInterfacesDict.so is already in libPileupReweightingDict.so -/cvmfs/sft.cern.ch/lcg/contrib/gcc/4.9.3/x86_64-slc6/include/c++/4.9.3/bits/regex.h:1545:11: runtime error: load of value 48, which is not a valid value for type 'bool' -/cvmfs/sft.cern.ch/lcg/contrib/gcc/4.9.3/x86_64-slc6/include/c++/4.9.3/bits/regex.h:1545:11: runtime error: load of value 240, which is not a valid value for type 'bool' -[?1034hut_xaodrootaccess_tran... INFO Environment initialised for data access -generateDVIterators INFO Attaching iterators to all known DV types -generateDVIterators INFO This may take a moment... -ut_xaodrootaccess_transtree2_test INFO Processing entry 0 -ut_xaodrootaccess_transtree2_test INFO Number of electrons: 5 -ut_xaodrootaccess_transtree2_test INFO - eta: -1.87225, phi: 2.58505, pt: 7153.77 -ut_xaodrootaccess_transtree2_test INFO - eta: -1.89711, phi: 2.30334, pt: 6618.11 -ut_xaodrootaccess_transtree2_test INFO - eta: -1.03354, phi: -0.733827, pt: 8336.68 -ut_xaodrootaccess_transtree2_test INFO - eta: 2.27778, phi: -1.85701, pt: 4034.43 -ut_xaodrootaccess_transtree2_test INFO - eta: -1.89711, phi: 2.30334, pt: 3463.31 -ut_xaodrootaccess_transtree2_test INFO Processing entry 1 -ut_xaodrootaccess_transtree2_test INFO Number of electrons: 16 -ut_xaodrootaccess_transtree2_test INFO - eta: 1.20973, phi: -2.73644, pt: 64042.3 -ut_xaodrootaccess_transtree2_test INFO - eta: 0.810467, phi: 1.29538, pt: 46569.2 -ut_xaodrootaccess_transtree2_test INFO - eta: 0.407468, phi: -0.850301, pt: 41894.1 -ut_xaodrootaccess_transtree2_test INFO - eta: 0.0397363, phi: -0.92689, pt: 14259.2 -ut_xaodrootaccess_transtree2_test INFO - eta: 0.853443, phi: 1.3642, pt: 10362 -ut_xaodrootaccess_transtree2_test INFO - eta: 0.166232, phi: -1.05669, pt: 7517.21 -ut_xaodrootaccess_transtree2_test INFO - eta: 0.10591, phi: -1.20178, pt: 11971.2 -ut_xaodrootaccess_transtree2_test INFO - eta: 0.056347, phi: -1.17958, pt: 18189.3 -ut_xaodrootaccess_transtree2_test INFO - eta: 1.24841, phi: -2.8877, pt: 11875.8 -ut_xaodrootaccess_transtree2_test INFO - eta: 1.2158, phi: -2.70483, pt: 10173.6 -ut_xaodrootaccess_transtree2_test INFO - eta: 0.191049, phi: -1.06734, pt: 7704.97 -ut_xaodrootaccess_transtree2_test INFO - eta: 1.31224, phi: 1.46253, pt: 7555.06 -ut_xaodrootaccess_transtree2_test INFO - eta: 1.6782, phi: 2.67353, pt: 7261.89 -ut_xaodrootaccess_transtree2_test INFO - eta: -0.0242342, phi: -0.875958, pt: 3211.76 -ut_xaodrootaccess_transtree2_test INFO - eta: 1.16864, phi: -2.69413, pt: 1721.68 -ut_xaodrootaccess_transtree2_test INFO - eta: 0.407468, phi: -0.850301, pt: 1905.01 -ut_xaodrootaccess_transtree2_test INFO Processing entry 2 -ut_xaodrootaccess_transtree2_test INFO Number of electrons: 3 -ut_xaodrootaccess_transtree2_test INFO - eta: 1.35437, phi: -1.67835, pt: 18782.8 -ut_xaodrootaccess_transtree2_test INFO - eta: 1.34787, phi: -1.67925, pt: 7960.93 -ut_xaodrootaccess_transtree2_test INFO - eta: -0.385872, phi: 0.694237, pt: 3030.75 -ut_xaodrootaccess_transtree2_test INFO Processing entry 3 -ut_xaodrootaccess_transtree2_test INFO Number of electrons: 7 -ut_xaodrootaccess_transtree2_test INFO - eta: -0.14451, phi: -0.0736832, pt: 83290.3 -ut_xaodrootaccess_transtree2_test INFO - eta: -0.0945223, phi: -2.97419, pt: 83881.3 -ut_xaodrootaccess_transtree2_test INFO - eta: -0.548944, phi: 0.834652, pt: 15323.1 -ut_xaodrootaccess_transtree2_test INFO - eta: 1.58378, phi: -1.62608, pt: 7411.35 -ut_xaodrootaccess_transtree2_test INFO - eta: -0.600011, phi: 0.447199, pt: 5797.86 -ut_xaodrootaccess_transtree2_test INFO - eta: -0.0472115, phi: -3.07577, pt: 3075.44 -ut_xaodrootaccess_transtree2_test INFO - eta: -0.624104, phi: 0.970929, pt: 2826.36 -ut_xaodrootaccess_transtree2_test INFO Processing entry 4 -ut_xaodrootaccess_transtree2_test INFO Number of electrons: 4 -ut_xaodrootaccess_transtree2_test INFO - eta: 0.293212, phi: -2.43334, pt: 28535.9 -ut_xaodrootaccess_transtree2_test INFO - eta: -1.12055, phi: -2.83096, pt: 5174.22 -ut_xaodrootaccess_transtree2_test INFO - eta: -0.715128, phi: -2.48471, pt: 3333.71 -ut_xaodrootaccess_transtree2_test INFO - eta: -0.734061, phi: -1.81256, pt: 1553.44 -ut_xaodrootaccess_transtree2_test INFO Processing entry 5 -ut_xaodrootaccess_transtree2_test INFO Number of electrons: 3 -ut_xaodrootaccess_transtree2_test INFO - eta: 1.89356, phi: 0.843517, pt: 26125.2 -ut_xaodrootaccess_transtree2_test INFO - eta: 1.89874, phi: 0.902491, pt: 7945.43 -ut_xaodrootaccess_transtree2_test INFO - eta: 0.42673, phi: 2.93155, pt: 4142.02 -ut_xaodrootaccess_transtree2_test INFO Processing entry 6 -ut_xaodrootaccess_transtree2_test INFO Number of electrons: 5 -ut_xaodrootaccess_transtree2_test INFO - eta: -0.978776, phi: -1.66459, pt: 28746.5 -ut_xaodrootaccess_transtree2_test INFO - eta: -1.34012, phi: 0.505818, pt: 12818.6 -ut_xaodrootaccess_transtree2_test INFO - eta: -1.21412, phi: 0.621285, pt: 18685 -ut_xaodrootaccess_transtree2_test INFO - eta: -1.03222, phi: 0.840678, pt: 6101.92 -ut_xaodrootaccess_transtree2_test INFO - eta: 1.27168, phi: -2.37407, pt: 8790.23 -ut_xaodrootaccess_transtree2_test INFO Processing entry 7 -ut_xaodrootaccess_transtree2_test INFO Number of electrons: 7 -ut_xaodrootaccess_transtree2_test INFO - eta: -1.14669, phi: -0.176249, pt: 14384.1 -ut_xaodrootaccess_transtree2_test INFO - eta: -0.551749, phi: 0.368342, pt: 5799.93 -ut_xaodrootaccess_transtree2_test INFO - eta: -1.07237, phi: -0.459667, pt: 3497.28 -ut_xaodrootaccess_transtree2_test INFO - eta: -0.580715, phi: 0.302969, pt: 4047.04 -ut_xaodrootaccess_transtree2_test INFO - eta: -1.81865, phi: -2.75309, pt: 4069.96 -ut_xaodrootaccess_transtree2_test INFO - eta: -0.580715, phi: 0.302969, pt: 2536.63 -ut_xaodrootaccess_transtree2_test INFO - eta: -1.10472, phi: 0.15616, pt: 2568.13 -ut_xaodrootaccess_transtree2_test INFO Processing entry 8 -ut_xaodrootaccess_transtree2_test INFO Number of electrons: 8 -ut_xaodrootaccess_transtree2_test INFO - eta: -0.893952, phi: -1.5656, pt: 62553.9 -ut_xaodrootaccess_transtree2_test INFO - eta: -0.194155, phi: 3.07662, pt: 30000.2 -ut_xaodrootaccess_transtree2_test INFO - eta: -2.23172, phi: 1.52299, pt: 14864.5 -ut_xaodrootaccess_transtree2_test INFO - eta: -2.27369, phi: 1.69665, pt: 6536.86 -ut_xaodrootaccess_transtree2_test INFO - eta: -0.860373, phi: -1.55368, pt: 4250.91 -ut_xaodrootaccess_transtree2_test INFO - eta: -0.783786, phi: -2.12645, pt: 3000.41 -ut_xaodrootaccess_transtree2_test INFO - eta: -2.23172, phi: 1.52299, pt: 2125.29 -ut_xaodrootaccess_transtree2_test INFO - eta: -1.07172, phi: 0.533009, pt: 2353.17 -ut_xaodrootaccess_transtree2_test INFO Processing entry 9 -ut_xaodrootaccess_transtree2_test INFO Number of electrons: 1 -ut_xaodrootaccess_transtree2_test INFO - eta: -1.23239, phi: -2.08669, pt: 5215.82 diff --git a/Control/xAODRootAccess/share/ut_xaodrootaccess_transtree_test.ref b/Control/xAODRootAccess/share/ut_xaodrootaccess_transtree_test.ref deleted file mode 100644 index daa86660eeacc1442c8a413f0eec6722180c40ec..0000000000000000000000000000000000000000 --- a/Control/xAODRootAccess/share/ut_xaodrootaccess_transtree_test.ref +++ /dev/null @@ -1,20 +0,0 @@ -/cvmfs/sft.cern.ch/lcg/contrib/gcc/4.9.3/x86_64-slc6/include/c++/4.9.3/bits/regex.h:1545:11: runtime error: load of value 240, which is not a valid value for type 'bool' -/cvmfs/sft.cern.ch/lcg/contrib/gcc/4.9.3/x86_64-slc6/include/c++/4.9.3/bits/regex.h:1545:11: runtime error: load of value 176, which is not a valid value for type 'bool' -TInterpreter::ReadRoot... WARNING class CP::IPileupReweightingTool found in libAsgAnalysisInterfacesDict.so is already in libPileupReweightingDict.so -ut_xaodrootaccess_tran... INFO Environment initialised for data access -xAOD::TEvent::getEvent... WARNING Can't find EventFormatElement for hashed SG key 981452424 -xAOD::TEvent::proxy_exact WARNING Can't find BranchInfo for 981452424. -xAOD::TEvent::addToStore WARNING Function should only be called through an invalid ElementLink -xAOD::TEvent::getEvent... WARNING Can't find EventFormatElement for hashed SG key 311645381 -xAOD::TEvent::proxy_exact WARNING Can't find BranchInfo for 311645381. -xAOD::TEvent::getEvent... WARNING Can't find EventFormatElement for hashed SG key 582965710 -xAOD::TEvent::proxy_exact WARNING Can't find BranchInfo for 582965710. -xAOD::TEvent::getEvent... WARNING Can't find EventFormatElement for hashed SG key 243728388 -xAOD::TEvent::proxy_exact WARNING Can't find BranchInfo for 243728388. -xAOD::MakeTransientTree INFO Created transient tree "CollectionTree" in ROOT's common memory -TCanvas::MakeDefCanvas INFO created default TCanvas with name c1 -xAOD::MakeTransientTree INFO Created transient tree "CollectionTree" in ROOT's common memory -xAOD::MakeTransientMet... INFO Created transient metadata tree "MetaData" in ROOT's common memory -xAOD::MakeTransientMet... INFO Created transient metadata tree "MetaData" in ROOT's common memory -xAOD::MakeTransientTree INFO Created transient tree "CollectionTree" in ROOT's common memory -xAOD::MakeTransientMet... INFO Created transient metadata tree "MetaData" in ROOT's common memory diff --git a/Control/xAODRootAccess/share/ut_xaodrootaccess_tstore_test.ref b/Control/xAODRootAccess/share/ut_xaodrootaccess_tstore_test.ref deleted file mode 100644 index bb4c49e80ad8135771efd334246aa0ed4418f549..0000000000000000000000000000000000000000 --- a/Control/xAODRootAccess/share/ut_xaodrootaccess_tstore_test.ref +++ /dev/null @@ -1,7 +0,0 @@ -ut_xaodrootaccess_tsto... INFO Environment initialised for data access -xAOD::THolder::getAs WARNING Trying to retrieve ClassB object with a ClassA pointer -xAOD::TStore::retrieve WARNING Couldn't (const) retrieve "ClassA/MyObjB" -xAOD::TStore::getName WARNING Key 0x12345678 not known by the store -xAOD::TStore::retrieve WARNING Couldn't (const) retrieve "ClassB/MyObjB" -xAOD::THolder::getAs WARNING Trying to retrieve ConstDataVector<DataVector<ClassA> > object with a DataVector<ClassA> pointer -xAOD::TStore::retrieve WARNING Couldn't (non-const) retrieve "DataVector<ClassA>/ConstDataVector" diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_athenaMode_test.cxx b/Control/xAODRootAccess/test/ut_xaodrootaccess_athenaMode_test.cxx new file mode 100644 index 0000000000000000000000000000000000000000..09d849af55dcac48fc2c4723fbdec15118783f0b --- /dev/null +++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_athenaMode_test.cxx @@ -0,0 +1,90 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +// Local include(s). +#include "xAODRootAccess/Init.h" +#include "xAODRootAccess/TEvent.h" +#include "xAODRootAccess/tools/Message.h" + +// EDM include(s). +#include "AthContainersInterfaces/IConstAuxStore.h" +#include "AthContainers/AuxVectorBase.h" + +// ROOT include(s). +#include <TFile.h> +#include <TSystem.h> +#include <TError.h> + +// System include(s). +#include <memory> + +/// Helper macro +#define RETURN_CHECK( CONTEXT, EXP ) \ + do { \ + const xAOD::TReturnCode result = EXP; \ + if( ! result.isSuccess() ) { \ + ::Error( CONTEXT, XAOD_MESSAGE( "Failed to execute: %s" ), \ + #EXP ); \ + return 1; \ + } \ + } while( false ) + +/// Another little helper macro +#define SIMPLE_ASSERT( EXP ) \ + do { \ + if( ! ( EXP ) ) { \ + ::Error( APP_NAME, XAOD_MESSAGE( "Error evaluating: %s" ), #EXP ); \ + return 1; \ + } \ + } while( 0 ) + +int main() { + + // Set the name of the application. + const char* APP_NAME = "ut_xaodrootaccess_athenaMode_test"; + + // Set up the environment. + RETURN_CHECK( APP_NAME, xAOD::Init() ); + + // Open the input file. + std::unique_ptr< TFile > ifile( TFile::Open( "$ASG_TEST_FILE_DATA", + "READ" ) ); + if( ! ifile ) { + ::Error( APP_NAME, XAOD_MESSAGE( "File %s couldn't be opened..." ), + gSystem->Getenv( "ASG_TEST_FILE_DATA" ) ); + return 1; + } + xAOD::TEvent event( xAOD::TEvent::kAthenaAccess ); + RETURN_CHECK( APP_NAME, event.readFrom( ifile.get() ) ); + + // Loop over the file. + const Long64_t entries = event.getEntries(); + for( Long64_t entry = 0; entry < entries; ++entry ) { + + // Load the event. + if( event.getEntry( entry ) < 0 ) { + ::Error( APP_NAME, XAOD_MESSAGE( "There was a problem loading entry " + "%lld from file: %s" ), + entry, gSystem->Getenv( "ASG_TEST_FILE_DATA" ) ); + return 1; + } + + // Load some interface containers. + const SG::AuxVectorBase* vecPtr= nullptr; + RETURN_CHECK( APP_NAME, event.retrieve( vecPtr, "Photons" ) ); + SIMPLE_ASSERT( vecPtr->getAuxIDs().size() != 0 ); + RETURN_CHECK( APP_NAME, event.retrieve( vecPtr, "TauJets" ) ); + SIMPLE_ASSERT( vecPtr->getAuxIDs().size() != 0 ); + + // Load some auxiliary containers directly. + const SG::IConstAuxStore* auxPtr = nullptr; + RETURN_CHECK( APP_NAME, event.retrieve( auxPtr, "ElectronsAux." ) ); + SIMPLE_ASSERT( auxPtr->getAuxIDs().size() != 0 ); + RETURN_CHECK( APP_NAME, event.retrieve( auxPtr, "MuonsAux." ) ); + SIMPLE_ASSERT( auxPtr->getAuxIDs().size() != 0 ); + } + + // Return gracefully. + return 0; +} diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_metadata_test.cxx b/Control/xAODRootAccess/test/ut_xaodrootaccess_metadata_test.cxx index da8f770b8bad6b64560c05d3f6271b7e3cc53f5b..ac0cba72b74d7dd12e517efc4fdbe61fc04ecbb7 100644 --- a/Control/xAODRootAccess/test/ut_xaodrootaccess_metadata_test.cxx +++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_metadata_test.cxx @@ -1,9 +1,7 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -// $Id: ut_xaodrootaccess_metadata_test.cxx 796448 2017-02-09 18:28:08Z ssnyder $ - // System include(s): #include <memory> @@ -14,6 +12,7 @@ #include <TTree.h> // EDM that the package uses anyway: +#include "AthContainers/AuxElement.h" #include "AthContainers/AuxVectorBase.h" #include "AthContainers/AuxTypeRegistry.h" #include "xAODCore/AuxContainerBase.h" @@ -64,13 +63,7 @@ int main() { xAOD::TEvent event; // First, test the reading of metadata from an input file. - const char* ref = getenv ("ATLAS_REFERENCE_DATA"); - std::string FPATH = - ref ? ref : "/afs/cern.ch/atlas/project/PAT"; - std::string FNAME = FPATH + "/xAODs/r5597/" - "data12_8TeV.00204158.physics_JetTauEtmiss.recon.AOD.r5597/" - "AOD.01495682._003054.pool.root.1"; - + const std::string FNAME = "${ASG_TEST_FILE_DATA}"; std::unique_ptr< ::TFile > ifile( ::TFile::Open( FNAME.c_str(), "READ" ) ); if( ! ifile.get() ) { @@ -81,6 +74,10 @@ int main() { RETURN_CHECK( APP_NAME, event.readFrom( ifile.get() ) ); Info( APP_NAME, "Opened file: %s", FNAME.c_str() ); + // Make sure that event data is not accessible at this point. + const SG::AuxElement* ei = nullptr; + SIMPLE_ASSERT( event.retrieve( ei, "EventInfo" ).isSuccess() == false ); + // Try to retrieve some objects: const SG::AuxVectorBase* v = 0; const xAOD::AuxContainerBase* c = 0; diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_proxydict_test.cxx b/Control/xAODRootAccess/test/ut_xaodrootaccess_proxydict_test.cxx new file mode 100644 index 0000000000000000000000000000000000000000..2dcef4f2c2f78eecc7cc3a8e494a18f3107ee118 --- /dev/null +++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_proxydict_test.cxx @@ -0,0 +1,101 @@ +/* + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +*/ + +// Local include(s). +#include "xAODRootAccess/Init.h" +#include "xAODRootAccess/TEvent.h" +#include "xAODRootAccess/tools/Message.h" + +// EDM include(s). +#include "AthContainersInterfaces/IConstAuxStore.h" +#include "AthContainers/AuxTypeRegistry.h" +#include "SGTools/DataProxy.h" + +// ROOT include(s). +#include <TFile.h> +#include <TSystem.h> +#include <TError.h> + +// System include(s). +#include <memory> + +/// Helper macro +#define RETURN_CHECK( CONTEXT, EXP ) \ + do { \ + const xAOD::TReturnCode result = EXP; \ + if( ! result.isSuccess() ) { \ + ::Error( CONTEXT, XAOD_MESSAGE( "Failed to execute: %s" ), \ + #EXP ); \ + return 1; \ + } \ + } while( false ) + +/// Another little helper macro +#define SIMPLE_ASSERT( EXP ) \ + do { \ + if( ! ( EXP ) ) { \ + ::Error( APP_NAME, XAOD_MESSAGE( "Error evaluating: %s" ), #EXP ); \ + return 1; \ + } \ + } while( 0 ) + +int main() { + + // Set the name of the application. + const char* APP_NAME = "ut_xaodrootaccess_proxydict_test"; + + // Set up the environment. + RETURN_CHECK( APP_NAME, xAOD::Init() ); + + // Open the input file. + std::unique_ptr< TFile > ifile( TFile::Open( "$ASG_TEST_FILE_DATA", + "READ" ) ); + if( ! ifile ) { + ::Error( APP_NAME, XAOD_MESSAGE( "File %s couldn't be opened..." ), + gSystem->Getenv( "ASG_TEST_FILE_DATA" ) ); + return 1; + } + xAOD::TEvent event; + RETURN_CHECK( APP_NAME, event.readFrom( ifile.get() ) ); + + // Access the IProxyDict interface of the event object. + IProxyDict& pdict = event; + + // The auxiliary variable to access later on. Tried to select something + // that should be a dynamic variable in any type of input file. + static const SG::auxid_t auxid = + SG::AuxTypeRegistry::instance().getAuxID< float >( "ptcone20" ); + // The clid for the auxiliary stores. + static const CLID auxClid = ClassID_traits< SG::IConstAuxStore >::ID(); + + // Loop over the file. + const Long64_t entries = event.getEntries(); + for( Long64_t entry = 0; entry < entries; ++entry ) { + + // Load the event. + if( event.getEntry( entry ) < 0 ) { + ::Error( APP_NAME, XAOD_MESSAGE( "There was a problem loading entry " + "%lld from file: %s" ), + entry, gSystem->Getenv( "ASG_TEST_FILE_DATA" ) ); + return 1; + } + + // Read some auxiliary stores through the IProxyDict interface. + SG::DataProxy* proxy = pdict.proxy( auxClid, "ElectronsAux." ); + SIMPLE_ASSERT( proxy != nullptr ); + const SG::IConstAuxStore* auxPtr = + SG::DataProxy_cast< SG::IConstAuxStore >( proxy ); + SIMPLE_ASSERT( auxPtr != nullptr ); + SIMPLE_ASSERT( auxPtr->getAuxIDs().count( auxid ) == 1 ); + + proxy = pdict.proxy( auxClid, "MuonsAux." ); + SIMPLE_ASSERT( proxy != nullptr ); + auxPtr = SG::DataProxy_cast< SG::IConstAuxStore >( proxy ); + SIMPLE_ASSERT( auxPtr != nullptr ); + SIMPLE_ASSERT( auxPtr->getAuxIDs().count( auxid ) == 1 ); + } + + // Return gracefully. + return 0; +} diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_remap_test.cxx b/Control/xAODRootAccess/test/ut_xaodrootaccess_remap_test.cxx index b79bd627837f458df8eeada8175ab2f4e7a1ffef..23d2dac5c3d75ef1857e0884cd94194d28539fa4 100644 --- a/Control/xAODRootAccess/test/ut_xaodrootaccess_remap_test.cxx +++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_remap_test.cxx @@ -1,9 +1,7 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -// $Id: ut_xaodrootaccess_remap_test.cxx 796448 2017-02-09 18:28:08Z ssnyder $ - // System include(s): #include <memory> @@ -35,24 +33,18 @@ int main() { xAOD::TEvent event; // Declare some name remappings: - RETURN_CHECK( APP_NAME, event.addNameRemap( "ElectronCollection", - "Electrons" ) ); - RETURN_CHECK( APP_NAME, event.addNameRemap( "TauJetCollection", "Taus" ) ); + RETURN_CHECK( APP_NAME, event.addNameRemap( "Muons", + "MyMuons" ) ); + RETURN_CHECK( APP_NAME, event.addNameRemap( "Taus", "MyTaus" ) ); // Print the definitions: event.printNameRemap(); // Connect the TEvent object to an input file: - const char* ref = getenv ("ATLAS_REFERENCE_DATA"); - std::string FPATH = - ref ? ref : "/afs/cern.ch/atlas/project/PAT"; - std::string INFILE = FPATH + "/xAODs/r5787/" - "mc14_13TeV.110401.PowhegPythia_P2012_ttbar_nonallhad.merge.AOD." - "e2928_s1982_s2008_r5787_r5853_tid01597980_00/" - "AOD.01597980._000098.pool.root.1"; - std::unique_ptr< ::TFile > ifile( ::TFile::Open( INFILE.c_str(), "READ" ) ); + static const char* FNAME = "${ASG_TEST_FILE_DATA}"; + std::unique_ptr< ::TFile > ifile( ::TFile::Open( FNAME, "READ" ) ); if( ! ifile.get() ) { - ::Error( APP_NAME, XAOD_MESSAGE( "Couldn't open file %s" ), INFILE.c_str() ); + ::Error( APP_NAME, XAOD_MESSAGE( "Couldn't open file %s" ), FNAME ); return 1; } RETURN_CHECK( APP_NAME, event.readFrom( ifile.get() ) ); @@ -60,14 +52,14 @@ int main() { // Load the first event: if( event.getEntry( 0 ) < 0 ) { ::Error( APP_NAME, XAOD_MESSAGE( "Couldn't load event 0 from file %s" ), - INFILE.c_str() ); + FNAME ); return 1; } // Retrieve a DataVector using an alias, and the actual name: const SG::AuxVectorBase* vec = 0; - RETURN_CHECK( APP_NAME, event.retrieve( vec, "Electrons" ) ); - RETURN_CHECK( APP_NAME, event.retrieve( vec, "ElectronCollection" ) ); + RETURN_CHECK( APP_NAME, event.retrieve( vec, "Muons" ) ); + RETURN_CHECK( APP_NAME, event.retrieve( vec, "MyMuons" ) ); // Create a dummy, temporary file to test the object copying: TUUID uuid; @@ -83,7 +75,7 @@ int main() { RETURN_CHECK( APP_NAME, event.writeTo( ofile.get() ) ); // Copy the electrons to the output: - RETURN_CHECK( APP_NAME, event.copy( "Electrons" ) ); + RETURN_CHECK( APP_NAME, event.copy( "MyMuons" ) ); // Write the event: if( event.fill() < 0 ) { @@ -114,10 +106,10 @@ int main() { } // Retrieve a DataVector using the actual name this time: - RETURN_CHECK( APP_NAME, event.retrieve( vec, "Electrons" ) ); + RETURN_CHECK( APP_NAME, event.retrieve( vec, "MyMuons" ) ); // And this should fail: - if( event.retrieve( vec, "ElectronCollection" ).isSuccess() ) { + if( event.retrieve( vec, "Muons" ).isSuccess() ) { ::Error( APP_NAME, XAOD_MESSAGE( "Failure is retrieval logic" ) ); return 1; } diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_slimming_test.cxx b/Control/xAODRootAccess/test/ut_xaodrootaccess_slimming_test.cxx index 58381565f62a6975f76fc1c3a0bae49dd18f9d2b..952163160f9349f138954f1d6a2f382d6bd9d2f1 100644 --- a/Control/xAODRootAccess/test/ut_xaodrootaccess_slimming_test.cxx +++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_slimming_test.cxx @@ -1,11 +1,7 @@ -// Dear emacs, this is -*- c++ -*- - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -// $Id: ut_xaodrootaccess_slimming_test.cxx 796448 2017-02-09 18:28:08Z ssnyder $ - // System include(s): #include <memory> #include <set> @@ -47,21 +43,15 @@ int main() { xAOD::TEvent event1( xAOD::TEvent::kBranchAccess ); // Set up slimming rules for some containers: - event1.setAuxItemList( "ElectronCollectionAux.", "eta.phi.pt.m" ); + event1.setAuxItemList( "ElectronsAux.", "eta.phi.pt.m" ); event1.setAuxItemList( "MuonsAux.", "eta.phi" ); // Connect an input file to the event: - const char* ref = getenv ("ATLAS_REFERENCE_DATA"); - std::string FPATH = - ref ? ref : "/afs/cern.ch/atlas/project/PAT"; - std::string FNAME = FPATH + "/xAODs/r5787/" - "mc14_13TeV.110401.PowhegPythia_P2012_ttbar_nonallhad.merge.AOD." - "e2928_s1982_s2008_r5787_r5853_tid01597980_00/" - "AOD.01597980._000098.pool.root.1"; - std::unique_ptr< ::TFile > ifile( ::TFile::Open( FNAME.c_str(), "READ" ) ); + static const char* FNAME = "${ASG_TEST_FILE_DATA}"; + std::unique_ptr< ::TFile > ifile( ::TFile::Open( FNAME, "READ" ) ); if( ! ifile.get() ) { ::Error( APP_NAME, XAOD_MESSAGE( "File %s couldn't be opened..." ), - FNAME.c_str() ); + FNAME ); return 1; } RETURN_CHECK( APP_NAME, event1.readFrom( ifile.get() ) ); @@ -79,12 +69,12 @@ int main() { // Read in the first event: if( event1.getEntry( 0 ) < 0 ) { ::Error( APP_NAME, XAOD_MESSAGE( "Couldn't load entry 0 from file %s" ), - FNAME.c_str() ); + FNAME ); return 1; } // Copy over the containers: - RETURN_CHECK( APP_NAME, event1.copy( "ElectronCollection" ) ); + RETURN_CHECK( APP_NAME, event1.copy( "Electrons" ) ); RETURN_CHECK( APP_NAME, event1.copy( "Muons" ) ); // Write out this first event: @@ -110,10 +100,10 @@ int main() { return 1; } ::TObjArray* branches = tree->GetListOfBranches(); - const std::set< std::string > expectedBranches1{ - "ElectronCollection", "ElectronCollectionAuxDyn.pt", - "ElectronCollectionAuxDyn.eta", "ElectronCollectionAuxDyn.phi", - "ElectronCollectionAuxDyn.m", + static const std::set< std::string > expectedBranches1{ + "Electrons", "ElectronsAuxDyn.pt", + "ElectronsAuxDyn.eta", "ElectronsAuxDyn.phi", + "ElectronsAuxDyn.m", "Muons", "MuonsAuxDyn.eta", "MuonsAuxDyn.phi" }; if( static_cast< size_t >( branches->GetEntries() ) != expectedBranches1.size() ) { diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_stats_test.cxx b/Control/xAODRootAccess/test/ut_xaodrootaccess_stats_test.cxx index 60c30638a79148091978d2adffb7a76e9fbacb8e..8b2bd29e758459daf4b97bde0901c14dffc022ab 100644 --- a/Control/xAODRootAccess/test/ut_xaodrootaccess_stats_test.cxx +++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_stats_test.cxx @@ -1,9 +1,7 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -// $Id: ut_xaodrootaccess_stats_test.cxx 796448 2017-02-09 18:28:08Z ssnyder $ - // System include(s): #include <memory> @@ -37,15 +35,10 @@ int main() { xAOD::TEvent event( xAOD::TEvent::kClassAccess ); // Connect an input file to the event: - const char* ref = getenv ("ATLAS_REFERENCE_DATA"); - std::string FPATH = - ref ? ref : "/afs/cern.ch/atlas/project/PAT"; - std::string FNAME = FPATH + "/xAODs/r5597/" - "data12_8TeV.00204158.physics_JetTauEtmiss.recon.AOD.r5597/" - "AOD.01495682._003054.pool.root.1"; - std::auto_ptr< ::TFile > ifile( ::TFile::Open( FNAME.c_str(), "READ" ) ); + static const char* FNAME = "${ASG_TEST_FILE_DATA}"; + std::unique_ptr< ::TFile > ifile( ::TFile::Open( FNAME, "READ" ) ); if( ! ifile.get() ) { - ::Error( APP_NAME, "File %s couldn't be opened...", FNAME.c_str() ); + ::Error( APP_NAME, "File %s couldn't be opened...", FNAME ); return 1; } RETURN_CHECK( APP_NAME, event.readFrom( ifile.get() ) ); diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_tauxstore_test.cxx b/Control/xAODRootAccess/test/ut_xaodrootaccess_tauxstore_test.cxx index bb831d2fe9fbeec7a805afa1e03323c5599c0fe9..412ab0fe1b665692a715cb2528bfbcb16af71e5b 100644 --- a/Control/xAODRootAccess/test/ut_xaodrootaccess_tauxstore_test.cxx +++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_tauxstore_test.cxx @@ -1,9 +1,7 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -// $Id: ut_xaodrootaccess_tauxstore_test.cxx 697574 2015-09-30 11:58:22Z krasznaa $ - // System include(s): #include <memory> @@ -19,8 +17,6 @@ #include "xAODRootAccess/TAuxStore.h" #include "xAODRootAccess/tools/ReturnCheck.h" -#include "CxxUtils/StrFormat.h" - /// Helper macro for evaluating logical tests #define SIMPLE_ASSERT( EXP ) \ do { \ @@ -75,15 +71,11 @@ int main() { // Check that it found the two variables that it needed to: ::Info( APP_NAME, "Auxiliary variables found on the input:" ); - std::vector<std::string> vars; - for( SG::auxid_t auxid : store.getAuxIDs() ) { - vars.push_back (CxxUtils::strformat (" - name: %s, type: %s", - reg.getName( auxid ).c_str(), - reg.getTypeName( auxid ).c_str() )); - } - std::sort (vars.begin(), vars.end()); - for (const std::string& s : vars) { - ::Info( APP_NAME, "%s", s.c_str()); + for( auto auxid : store.getAuxIDs() ) { + ::Info( APP_NAME, " - id: %i, name: %s, type: %s", + static_cast< int >( auxid ), + reg.getName( auxid ).c_str(), + reg.getTypeName( auxid ).c_str() ); } SIMPLE_ASSERT( store.getAuxIDs().size() == 2 ); @@ -94,26 +86,27 @@ int main() { // Make sure that the store now knows about this variable: SIMPLE_ASSERT( store.getAuxIDs().size() == 3 ); + // Test the isDecoration(...) function. const SG::auxid_t var1Id = reg.findAuxID( "var1" ); SIMPLE_ASSERT( var1Id != SG::null_auxid ); const SG::auxid_t var2Id = reg.findAuxID( "var2" ); SIMPLE_ASSERT( var2Id != SG::null_auxid ); - assert (!store.isDecoration (var1Id)); - assert (!store.isDecoration (var2Id)); - assert ( store.isDecoration (decId)); + SIMPLE_ASSERT( ! store.isDecoration( var1Id ) ); + SIMPLE_ASSERT( ! store.isDecoration( var2Id ) ); + SIMPLE_ASSERT( store.isDecoration( decId ) ); // Check that it can be cleared out: SIMPLE_ASSERT (store.clearDecorations() == true); SIMPLE_ASSERT( store.getAuxIDs().size() == 2 ); SIMPLE_ASSERT (store.clearDecorations() == false); SIMPLE_ASSERT( store.getAuxIDs().size() == 2 ); - - assert (!store.isDecoration (var1Id)); - assert (!store.isDecoration (var2Id)); - assert (!store.isDecoration (decId)); + SIMPLE_ASSERT( ! store.isDecoration( var1Id ) ); + SIMPLE_ASSERT( ! store.isDecoration( var2Id ) ); + SIMPLE_ASSERT( ! store.isDecoration( decId ) ); // Try to overwrite an existing variable with a decoration, to check that // it can't be done: + SIMPLE_ASSERT( var1Id != SG::null_auxid ); bool exceptionThrown = false; try { store.getDecoration( var1Id, 2, 2 ); @@ -136,13 +129,13 @@ int main() { // Create the decoration again: SIMPLE_ASSERT( store.getDecoration( decId, 5, 5 ) != 0 ); SIMPLE_ASSERT( store.getAuxIDs().size() == 3 ); - - assert (!store.isDecoration (var1Id)); - assert (!store.isDecoration (var2Id)); - assert ( store.isDecoration (decId)); + SIMPLE_ASSERT( ! store.isDecoration( var1Id ) ); + SIMPLE_ASSERT( ! store.isDecoration( var2Id ) ); + SIMPLE_ASSERT( store.isDecoration( decId ) ); // Try to overwrite an existing variable with a decoration, to check that // it can't be done: + SIMPLE_ASSERT( var2Id != SG::null_auxid ); exceptionThrown = false; try { store.getDecoration( var1Id, 2, 2 ); @@ -171,10 +164,9 @@ int main() { // removed. Since this is a "persistent decoration" now: SIMPLE_ASSERT (store.clearDecorations() == false); SIMPLE_ASSERT( store.getAuxIDs().size() == 3 ); - - assert (!store.isDecoration (var1Id)); - assert (!store.isDecoration (var2Id)); - assert ( store.isDecoration (decId)); + SIMPLE_ASSERT( ! store.isDecoration( var1Id ) ); + SIMPLE_ASSERT( ! store.isDecoration( var2Id ) ); + SIMPLE_ASSERT( store.isDecoration( decId ) ); return 0; } diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_tchain_test.cxx b/Control/xAODRootAccess/test/ut_xaodrootaccess_tchain_test.cxx index 68f8813a4107ceb3caeff493f00e731ad5bac248..e223d3e7c027f969e3022adff5fb65b35892d363 100644 --- a/Control/xAODRootAccess/test/ut_xaodrootaccess_tchain_test.cxx +++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_tchain_test.cxx @@ -1,11 +1,7 @@ -// Dear emacs, this is -*- c++ -*- - /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -// $Id: ut_xaodrootaccess_tchain_test.cxx 796448 2017-02-09 18:28:08Z ssnyder $ - // ROOT include(s): #include <TChain.h> #include <TError.h> @@ -23,20 +19,20 @@ /// Type used in the event/store test class ClassA { - + public: int m_var1; float m_var2; - + }; // class ClassA /// Type used in the event/store test class ClassB : public ClassA { - + public: int m_var3; float m_var4; - + }; // class ClassB /// Helper function, "processing" a TChain @@ -46,23 +42,23 @@ int main() { // Get the name of the application: const char* APP_NAME = "ut_xaodrootaccess_tchain_test"; - + // Initialise the environment: RETURN_CHECK( APP_NAME, xAOD::Init( APP_NAME ) ); - + // Create the tested object(s): xAOD::TEvent event( xAOD::TEvent::kClassAccess ); xAOD::TStore store; - const char* ref = getenv ("ATLAS_REFERENCE_DATA"); - std::string FPATH = - ref ? ref : "/afs/cern.ch/atlas/project/PAT"; - std::string FNAME1 = FPATH + "/xAODs/r5591/" - "mc14_8TeV.117050.PowhegPythia_P2011C_ttbar.recon." - "AOD.e1727_s1933_s1911_r5591/AOD.01494881._105458.pool.root.1"; - std::string FNAME2 = FPATH + "/xAODs/r5591/" - "mc14_8TeV.117050.PowhegPythia_P2011C_ttbar.recon." - "AOD.e1727_s1933_s1911_r5591/AOD.01494881._107292.pool.root.1"; + const char* ref = getenv( "ATLAS_REFERENCE_DATA" ); + const std::string FPATH = + ref ? ref : "/afs/cern.ch/atlas/project/PAT"; + const std::string FNAME1 = FPATH + "/xAODs/r5591/" + "mc14_8TeV.117050.PowhegPythia_P2011C_ttbar.recon." + "AOD.e1727_s1933_s1911_r5591/AOD.01494881._105458.pool.root.1"; + const std::string FNAME2 = FPATH + "/xAODs/r5591/" + "mc14_8TeV.117050.PowhegPythia_P2011C_ttbar.recon." + "AOD.e1727_s1933_s1911_r5591/AOD.01494881._107292.pool.root.1"; // Set up a TChain with some mc14_8TeV input files: ::TChain chain1( "CollectionTree" ); @@ -78,14 +74,14 @@ int main() { // Set up a TChain with some mc14_8TeV input files: ::TChain chain2( "CollectionTree" ); - std::string FNAME3 = FPATH + "/xAODs/r5787/" - "mc14_13TeV.110401.PowhegPythia_P2012_ttbar_nonallhad.merge." - "AOD.e2928_s1982_s2008_r5787_r5853_tid01597980_00/" - "AOD.01597980._000098.pool.root.1"; - std::string FNAME4 = FPATH + "/xAODs/r5787/" - "mc14_13TeV.110401.PowhegPythia_P2012_ttbar_nonallhad.merge." - "AOD.e2928_s1982_s2008_r5787_r5853_tid01597980_00/" - "AOD.01597980._000420.pool.root.1"; + const std::string FNAME3 = FPATH + "/xAODs/r5787/" + "mc14_13TeV.110401.PowhegPythia_P2012_ttbar_nonallhad.merge." + "AOD.e2928_s1982_s2008_r5787_r5853_tid01597980_00/" + "AOD.01597980._000098.pool.root.1"; + const std::string FNAME4 = FPATH + "/xAODs/r5787/" + "mc14_13TeV.110401.PowhegPythia_P2012_ttbar_nonallhad.merge." + "AOD.e2928_s1982_s2008_r5787_r5853_tid01597980_00/" + "AOD.01597980._000420.pool.root.1"; chain2.Add( FNAME3.c_str() ); chain2.Add( FNAME4.c_str() ); diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_tevent_copy_test.cxx b/Control/xAODRootAccess/test/ut_xaodrootaccess_tevent_copy_test.cxx index afeb14e8bd98b35a310c5caf0bde9ec9184f01aa..ee5569624eb9ecb0999f7d45cdfbdae7d8c9acac 100644 --- a/Control/xAODRootAccess/test/ut_xaodrootaccess_tevent_copy_test.cxx +++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_tevent_copy_test.cxx @@ -2,8 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -// $Id: ut_xaodrootaccess_tevent_copy_test.cxx 743157 2016-04-27 10:16:50Z krasznaa $ - // System include(s): #include <memory> @@ -11,6 +9,7 @@ #include <TFile.h> #include <TError.h> #include <TString.h> +#include <TSystem.h> // Local include(s): #include "xAODRootAccess/Init.h" @@ -18,7 +17,7 @@ #include "xAODRootAccess/tools/ReturnCheck.h" /// Helper macro -#define CHECK( CONTEXT, EXP ) \ +#define CHECK( CONTEXT, EXP ) \ do { \ const xAOD::TReturnCode result = EXP; \ if( ! result.isSuccess() ) { \ @@ -71,15 +70,16 @@ xAOD::TReturnCode copyObjects( xAOD::TEvent::EAuxMode mode ) { xAOD::TEvent event( mode ); // Connect it to the test input file: - std::unique_ptr< TFile > ifile( TFile::Open( ASG_TEST_FILE_DATA, "READ" ) ); - if( ! ifile.get() ) { + std::unique_ptr< TFile > ifile( TFile::Open( "$ASG_TEST_FILE_DATA", + "READ" ) ); + if( ! ifile ) { Error( "copyObjects", XAOD_MESSAGE( "Couldn't open input file: %s" ), - ASG_TEST_FILE_DATA ); + gSystem->Getenv( "ASG_TEST_FILE_DATA" ) ); return xAOD::TReturnCode::kFailure; } RETURN_CHECK( "copyObjects", event.readFrom( ifile.get() ) ); Info( "copyObjects", "Opened input file %s in mode %s", - ASG_TEST_FILE_DATA, modeName.Data() ); + gSystem->Getenv( "ASG_TEST_FILE_DATA" ), modeName.Data() ); // Connect it to an output file: std::unique_ptr< TFile > ofile( TFile::Open( "dummy_output.root", @@ -104,9 +104,9 @@ xAOD::TReturnCode copyObjects( xAOD::TEvent::EAuxMode mode ) { } // Copy a standalone object: - RETURN_CHECK( "copyObjects", event.copy( "EventInfo" ) ); + RETURN_CHECK( "copyObjects", event.copy( "Kt4EMTopoOriginEventShape" ) ); // Copy a container: - RETURN_CHECK( "copyObjects", event.copy( "Electrons" ) ); + RETURN_CHECK( "copyObjects", event.copy( "Muons" ) ); // Write the event to the output file: if( event.fill() <= 0 ) { diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_tevent_test.cxx b/Control/xAODRootAccess/test/ut_xaodrootaccess_tevent_test.cxx index c0e95eb56fb619f5d3c0af0897a2b5bc1424aca2..d5f2d7cd688e65f35a13368fd5a51bc1d6afe9bb 100644 --- a/Control/xAODRootAccess/test/ut_xaodrootaccess_tevent_test.cxx +++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_tevent_test.cxx @@ -1,11 +1,7 @@ -// Dear emacs, this is -*- c++ -*- - /* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -// $Id: ut_xaodrootaccess_tevent_test.cxx 796448 2017-02-09 18:28:08Z ssnyder $ - // System include(s): #include <memory> #include <vector> @@ -76,24 +72,18 @@ int main() { const char* APP_NAME = "ut_xaodrootaccess_tevent_test"; // Initialise the environment: - RETURN_CHECK( APP_NAME, xAOD::Init( APP_NAME ) ); + RETURN_CHECK( APP_NAME, xAOD::Init() ); // Create the tested object(s): - xAOD::TEvent event( xAOD::TEvent::kClassAccess ); + xAOD::TEvent event; xAOD::TStore store; // Connect an input file to the event: - const char* ref = getenv ("ATLAS_REFERENCE_DATA"); - std::string FPATH = - ref ? ref : "/afs/cern.ch/atlas/project/PAT"; - std::string FNAME = FPATH + - "/xAODs/r5597/" - "data12_8TeV.00204158.physics_JetTauEtmiss.recon.AOD.r5597/" - "AOD.01495682._003054.pool.root.1"; - std::auto_ptr< ::TFile > ifile( ::TFile::Open( FNAME.c_str(), "READ" ) ); - if( ! ifile.get() ) { + std::unique_ptr< ::TFile > ifile( ::TFile::Open( "$ASG_TEST_FILE_DATA", + "READ" ) ); + if( ! ifile ) { ::Error( APP_NAME, XAOD_MESSAGE( "File %s couldn't be opened..." ), - FNAME.c_str() ); + gSystem->Getenv( "ASG_TEST_FILE_DATA" ) ); return 1; } RETURN_CHECK( APP_NAME, event.readFrom( ifile.get() ) ); @@ -101,13 +91,13 @@ int main() { // Read in the first event: if( event.getEntry( 0 ) < 0 ) { ::Error( APP_NAME, XAOD_MESSAGE( "Couldn't load entry 0 from file %s" ), - FNAME.c_str() ); + gSystem->Getenv( "ASG_TEST_FILE_DATA" ) ); return 1; } // Try to retrieve some objects: const xAOD::AuxContainerBase* c = 0; - RETURN_CHECK( APP_NAME, event.retrieve( c, "ElectronCollectionAux." ) ); + RETURN_CHECK( APP_NAME, event.retrieve( c, "ElectronsAux." ) ); RETURN_CHECK( APP_NAME, event.retrieve( c, "MuonsAux." ) ); // Check if the second one was assigned the correct type of internal store: diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_tpyevent_test.py b/Control/xAODRootAccess/test/ut_xaodrootaccess_tpyevent_test.py index 74297fe4ed1a2b02fb83055296868dc03b830081..ff4e880ff601f09c5d3e678dc40fceb6f1dc210b 100755 --- a/Control/xAODRootAccess/test/ut_xaodrootaccess_tpyevent_test.py +++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_tpyevent_test.py @@ -1,14 +1,10 @@ #!/usr/bin/env python - -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration # -# $Id: ut_xaodrootaccess_tpyevent_test.py 796448 2017-02-09 18:28:08Z ssnyder $ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # # Unit test for the xAOD::TPyEvent class. # -import os - ## C/C++ style main function def main(): @@ -26,12 +22,7 @@ def main(): # Set up the environment: import ROOT - if (os.environ.has_key('ROOTCOREDIR') and - ROOT.gROOT.Macro( "$ROOTCOREDIR/scripts/load_packages.C" )): - logger.error( "Couldn't load the RootCore packages" ) - return 1 - ROOT.xAOD.TEvent - if ROOT.xAOD.Init( APP_NAME ).isFailure(): + if not ROOT.xAOD.Init( APP_NAME ).isSuccess(): logger.error( "Failed to call xAOD::Init(...)" ) return 1 @@ -42,19 +33,20 @@ def main(): store = TPyStore() # Create a transient tree from a test file: - FPATH = os.environ.get ('ATLAS_REFERENCE_DATA', - '/afs/cern.ch/atlas/project/PAT') - FNAME = FPATH + "/xAODs/r5591/" \ - "mc14_8TeV.117050.PowhegPythia_P2011C_ttbar.recon." \ - "AOD.e1727_s1933_s1911_r5591/AOD.01494881._105458.pool.root.1" - ifile = ROOT.TFile.Open( FNAME, "READ" ) + import os + ifile = ROOT.TFile.Open( "$ASG_TEST_FILE_MC", "READ" ) if not ifile: - logger.error( "Couldn't open input file: %s" % FNAME ) + logger.error( "Couldn't open input file: %s" % + os.environ.get( "ASG_TEST_FILE_MC", + "!ASG_TEST_FILE_MC!" ) ) return 1 tree = ROOT.xAOD.MakeTransientTree( ifile ) if not tree: - logger.error( "Failed to make transient tree from file: %s" % FNAME ) + logger.error( "Failed to make transient tree from file: %s" % + os.environ.get( "ASG_TEST_FILE_MC", + "!ASG_TEST_FILE_MC!" ) ) return 1 + import xAODRootAccess.GenerateDVIterators # Connect the TPyEvent object to an output file: ofile = ROOT.TFile.Open( "test.root", "RECREATE" ) @@ -76,71 +68,70 @@ def main(): # Clear the store: store.clear() - # Copy the EventInfo payload: - if not event.record( tree.EventInfo, - "EventInfo" ).isSuccess(): - logger.error( "Failed to record xAOD::EventInfo from the " + # Copy the Kt4EMTopoOriginEventShape payload: + if not event.record( tree.Kt4EMTopoOriginEventShape, + "Kt4EMTopoOriginEventShape" ).isSuccess(): + logger.error( "Failed to record xAOD::EventShape from the " "input file" ) return 1 - if not event.record( tree.EventInfo.getConstStore(), - "EventInfoAux." ).isSuccess(): - logger.error( "Failed to record xAOD::EventAuxInfo from the " + if not event.record( tree.Kt4EMTopoOriginEventShape.getConstStore(), + "Kt4EMTopoOriginEventShapeAux." ).isSuccess(): + logger.error( "Faiedl to record xAOD::EventShapeAuxInfo from the " "input file" ) return 1 - # Check that the electrons can be accessed: - logger.info( " Number of electrons: %i" % - tree.ElectronCollection.size() ) + # Check that the muons can be accessed: + logger.info( " Number of muons: %i" % + tree.Muons.size() ) - # Copy the electrons into the output: - if not event.record( tree.ElectronCollection, - "AllElectrons" ).isSuccess(): - logger.error( "Failed to record xAOD::ElectronContainer from the " + # Copy the muons into the output: + if not event.record( tree.Muons, + "AllMuons" ).isSuccess(): + logger.error( "Failed to record xAOD::MuonContainer from the " "input file" ) return 1 - if not event.record( tree.ElectronCollection.getConstStore(), - "AllElectronsAux." ).isSuccess(): - logger.error( "Failed to record xAOD::ElectronAuxContainer from " + if not event.record( tree.Muons.getConstStore(), + "AllMuonsAux." ).isSuccess(): + logger.error( "Failed to record xAOD::MuonAuxContainer from " "the input file" ) return 1 - # Create a container of just the central electrons: - cElectrons = ROOT.xAOD.ElectronContainer_v1() + # Create a container of just the central muons: + cMuons = ROOT.xAOD.MuonContainer() # And record the container into the output right away. (In order to get # a proper auxiliary container for it.) - cElectrons.setNonConstStore( event.recordAux( "CentralElectronsAux." ) ) - if not event.record( cElectrons, - "CentralElectrons" ).isSuccess(): - logger.error( "Failed to record central electrons into the output" ) + cMuons.setNonConstStore( event.recordAux( "CentralMuonsAux." ) ) + if not event.record( cMuons, + "CentralMuons" ).isSuccess(): + logger.error( "Failed to record central muons into the output" ) return 1 - # Now put all central electrons into this container, with just a few + # Now put all central muons into this container, with just a few # properties. Since deep copying doesn't work this easily... :-( - for i in xrange( tree.ElectronCollection.size() ): - el = tree.ElectronCollection.at( i ) - if abs( el.eta() ) < 1.0: - newEl = ROOT.xAOD.Electron_v1() - cElectrons.push_back( newEl ) - newEl.setP4( el.pt(), el.eta(), el.phi(), el.m() ) + for mu in tree.Muons: + if abs( mu.eta() ) < 1.0: + newMu = ROOT.xAOD.Muon() + cMuons.push_back( newMu ) + newMu.setP4( mu.pt(), mu.eta(), mu.phi() ) pass pass - # Print how many central electrons got selected: - logger.info( " Number of central electrons: %i" % - cElectrons.size() ) + # Print how many central muons got selected: + logger.info( " Number of central muons: %i" % + cMuons.size() ) # Put an object into the transient store: - trElectrons = ROOT.xAOD.ElectronContainer_v1() - if not store.record( trElectrons, "TransientElectrons" ).isSuccess(): - logger.error( "Failed to record transient electrons into the " + trMuons = ROOT.xAOD.MuonContainer() + if not store.record( trMuons, "TransientMuons" ).isSuccess(): + logger.error( "Failed to record transient muons into the " "transient store" ) return 1 # Check that it is now available through TPyEvent: - if not event.contains( "TransientElectrons", - ROOT.xAOD.ElectronContainer_v1 ): - logger.error( "Transient electrons not visible through TPyEvent" ) + if not event.contains( "TransientMuons", + ROOT.xAOD.MuonContainer ): + logger.error( "Transient muons not visible through TPyEvent" ) return 1 # Record the event: diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_tpystore_test.py b/Control/xAODRootAccess/test/ut_xaodrootaccess_tpystore_test.py index 7ab397b6fa0f98ae6c03ffcb5b537c1230b82046..95e606a3c5687afbbe01cc7da20096d0f724b29e 100755 --- a/Control/xAODRootAccess/test/ut_xaodrootaccess_tpystore_test.py +++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_tpystore_test.py @@ -1,17 +1,10 @@ #!/usr/bin/env python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # -# $Id: ut_xaodrootaccess_tpystore_test.py 796448 2017-02-09 18:28:08Z ssnyder $ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # # Unit test for the TPyStore class. # -import os -import ROOT -import cppyy -ROOT.xAOD.ElectronAuxContainer_v1 - ## C/C++ style main function def main(): @@ -29,12 +22,7 @@ def main(): # Set up the environment: import ROOT - if (os.environ.has_key('ROOTCOREDIR') and - ROOT.gROOT.Macro( "$ROOTCOREDIR/scripts/load_packages.C" )): - logger.error( "Couldn't load the RootCore packages" ) - return 1 - ROOT.xAOD.TEvent - if ROOT.xAOD.Init( APP_NAME ).isFailure(): + if not ROOT.xAOD.Init( APP_NAME ).isSuccess(): logger.error( "Failed to call xAOD::Init(...)" ) return 1 @@ -53,6 +41,7 @@ def main(): "AuxInfoBase" ).isSuccess(): logger.error( "Couldn't record xAOD::AuxInfoBase object" ) return 1 + logger.info( "Objects recorded into the store" ) # Now check if the store know about them propertly: if not store.contains( "AuxContainerBase", @@ -76,9 +65,9 @@ def main(): "SG::IAuxStoreIO" ) return 1 if store.contains( "AuxContainerBase", - ROOT.xAOD.ElectronAuxContainer_v1 ): + ROOT.xAOD.AuxInfoBase ): logger.error( "AuxContainerBase available as " - "xAOD::ElectronAuxContainer_v1?!?" ) + "xAOD::AuxInfoBase?!?" ) return 1 logger.info( "AuxContainerBase/AuxInfoBase containment tests " "succeeded" ) diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_transtree2_test.py b/Control/xAODRootAccess/test/ut_xaodrootaccess_transtree2_test.py index 207f7541e5b19dc64240ac3acfa425294f8505b0..06257601501ef20e7301fdc5930d3599d4e63a47 100755 --- a/Control/xAODRootAccess/test/ut_xaodrootaccess_transtree2_test.py +++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_transtree2_test.py @@ -1,15 +1,12 @@ #!/usr/bin/env python - -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # -# $Id: ut_xaodrootaccess_transtree2_test.py 796448 2017-02-09 18:28:08Z ssnyder $ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # # Unit test for the transient tree creating infrastructure # # The necessary import(s): import ROOT -import os ## Helper function creating a vector<string> object out of a list of strings def toVectorString( stringList ): @@ -41,25 +38,12 @@ def main(): logger.addHandler( hdlr ) # Set up the environment: - if (os.environ.has_key('ROOTCOREDIR') and - ROOT.gROOT.Macro( "$ROOTCOREDIR/scripts/load_packages.C" )): - logger.error( "Couldn't load the RootCore packages" ) - return 1 - ROOT.xAOD.TEvent - if ROOT.xAOD.Init( APP_NAME ).isFailure(): + if not ROOT.xAOD.Init( APP_NAME ).isSuccess(): logger.error( "Failed to call xAOD::Init(...)" ) return 1 # Set up a TFile as input: - fname = os.environ.get ('ASG_TEST_FILE_DATA', None) - if not fname: - fpath = os.environ.get ('ATLAS_REFERENCE_DATA', - '/afs/cern.ch/atlas/project/PAT') - fname = os.path.join (fpath, - "xAODs/r8601/" - "data15_13TeV.00284285.physics_Main.recon.AOD.r8601/AOD.09617210._008306.pool.root.1") - - ifile = ROOT.TFile.Open( fname, "READ" ) + ifile = ROOT.TFile.Open( "$ASG_TEST_FILE_DATA", "READ" ) if not ifile: logger.error( "Couldn't open the test input file" ) return 1 diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_transtree_test.cxx b/Control/xAODRootAccess/test/ut_xaodrootaccess_transtree_test.cxx index 5772892d46add0774a8eac861c03fdd0d7eccb5a..f7b4e3d8138b29605cc06257e78569977c9e8f4f 100644 --- a/Control/xAODRootAccess/test/ut_xaodrootaccess_transtree_test.cxx +++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_transtree_test.cxx @@ -2,8 +2,6 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -// $Id: ut_xaodrootaccess_transtree_test.cxx 796448 2017-02-09 18:28:08Z ssnyder $ - // System include(s): #include <memory> @@ -14,6 +12,7 @@ #include <TTree.h> #include <TH1.h> #include <TDirectory.h> +#include <TSystem.h> // Local include(s): #include "xAODRootAccess/Init.h" @@ -29,23 +28,12 @@ int main() { // Initialise the environment: RETURN_CHECK( APP_NAME, xAOD::Init( APP_NAME ) ); - // The files used in the test: - const char* ref = getenv ("ATLAS_REFERENCE_DATA"); - std::string FPATH = - ref ? ref : "/afs/cern.ch/atlas/project/PAT"; - std::string FNAME1 = FPATH + "/xAODs/r5787/" - "mc14_13TeV.110401.PowhegPythia_P2012_ttbar_nonallhad.merge.AOD." - "e2928_s1982_s2008_r5787_r5853_tid01597980_00/" - "AOD.01597980._000098.pool.root.1"; - std::string FNAME2 = FPATH + "/xAODs/r5787/" - "mc14_13TeV.110401.PowhegPythia_P2012_ttbar_nonallhad.merge.AOD." - "e2928_s1982_s2008_r5787_r5853_tid01597980_00/" - "AOD.01597980._000420.pool.root.1"; - // Open it using a TFile: - std::unique_ptr< ::TFile > ifile( ::TFile::Open( FNAME1.c_str(), "READ" ) ); + std::unique_ptr< ::TFile > ifile( ::TFile::Open( "$ASG_TEST_FILE_MC", + "READ" ) ); if( ! ifile.get() ) { - ::Error( APP_NAME, XAOD_MESSAGE( "Couldn't open file: %s" ), FNAME1.c_str() ); + ::Error( APP_NAME, XAOD_MESSAGE( "Couldn't open file: %s" ), + gSystem->Getenv( "ASG_TEST_FILE_MC" ) ); return 1; } @@ -54,13 +42,13 @@ int main() { if( ! tree ) { ::Error( APP_NAME, XAOD_MESSAGE( "Couldn't create transient tree from file: %s" ), - FNAME1.c_str() ); + gSystem->Getenv( "ASG_TEST_FILE_MC" ) ); return 1; } // Make a test plot: - tree->Draw( "ElectronCollection.eta()-" - "ElectronCollection.trackParticle().eta()>>dummyHist1" ); + tree->Draw( "Electrons.eta()-" + "Electrons.trackParticle().eta()>>dummyHist1" ); ::TH1* dummyHist = dynamic_cast< ::TH1* >( gDirectory->Get( "dummyHist1" ) ); if( ! dummyHist ) { ::Error( APP_NAME, XAOD_MESSAGE( "Couldn't access \"dummyHist1\"" ) ); @@ -71,29 +59,30 @@ int main() { // Clean up the event tree memory: xAOD::ClearTransientTrees(); - // Set up a chain with this one file: - ::TChain eventChain( "CollectionTree" ); - eventChain.Add( FNAME1.c_str() ); - eventChain.Add( FNAME2.c_str() ); - - // Create a transient tree using it: - tree = xAOD::MakeTransientTree( &eventChain ); - if( ! tree ) { - ::Error( APP_NAME, - XAOD_MESSAGE( "Couldn't create transient tree from TChain " - "input" ) ); - return 1; - } - - // Make a test plot: - tree->Draw( "ElectronCollection.eta()-" - "ElectronCollection.trackParticle().eta()>>dummyHist2" ); - dummyHist = dynamic_cast< ::TH1* >( gDirectory->Get( "dummyHist2" ) ); - if( ! dummyHist ) { - ::Error( APP_NAME, XAOD_MESSAGE( "Couldn't access \"dummyHist2\"" ) ); - return 1; + { + // Set up a chain with this one file: + ::TChain eventChain( "CollectionTree" ); + eventChain.Add( "$ASG_TEST_FILE_MC" ); + + // Create a transient tree using it: + tree = xAOD::MakeTransientTree( &eventChain ); + if( ! tree ) { + ::Error( APP_NAME, + XAOD_MESSAGE( "Couldn't create transient tree from TChain " + "input" ) ); + return 1; + } + + // Make a test plot: + tree->Draw( "Electrons.eta()-" + "Electrons.trackParticle().eta()>>dummyHist2" ); + dummyHist = dynamic_cast< ::TH1* >( gDirectory->Get( "dummyHist2" ) ); + if( ! dummyHist ) { + ::Error( APP_NAME, XAOD_MESSAGE( "Couldn't access \"dummyHist2\"" ) ); + return 1; + } + //dummyHist->Print( "all" ); } - //dummyHist->Print( "all" ); // Clean up the event tree memory: xAOD::ClearTransientTrees(); @@ -104,7 +93,7 @@ int main() { ::Error( APP_NAME, XAOD_MESSAGE( "Couldn't create transient metadata tree from " "file: %s" ), - FNAME1.c_str() ); + gSystem->Getenv( "ASG_TEST_FILE_MC" ) ); return 1; } @@ -117,29 +106,30 @@ int main() { } //dummyHist->Print( "all" ); - // Set up a chain with this one file: - ::TChain metaChain( "MetaData" ); - metaChain.Add( FNAME1.c_str() ); - metaChain.Add( FNAME2.c_str() ); - - // Create a transient tree using it: - tree = xAOD::MakeTransientMetaTree( &metaChain ); - if( ! tree ) { - ::Error( APP_NAME, - XAOD_MESSAGE( "Couldn't create transient metadata tree from " - "TChain input" ) ); - return 1; + { + // Set up a chain with this one file: + ::TChain metaChain( "MetaData" ); + metaChain.Add( "$ASG_TEST_FILE_MC" ); + + // Create a transient tree using it: + tree = xAOD::MakeTransientMetaTree( &metaChain ); + if( ! tree ) { + ::Error( APP_NAME, + XAOD_MESSAGE( "Couldn't create transient metadata tree from " + "TChain input" ) ); + return 1; + } + + // Make a test plot: + tree->Draw( "TriggerMenu.l1psk()>>dummyHist4" ); + dummyHist = dynamic_cast< ::TH1* >( gDirectory->Get( "dummyHist4" ) ); + if( ! dummyHist ) { + ::Error( APP_NAME, XAOD_MESSAGE( "Couldn't access \"dummyHist4\"" ) ); + return 1; + } + //dummyHist->Print( "all" ); } - // Make a test plot: - tree->Draw( "TriggerMenu.l1psk()>>dummyHist4" ); - dummyHist = dynamic_cast< ::TH1* >( gDirectory->Get( "dummyHist4" ) ); - if( ! dummyHist ) { - ::Error( APP_NAME, XAOD_MESSAGE( "Couldn't access \"dummyHist4\"" ) ); - return 1; - } - //dummyHist->Print( "all" ); - // Clean up the metadata tree memory: xAOD::ClearTransientTrees(); @@ -147,8 +137,8 @@ int main() { xAOD::TTransTrees tt = xAOD::MakeTransientTrees( ifile.get() ); // And make some test plots: - tt.eventTree()->Draw( "ElectronCollection.eta()-" - "ElectronCollection.trackParticle().eta()" + tt.eventTree()->Draw( "Electrons.eta()-" + "Electrons.trackParticle().eta()" ">>dummyHist5" ); dummyHist = dynamic_cast< ::TH1* >( gDirectory->Get( "dummyHist5" ) ); if( ! dummyHist ) { diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_tstore_test.cxx b/Control/xAODRootAccess/test/ut_xaodrootaccess_tstore_test.cxx index 01655e2813ad9876bef017ad4d5944e3083f3f16..cb7f6f215cd76359b8adb9208a61d90e5756f5f9 100644 --- a/Control/xAODRootAccess/test/ut_xaodrootaccess_tstore_test.cxx +++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_tstore_test.cxx @@ -1,9 +1,11 @@ // Dear emacs, this is -*- c++ -*- /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ +// $Id: ut_xaodrootaccess_tstore_test.cxx 663791 2015-04-29 13:08:06Z krasznaa $ + // System include(s): #include <memory> @@ -17,11 +19,7 @@ // Local include(s): #include "xAODRootAccess/Init.h" -//#define protected public -//#define private public -# include "xAODRootAccess/TStore.h" -//#undef private -//#undef protected +#include "xAODRootAccess/TStore.h" #include "xAODRootAccess/tools/Message.h" #include "xAODRootAccess/tools/Utils.h" @@ -66,16 +64,19 @@ public: }; // class ClassB +/// Class making some of TStore's internal functions public +class TStoreTester : public xAOD::TStore { -class TStoreTest - : public xAOD::TStore -{ public: - using xAOD::TStore::TStore; + /// Inherit the TStore constructor(s) + using xAOD::TStore::TStore; + + /// Make all implementations of the "contains" function public + using xAOD::TStore::contains; + /// Make all implementations of the "getName" function public + using xAOD::TStore::getName; - using xAOD::TStore::contains; - using xAOD::TStore::getName; -}; +}; // class TStoreTester int main() { @@ -87,7 +88,7 @@ int main() { RETURN_CHECK( APP_NAME, xAOD::Init( APP_NAME ) ); // Create the TStore object that we'll be testing: - TStoreTest store; + TStoreTester store; // Record an EventFormat object: std::unique_ptr< xAOD::AuxContainerBase > c1( new xAOD::AuxContainerBase() ); diff --git a/Control/xAODRootAccess/util/xAODMerge.cxx b/Control/xAODRootAccess/util/xAODMerge.cxx index 6ec2def001fd0e71194bc2032ac1d6c0bf48b9c8..c918b00a5ce619515a0de98d0d52e47a3e0cdc27 100644 --- a/Control/xAODRootAccess/util/xAODMerge.cxx +++ b/Control/xAODRootAccess/util/xAODMerge.cxx @@ -1,8 +1,4 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -/// $Id: xAODMerge.cxx 796983 2017-02-14 05:09:12Z ssnyder $ +/// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration /// /// @brief Executable replacing "hadd" for merging xAOD files in standalone mode /// @@ -13,12 +9,11 @@ /// /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> /// -/// $Revision: 796983 $ -/// $Date: 2017-02-14 06:09:12 +0100 (Tue, 14 Feb 2017) $ // System include(s): #include <cstring> #include <vector> +#include <cstdlib> // ROOT include(s): #include <TError.h> @@ -123,7 +118,7 @@ int main( int argc, char* argv[] ) { } } - if (!outputName) { + if( ! outputName ) { ::Error( APP_NAME, "No output name provided." ); return 1; } diff --git a/Control/xAODRootAccess/xAODRootAccess/Init.h b/Control/xAODRootAccess/xAODRootAccess/Init.h index f00adb35169c53e3f51ab96154c52fb8b2b491cc..9f07d138351f61797d0c9503c633a8e86c0360f8 100644 --- a/Control/xAODRootAccess/xAODRootAccess/Init.h +++ b/Control/xAODRootAccess/xAODRootAccess/Init.h @@ -1,10 +1,7 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: Init.h 687022 2015-08-03 09:48:01Z krasznaa $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_INIT_H #define XAODROOTACCESS_INIT_H @@ -26,9 +23,6 @@ namespace xAOD { /// /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> /// - /// $Revision: 687022 $ - /// $Date: 2015-08-03 11:48:01 +0200 (Mon, 03 Aug 2015) $ - /// /// @param appname Name of the application/script [optional] /// @returns <code>TReturnCode::kSuccess</code> if successful, /// <code>TReturnCode::kFailure</code> if not @@ -46,9 +40,6 @@ namespace xAOD { /// /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> /// - /// $Revision: 687022 $ - /// $Date: 2015-08-03 11:48:01 +0200 (Mon, 03 Aug 2015) $ - /// /// @param appname Name of the application /// @param argc The argc argument from main(...) /// @param argv The argv argument from main(...) diff --git a/Control/xAODRootAccess/xAODRootAccess/MakeTransientTree.h b/Control/xAODRootAccess/xAODRootAccess/MakeTransientTree.h index b24adb8a0768a3792a4510881cd1c292b1fcc42c..82d4500d03f319ccc09cccf09997d30990e40c4b 100644 --- a/Control/xAODRootAccess/xAODRootAccess/MakeTransientTree.h +++ b/Control/xAODRootAccess/xAODRootAccess/MakeTransientTree.h @@ -1,10 +1,7 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: MakeTransientTree.h 741414 2016-04-19 17:06:16Z krasznaa $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_MAKETRANSIENTTREE_H #define XAODROOTACCESS_MAKETRANSIENTTREE_H diff --git a/Control/xAODRootAccess/xAODRootAccess/TActiveStore.h b/Control/xAODRootAccess/xAODRootAccess/TActiveStore.h index a241f494017734e9c0bcf601906f37753b91fd9f..82b61c46e7d3f016abf7a5b72a6c2195f9a191ff 100644 --- a/Control/xAODRootAccess/xAODRootAccess/TActiveStore.h +++ b/Control/xAODRootAccess/xAODRootAccess/TActiveStore.h @@ -1,9 +1,7 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_TACTIVESTORE_H #define XAODROOTACCESS_TACTIVESTORE_H diff --git a/Control/xAODRootAccess/xAODRootAccess/TAuxStore.h b/Control/xAODRootAccess/xAODRootAccess/TAuxStore.h index c5fcead2188cc57e6554802b46f5fcd777c3bade..ef198405d526886a2a33a66d65cd24ef4827b550 100644 --- a/Control/xAODRootAccess/xAODRootAccess/TAuxStore.h +++ b/Control/xAODRootAccess/xAODRootAccess/TAuxStore.h @@ -1,10 +1,7 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TAuxStore.h 793778 2017-01-25 04:06:29Z ssnyder $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_TAUXSTORE_H #define XAODROOTACCESS_TAUXSTORE_H @@ -45,9 +42,6 @@ namespace xAOD { /// /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> /// - /// $Revision: 793778 $ - /// $Date: 2017-01-25 05:06:29 +0100 (Wed, 25 Jan 2017) $ - /// class TAuxStore : public SG::IAuxStore, public SG::IAuxStoreIO { @@ -175,7 +169,8 @@ namespace xAOD { virtual const auxid_set_t& getDynamicAuxIDs() const override; /// Select dynamic auxiliary attributes for writing - virtual void selectAux( const std::set< std::string >& attributes ) override; + virtual void + selectAux( const std::set< std::string >& attributes ) override; /// Get the IDs of the selected aux variables virtual auxid_set_t getSelectedAuxIDs() const override; @@ -183,7 +178,8 @@ namespace xAOD { /// @} private: - /// Function used for setting up the statistics info about the managed branches + /// Function used for setting up the statistics info about the managed + /// branches TReturnCode initStats( ::TTree* tree ); /// Connect a variable to the input tree TReturnCode setupInputData( auxid_t auxid ) const; diff --git a/Control/xAODRootAccess/xAODRootAccess/TEvent.h b/Control/xAODRootAccess/xAODRootAccess/TEvent.h index 406a9b003b73372ad98b0a507e4dfe409f6ab470..aecf5186928f2ad24435b1441f6144872cdba5bd 100644 --- a/Control/xAODRootAccess/xAODRootAccess/TEvent.h +++ b/Control/xAODRootAccess/xAODRootAccess/TEvent.h @@ -1,15 +1,12 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TEvent.h 796516 2017-02-10 04:45:05Z ssnyder $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_TEVENT_H #define XAODROOTACCESS_TEVENT_H // STL include(s): -#include <map> +#include <unordered_map> #include <set> #include <string> #include <vector> @@ -44,6 +41,9 @@ namespace xAODPrivate { class THolderBucket; class TLoader; } +namespace CP { + class xAODWriterAlg; +} namespace xAOD { @@ -73,9 +73,6 @@ namespace xAOD { /// /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> /// - /// $Revision: 796516 $ - /// $Date: 2017-02-10 05:45:05 +0100 (Fri, 10 Feb 2017) $ - /// class TEvent : public TVirtualEvent, public IProxyDict { @@ -87,6 +84,7 @@ namespace xAOD { friend class xAOD::TTreeMgr; friend class xAODPrivate::THolderBucket; friend class xAODPrivate::TLoader; + friend class CP::xAODWriterAlg; public: /// Auxiliary store "mode" @@ -346,9 +344,6 @@ namespace xAOD { const std::type_info& ti, ::Bool_t silent = kFALSE, ::Bool_t metadata = kFALSE ); - - public: - // Make this public for calling from python. /// Internal function for recording an object into the output TReturnCode record( void* obj, const std::string& typeName, const std::string& key, @@ -356,8 +351,6 @@ namespace xAOD { ::Bool_t overwrite = kFALSE, ::Bool_t metadata = kFALSE, ::Bool_t isOwner = kTRUE ); - - protected: /// Internal function for adding an auxiliary store object to the output TReturnCode record( TAuxStore* store, const std::string& key, ::Int_t basketSize, ::Int_t splitLevel, @@ -400,8 +393,8 @@ namespace xAOD { ::Bool_t metadata = kFALSE ) const; /// Definition of the internal data structure type - typedef std::map< std::string, - TVirtualManager* > Object_t; + typedef std::unordered_map< std::string, + TVirtualManager* > Object_t; /// Definition of the structure type holding on to listeners typedef std::vector< TVirtualIncidentListener* > Listener_t; @@ -450,13 +443,13 @@ namespace xAOD { EventFormat* m_outputEventFormat; /// Rules for selecting which auxiliary branches to write - std::map< std::string, std::set< std::string > > m_auxItemList; + std::unordered_map< std::string, std::set< std::string > > m_auxItemList; /// Listeners who should be notified when certain incidents happen Listener_t m_listeners; /// Container name re-mapping rules - std::map< std::string, std::string > m_nameRemapping; + std::unordered_map< std::string, std::string > m_nameRemapping; /// @name Variable(s) used in the IProxyDict implementation /// @{ @@ -490,9 +483,7 @@ namespace xAOD { } // namespace xAOD -// Include the template implementation(s): -#ifndef __GCCXML__ -# include "TEvent.icc" -#endif // __GCCXML__ +// Include the template implementation(s). +#include "TEvent.icc" #endif // XAODROOTACCESS_TEVENT_H diff --git a/Control/xAODRootAccess/xAODRootAccess/TEvent.icc b/Control/xAODRootAccess/xAODRootAccess/TEvent.icc index 768cf70a299d05e0b25d32ea3d2e4925ba84e1b6..6c58657855da68e0225a1c8b97c0bc44b213621e 100644 --- a/Control/xAODRootAccess/xAODRootAccess/TEvent.icc +++ b/Control/xAODRootAccess/xAODRootAccess/TEvent.icc @@ -1,10 +1,7 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TEvent.icc 663791 2015-04-29 13:08:06Z krasznaa $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_TEVENT_ICC #define XAODROOTACCESS_TEVENT_ICC @@ -12,7 +9,7 @@ #include <TError.h> // EDM include(s): -#include "AthContainers/ClassName.h" +#include "AthContainers/normalizedTypeinfoName.h" namespace xAOD { @@ -66,7 +63,8 @@ namespace xAOD { if( ! result ) { ::Warning( "xAOD::TEvent::retrieve", "Couldn't (const) retrieve \"%s/%s\"", - ClassName< T >::name().c_str(), key.c_str() ); + SG::normalizedTypeinfoName( typeid( T ) ).c_str(), + key.c_str() ); return TReturnCode::kRecoverable; } } else { @@ -102,7 +100,8 @@ namespace xAOD { if( ! result ) { ::Warning( "xAOD::TEvent::retrieve", "Couldn't (non-const) retrieve \"%s/%s\"", - ClassName< T >::name().c_str(), key.c_str() ); + SG::normalizedTypeinfoName( typeid( T ) ).c_str(), + key.c_str() ); return TReturnCode::kRecoverable; } @@ -127,7 +126,8 @@ namespace xAOD { ::Int_t basketSize, ::Int_t splitLevel ) { // Just call the non-templated implementation: - return record( obj, ClassName< T >::name(), key, basketSize, splitLevel ); + return record( obj, SG::normalizedTypeinfoName( typeid( T ) ), key, + basketSize, splitLevel ); } /// This function is used to add an object to the output. As the interface @@ -148,8 +148,9 @@ namespace xAOD { ::Int_t basketSize, ::Int_t splitLevel ) { // Just call the non-templated implementation: - const TReturnCode rc = record( obj.get(), ClassName< T >::name(), key, - basketSize, splitLevel ); + const TReturnCode rc = + record( obj.get(), SG::normalizedTypeinfoName( typeid( T ) ), key, + basketSize, splitLevel ); if( ! rc.isSuccess() ) { return rc; } @@ -207,7 +208,8 @@ namespace xAOD { if( ! result ) { ::Warning( "xAOD::TEvent::retrieveMetaInput", "Couldn't (const) retrieve \"%s/%s\"", - ClassName< T >::name().c_str(), key.c_str() ); + SG::normalizedTypeinfoName( typeid( T ) ).c_str(), + key.c_str() ); return TReturnCode::kRecoverable; } @@ -233,7 +235,8 @@ namespace xAOD { if( ! result ) { ::Warning( "xAOD::TEvent::retrieveMetaOutput", "Couldn't (const) retrieve \"%s/%s\"", - ClassName< T >::name().c_str(), key.c_str() ); + SG::normalizedTypeinfoName( typeid( T ) ).c_str(), + key.c_str() ); return TReturnCode::kRecoverable; } @@ -258,7 +261,8 @@ namespace xAOD { if( ! result ) { ::Warning( "xAOD::TEvent::retrieveMetaOutput", "Couldn't (non-const) retrieve \"%s/%s\"", - ClassName< T >::name().c_str(), key.c_str() ); + SG::normalizedTypeinfoName( typeid( T ) ).c_str(), + key.c_str() ); return TReturnCode::kRecoverable; } @@ -283,8 +287,8 @@ namespace xAOD { ::Int_t basketSize, ::Int_t splitLevel ) { // Just call the non-templated implementation: - return record( obj, ClassName< T >::name(), key, basketSize, splitLevel, - kFALSE, kTRUE ); + return record( obj, SG::normalizedTypeinfoName( typeid( T ) ), key, + basketSize, splitLevel, kFALSE, kTRUE ); } /// This function can be used to add a metadata object to the output. As the @@ -305,8 +309,9 @@ namespace xAOD { ::Int_t basketSize, ::Int_t splitLevel ) { // Just call the non-templated implementation: - const TReturnCode rc = record( obj.get(), ClassName< T >::name(), key, - basketSize, splitLevel, kFALSE, kTRUE ); + const TReturnCode rc = + record( obj.get(), SG::normalizedTypeinfoName( typeid( T ) ), key, + basketSize, splitLevel, kFALSE, kTRUE ); if( ! rc.isSuccess() ) { return rc; } diff --git a/Control/xAODRootAccess/xAODRootAccess/TPyEvent.h b/Control/xAODRootAccess/xAODRootAccess/TPyEvent.h index 85100cc706bd976a380bdeb3f581ec527259c38e..4afc407e0e8334a136a6a8d871f639d914d16a59 100644 --- a/Control/xAODRootAccess/xAODRootAccess/TPyEvent.h +++ b/Control/xAODRootAccess/xAODRootAccess/TPyEvent.h @@ -1,10 +1,7 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TPyEvent.h 649835 2015-02-26 08:19:01Z krasznaa $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_TPYEVENT_H #define XAODROOTACCESS_TPYEVENT_H @@ -29,9 +26,6 @@ namespace xAOD { /// /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> /// - /// $Revision: 649835 $ - /// $Date: 2015-02-26 09:19:01 +0100 (Thu, 26 Feb 2015) $ - /// class TPyEvent : public TEvent { public: @@ -45,7 +39,7 @@ namespace xAOD { const std::string& type ) const; /// Add an output object to the event - TReturnCode record( int dum, void* obj, const std::string& key, + TReturnCode record( int dummy, void* obj, const std::string& key, const std::string& type, ::Int_t basketSize = 32000, ::Int_t splitLevel = 0 ); diff --git a/Control/xAODRootAccess/xAODRootAccess/TPyStore.h b/Control/xAODRootAccess/xAODRootAccess/TPyStore.h index 8db84b5a40d244356d1dca7ef6b5e2d120c1d5f0..b439318750246faf4fc101c498a0818459ff3cf2 100644 --- a/Control/xAODRootAccess/xAODRootAccess/TPyStore.h +++ b/Control/xAODRootAccess/xAODRootAccess/TPyStore.h @@ -1,10 +1,7 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TPyStore.h 659468 2015-04-08 14:31:56Z krasznaa $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_TPYSTORE_H #define XAODROOTACCESS_TPYSTORE_H @@ -30,9 +27,6 @@ namespace xAOD { /// /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> /// - /// $Revision: 659468 $ - /// $Date: 2015-04-08 16:31:56 +0200 (Wed, 08 Apr 2015) $ - /// class TPyStore : public TStore { public: diff --git a/Control/xAODRootAccess/xAODRootAccess/TStore.h b/Control/xAODRootAccess/xAODRootAccess/TStore.h index 1d362be0cf809fe0eb99b7dd82b4b388027ab1cd..ce47b0d5e0fb2a5cd2125e0e650cd12b140c5203 100644 --- a/Control/xAODRootAccess/xAODRootAccess/TStore.h +++ b/Control/xAODRootAccess/xAODRootAccess/TStore.h @@ -1,10 +1,7 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TStore.h 663791 2015-04-29 13:08:06Z krasznaa $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_TSTORE_H #define XAODROOTACCESS_TSTORE_H @@ -17,9 +14,7 @@ #include <Rtypes.h> // EDM include(s): -#ifndef __CINT__ -# include "AthContainers/ConstDataVector.h" -#endif // __CINT__ +#include "AthContainers/ConstDataVector.h" // Local include(s): #include "xAODRootAccess/tools/TReturnCode.h" @@ -44,9 +39,6 @@ namespace xAOD { /// /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> /// - /// $Revision: 663791 $ - /// $Date: 2015-04-29 15:08:06 +0200 (Wed, 29 Apr 2015) $ - /// class TStore { /// Make TEvent a friend of this class @@ -118,12 +110,10 @@ namespace xAOD { /// Function recording an object that has no dictionary TReturnCode record( void* obj, const std::string& key, const std::type_info& ti ); -#if !defined(__GCCXML__) and !defined(__CINT__) /// Function doing the first step of recording a ConstDataVector object template< class T > TReturnCode record( ConstDataVector< T >* obj, const std::string& key, const std::type_info& ti ); -#endif // not __GCCXML__ or __CINT__ /// Function doing the second step of recording a ConstDataVector object TReturnCode record( THolder* hldr, const std::string& key ); @@ -155,9 +145,7 @@ namespace xAOD { } // namespace xAOD -// Include the template implementation: -#if !defined(__GCCXML__) and !defined(__CINT__) -# include "TStore.icc" -#endif // not __GCCXML__ or __CINT__ +// Include the template implementation. +#include "TStore.icc" #endif // XAODROOTACCESS_TSTORE_H diff --git a/Control/xAODRootAccess/xAODRootAccess/TStore.icc b/Control/xAODRootAccess/xAODRootAccess/TStore.icc index 04bf3a7b2d51f638c4749bdd9a9e2141d60759e2..1efce12e3c0e5377a84a5d18933bdb3b138196ad 100644 --- a/Control/xAODRootAccess/xAODRootAccess/TStore.icc +++ b/Control/xAODRootAccess/xAODRootAccess/TStore.icc @@ -1,10 +1,7 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TStore.icc 663791 2015-04-29 13:08:06Z krasznaa $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_TSTORE_ICC #define XAODROOTACCESS_TSTORE_ICC @@ -12,7 +9,6 @@ #include <TError.h> // EDM include(s): -#include "AthContainers/ClassName.h" #include "AthContainers/normalizedTypeinfoName.h" // Local include(s): @@ -75,7 +71,8 @@ namespace xAOD { TReturnCode TStore::record( T* obj, const std::string& key ) { // Check if it's possible to record the object with a dictionary: - TReturnCode result = record( obj, key, ClassName< T >::name() ); + TReturnCode result = record( obj, key, + SG::normalizedTypeinfoName( typeid( T ) ) ); // If it's a success or a failure, let's stop here. Only go on for a // recoverable error: if( ! result.isRecoverable() ) { @@ -97,7 +94,8 @@ namespace xAOD { const std::string& key ) { // Check if it's possible to record the object with a dictionary: - TReturnCode result = record( obj.get(), key, ClassName< T >::name() ); + TReturnCode result = record( obj.get(), key, + SG::normalizedTypeinfoName( typeid( T ) ) ); // If it's a success or a failure, let's stop here. Only go on for a // recoverable error: if( ! result.isRecoverable() ) { diff --git a/Control/xAODRootAccess/xAODRootAccess/TTreeMgr.h b/Control/xAODRootAccess/xAODRootAccess/TTreeMgr.h index 7e6b7fe9ae87facc5616f7c6a41747344fe4b5a6..f46fc7f1cf56294b0b9247f9c60296fd1298744a 100644 --- a/Control/xAODRootAccess/xAODRootAccess/TTreeMgr.h +++ b/Control/xAODRootAccess/xAODRootAccess/TTreeMgr.h @@ -1,10 +1,7 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TTreeMgr.h 746122 2016-05-11 10:11:31Z krasznaa $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_TTREEMGR_H #define XAODROOTACCESS_TTREEMGR_H @@ -34,9 +31,6 @@ namespace xAOD { /// /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> /// - /// $Revision: 746122 $ - /// $Date: 2016-05-11 12:11:31 +0200 (Wed, 11 May 2016) $ - /// class TTreeMgr { public: diff --git a/Control/xAODRootAccess/xAODRootAccess/TVirtualIncidentListener.h b/Control/xAODRootAccess/xAODRootAccess/TVirtualIncidentListener.h index 07ad54a231aeb394ac29ae0377e51055f464707c..1638f2a4f04ba9c27c1abca4015274c6fbded859 100644 --- a/Control/xAODRootAccess/xAODRootAccess/TVirtualIncidentListener.h +++ b/Control/xAODRootAccess/xAODRootAccess/TVirtualIncidentListener.h @@ -1,10 +1,7 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TVirtualIncidentListener.h 611948 2014-08-15 08:48:40Z krasznaa $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_TVIRTUALINCIDENTLISTENER_H #define XAODROOTACCESS_TVIRTUALINCIDENTLISTENER_H @@ -25,9 +22,6 @@ namespace xAOD { /// /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> /// - /// $Revision: 611948 $ - /// $Date: 2014-08-15 10:48:40 +0200 (Fri, 15 Aug 2014) $ - /// class TVirtualIncidentListener { public: diff --git a/Control/xAODRootAccess/xAODRootAccess/selection.xml b/Control/xAODRootAccess/xAODRootAccess/selection.xml index 23e2f988547d2e169010571ff908c316cbe579a1..99fb9c6ae1e53132ac82171aeb414e752d2344a1 100644 --- a/Control/xAODRootAccess/xAODRootAccess/selection.xml +++ b/Control/xAODRootAccess/xAODRootAccess/selection.xml @@ -1,4 +1,4 @@ -<!-- $Id: selection.xml 796516 2017-02-10 04:45:05Z ssnyder $ --> +<!-- Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration --> <lcgdict> <!-- The TEvent class: --> @@ -49,12 +49,4 @@ <!-- The TActiveStore helper class: --> <class name="xAOD::TActiveStore" /> - <function name="xAOD::MakeTransientTree"/> - - <!-- Suppress the unwanted classes found by ROOT 6. --> - <!-- Hopefully we can remove these extra lines at one point... --> - <exclusion> - <class name="SG::IConstAuxStore" /> - <class name="DataLink<SG::IConstAuxStore>" /> - </exclusion> </lcgdict> diff --git a/Control/xAODRootAccess/xAODRootAccess/tools/IProxyDict.h b/Control/xAODRootAccess/xAODRootAccess/tools/IProxyDict.h index e1e5310f9e876f3b9774425c94ffd681ca5ba6cf..5047e08d3ceeabd0b2241ca69f3003b161f2c201 100644 --- a/Control/xAODRootAccess/xAODRootAccess/tools/IProxyDict.h +++ b/Control/xAODRootAccess/xAODRootAccess/tools/IProxyDict.h @@ -1,10 +1,7 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: IProxyDict.h 791122 2016-12-27 13:55:49Z ssnyder $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_TOOLS_IPROXYDICT_H #define XAODROOTACCESS_TOOLS_IPROXYDICT_H @@ -44,9 +41,6 @@ struct InterfaceID {}; /// /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> /// -/// $Revision: 791122 $ -/// $Date: 2016-12-27 14:55:49 +0100 (Tue, 27 Dec 2016) $ -/// class IProxyDict { public: @@ -110,7 +104,7 @@ public: #else -// If we're in an offline build, just take the declaration from SGTools: +// If we're in an offline build, just take the declaration from AthenaKernel. #include "AthenaKernel/IProxyDict.h" #endif // XAOD_STANDALONE diff --git a/Control/xAODRootAccess/xAODRootAccess/tools/TAuxVector.h b/Control/xAODRootAccess/xAODRootAccess/tools/TAuxVector.h index c79d905d2e92a988d9c11c48d44ffd3c33112db8..2a3c1790b5d038fbec9334433e839546168dfa51 100644 --- a/Control/xAODRootAccess/xAODRootAccess/tools/TAuxVector.h +++ b/Control/xAODRootAccess/xAODRootAccess/tools/TAuxVector.h @@ -1,10 +1,7 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TAuxVector.h 793778 2017-01-25 04:06:29Z ssnyder $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_TOOLS_TAUXVECTOR_H #define XAODROOTACCESS_TOOLS_TAUXVECTOR_H @@ -32,9 +29,6 @@ namespace xAOD { /// @author Scott Snyder <Scott.Snyder@cern.ch> /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> /// - /// $Revision: 793778 $ - /// $Date: 2017-01-25 05:06:29 +0100 (Wed, 25 Jan 2017) $ - /// class TAuxVector : public SG::IAuxTypeVector { public: @@ -53,7 +47,7 @@ namespace xAOD { /// @{ /// Copy the managed vector - virtual std::unique_ptr<SG::IAuxTypeVector> clone() const override; + virtual std::unique_ptr< SG::IAuxTypeVector > clone() const override; /// Return a pointer to the start of the vector's data virtual void* toPtr() override; diff --git a/Control/xAODRootAccess/xAODRootAccess/tools/TAuxVectorFactory.h b/Control/xAODRootAccess/xAODRootAccess/tools/TAuxVectorFactory.h index ca1f52e43a8b1ae9e4c8db46f4666b075c17cd89..a1ee72ddb05f5fbdc0fd8de68f499077bfc4f092 100644 --- a/Control/xAODRootAccess/xAODRootAccess/tools/TAuxVectorFactory.h +++ b/Control/xAODRootAccess/xAODRootAccess/tools/TAuxVectorFactory.h @@ -1,10 +1,7 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TAuxVectorFactory.h 793319 2017-01-21 16:21:46Z ssnyder $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_TOOLS_TAUXVECTORFACTORY_H #define XAODROOTACCESS_TOOLS_TAUXVECTORFACTORY_H @@ -31,9 +28,6 @@ namespace xAOD { /// @author Scott Snyder <Scott.Snyder@cern.ch> /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> /// - /// $Revision: 793319 $ - /// $Date: 2017-01-21 17:21:46 +0100 (Sat, 21 Jan 2017) $ - /// class TAuxVectorFactory : public SG::IAuxTypeVectorFactory { public: @@ -46,35 +40,38 @@ namespace xAOD { /// @{ /// Create a new vector in memory with the requested size and capacity - virtual - std::unique_ptr<SG::IAuxTypeVector> create( size_t size, size_t capacity ) const; + virtual std::unique_ptr< SG::IAuxTypeVector > + create( size_t size, size_t capacity ) const override; - std::unique_ptr<SG::IAuxTypeVector> - createFromData( void* /*data*/, bool /*isPacked*/, bool ) const; + /// Create a vector object of this type from a data blob + virtual std::unique_ptr< SG::IAuxTypeVector > + createFromData( void* data, bool isPacked, + bool ownFlag ) const override; /// Copy one element from one location to another - virtual void copy( void* dst, size_t dst_index, - const void* src, size_t src_index ) const; + virtual void copy( void* dst, size_t dst_index, + const void* src, size_t src_index ) const override; /// Copy one element from one location to another - virtual void copyForOutput( void* dst, size_t dst_index, - const void* src, size_t src_index ) const; + virtual void + copyForOutput( void* dst, size_t dst_index, + const void* src, size_t src_index ) const override; /// Swap the payload of two elements in memory virtual void swap( void* a, size_t aindex, - void* b, size_t bindex ) const; + void* b, size_t bindex ) const override; /// Clear the payload of a given range inside a vector - virtual void clear( void* dst, size_t dst_index ) const; + virtual void clear( void* dst, size_t dst_index ) const override; /// Size of the elements inside the vector type - virtual size_t getEltSize() const; + virtual size_t getEltSize() const override; /// Type info of the vector type handled by the factory object - virtual const std::type_info* tiVec() const; + virtual const std::type_info* tiVec() const override; /// Type of the factory - virtual bool isDynamic() const { return true; } + virtual bool isDynamic() const override { return true; } /// @} diff --git a/Control/xAODRootAccess/xAODRootAccess/tools/TDestructorRegistry.h b/Control/xAODRootAccess/xAODRootAccess/tools/TDestructorRegistry.h index 6aa402802b1c78e3db9a3bf214295ed3b3dca2d6..0f9781b96e01b5082bb8c5cd34324fbed22aa410 100644 --- a/Control/xAODRootAccess/xAODRootAccess/tools/TDestructorRegistry.h +++ b/Control/xAODRootAccess/xAODRootAccess/tools/TDestructorRegistry.h @@ -1,16 +1,14 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TDestructorRegistry.h 599851 2014-06-02 12:32:51Z krasznaa $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_TOOLS_TDESTRUCTORREGISTRY_H #define XAODROOTACCESS_TOOLS_TDESTRUCTORREGISTRY_H // System include(s): #include <map> #include <shared_mutex> +#include <memory> // Forward declaration(s): namespace std { @@ -30,9 +28,6 @@ namespace xAOD { /// /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> /// - /// $Revision: 599851 $ - /// $Date: 2014-06-02 14:32:51 +0200 (Mon, 02 Jun 2014) $ - /// class TDestructorRegistry { public: @@ -51,23 +46,17 @@ namespace xAOD { /// Hide the copy-constructor TDestructorRegistry( const TDestructorRegistry& ) = delete; - /// Type used internally to clean up memory at the end of the process - class TDestructorHolder { - public: - /// Constructor with a new TVirtualDestructor pointer - TDestructorHolder( TVirtualDestructor* d = 0 ); - /// Destructor - ~TDestructorHolder(); - - /// The managed object - TVirtualDestructor* m_destructor; - }; - /// Type of the internal map - typedef std::map< const std::type_info*, TDestructorHolder > Map_t; + typedef std::map< const std::type_info*, + std::unique_ptr< TVirtualDestructor > > Map_t; /// Internal map of known destructor objects Map_t m_types; /// Mutex for the destructor map + /// + /// This type is used because the registry is filled mostly at the very + /// beginning of a job, and is just read from there on. For the reading + /// the clients don't need exclusive locks on the store. + /// mutable std::shared_timed_mutex m_mutex; }; // class TDestructorRegistry diff --git a/Control/xAODRootAccess/xAODRootAccess/tools/TDestructorRegistry.icc b/Control/xAODRootAccess/xAODRootAccess/tools/TDestructorRegistry.icc index 16c461bd9a182b3b673a434790c32456983a4831..c45fbef9e46b039d89d13878152ac030a7097173 100644 --- a/Control/xAODRootAccess/xAODRootAccess/tools/TDestructorRegistry.icc +++ b/Control/xAODRootAccess/xAODRootAccess/tools/TDestructorRegistry.icc @@ -1,10 +1,7 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TDestructorRegistry.icc 599851 2014-06-02 12:32:51Z krasznaa $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_TOOLS_TDESTRUCTORREGISTRY_ICC #define XAODROOTACCESS_TOOLS_TDESTRUCTORREGISTRY_ICC @@ -39,10 +36,8 @@ namespace xAOD { // Get a "write lock": std::unique_lock< std::shared_timed_mutex > lock( m_mutex ); - // Create a new destructor object: - TVirtualDestructor* d = new TDestructor< T >(); - // ...and remember it: - m_types[ &ti ].m_destructor = d; + // Create a new destructor object. + m_types[ &ti ] = std::make_unique< TDestructor< T > >(); return; } diff --git a/Control/xAODRootAccess/xAODRootAccess/tools/TFileAccessTracer.h b/Control/xAODRootAccess/xAODRootAccess/tools/TFileAccessTracer.h index 4faae0b05f829d58359a858fdeead7e0755e6296..c446860d535120c736d37599e0b78f2bf0a99c7b 100644 --- a/Control/xAODRootAccess/xAODRootAccess/tools/TFileAccessTracer.h +++ b/Control/xAODRootAccess/xAODRootAccess/tools/TFileAccessTracer.h @@ -1,9 +1,7 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_TOOLS_TFILEACCESSTRACER_H #define XAODROOTACCESS_TOOLS_TFILEACCESSTRACER_H @@ -97,9 +95,6 @@ namespace xAOD { /// Object describing the job's xAOD access statistics ReadStats* m_readStats; - /// Global property for enabling data submission or not - static ::Bool_t m_enableDataSumbission; - /// Mutex for modifying the object mutable std::mutex m_mutex; diff --git a/Control/xAODRootAccess/xAODRootAccess/tools/THolder.h b/Control/xAODRootAccess/xAODRootAccess/tools/THolder.h index 9f8a1667b6a9c9f220da2af27ac3ca91d93777b1..dec3c8e0e8a85f62ddf16882b7c46eb02f62144f 100644 --- a/Control/xAODRootAccess/xAODRootAccess/tools/THolder.h +++ b/Control/xAODRootAccess/xAODRootAccess/tools/THolder.h @@ -1,10 +1,7 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: THolder.h 725531 2016-02-22 16:14:25Z krasznaa $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_TOOLS_THOLDER_H #define XAODROOTACCESS_TOOLS_THOLDER_H @@ -35,9 +32,6 @@ namespace xAOD { /// /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> /// - /// $Revision: 725531 $ - /// $Date: 2016-02-22 17:14:25 +0100 (Mon, 22 Feb 2016) $ - /// class THolder { public: @@ -88,20 +82,17 @@ namespace xAOD { /// Renew the object in memory void renew(); - /// Cache whether the type is a DataVector or an AuxElement. - /// Allows removing repeated calls to TClass::InheritsFrom() - /// in TEvent::setAuxStore(). + /// Type of the object held by this one. enum TypeKind { - OTHER, - DATAVECTOR, - AUXELEMENT - }; - TypeKind typeKind() const { return m_typeKind; } + OTHER, ///< Some non-specified type + DATAVECTOR, ///< A DataVector container + AUXELEMENT ///< A type inheriting from @c SG::AuxElement + }; // enum TypeKind - - private: - static TypeKind setTypeKind (const TClass* type); - TypeKind m_typeKind; + /// Return the type of the object held by this one. + TypeKind typeKind() const { + return m_typeKind; + } protected: /// Internal function used to delete the managed object from memory @@ -115,6 +106,8 @@ namespace xAOD { const std::type_info* m_typeInfo; /// A flag for whether the object owns what it points to ::Bool_t m_owner; + /// Type of the object held + TypeKind m_typeKind; }; // class THolder diff --git a/Control/xAODRootAccess/xAODRootAccess/tools/TSocket.h b/Control/xAODRootAccess/xAODRootAccess/tools/TSocket.h index cfedaf24f0b921c3bce22b96350daeb931311a8e..ea771fc02dd22d19a5053d172cb1fb6ea8c1d328 100644 --- a/Control/xAODRootAccess/xAODRootAccess/tools/TSocket.h +++ b/Control/xAODRootAccess/xAODRootAccess/tools/TSocket.h @@ -1,10 +1,7 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: TSocket.h 781356 2016-10-31 14:03:28Z krasznaa $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_TOOLS_TSOCKET_H #define XAODROOTACCESS_TOOLS_TSOCKET_H @@ -29,9 +26,6 @@ namespace xAOD { /// /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> /// - /// $Revision: 781356 $ - /// $Date: 2016-10-31 15:03:28 +0100 (Mon, 31 Oct 2016) $ - /// class TSocket { public: @@ -40,9 +34,10 @@ namespace xAOD { /// Destructor ~TSocket(); - // Dtor closes the socket, so don't allow copy/assign. - TSocket (const TSocket&) = delete; - TSocket& operator= (const TSocket&) = delete; + /// Do not allow object copying + TSocket( const TSocket& ) = delete; + /// Do not allow assignment + TSocket& operator=( const TSocket& ) = delete; /// Function connecting to the specified address TReturnCode connect( const TInetAddress& address, int port ); diff --git a/Control/xAODRootAccess/xAODRootAccess/xAODRootAccessDict.h b/Control/xAODRootAccess/xAODRootAccess/xAODRootAccessDict.h index 0406b2756904cc8d0bacec5139c127d63c0d1355..3a1fc3b9436beef564e427992e5ff70f859feabc 100644 --- a/Control/xAODRootAccess/xAODRootAccess/xAODRootAccessDict.h +++ b/Control/xAODRootAccess/xAODRootAccess/xAODRootAccessDict.h @@ -1,15 +1,11 @@ // Dear emacs, this is -*- c++ -*- - -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -// $Id: xAODRootAccessDict.h 796516 2017-02-10 04:45:05Z ssnyder $ +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef XAODROOTACCESS_XAODROOTACCESSDICT_H #define XAODROOTACCESS_XAODROOTACCESSDICT_H // Local includude(s): -#include "xAODRootAccess/MakeTransientTree.h" #include "xAODRootAccess/TEvent.h" #include "xAODRootAccess/TStore.h" #include "xAODRootAccess/TActiveStore.h" diff --git a/Event/EventAthenaPool/CMakeLists.txt b/Event/EventAthenaPool/CMakeLists.txt index e2191c0ac10a975fb4a94c684fd5fa844708cfb4..d27314cb55e0dce7c54ab8aeaee4081d03c67622 100644 --- a/Event/EventAthenaPool/CMakeLists.txt +++ b/Event/EventAthenaPool/CMakeLists.txt @@ -17,7 +17,7 @@ atlas_install_joboptions( share/*.py ) # Set up (a) test(s) for the converter(s): find_package( AthenaPoolUtilitiesTest ) -if( ATHENAPOOLUTILITIESTEST_FOUND ) +if( ATHENAPOOLUTILITIESTEST_FOUND AND NOT GENERATIONBASE ) set( EVENTATHENAPOOL_REFERENCE_TAG EventAthenaPoolReference-01-00-00 ) run_tpcnv_legacy_test( EventTPCnv_15.0.0 AOD-15.0.0-full @@ -28,7 +28,7 @@ if( ATHENAPOOLUTILITIESTEST_FOUND ) REFERENCE_TAG ${EVENTATHENAPOOL_REFERENCE_TAG} ) run_tpcnv_legacy_test( EventTPCnv_20.1.7.2 ESD-20.1.7.2 REFERENCE_TAG ${EVENTATHENAPOOL_REFERENCE_TAG} ) -else() +elseif( NOT ATHENAPOOLUTILITIESTEST_FOUND ) message( WARNING "Couldn't find AthenaPoolUtilitiesTest. No test(s) set up." ) -endif() +endif() diff --git a/Event/EventBookkeeperAthenaPool/CMakeLists.txt b/Event/EventBookkeeperAthenaPool/CMakeLists.txt index d17a120208d34eef24935a8cc15353fbfb6fd3ab..33252f7aac214a6b427bb45e7dde12b8c6fca4db 100644 --- a/Event/EventBookkeeperAthenaPool/CMakeLists.txt +++ b/Event/EventBookkeeperAthenaPool/CMakeLists.txt @@ -19,14 +19,14 @@ atlas_install_joboptions( share/*.py ) # Set up (a) test(s) for the converter(s): find_package( AthenaPoolUtilitiesTest ) -if( ATHENAPOOLUTILITIESTEST_FOUND ) +if( ATHENAPOOLUTILITIESTEST_FOUND AND NOT GENERATIONBASE ) set( EVENTBOOKKEEPERATHENAPOOL_REFERENCE_TAG EventBookkeeperAthenaPoolReference-01-00-00 ) run_tpcnv_legacy_test( EventBookkeeperTPCnv_16.0.0 AOD-16.0.0-full REFERENCE_TAG ${EVENTBOOKKEEPERATHENAPOOL_REFERENCE_TAG} ) run_tpcnv_legacy_test( EventBookkeeperTPCnv_18.0.0 AOD-18.0.0-full REFERENCE_TAG ${EVENTBOOKKEEPERATHENAPOOL_REFERENCE_TAG} ) -else() +elseif( NOT ATHENAPOOLUTILITIESTEST_FOUND ) message( WARNING "Couldn't find AthenaPoolUtilitiesTest. No test(s) set up." ) -endif() +endif() diff --git a/Event/EventBookkeeperTools/CMakeLists.txt b/Event/EventBookkeeperTools/CMakeLists.txt index 5222f72af67b9eeea8fe0aeabc1a3e68c8fa0d46..24abcf768dbfaffdef38a6a1d006fb5f99be7773 100644 --- a/Event/EventBookkeeperTools/CMakeLists.txt +++ b/Event/EventBookkeeperTools/CMakeLists.txt @@ -59,7 +59,9 @@ atlas_add_test( CutflowSvcDummyAlg SCRIPT athena EventBookkeeperTools/TestCutFlowSvcDummyAlg.py PROPERTIES TIMEOUT 300 POST_EXEC_SCRIPT nopost.sh ) -atlas_add_test( CutflowSvcOutput - SCRIPT athena EventBookkeeperTools/TestCutFlowSvcOutput.py - PROPERTIES TIMEOUT 300 - POST_EXEC_SCRIPT nopost.sh ) +if ( NOT GENERATIONBASE ) + atlas_add_test( CutflowSvcOutput + SCRIPT athena EventBookkeeperTools/TestCutFlowSvcOutput.py + PROPERTIES TIMEOUT 300 + POST_EXEC_SCRIPT nopost.sh ) +endif() diff --git a/InnerDetector/InDetValidation/InDetTruthVertexValidation/Root/InDetVertexTruthMatchTool.cxx b/InnerDetector/InDetValidation/InDetTruthVertexValidation/Root/InDetVertexTruthMatchTool.cxx index 2869b9d284c7c817d6fe02566ae09108358082a3..1fce5a1c70b73e1f897c864c75c97620c6f5c631 100644 --- a/InnerDetector/InDetValidation/InDetTruthVertexValidation/Root/InDetVertexTruthMatchTool.cxx +++ b/InnerDetector/InDetValidation/InDetTruthVertexValidation/Root/InDetVertexTruthMatchTool.cxx @@ -11,9 +11,9 @@ using namespace InDetVertexTruthMatchUtils; InDetVertexTruthMatchTool::InDetVertexTruthMatchTool( const std::string & name ) : asg::AsgTool(name) { - declareProperty("trackMatchProb", m_trkMatchProb = 0.7 ); + declareProperty("trackMatchProb", m_trkMatchProb = 0.5 ); declareProperty("vertexMatchWeight", m_vxMatchWeight = 0.7 ); - declareProperty("trackPtCut", m_trkPtCut = 100. ); + declareProperty("trackPtCut", m_trkPtCut = 500. ); } StatusCode InDetVertexTruthMatchTool::initialize() { @@ -261,7 +261,9 @@ StatusCode InDetVertexTruthMatchTool::matchVertices( const xAOD::VertexContainer const ElementLink<xAOD::TruthParticleContainer> & truthPartLink = trk_truthPartAcc( trk ); float prob = trk_truthProbAcc( trk ); - if (truthPartLink.isValid() && prob > m_trkMatchProb) { + if (!truthPartLink.isValid()) continue; + + if (prob > m_trkMatchProb) { const xAOD::TruthParticle & truthPart = **truthPartLink; //check if the truth particle is "good" if ( pass( truthPart) ) { @@ -405,18 +407,8 @@ StatusCode InDetVertexTruthMatchTool::matchVertices( const xAOD::VertexContainer bool InDetVertexTruthMatchTool::pass( const xAOD::TruthParticle & truthPart ) const { //remove the registered secondaries - if ( truthPart.barcode() > 200000 ) return false; - - return true; - -} - -/* -bool InDetVertexTruthMatchTool::pass( const xAOD::TrackParticle & trackPart ) { - - if( trackPart.pt() < m_trkPtCut ) return false; + if( truthPart.pt() < m_trkPtCut ) return false; return true; -} -*/ +} \ No newline at end of file diff --git a/LArCalorimeter/LArMonitoring/python/GlobalVariables.py b/LArCalorimeter/LArMonitoring/python/GlobalVariables.py index ee05359cb10934fe8ecce13521786ff84e30c0fc..7efc51677dc39c81477ad5abddb8876170bbd3a8 100644 --- a/LArCalorimeter/LArMonitoring/python/GlobalVariables.py +++ b/LArCalorimeter/LArMonitoring/python/GlobalVariables.py @@ -50,8 +50,10 @@ phibinsPS=64 phibins=256 lArDQGlobals.HVeta_EMEC = {"EMECAPS":emecbinsA,"EMECA":emecbinsA,"EMECCPS":emecbinsC,"EMECC":emecbinsC} lArDQGlobals.HVphi_EMEC={} -lArDQGlobals.HVphi_EMEC["EMECAPS"]=[-TMath.Pi()+ x*2*TMath.Pi()/phibinsPS for x in range(phibinsPS+1)] -lArDQGlobals.HVphi_EMEC["EMECA"]=[-TMath.Pi()+ x*2*TMath.Pi()/phibins for x in range(phibins+1)] +ps_phirange = range(phibinsPS+1) +lArDQGlobals.HVphi_EMEC["EMECAPS"]=[-TMath.Pi()+ x*2*TMath.Pi()/phibinsPS for x in ps_phirange] +phirange =range(phibins+1) +lArDQGlobals.HVphi_EMEC["EMECA"]=[-TMath.Pi()+ x*2*TMath.Pi()/phibins for x in phirange] lArDQGlobals.HVphi_EMEC["EMECCPS"]=lArDQGlobals.HVphi_EMEC["EMECAPS"] lArDQGlobals.HVphi_EMEC["EMECC"]=lArDQGlobals.HVphi_EMEC["EMECA"] #hec-fcal @@ -103,8 +105,12 @@ lArDQGlobals.N_Cells=200000 #feedthrough+slot ranges lArDQGlobals.Feedthrough_Slot_Nbins={p : (lArDQGlobals.FEB_Feedthrough[p][1]+1)*lArDQGlobals.FEB_Slot[p][1] for p in lArDQGlobals.FEB_Feedthrough } lArDQGlobals.Feedthrough_Slot_range={p : [lArDQGlobals.FEB_Feedthrough[p][0]*lArDQGlobals.FEB_Slot[p][1]+lArDQGlobals.FEB_Slot[p][0]-0.5,lArDQGlobals.FEB_Feedthrough[p][1]*lArDQGlobals.FEB_Slot[p][1]+lArDQGlobals.FEB_Slot[p][1]+0.5] for p in lArDQGlobals.FEB_Feedthrough } -lArDQGlobals.Feedthrough_Slot_labels_Barrel=[str(If) if Is==1 else '' for If in range(32) for Is in range(1,15)] -lArDQGlobals.Feedthrough_Slot_labels_Endcap=[str(If) if Is==1 else '' for If in range(25) for Is in range(1,16)] +range_0_32=range(32) +range_1_15=range(1,15) +lArDQGlobals.Feedthrough_Slot_labels_Barrel=[str(If) if Is==1 else '' for If in range_0_32 for Is in range_1_15] +range_0_25=range(25) +range_1_16=range(1,16) +lArDQGlobals.Feedthrough_Slot_labels_Endcap=[str(If) if Is==1 else '' for If in range_0_25 for Is in range_1_16] #ROD ranges @@ -302,10 +308,12 @@ for Layer in lArDQGlobals.Layers : if Layer=="0": #there's only fcal1, fcal2 and fcal3 continue else: - lArDQGlobals.Cell_Variables["phiRange"][sdet]["A"][Layer]=[-0.5+x for x in xrange(lArDQGlobals.Cell_Variables["phiNbin"][sdet]["A"][Layer]+1)] + phi_range=range(lArDQGlobals.Cell_Variables["phiNbin"][sdet]["A"][Layer]+1) + lArDQGlobals.Cell_Variables["phiRange"][sdet]["A"][Layer]=[-0.5+x for x in phi_range] lArDQGlobals.Cell_Variables["phiRange"][sdet]["C"]=lArDQGlobals.Cell_Variables["phiRange"][sdet]["A"] else: #all other partitions - lArDQGlobals.Cell_Variables["phiRange"][sdet]["A"][Layer]=[-TMath.Pi()+ x*2*TMath.Pi()/lArDQGlobals.Cell_Variables["phiNbin"][sdet]["A"][Layer] for x in xrange(lArDQGlobals.Cell_Variables["phiNbin"][sdet]["A"][Layer]+1)] + phi_range=range(lArDQGlobals.Cell_Variables["phiNbin"][sdet]["A"][Layer]+1) + lArDQGlobals.Cell_Variables["phiRange"][sdet]["A"][Layer]=[-TMath.Pi()+ x*2*TMath.Pi()/lArDQGlobals.Cell_Variables["phiNbin"][sdet]["A"][Layer] for x in phi_range] lArDQGlobals.Cell_Variables["phiRange"][sdet]["C"]=lArDQGlobals.Cell_Variables["phiRange"][sdet]["A"] pass pass #partition loop @@ -326,13 +334,14 @@ for sdet in lArDQGlobals.SubDet: etamin=lArDQGlobals.Cell_Variables["etaMin"][sdet]["A"][Lay] currange=[etamin] - for k in xrange(len(Ranges)-1) : - currange+=[round(currange[-1] + x * Sizes[k],5) for x in xrange(1,Ranges[k+1]-Ranges[k]+1)] + for k in range(len(Ranges)-1) : + eta_range = range(1,Ranges[k+1]-Ranges[k]+1) + currange+=[round(currange[-1] + x * Sizes[k],5) for x in eta_range] lArDQGlobals.Cell_Variables["etaRange"][sdet]["A"][Lay]=currange #The C side is just the symmeteric of the A side if sdet=="FCal": lArDQGlobals.Cell_Variables["etaRange"][sdet]["C"][Lay] = lArDQGlobals.Cell_Variables["etaRange"][sdet]["A"][Lay] else: #all other partitions - lArDQGlobals.Cell_Variables["etaRange"][sdet]["C"][Lay] =map(lambda x: x*-1,lArDQGlobals.Cell_Variables["etaRange"][sdet]["A"][Lay])[::-1] + lArDQGlobals.Cell_Variables["etaRange"][sdet]["C"][Lay] =list(map(lambda x: x*-1,lArDQGlobals.Cell_Variables["etaRange"][sdet]["A"][Lay]))[::-1] diff --git a/LArCalorimeter/LArMonitoring/python/LArCoverageAlg.py b/LArCalorimeter/LArMonitoring/python/LArCoverageAlg.py index d2ba1d15c1cab8e5b10782bc7c3cffc5bd27872a..12ccd826b1cfddb64120f256ddf8997e600f0419 100644 --- a/LArCalorimeter/LArMonitoring/python/LArCoverageAlg.py +++ b/LArCalorimeter/LArMonitoring/python/LArCoverageAlg.py @@ -161,7 +161,8 @@ def LArCoverageConfigCore(helper, algoinstance,inputFlags): # -- badChannels histograms -- badChannels_path='Coverage/BadChannels/' - badChannelToolArrayBarrel.defineHistogram('mon_FtSlot,single_channel;DBBadChannelsBarrel', + for side in lArDQGlobals.Sides: + badChannelToolArrayBarrel.defineHistogram('mon_FtSlot,single_channel;DBBadChannelsBarrel', type='TH2I', path=badChannels_path, title='Known Bad Channels - Barrel;Feedthrough(+Slot increasing);Channel', @@ -173,7 +174,7 @@ def LArCoverageConfigCore(helper, algoinstance,inputFlags): ymin=-0.5, ymax=lArDQGlobals.FEB_N_channels-0.5, xlabels=lArDQGlobals.Feedthrough_Slot_labels_Barrel) - badChannelToolArrayEndcap.defineHistogram('mon_FtSlot,single_channel;DBBadChannelsEndcap', + badChannelToolArrayEndcap.defineHistogram('mon_FtSlot,single_channel;DBBadChannelsEndcap', type='TH2I', path=badChannels_path, title='Known Bad Channels - Endcap '+side+';Feedthrough(+Slot increasing);Channel', @@ -492,7 +493,7 @@ if __name__=='__main__': cfg.merge(larCoverageAcc) ConfigFlags.dump() - f=open("CoverageMaker.pkl","w") + f=open("CoverageMaker.pkl","wb") cfg.store(f) f.close() diff --git a/LArCalorimeter/LArMonitoring/python/LArFEBMonAlg.py b/LArCalorimeter/LArMonitoring/python/LArFEBMonAlg.py index aa45eb3c61a54d9c1698fe6c96e0ec87d2792674..447167121bfa66660a37ec116aab77ebe2f50a15 100644 --- a/LArCalorimeter/LArMonitoring/python/LArFEBMonAlg.py +++ b/LArCalorimeter/LArMonitoring/python/LArFEBMonAlg.py @@ -181,7 +181,7 @@ def LArFEBMonConfigCore(helper,algoinstance,inputFlags, cellDebug=False, dspDebu title='# of cells with samples readout:Number of cells:Number of events', type='TH1I', path=summary_hist_path, - xbins=lArDQGlobals.N_Cells/10, xmin=-1000, xmax=lArDQGlobals.N_Cells-1000) + xbins=int(lArDQGlobals.N_Cells/10), xmin=-1000, xmax=lArDQGlobals.N_Cells-1000) Group.defineHistogram('LB,LArEvSize;eventSizeVsLB', title='LAr event size (w/o ROS headers):Luminosity Block:Megabytes', type='TProfile', @@ -438,7 +438,7 @@ if __name__=='__main__': cfg.printConfig() ConfigFlags.dump() - f=open("LArFEBMon.pkl","w") + f=open("LArFEBMon.pkl","wb") cfg.store(f) f.close() diff --git a/LArCalorimeter/LArMonitoring/python/LArNoisyROMonAlg.py b/LArCalorimeter/LArMonitoring/python/LArNoisyROMonAlg.py index 50f8888899d2acfef8d7d7760bc88ec41b557da8..8e7d569971e2b1164202235b961c051b63735601 100644 --- a/LArCalorimeter/LArMonitoring/python/LArNoisyROMonAlg.py +++ b/LArCalorimeter/LArMonitoring/python/LArNoisyROMonAlg.py @@ -13,9 +13,9 @@ def LArNoisyROMonConfig(inputFlags, inKey="", from AthenaConfiguration.ComponentFactory import CompFactory NoisyFEBDefStr="(>"+str(inputFlags.LAr.NoisyRO.BadChanPerFEB)+" chan with Q>"+str(inputFlags.LAr.NoisyRO.CellQuality)+")" - MNBTightFEBDefStr="(>"+str(inputFlags.LAr.NoisyRO.MNBTightCut)+" chan with Q>"+str(inputFlags.LAr.NoisyRO.CellQualityCut)+")" + MNBTightFEBDefStr="(>"+str(inputFlags.LAr.NoisyRO.MNBTightCut)+" chan with Q>"+str(inputFlags.LAr.NoisyRO.CellQuality)+")" MNBTight_PsVetoFEBDefStr="(>"+str(inputFlags.LAr.NoisyRO.MNBTight_PsVetoCut[0])+" chan with Q>"+str(inputFlags.LAr.NoisyRO.CellQuality)+") + PS veto (<"+str(inputFlags.LAr.NoisyRO.MNBTight_PsVetoCut[1])+" channels)" - MNBLooseFEBDefStr="(>"+str(inputFlags.LAr.NoisyRO.MNBLooseCut)+" chan with Q>"+str(inputFlags.LAr.NoisyRO.CellQualityCut)+")" + MNBLooseFEBDefStr="(>"+str(inputFlags.LAr.NoisyRO.MNBLooseCut)+" chan with Q>"+str(inputFlags.LAr.NoisyRO.CellQuality)+")" return LArNoisyROMonConfigCore(helper,CompFactory.LArNoisyROMonAlg, inputFlags, inKey, NoisyFEBDefStr, MNBTightFEBDefStr, MNBTight_PsVetoFEBDefStr, MNBLooseFEBDefStr) diff --git a/LArCalorimeter/LArROD/python/LArSCellGetter.py b/LArCalorimeter/LArROD/python/LArSCellGetter.py index 2e44cdf37144ba17acb986a37990f75034259cf5..9ffdcdf7c330f71672f55ef20bc91b38cd5c443a 100755 --- a/LArCalorimeter/LArROD/python/LArSCellGetter.py +++ b/LArCalorimeter/LArROD/python/LArSCellGetter.py @@ -47,7 +47,6 @@ class LArSCellGetter ( Configured ) : # Only MC case if True : - from LArROD.LArRODConf import LArSuperCellBuilderDriver theLArSCellBuilder=LArSuperCellBuilderDriver("LArSuperCellBuilder") @@ -69,6 +68,7 @@ class LArSCellGetter ( Configured ) : from LArROD.LArRODConf import LArRawChannelBuilderToolOFC theLArRawChannelBuilderToolOFC=LArRawChannelBuilderToolOFC('LArRawChannelBuilderSCToolOFC') theLArRawChannelBuilderToolOFC.OFCTool=theLArOFCSCTool + theLArRawChannelBuilderToolOFC.ECut=-99999.0 theLArRawChannelBuilderToolOFC.KeyShape = "LArShapeSC" ToolSvc+=theLArRawChannelBuilderToolOFC theLArSCellBuilder.BuilderTools += [theLArRawChannelBuilderToolOFC] diff --git a/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/CMakeLists.txt index 182587bba99c7b21df86dc64da7e92baccabe9dd..a11e44c8afdc22e2126b9b35711057f45dcfbd71 100644 --- a/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/CMakeLists.txt +++ b/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/CMakeLists.txt @@ -1,49 +1,25 @@ -# $Id: CMakeLists.txt 777718 2016-10-11 16:52:13Z jrobinso $ -################################################################################ -# Package: HFORTools -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( HFORTools ) -# Extra dependencies, based on the environment: -set( extra_deps ) -set( extra_deps Control/AthenaBaseComps ) -if( XAOD_STANDALONE ) - set( extra_deps Control/xAODRootAccess ) -else() - set( extra_deps Control/AthenaBaseComps GaudiKernel PhysicsAnalysis/POOLRootAccess) -endif() - -# Declare the package's dependencies: -atlas_depends_on_subdirs( - PUBLIC - Control/AthToolSupport/AsgTools - Event/xAOD/xAODJet - Event/xAOD/xAODTruth - Event/xAOD/xAODEventInfo - PRIVATE - Event/xAOD/xAODBase - Tools/PathResolver - ${extra_deps} ) - # External dependencies: -find_package( Boost COMPONENTS program_options ) -find_package( ROOT COMPONENTS Core Hist RIO Gpad ) -find_package( Eigen ) +find_package( Boost ) +find_package( ROOT COMPONENTS Core RIO ) # Libraries in the package: atlas_add_library( HFORToolsLib HFORTools/*.h Root/*.cxx PUBLIC_HEADERS HFORTools - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} AsgTools xAODCore xAODBase xAODJet xAODTruth xAODEventInfo PathResolver ) + LINK_LIBRARIES AsgTools xAODTruth xAODJet + PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} + PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} PathResolver xAODBase xAODEventInfo + xAODRootAccess ) if( NOT XAOD_STANDALONE ) atlas_add_component( HFORTools src/*.h src/*.cxx src/components/*.cxx - LINK_LIBRARIES POOLRootAccessLib AthenaBaseComps GaudiKernel xAODBase xAODJet xAODTruth xAODEventInfo PathResolver - HFORToolsLib ) + LINK_LIBRARIES GaudiKernel AthenaBaseComps xAODEventInfo HFORToolsLib ) endif() atlas_add_dictionary( HFORToolsDict @@ -51,14 +27,19 @@ atlas_add_dictionary( HFORToolsDict HFORTools/selection.xml LINK_LIBRARIES HFORToolsLib ) -if( NOT XAOD_STANDALONE ) - # Test(s) in the package: - atlas_add_test( ut_HFORTools_test - SOURCES test/ut_HFORTools_test.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${GTEST_LIBRARIES} POOLRootAccessLib AthenaBaseComps GaudiKernel HFORToolsLib - PROPERTIES TIMEOUT 600 ) +# Figure out which library to use for xAOD reading in the test(s). +set( test_lib ) +if( XAOD_STANDALONE ) + set( test_lib xAODRootAccess ${ROOT_LIBRARIES} + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ) +else() + set( test_lib POOLRootAccessLib ) endif() +# Test(s) in the package: +atlas_add_test( ut_HFORTools_test + SOURCES test/ut_HFORTools_test.cxx + LINK_LIBRARIES AsgTools xAODEventInfo HFORToolsLib ${test_lib} ) + # Install files from the package: atlas_install_data( data/*.cfg ) diff --git a/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/test/ut_HFORTools_test.cxx b/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/test/ut_HFORTools_test.cxx index 55011df7cf306252f6d1511e8e8a523bf49c1170..ce81b3a222aae6f4a833f9e66cff4c26da2879a7 100644 --- a/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/test/ut_HFORTools_test.cxx +++ b/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/test/ut_HFORTools_test.cxx @@ -2,15 +2,21 @@ Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -#include <xAODRootAccess/Init.h> #include "AsgTools/AnaToolHandle.h" #include "xAODEventInfo/EventInfo.h" #include "HFORTools/IHFORSelectionTool.h" -#ifndef XAOD_STANDALONE -#include "POOLRootAccess/TEvent.h" +#ifdef XAOD_STANDALONE +# include <TFile.h> +# include "xAODRootAccess/Init.h" +# include "xAODRootAccess/TEvent.h" +#else +# include "POOLRootAccess/TEvent.h" #endif +// System include(s). +#include <memory> + using namespace asg::msgUserCode; //============================================================================== @@ -23,16 +29,19 @@ using namespace asg::msgUserCode; int main() { ANA_CHECK_SET_TYPE (int); //makes ANA_CHECK return ints if exiting function -#ifdef ROOTCORE +#ifdef XAOD_STANDALONE StatusCode::enableFailure(); ANA_CHECK (xAOD::Init ()); -#endif - -#ifndef XAOD_STANDALONE + std::unique_ptr< TFile > ifile( TFile::Open( "${ASG_TEST_FILE_MC}" ) ); + xAOD::TEvent evt( xAOD::TEvent::kAthenaAccess ); + ANA_CHECK( evt.readFrom( ifile.get() ) ); +#else //start just by loading the first event of the test MC file POOL::TEvent evt(POOL::TEvent::kAthenaAccess); ANA_CHECK(evt.readFrom("$ASG_TEST_FILE_MC")); +#endif // XAOD_STANDALONE + evt.getEntry(0); //configuring the tool @@ -65,7 +74,5 @@ int main() { } } -#endif - return 0; //zero = success } diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagJetAugmenter.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagJetAugmenter.h index ec4e85d3dbbf229c60fc93b1859cc6c4334039b9..66678e90fd0d43f31d506cb152b80100f46780d7 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagJetAugmenter.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/BTagJetAugmenter.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef BTAG_JET_AUGMENTER_HH @@ -15,7 +15,7 @@ class BTagJetAugmenter { public: typedef FlavorTagDiscriminants::FlipTagConfig FlipTagConfig; - BTagJetAugmenter(FlipTagConfig flip = FlipTagConfig::STANDARD); + BTagJetAugmenter(std::string associator, FlipTagConfig flip = FlipTagConfig::STANDARD); ~BTagJetAugmenter(); BTagJetAugmenter(BTagJetAugmenter&&); void augmentJfDr(const xAOD::BTagging &btag); @@ -23,6 +23,46 @@ public: void augmentBtagJes(const xAOD::Jet &target, const xAOD::Jet &uncalib); void augment(const xAOD::Jet &jet); void augment(const xAOD::Jet &jet, const xAOD::Jet &uncalibrated_jet); + + std::string get_pt_uncalib_key(); + std::string get_eta_uncalib_key(); + std::string get_abs_eta_uncalib_key(); + + std::string get_ip2d_nTrks_key(); + std::string get_ip2d_isDefaults_key(); + std::string get_ip2d_cu_key(); + std::string get_ip2d_bu_key(); + std::string get_ip2d_bc_key(); + + std::string get_ip3d_nTrks_key(); + std::string get_ip3d_isDefaults_key(); + std::string get_ip3d_cu_key(); + std::string get_ip3d_bu_key(); + std::string get_ip3d_bc_key(); + + std::string get_jf_isDefaults_key(); + std::string get_jf_deltaR_key(); + + std::string get_sv1_isDefaults_key(); + + std::string get_secondaryVtx_isDefaults_key(); + std::string get_secondaryVtx_nTrks_key(); + std::string get_secondaryVtx_m_key(); + std::string get_secondaryVtx_E_key(); + std::string get_secondaryVtx_EFrac_key(); + std::string get_secondaryVtx_L3d_key(); + std::string get_secondaryVtx_Lxy_key(); + std::string get_secondaryVtx_min_trk_flightDirRelEta_key(); + std::string get_secondaryVtx_max_trk_flightDirRelEta_key(); + std::string get_secondaryVtx_avg_trk_flightDirRelEta_key(); + std::string get_min_trk_flightDirRelEta_key(); + std::string get_max_trk_flightDirRelEta_key(); + std::string get_avg_trk_flightDirRelEta_key(); + + std::string get_smt_isDefaults_key(); + + std::string get_rnnip_isDefaults_key(); + private: bool jfIsDefaults(const xAOD::BTagging &btag); typedef SG::AuxElement AE; diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2HighLevel.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2HighLevel.h index f925816e2996b76477f47a81a2439abd3d7162d0..2a95e09bee65bd0cb06f3a79caacef80a4c95ad3 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2HighLevel.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2HighLevel.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef DL2_HIGH_LEVEL_HH diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2HighLevelTools.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2HighLevelTools.h index a948b644f381aa0ced1815a4c58cb92d313b63d1..621a333e8c3e77256c5382308d1c68074741a150 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2HighLevelTools.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2HighLevelTools.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef DL2_HIGHLEVEL_TOOLS_H diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2Tool.h b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2Tool.h index 3106a8fb70e3cbc423555f8d1d5f6ae06244b374..cb507da622add9757be63b4a3bb6966677936167 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2Tool.h +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/FlavorTagDiscriminants/DL2Tool.h @@ -1,6 +1,6 @@ // for text editors: this file is -*- C++ -*- /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef DL2_TOOL_H @@ -28,6 +28,7 @@ namespace FlavorTagDiscriminants { StatusCode initialize() override; StatusCode finalize() override; + // returns 0 for success virtual void decorate(const xAOD::Jet& jet) const override; private: DL2Properties m_props; //! diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagAugmenterTool.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagAugmenterTool.cxx index ce80e2275db80da073ba6f145195a7911c56087e..8fb50ba24eb274d06f35da80b2d3b6f3520468b6 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagAugmenterTool.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagAugmenterTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "FlavorTagDiscriminants/BTagAugmenterTool.h" @@ -18,7 +18,7 @@ namespace FlavorTagDiscriminants { StatusCode BTagAugmenterTool::initialize() { m_aug.reset( - new BTagJetAugmenter( + new BTagJetAugmenter("BTagTrackToJetAssociator", flipTagConfigFromString(m_flipTagConfig))); return StatusCode::SUCCESS; } diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagJetAugmenter.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagJetAugmenter.cxx index eb3d723e621bdef72dc2ddcc8251e37437489ed7..c6bd4b621f21209c769b68754f3114d634870103 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagJetAugmenter.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/BTagJetAugmenter.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "FlavorTagDiscriminants/BTagJetAugmenter.h" @@ -60,7 +60,7 @@ namespace { } -BTagJetAugmenter::BTagJetAugmenter(FlavorTagDiscriminants::FlipTagConfig f): +BTagJetAugmenter::BTagJetAugmenter(std::string associator, FlavorTagDiscriminants::FlipTagConfig f): m_pt_uncalib("pt_btagJes"), m_eta_uncalib("eta_btagJes"), m_abs_eta_uncalib("absEta_btagJes"), @@ -93,7 +93,7 @@ BTagJetAugmenter::BTagJetAugmenter(FlavorTagDiscriminants::FlipTagConfig f): m_sv1_vertices(sv(f) + "_vertices"), m_sv1_nVtx(sv(f) + "_nVtx"), m_sv1_isDefaults(sv(f) + "_isDefaults"), - m_jet_track_links("BTagTrackToJetAssociator"), + m_jet_track_links(associator), m_secondaryVtx_isDefaults(jfSvNew(f) + "_isDefaults"), m_secondaryVtx_nTrks(jfSvNew(f) + "_nTracks"), m_secondaryVtx_m(jfSvNew(f) + "_mass"), @@ -122,6 +122,130 @@ BTagJetAugmenter::BTagJetAugmenter(FlavorTagDiscriminants::FlipTagConfig f): BTagJetAugmenter::~BTagJetAugmenter() = default; BTagJetAugmenter::BTagJetAugmenter(BTagJetAugmenter&&) = default; +std::string BTagJetAugmenter::get_pt_uncalib_key() { + return SG::AuxTypeRegistry::instance().getName( m_pt_uncalib.auxid() ); +} + +std::string BTagJetAugmenter::get_eta_uncalib_key() { + return SG::AuxTypeRegistry::instance().getName( m_eta_uncalib.auxid() ); +} + +std::string BTagJetAugmenter:: get_abs_eta_uncalib_key() { + return SG::AuxTypeRegistry::instance().getName( m_abs_eta_uncalib.auxid() ); +} + +std::string BTagJetAugmenter::get_ip2d_nTrks_key() { + return SG::AuxTypeRegistry::instance().getName( m_ip2d_nTrks.auxid() ); +} + +std::string BTagJetAugmenter::get_ip2d_isDefaults_key() { + return SG::AuxTypeRegistry::instance().getName( m_ip2d_isDefaults.auxid() ); +} + +std::string BTagJetAugmenter::get_ip2d_cu_key() { + return SG::AuxTypeRegistry::instance().getName( m_ip2d_cu.auxid() ); +} + +std::string BTagJetAugmenter::get_ip2d_bu_key() { + return SG::AuxTypeRegistry::instance().getName( m_ip2d_bu.auxid() ); +} + +std::string BTagJetAugmenter::get_ip2d_bc_key() { + return SG::AuxTypeRegistry::instance().getName( m_ip2d_bc.auxid() ); +} + +std::string BTagJetAugmenter::get_ip3d_nTrks_key() { + return SG::AuxTypeRegistry::instance().getName( m_ip3d_nTrks.auxid() ); +} + +std::string BTagJetAugmenter::get_ip3d_isDefaults_key() { + return SG::AuxTypeRegistry::instance().getName( m_ip3d_isDefaults.auxid() ); +} + +std::string BTagJetAugmenter::get_ip3d_cu_key() { + return SG::AuxTypeRegistry::instance().getName( m_ip3d_cu.auxid() ); +} + +std::string BTagJetAugmenter::get_ip3d_bu_key() { + return SG::AuxTypeRegistry::instance().getName( m_ip3d_bu.auxid() ); +} + +std::string BTagJetAugmenter::get_ip3d_bc_key() { + return SG::AuxTypeRegistry::instance().getName( m_ip3d_bc.auxid() ); +} + +std::string BTagJetAugmenter::get_jf_isDefaults_key() { + return SG::AuxTypeRegistry::instance().getName( m_jf_isDefaults.auxid() ); +} + +std::string BTagJetAugmenter::get_jf_deltaR_key() { + return SG::AuxTypeRegistry::instance().getName( m_jf_deltaR.auxid() ); +} + +std::string BTagJetAugmenter::get_sv1_isDefaults_key() { + return SG::AuxTypeRegistry::instance().getName( m_sv1_isDefaults.auxid() ); +} + +std::string BTagJetAugmenter::get_secondaryVtx_isDefaults_key() { + return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_isDefaults.auxid() ); +} + +std::string BTagJetAugmenter::get_secondaryVtx_nTrks_key() { + return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_nTrks.auxid() ); +} + +std::string BTagJetAugmenter::get_secondaryVtx_m_key() { + return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_m.auxid() ); +} + +std::string BTagJetAugmenter::get_secondaryVtx_E_key() { + return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_E.auxid() ); +} + +std::string BTagJetAugmenter::get_secondaryVtx_EFrac_key() { + return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_EFrac.auxid() ); +} + +std::string BTagJetAugmenter::get_secondaryVtx_L3d_key() { + return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_L3d.auxid() ); +} + +std::string BTagJetAugmenter::get_secondaryVtx_Lxy_key() { + return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_Lxy.auxid() ); +} + +std::string BTagJetAugmenter::get_secondaryVtx_min_trk_flightDirRelEta_key() { + return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_min_trk_flightDirRelEta.auxid() ); +} + +std::string BTagJetAugmenter::get_secondaryVtx_max_trk_flightDirRelEta_key() { + return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_max_trk_flightDirRelEta.auxid() ); +} + +std::string BTagJetAugmenter::get_secondaryVtx_avg_trk_flightDirRelEta_key() { + return SG::AuxTypeRegistry::instance().getName( m_secondaryVtx_avg_trk_flightDirRelEta.auxid() ); +} + +std::string BTagJetAugmenter::get_min_trk_flightDirRelEta_key() { + return SG::AuxTypeRegistry::instance().getName( m_min_trk_flightDirRelEta.auxid() ); +} + +std::string BTagJetAugmenter::get_max_trk_flightDirRelEta_key() { + return SG::AuxTypeRegistry::instance().getName( m_max_trk_flightDirRelEta.auxid() ); +} + +std::string BTagJetAugmenter::get_avg_trk_flightDirRelEta_key() { + return SG::AuxTypeRegistry::instance().getName( m_avg_trk_flightDirRelEta.auxid() ); +} + +std::string BTagJetAugmenter::get_smt_isDefaults_key() { + return SG::AuxTypeRegistry::instance().getName( m_smt_isDefaults.auxid() ); +} + +std::string BTagJetAugmenter::get_rnnip_isDefaults_key() { + return SG::AuxTypeRegistry::instance().getName( m_rnnip_isDefaults.auxid() ); +} + void BTagJetAugmenter::augment(const xAOD::Jet &jet, const xAOD::Jet &uncalibrated_jet) { augmentBtagJes(jet, uncalibrated_jet); diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2.cxx index 6ac9a4e0efeffbd94f7007833055262b01fa6897..8131fed22c7137e85f36b6deedad5ad4fb7ba939 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "FlavorTagDiscriminants/DL2.h" diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevel.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevel.cxx index 436b74fc5bdd2ed6aed418f992a56167026e8775..525dee9dd39308732bed19d308b710f13271a932 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevel.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevel.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "FlavorTagDiscriminants/DL2HighLevel.h" diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevelTools.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevelTools.cxx index 5c118cec80fa4c28daf708e3090954351331f345..1a876791abf4a312826812f0efd17163f0fb526d 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevelTools.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2HighLevelTools.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "FlavorTagDiscriminants/DL2HighLevelTools.h" diff --git a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2Tool.cxx b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2Tool.cxx index cc80c855a65cc0960729f7fb104cc1bf3bc9949e..e5d6f077052d5f0ce46613538dadeb9a453d37ac 100644 --- a/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2Tool.cxx +++ b/PhysicsAnalysis/JetTagging/FlavorTagDiscriminants/Root/DL2Tool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "FlavorTagDiscriminants/DL2Tool.h" @@ -31,6 +31,7 @@ namespace FlavorTagDiscriminants { } void DL2Tool::decorate(const xAOD::Jet& jet) const { + ATH_MSG_DEBUG("Decoration from: " + m_props.nnFile); m_dl2->decorate(jet); } diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/BTagHighLevelAugmenterAlg.h b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/BTagHighLevelAugmenterAlg.h new file mode 100644 index 0000000000000000000000000000000000000000..d8cf5562a438311deed3c0f0c66a98f91879ceda --- /dev/null +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/BTagHighLevelAugmenterAlg.h @@ -0,0 +1,85 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef BTAG_HIGHLEVEL_AUGMENTER_ALG_HH +#define BTAG_HIGHLEVEL_AUGMENTER_ALG_HH + +// ATLAS things +#include "AthenaBaseComps/AthAlgorithm.h" +#include "xAODJet/Jet.h" +#include "xAODBTagging/BTagging.h" +#include "xAODEventInfo/EventInfo.h" +#include "StoreGate/ReadDecorHandle.h" + +#include "FlavorTagDiscriminants/BTagJetAugmenter.h" + +#include "FlavorTagDiscriminants/FlipTagEnums.h" +typedef FlavorTagDiscriminants::FlipTagConfig FlipTagConfig; + +namespace Analysis { + class BTagHighLevelAugmenterAlg: public AthAlgorithm { + public: + BTagHighLevelAugmenterAlg(const std::string& name, + ISvcLocator* pSvcLocator ); + + StatusCode initialize() override final; + StatusCode execute() override final; + + + private: + // Input Containers + SG::ReadHandleKey<xAOD::BTaggingContainer > m_BTagCollectionName {this, "BTaggingCollectionName", "", "Input BTagging container"}; + SG::ReadDecorHandleKey<xAOD::BTaggingContainer> m_bTagJetDecorLinkName {this, "JetLinkName", "", "Element Link from BTagging to Jet container"}; + std::string m_flipTagConfig; + std::string m_acc_jet_track_links; + std::unique_ptr<BTagJetAugmenter> m_aug; + + + typedef SG::AuxElement AE; + + // Decorator keys will be modified at run-time to conform to the correct container name + // For the run-time update to work, the decoration key name properties must start with a period (".") + + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_pt_uncalib {this, "pt_uncalib", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_eta_uncalib {this, "eta_uncalib", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_abs_eta_uncalib {this, "abs_eta_uncalib", "", ""}; + + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip2d_nTrks {this, "ip2d_nTrks", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip2d_isDefaults {this, "ip2d_isDefaults", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip2d_cu {this, "ip2d_cu", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip2d_bu {this, "ip2d_bu", "", "" }; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip2d_bc {this, "ip2d_bc", "", ""}; + + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip3d_nTrks {this, "ip3d_nTrks", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip3d_isDefaults {this, "ip3d_isDefaults", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip3d_cu {this, "ip3d_cu", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip3d_bu {this, "ip3d_bu", "", "" }; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_ip3d_bc {this, "ip3d_bc", "", ""}; + + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_jf_isDefaults {this, "jf_isDefaults", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_jf_deltaR {this, "jf_deltaR", "", ""}; + + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_sv1_isDefaults {this, "sv1_isDefaults", "", ""}; + + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_isDefaults {this, "secondaryVtx_isDefaults", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_nTrks {this, "secondaryVtx_nTrks", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_m {this, "secondaryVtx_m", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_E {this, "secondaryVtx_E", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_EFrac {this, "secondaryVtx_EFrac", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_L3d {this, "secondaryVtx_L3d", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_Lxy {this, "secondaryVtx_Lxy", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_min_trk_flightDirRelEta {this, "secondaryVtx_min_trk_flightDirRelEta", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_max_trk_flightDirRelEta {this, "secondaryVtx_max_trk_flightDirRelEta", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_secondaryVtx_avg_trk_flightDirRelEta {this, "secondaryVtx_avg_trk_flightDirRelEta", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_min_trk_flightDirRelEta {this, "min_trk_flightDirRelEta", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_max_trk_flightDirRelEta {this, "max_trk_flightDirRelEta", "", ""}; + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_avg_trk_flightDirRelEta {this, "avg_trk_flightDirRelEta", "", ""}; + + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_smt_isDefaults {this, "smt_isDefaults", "", ""}; + + SG::WriteDecorHandleKey< xAOD::BTaggingContainer > m_dec_rnnip_isDefaults {this, "rnnip_isDefaults", "", ""}; + }; +} + +#endif diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/HighLevelBTagAlg.h b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/HighLevelBTagAlg.h new file mode 100644 index 0000000000000000000000000000000000000000..eec3d81b75b7d135d56e7d353186496fed664d72 --- /dev/null +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/HighLevelBTagAlg.h @@ -0,0 +1,63 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef HIGHLEVEL_BTAG_ALG_H +#define HIGHLEVEL_BTAG_ALG_H + +#include "AthenaBaseComps/AthAlgorithm.h" +#include "GaudiKernel/ToolHandle.h" + +#include <string> + +#include "xAODBTagging/BTaggingContainer.h" +#include "JetInterface/IJetModifier.h" +#include "FlavorTagDiscriminants/ISingleJetDecorator.h" +#include "VxSecVertex/VxSecVertexInfo.h" + +#include "StoreGate/ReadHandleKey.h" +#include "StoreGate/WriteHandleKey.h" +#include "StoreGate/WriteDecorHandleKeyArray.h" + +namespace InDet { + class ISecVertexInJetFinder; +} + +/** The namespace of all packages in PhysicsAnalysis/JetTagging */ +namespace Analysis +{ + + class HighLevelBTagAlg : public AthAlgorithm + { + public: + /** Constructors and destructors */ + HighLevelBTagAlg(const std::string& name, ISvcLocator *pSvcLocator); + virtual ~HighLevelBTagAlg(); + + /** Main routines specific to an ATHENA algorithm */ + virtual StatusCode initialize() override; + virtual StatusCode execute() override; + + private: + + ToolHandle<ISingleJetDecorator> m_jetDecorator; + + SG::ReadHandleKey<xAOD::BTaggingContainer> m_BTagCollectionName {this, "BTaggingCollectionName", "", "Input BTagging container"}; + Gaudi::Property<SG::ReadDecorHandleKey<xAOD::BTaggingContainer> >m_btagJetLinkName{this,"JetContainerLink","","Element link form BTagging to Jet container"}; + SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrackContainerKey {this,"TrackContainer","InDetTrackParticles","Key for the input track collection"}; + + Gaudi::Property< std::string > m_prefix{this,"prefix","btagIp_",""}; + + SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_dec_d0 {this, "d0", "d0", "d0 of tracks"}; + SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_dec_z0 {this, "z0SinTheta", "z0SinTheta", "z0SinTheta of tracks"}; + SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_dec_d0_sigma {this, "d0Uncertainty", "d0Uncertainty", "d0Uncertainty of tracks"}; + SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_dec_z0_sigma {this, "z0SinThetaUncertainty", "z0SinThetaUncertainty", "z0SinThetaUncertainty of tracks"}; + + SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_dec_track_pos {this, "trackDisplacement","trackDisplacement","trackDisplacement of tracks" }; + SG::ReadDecorHandleKey< xAOD::TrackParticleContainer > m_dec_track_mom {this, "trackMomentum","trackMomentum","trackMomentum of tracks" }; + + }; // End class + +} // End namespace + +#endif // PREBTAGMODIFIERS_H diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetBTaggingAlg.h b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetBTaggingAlg.h index 2f39623128849745079ce2f7477caf9e4df0e5dc..66b0930ea6a047f54d190379535ab521b086b105 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetBTaggingAlg.h +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/BTagging/JetBTaggingAlg.h @@ -15,6 +15,7 @@ #include "StoreGate/ReadHandleKey.h" #include "StoreGate/WriteHandleKey.h" #include "StoreGate/ReadDecorHandleKeyArray.h" +#include "StoreGate/WriteDecorHandleKeyArray.h" #include "xAODJet/JetContainer.h" #include "xAODBTagging/BTaggingContainer.h" @@ -42,16 +43,16 @@ class JetBTaggingAlg: private: SG::ReadHandleKey<xAOD::JetContainer > m_JetCollectionName {this, "JetCollectionName", "", "Input jet container"}; - Gaudi::Property<SG::ReadDecorHandleKeyArray<xAOD::JetContainer>> m_jetParticleLinkNameList{ this, "TrackToJetAssociatorNames", {""}, "Element Link vector form jet to particle container"}; + Gaudi::Property<SG::ReadDecorHandleKeyArray<xAOD::JetContainer>> m_jetParticleLinkNameList{ this, "TrackToJetAssociatorNames", {""}, "Element Link vector from jet to particle container"}; //SG::ReadHandleKey<xAOD::VertexContainer> m_VertexCollectionName {this, "vxPrimaryCollectionName", "", "Input primary vertex container"}; SG::ReadHandleKey<xAOD::VertexContainer> m_BTagSVCollectionName {this, "BTagSVCollectionName", "", "Input BTagging secondary vertex container"}; SG::ReadHandleKey<xAOD::BTagVertexContainer> m_BTagJFVtxCollectionName {this, "BTagJFVtxCollectionName", "", "Input BTagging Jet Fitter container"}; - Gaudi::Property<SG::WriteDecorHandleKey<xAOD::JetContainer> >m_jetBTaggingLinkName{this,"JetContainerName","","Element link form jet to BTagging container"}; + Gaudi::Property<SG::WriteDecorHandleKey<xAOD::JetContainer> >m_jetBTaggingLinkName {this, "BTaggingLinkName", "", "Element link from jet to BTagging container"}; SG::WriteHandleKey<xAOD::BTaggingContainer> m_BTaggingCollectionName {this, "BTaggingCollectionName", "", "Output BTagging container"}; + SG::WriteDecorHandleKey<xAOD::BTaggingContainer> m_bTagJetDecorLinkName {this, "JetLinkName", "", "Element Link from BTagging to Jet container"}; std::string m_JetName; std::string m_BTagLink; - std::vector<std::string> m_TrackToJetAssocNameList; ToolHandle< IBTagTool > m_bTagTool; ToolHandle< IBTagLightSecVertexing > m_bTagSecVtxTool; diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/CMakeLists.txt b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/CMakeLists.txt index ff75c63e0de50b4332edb650ab41e48c63411f93..e295aa977188748b9a1340a1c6def617502a047b 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/CMakeLists.txt +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/CMakeLists.txt @@ -51,6 +51,8 @@ atlas_add_library( BTaggingLib src/JetSecVertexingAlg.cxx src/JetSecVtxFindingAlg.cxx src/BTagTrackAugmenterAlg.cxx + src/BTagHighLevelAugmenterAlg.cxx + src/HighLevelBTagAlg.cxx PUBLIC_HEADERS BTagging PRIVATE_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} LINK_LIBRARIES AsgTools AthenaBaseComps xAODBTagging xAODJet GaudiKernel MagFieldInterfaces JetInterface VxVertex ParticleJetToolsLib JetTagToolsLib FlavorTagDiscriminants @@ -59,7 +61,7 @@ atlas_add_library( BTaggingLib atlas_add_component( BTagging src/components/*.cxx INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${EIGEN_LIBRARIES} AsgTools AthenaBaseComps xAODBTagging xAODJet GaudiKernel MagFieldInterfaces JetInterface VxVertex GeoPrimitives xAODBase xAODCore xAODMuon xAODTracking InDetRecToolInterfaces ParticleJetToolsLib JetTagEvent JetTagInfo JetTagToolsLib Particle TrkLinks VxJetVertex VxSecVertex BTaggingLib ) + LINK_LIBRARIES ${EIGEN_LIBRARIES} AsgTools AthenaBaseComps xAODBTagging xAODJet GaudiKernel MagFieldInterfaces JetInterface VxVertex GeoPrimitives xAODBase xAODCore xAODMuon xAODTracking InDetRecToolInterfaces ParticleJetToolsLib JetTagEvent JetTagInfo JetTagToolsLib FlavorTagDiscriminants Particle TrkLinks VxJetVertex VxSecVertex BTaggingLib ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagHighLevelAugmenterAlgConfig.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagHighLevelAugmenterAlgConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..e0409a72a496e2af7f2375fd56c82b20cbba9790 --- /dev/null +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagHighLevelAugmenterAlgConfig.py @@ -0,0 +1,28 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory + +Analysis__BTagHighLevelAugmenterAlg=CompFactory.Analysis__BTagHighLevelAugmenterAlg + +def BTagHighLevelAugmenterAlgCfg(ConfigFlags, sequenceName, BTagCollection, Associator, doFlipTagger=False, **options): + """Adds a SecVtxTool instance and registers it. + + input: name: The algorithm's name. + BTaggingCollectionName The name of the btagging collections. + options: Python dictionary of options to be passed to the algorithm. + output: The tool.""" + + acc = ComponentAccumulator(sequenceName) + + options = {} + options['BTaggingCollectionName'] = BTagCollection + options['JetLinkName'] = options['BTaggingCollectionName'] + '.jetLink' + options['BTagTrackToJetAssociatorName'] = Associator + options['name'] = (BTagCollection + '_Augment').lower() + if doFlipTagger: options['FlipTagConfig'] = 'FLIP_SIGN' + + # -- create the augmentation algorithm + acc.addEventAlgo(Analysis__BTagHighLevelAugmenterAlg(**options), sequenceName) + + return acc diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagLightSecVertexingConfig.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagLightSecVertexingConfig.py index c1c9dc0bb3dfc2bc292493d156c5a745635e1528..56327065748cd5a4d9531b06d2add505c5fc550a 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagLightSecVertexingConfig.py +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagLightSecVertexingConfig.py @@ -28,7 +28,7 @@ def BTagLightSecVtxToolCfg(flags, Name, JetCollection, SVandAssoc = {""}, TimeSt TimeStamp = '_' + TimeStamp for sv, assoc in SVandAssoc.items(): - VxSecVertexInfoNameList.append(sv+'VxSecVertexInfo') + VxSecVertexInfoNameList.append(sv+'VxSecVertexInfo_'+JetCollection) secVtxFinderTrackNameList.append(assoc) secVtxFinderxAODBaseNameList.append(sv) diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagRun3Config.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagRun3Config.py index 8d1b90be9377675cd0c16d37bdea37f0c082edde..dda2e8c05784e896c8a1f7dec24301776510e994 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagRun3Config.py +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagRun3Config.py @@ -10,6 +10,8 @@ from BTagging.JetBTaggingAlgConfig import JetBTaggingAlgCfg from BTagging.JetSecVertexingAlgConfig import JetSecVertexingAlgCfg from BTagging.JetSecVtxFindingAlgConfig import JetSecVtxFindingAlgCfg from BTagging.BTagTrackAugmenterAlgConfig import BTagTrackAugmenterAlgCfg +from BTagging.BTagHighLevelAugmenterAlgConfig import BTagHighLevelAugmenterAlgCfg +from BTagging.HighLevelBTagAlgConfig import HighLevelBTagAlgCfg def JetTagCalibCfg(ConfigFlags, scheme="", TaggerList = []): result=ComponentAccumulator() @@ -77,6 +79,11 @@ def registerOutputContainersForJetCollection(flags, JetCollection, suffix = ''): author = flags.BTagging.OutputFiles.Prefix + JetCollection + suffix ItemList.append(OutputFilesBaseName + author) + # jetLink + jetLink = '.jetLink' + ItemList.append(OutputFilesBaseName+author+jetLink) + ItemList.append(OutputFilesBaseAuxName+author+jetLink) + ItemList.append(OutputFilesBaseAuxName + author + 'Aux.-BTagTrackToJetAssociatorBB') # SecVert ItemList.append(OutputFilesBaseNameSecVtx + author + OutputFilesSVname) @@ -165,12 +172,13 @@ def BTagCfg(inputFlags,**kwargs): #Should be parameters JetCollection = ['AntiKt4EMTopo','AntiKt4EMPFlow'] - JetCollection = ['AntiKt4EMTopo'] - taggerList = inputFlags.BTagging.run2TaggersList - taggerList += ['MultiSVbb1','MultiSVbb2'] + TrainedTaggers = inputFlags.BTagging.run2TaggersList + ['MultiSVbb1','MultiSVbb2'] + result.merge(JetTagCalibCfg(inputFlags, TaggerList = TrainedTaggers)) for jet in JetCollection: + taggerList = inputFlags.BTagging.run2TaggersList + taggerList += ['MultiSVbb1','MultiSVbb2'] if timestamp: #Time-stamped BTagging container (21.2) for ts in timestamp: @@ -195,8 +203,20 @@ def BTagCfg(inputFlags,**kwargs): result.merge(BTagRedoESDCfg(inputFlags, jet, extraCont)) if splitAlg: - #Track Augmenter - result.merge(BTagTrackAugmenterAlgCfg(inputFlags)) + postTagDL2JetToTrainingMap={ + 'AntiKt4EMPFlow': [ + #'BTagging/201903/smt/antikt4empflow/network.json', + 'BTagging/201903/rnnip/antikt4empflow/network.json', + 'BTagging/201903/dl1r/antikt4empflow/network.json', + 'BTagging/201903/dl1/antikt4empflow/network.json', + #'BTagging/201903/dl1rmu/antikt4empflow/network.json', + ] + } + + if jet in postTagDL2JetToTrainingMap: + #Remove DL1 and RNNIP from taggers list, those taggers are run with HighLevelBTagAlg + taggerList.remove('RNNIP') + taggerList.remove('DL1') #Track Association TrackToJetAssociators = ['BTagTrackToJetAssociator', 'BTagTrackToJetAssociatorBB'] @@ -222,10 +242,31 @@ def BTagCfg(inputFlags,**kwargs): #BTagging result.merge(JetBTaggingAlgCfg(inputFlags, JetCollection = jet, TaggerList = taggerList, SVandAssoc = SecVertexingAndAssociators, **kwargs)) + + if jet in postTagDL2JetToTrainingMap: + result.merge(RunHighLevelTaggersCfg(inputFlags, jet, 'BTagTrackToJetAssociator', postTagDL2JetToTrainingMap[jet])) + else: result.merge(JetBTaggerAlgCfg(inputFlags, JetCollection = jet, TaggerList = taggerList, **kwargs)) - result.merge(JetTagCalibCfg(inputFlags, TaggerList = taggerList)) + return result + +def RunHighLevelTaggersCfg(inputFlags, JetCollection, Associator, TrainingMaps): + result = ComponentAccumulator() + #Track Augmenter + result.merge(BTagTrackAugmenterAlgCfg(inputFlags)) + + from AthenaCommon.AlgSequence import AthSequencer + BTagCollection = 'BTagging_'+JetCollection + sequenceName = BTagCollection + "_HLTaggers" + + HLBTagSeq = AthSequencer(sequenceName) + HLBTagSeq.Sequential = True + result.addSequence(HLBTagSeq) + + result.merge(BTagHighLevelAugmenterAlgCfg(inputFlags, sequenceName, BTagCollection = BTagCollection, Associator = Associator, **kwargs) ) + for dl2 in TrainingMaps: + result.merge(HighLevelBTagAlgCfg(inputFlags, sequenceName, BTagCollection, dl2) ) return result diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagToolConfig.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagToolConfig.py index c251bb1bdabb21829894dfbb09ce16573a53fde0..8a9d4bed5a4c0f57c07d072f485df43e6caaec6c 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagToolConfig.py +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTagToolConfig.py @@ -71,6 +71,11 @@ def BTagToolCfg(ConfigFlags, TaggerList, useBTagFlagsDefaults = True): # list of taggers that use MultivariateTagManager mvtm_taggers = ['MV2c00','MV2c10','MV2c20','MV2c100','MV2cl100','MV2c10mu','MV2c10rnn','MV2m','MV2c10hp','DL1','DL1mu','DL1rnn'] + if 'RNNIP' not in TaggerList: #some taggers needs RNNIP variables + mvtm_taggers.remove('DL1rnn') + mvtm_taggers.remove('MV2c10rnn') + mvtm_taggers.remove('MV2c100') + mvtm_taggers.remove('MV2cl100') mvtm_active_taggers = list(set(mvtm_taggers) & set(TaggerList)) if len(mvtm_active_taggers) > 0: from JetTagTools.MultivariateTagManagerConfig import MultivariateTagManagerCfg diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/HighLevelBTagAlgConfig.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/HighLevelBTagAlgConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..a1298e30d2d31ebf485f90bef0b9ec7f49e6b827 --- /dev/null +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/HighLevelBTagAlgConfig.py @@ -0,0 +1,42 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory + +Analysis__HighLevelBTagAlg=CompFactory.Analysis__HighLevelBTagAlg +FlavorTagDiscriminants__DL2Tool=CompFactory.FlavorTagDiscriminants__DL2Tool + +def DL2ToolCfg(ConfigFlags, NNFile = '', **options): + acc = ComponentAccumulator() + + options['nnFile'] = NNFile + options['name'] = "decorator" + dl2 = FlavorTagDiscriminants__DL2Tool(**options) + + acc.setPrivateTools(dl2) + + return acc + +def HighLevelBTagAlgCfg(ConfigFlags, sequenceName, BTaggingCollection, NNFile = "", **options): + """Adds a SecVtxTool instance and registers it. + + input: name: The tool's name. + JetCollection The name of the jet collections. + ToolSvc: The ToolSvc instance. + options: Python dictionary of options to be passed to the SecVtxTool. + output: The tool.""" + + acc = ComponentAccumulator(sequenceName) + + Name = NNFile.replace("/", "_").replace("_network.json", "") + dl2 = acc.popToolsAndMerge(DL2ToolCfg(ConfigFlags, NNFile, **options)) + + options = {} + options['BTaggingCollectionName'] = BTaggingCollection + options['JetDecorator'] = dl2 + options['name'] = Name.lower() + + # -- create the association algorithm + acc.addEventAlgo(Analysis__HighLevelBTagAlg(**options)) + + return acc diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetBTaggingAlgConfig.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetBTaggingAlgConfig.py index daa2c261e3f0a24e18ad48dbc627aea6ce46c690..bdc8f1d296757f295a0a1e79faadddc220b7d209 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetBTaggingAlgConfig.py +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetBTaggingAlgConfig.py @@ -43,7 +43,8 @@ def JetBTaggingAlgCfg(ConfigFlags, JetCollection="", TaggerList=[], SetupScheme= options['BTagJFVtxCollectionName'] = btagname + 'JFVtx' options['JetCalibrationName'] = jetcol.replace('Track', 'PV0Track') options['BTaggingCollectionName'] = btagname - options['BTaggingLink'] = '.btaggingLink'+ts + options['BTaggingLinkName'] = '.btaggingLink'+ts + options['JetLinkName'] = options['BTaggingCollectionName'] + '.jetLink' # -- create main BTagging algorithm acc.addEventAlgo(JetBTaggingAlg(**options)) diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetSecVertexingAlgConfig.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetSecVertexingAlgConfig.py index fb16d0e57cf40555e1e5f8649d1ff8c0f9cefd44..8d9949d6509b9aaff013a42ed705ee552765488e 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetSecVertexingAlgConfig.py +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetSecVertexingAlgConfig.py @@ -33,7 +33,7 @@ def JetSecVertexingAlgCfg(ConfigFlags, JetCollection, ParticleCollection="", SVF options.setdefault('PrimaryVertexName', BTaggingFlags.PrimaryVertexCollectionName) options.setdefault('vxPrimaryCollectionName', BTaggingFlags.PrimaryVertexCollectionName) options['JetCollectionName'] = jetcol.replace('Track', 'PV0Track') + 'Jets' - options['BTagVxSecVertexInfoName'] = SVFinder + 'VxSecVertexInfo' + options['BTagVxSecVertexInfoName'] = SVFinder + 'VxSecVertexInfo_' + JetCollection options['TrackToJetAssociatorName'] = options['JetCollectionName'] + '.' + Associator options['BTagJFVtxCollectionName'] = btagname + JetSVLink options['BTagSVCollectionName'] = btagname + JetSVLink diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetSecVtxFindingAlgConfig.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetSecVtxFindingAlgConfig.py index 50e729c6f5347b8ba9f6ea6e989d0f789e5ee47c..069905ab2931cf8185db8709fd036d5798e70fa4 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetSecVtxFindingAlgConfig.py +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/JetSecVtxFindingAlgConfig.py @@ -36,7 +36,7 @@ def JetSecVtxFindingAlgCfg(ConfigFlags, JetCollection, ParticleCollection="", SV options.setdefault('vxPrimaryCollectionName', BTaggingFlags.PrimaryVertexCollectionName) options['JetCollectionName'] = jetcol.replace('Track', 'PV0Track') + 'Jets' options['TrackToJetAssociatorName'] = options['JetCollectionName'] + '.' + Associator - options['BTagVxSecVertexInfoName'] = SVFinder + 'VxSecVertexInfo' + options['BTagVxSecVertexInfoName'] = SVFinder + 'VxSecVertexInfo_' + JetCollection options['name'] = (jetcol + '_' + SVFinder + '_secvtxfinding').lower() # -- create the association algorithm diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagHighLevelAugmenterAlg.cxx b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagHighLevelAugmenterAlg.cxx new file mode 100644 index 0000000000000000000000000000000000000000..10be070149b4bbd728b5e49897943beec0a889de --- /dev/null +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagHighLevelAugmenterAlg.cxx @@ -0,0 +1,139 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +#include "BTagging/BTagHighLevelAugmenterAlg.h" + +#include <cmath> +#include <cstddef> +#include <regex> + +#include "xAODJet/Jet.h" +#include "xAODJet/JetContainer.h" +#include "StoreGate/WriteDecorHandle.h" + +namespace Analysis { + BTagHighLevelAugmenterAlg::BTagHighLevelAugmenterAlg( const std::string& name, ISvcLocator* loc ) + : AthAlgorithm(name, loc), + m_flipTagConfig("STANDARD"), + m_acc_jet_track_links("BTagTrackToJetAssociation") + { + declareProperty("FlipTagConfig", m_flipTagConfig); + declareProperty("BTagTrackToJetAssociatorName", m_acc_jet_track_links); + } + + StatusCode BTagHighLevelAugmenterAlg::initialize() { + ATH_MSG_INFO( "Inizializing " << name() << "... " ); + + // Initialize Container keys + ATH_MSG_DEBUG( "Inizializing containers:" ); + ATH_MSG_DEBUG( " ** " << m_BTagCollectionName ); + + ATH_CHECK( m_BTagCollectionName.initialize() ); + ATH_CHECK( m_bTagJetDecorLinkName.initialize() ); + + FlipTagConfig flipTagConf = FlavorTagDiscriminants::flipTagConfigFromString(m_flipTagConfig); + m_aug = std::make_unique<BTagJetAugmenter>(m_acc_jet_track_links, flipTagConf); + + m_dec_pt_uncalib = m_BTagCollectionName.key() + "." + m_aug->get_pt_uncalib_key(); + m_dec_eta_uncalib = m_BTagCollectionName.key() + "." + m_aug->get_eta_uncalib_key(); + m_dec_abs_eta_uncalib = m_BTagCollectionName.key() + "." + m_aug->get_abs_eta_uncalib_key(); + + m_dec_ip2d_nTrks = m_BTagCollectionName.key() + "." + m_aug->get_ip2d_nTrks_key(); + m_dec_ip2d_isDefaults = m_BTagCollectionName.key() + "." + m_aug->get_ip2d_isDefaults_key(); + m_dec_ip2d_cu = m_BTagCollectionName.key() + "." + m_aug->get_ip2d_cu_key(); + m_dec_ip2d_bu = m_BTagCollectionName.key() + "." + m_aug->get_ip2d_bu_key(); + m_dec_ip2d_bc = m_BTagCollectionName.key() + "." + m_aug->get_ip2d_bc_key(); + + m_dec_ip3d_nTrks = m_BTagCollectionName.key() + "." + m_aug->get_ip3d_nTrks_key(); + m_dec_ip3d_isDefaults = m_BTagCollectionName.key() + "." + m_aug->get_ip3d_isDefaults_key(); + m_dec_ip3d_cu = m_BTagCollectionName.key() + "." + m_aug->get_ip3d_cu_key(); + m_dec_ip3d_bu = m_BTagCollectionName.key() + "." + m_aug->get_ip2d_bu_key(); + m_dec_ip3d_bc = m_BTagCollectionName.key() + "." + m_aug->get_ip2d_bc_key(); + + m_dec_jf_isDefaults = m_BTagCollectionName.key() + "." + m_aug->get_jf_isDefaults_key(); + m_dec_jf_deltaR = m_BTagCollectionName.key() + "." + m_aug->get_jf_deltaR_key(); + + m_dec_sv1_isDefaults = m_BTagCollectionName.key() + "." + m_aug->get_sv1_isDefaults_key(); + + m_dec_secondaryVtx_isDefaults = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_isDefaults_key(); + m_dec_secondaryVtx_nTrks = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_nTrks_key(); + m_dec_secondaryVtx_m = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_m_key(); + m_dec_secondaryVtx_E = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_E_key(); + m_dec_secondaryVtx_EFrac = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_EFrac_key(); + m_dec_secondaryVtx_L3d = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_L3d_key(); + m_dec_secondaryVtx_Lxy = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_Lxy_key(); + m_dec_secondaryVtx_min_trk_flightDirRelEta = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_min_trk_flightDirRelEta_key(); + m_dec_secondaryVtx_max_trk_flightDirRelEta = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_max_trk_flightDirRelEta_key(); + m_dec_secondaryVtx_avg_trk_flightDirRelEta = m_BTagCollectionName.key() + "." + m_aug->get_secondaryVtx_avg_trk_flightDirRelEta_key(); + m_dec_min_trk_flightDirRelEta = m_BTagCollectionName.key() + "." + m_aug->get_min_trk_flightDirRelEta_key(); + m_dec_max_trk_flightDirRelEta = m_BTagCollectionName.key() + "." + m_aug->get_max_trk_flightDirRelEta_key(); + m_dec_avg_trk_flightDirRelEta = m_BTagCollectionName.key() + "." + m_aug->get_avg_trk_flightDirRelEta_key(); + + m_dec_smt_isDefaults = m_BTagCollectionName.key() + "." + m_aug->get_smt_isDefaults_key(); + + m_dec_rnnip_isDefaults = m_BTagCollectionName.key() + "." + m_aug->get_rnnip_isDefaults_key(); + + CHECK( m_dec_pt_uncalib.initialize() ); + CHECK( m_dec_eta_uncalib.initialize() ); + CHECK( m_dec_abs_eta_uncalib.initialize() ); + + CHECK( m_dec_ip2d_nTrks.initialize() ); + CHECK( m_dec_ip2d_isDefaults.initialize() ); + CHECK( m_dec_ip2d_cu.initialize() ); + CHECK( m_dec_ip2d_bu.initialize() ); + CHECK( m_dec_ip2d_bc.initialize() ); + + CHECK( m_dec_ip3d_nTrks.initialize() ); + CHECK( m_dec_ip3d_isDefaults.initialize() ); + CHECK( m_dec_ip3d_cu.initialize() ); + CHECK( m_dec_ip3d_bu.initialize() ); + CHECK( m_dec_ip3d_bc.initialize() ); + + CHECK( m_dec_jf_isDefaults.initialize() ); + CHECK( m_dec_jf_deltaR.initialize() ); + + CHECK( m_dec_sv1_isDefaults.initialize() ); + + CHECK( m_dec_secondaryVtx_isDefaults.initialize() ); + CHECK( m_dec_secondaryVtx_nTrks.initialize() ); + CHECK( m_dec_secondaryVtx_m.initialize() ); + CHECK( m_dec_secondaryVtx_E.initialize() ); + CHECK( m_dec_secondaryVtx_EFrac.initialize() ); + CHECK( m_dec_secondaryVtx_L3d.initialize() ); + CHECK( m_dec_secondaryVtx_Lxy.initialize() ); + CHECK( m_dec_secondaryVtx_min_trk_flightDirRelEta.initialize() ); + CHECK( m_dec_secondaryVtx_max_trk_flightDirRelEta.initialize() ); + CHECK( m_dec_secondaryVtx_avg_trk_flightDirRelEta.initialize() ); + CHECK( m_dec_min_trk_flightDirRelEta.initialize() ); + CHECK( m_dec_max_trk_flightDirRelEta.initialize() ); + CHECK( m_dec_avg_trk_flightDirRelEta.initialize() ); + + CHECK( m_dec_smt_isDefaults.initialize() ); + + CHECK( m_dec_rnnip_isDefaults.initialize() ); + + return StatusCode::SUCCESS; + } + + StatusCode BTagHighLevelAugmenterAlg::execute() { + ATH_MSG_DEBUG( "Executing " << name() << "... " ); + + SG::ReadHandle< xAOD::BTaggingContainer > h_bTagContainer( m_BTagCollectionName); + CHECK( h_bTagContainer.isValid() ); + const xAOD::BTaggingContainer* btags = h_bTagContainer.get(); + ATH_MSG_DEBUG( "Retrieved " << btags->size() << " input btagging..." ); + + SG::AuxElement::Accessor< ElementLink< xAOD::JetContainer > > jetAcc("jetLink"); + for (const xAOD::BTagging * btag : *btags) { + const xAOD::Jet* jet_ptr = *jetAcc(*btag); + m_aug->augment(*jet_ptr); + } + + return StatusCode::SUCCESS; + } + + + + +} diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagLightSecVertexing.cxx b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagLightSecVertexing.cxx index 506a589e1fbff83db4211aeb9b13282c15dca745..358cd14cad541617bc518d269b4c5fc732da3b10 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagLightSecVertexing.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/BTagLightSecVertexing.cxx @@ -126,8 +126,6 @@ namespace Analysis { std::vector<ElementLink<xAOD::TrackParticleContainer> > TrkList; float mass = -1., energyfrc = -1., energyTrk=-1, dsttomatlayer = -1; int n2trk = -1, npsec = -1; //npprm = -1; - - //std::vector< ElementLink< xAOD::VertexContainer > > SVertexLinks; if(myVertexInfoVKal->vertices().size()){ npsec=0; diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/HighLevelBTagAlg.cxx b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/HighLevelBTagAlg.cxx new file mode 100644 index 0000000000000000000000000000000000000000..444b50c7a58072fb85b62a68ef00755a12a7ab26 --- /dev/null +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/HighLevelBTagAlg.cxx @@ -0,0 +1,91 @@ +/* + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +*/ + +#include "BTagging/HighLevelBTagAlg.h" + +#include "xAODJet/JetContainer.h" +//general interface for secondary vertex finders +#include "InDetRecToolInterfaces/ISecVertexInJetFinder.h" +#include "VxSecVertex/VxSecVKalVertexInfo.h" +#include "VxSecVertex/VxJetFitterVertexInfo.h" + +#include "StoreGate/ReadDecorHandle.h" +#include "StoreGate/ReadHandle.h" + +namespace Analysis { + + HighLevelBTagAlg::HighLevelBTagAlg(const std::string& name, ISvcLocator* pSvcLocator): + AthAlgorithm(name,pSvcLocator), + m_jetDecorator(this) + //m_vxPrimaryName("PrimaryVertices") + { + declareProperty("JetDecorator", m_jetDecorator); + } + + HighLevelBTagAlg::~HighLevelBTagAlg() { + } + + StatusCode HighLevelBTagAlg::initialize() + { + // This will check that the properties were initialized properly + // by job configuration. + ATH_CHECK( m_BTagCollectionName.initialize() ); + m_btagJetLinkName = m_BTagCollectionName.key() + ".jetLink"; + ATH_CHECK( m_btagJetLinkName.initialize() ); + + /* ----------------------------------------------------------------------------------- */ + /* RETRIEVE SERVICES FROM STOREGATE */ + /* ----------------------------------------------------------------------------------- */ + + if ( m_jetDecorator.retrieve().isFailure() ) { + ATH_MSG_ERROR("#BTAG# Failed to retrieve " << m_jetDecorator); + } else { + ATH_MSG_DEBUG("#BTAG# Retrieved " << m_jetDecorator); + } + + // Prepare decorators + m_dec_d0 = m_TrackContainerKey.key() + "." + m_prefix.value() + m_dec_d0.key(); + m_dec_z0 = m_TrackContainerKey.key() + "." + m_prefix.value() + m_dec_z0.key(); + m_dec_d0_sigma = m_TrackContainerKey.key() + "." + m_prefix.value() + m_dec_d0_sigma.key(); + m_dec_z0_sigma = m_TrackContainerKey.key() + "." + m_prefix.value() + m_dec_z0_sigma.key(); + + m_dec_track_pos = m_TrackContainerKey.key() + "." + m_prefix.value() + m_dec_track_pos.key(); + m_dec_track_mom = m_TrackContainerKey.key() + "." + m_prefix.value() + m_dec_track_mom.key(); + + // Initialize decorators + CHECK( m_dec_d0.initialize() ); + CHECK( m_dec_z0.initialize() ); + CHECK( m_dec_d0_sigma.initialize() ); + CHECK( m_dec_z0_sigma.initialize() ); + CHECK( m_dec_track_pos.initialize() ); + CHECK( m_dec_track_mom.initialize() ); + + return StatusCode::SUCCESS; + } + + + StatusCode HighLevelBTagAlg::execute() { + //retrieve the BTagging container + SG::ReadHandle< xAOD::BTaggingContainer > h_btagContainer( m_BTagCollectionName); + SG::ReadDecorHandle<xAOD::BTaggingContainer, ElementLink< xAOD::JetContainer > > h_btagJetLinkName (m_btagJetLinkName); + if (!h_btagContainer.isValid()) { + ATH_MSG_ERROR( " cannot retrieve BTagging container with key " << m_BTagCollectionName.key() ); + return StatusCode::FAILURE; + } + if (!h_btagJetLinkName.isAvailable()) { + ATH_MSG_ERROR( " cannot retrieve Jet container EL decoration with key " << m_btagJetLinkName.key() ); + return StatusCode::FAILURE; + } + + + for (xAOD::BTaggingContainer::const_iterator btagIter = h_btagContainer->begin(); btagIter != h_btagContainer->end(); ++btagIter) { + const ElementLink< xAOD::JetContainer > jetCont = h_btagJetLinkName(**btagIter); + const xAOD::Jet* jet = *jetCont; + m_jetDecorator->decorate(*jet); + } + + return StatusCode::SUCCESS; + } + +} // namespace diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggingAlg.cxx b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggingAlg.cxx index 63565467e1848838ff5303d3a480d3460729e595..a0c71a3d03b6300ae196062e6d6ebd3ea6af81f6 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggingAlg.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/JetBTaggingAlg.cxx @@ -57,6 +57,7 @@ namespace Analysis { ATH_CHECK( m_BTaggingCollectionName.initialize() ); m_jetBTaggingLinkName = m_JetCollectionName.key() + m_BTagLink; ATH_CHECK( m_jetBTaggingLinkName.initialize() ); + ATH_CHECK( m_bTagJetDecorLinkName.initialize() ); /// retrieve the main BTagTool if ( m_bTagTool.retrieve().isFailure() ) { @@ -121,7 +122,9 @@ namespace Analysis { //Decor Jet with element link to the BTagging - SG::WriteDecorHandle<xAOD::JetContainer,ElementLink< xAOD::BTaggingContainer > > h_jetBTaggingLinkName(m_jetBTaggingLinkName); + SG::WriteDecorHandle<xAOD::JetContainer, ElementLink< xAOD::BTaggingContainer > > h_jetBTaggingLinkName(m_jetBTaggingLinkName); + //Decor BTagging with element link to the Jet + SG::WriteDecorHandle<xAOD::BTaggingContainer, ElementLink< xAOD::JetContainer > > h_bTagJetLinkName(m_bTagJetDecorLinkName); //Create a xAOD::BTaggingContainer in any case (must be done) std::string bTaggingContName = m_BTaggingCollectionName.key(); @@ -172,13 +175,16 @@ namespace Analysis { ATH_MSG_WARNING("#BTAG# Failed in taggers call"); } - //Create the element link from the jet to the btagging + //Create the element link from the jet to the btagging and reverse link for (size_t jetIndex=0; jetIndex < h_JetCollectionName->size() ; ++jetIndex) { const xAOD::Jet * jetToTag = h_JetCollectionName->at(jetIndex); xAOD::BTagging * itBTag = h_BTaggingCollectionName->at(jetIndex); ElementLink< xAOD::BTaggingContainer> linkBTagger; linkBTagger.toContainedElement(*h_BTaggingCollectionName.ptr(), itBTag); h_jetBTaggingLinkName(*jetToTag) = linkBTagger; + ElementLink< xAOD::JetContainer> linkJet; + linkJet.toContainedElement(*h_JetCollectionName.ptr(), jetToTag); + h_bTagJetLinkName(*itBTag) = linkJet; } return StatusCode::SUCCESS; diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/components/BTagging_entries.cxx b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/components/BTagging_entries.cxx index d6dc3959e3dca79f45204a4e477d8999ebe89836..34af5480e2b5df8f309de7ded5e906c54bf58d79 100644 --- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/components/BTagging_entries.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/components/BTagging_entries.cxx @@ -11,6 +11,8 @@ #include "BTagging/JetSecVertexingAlg.h" #include "BTagging/JetSecVtxFindingAlg.h" #include "BTagging/BTagTrackAugmenterAlg.h" +#include "BTagging/BTagHighLevelAugmenterAlg.h" +#include "BTagging/HighLevelBTagAlg.h" using namespace Analysis ; @@ -27,5 +29,7 @@ DECLARE_COMPONENT( JetBTaggerAlg ) DECLARE_COMPONENT( JetBTaggingAlg ) DECLARE_COMPONENT( JetParticleAssociationAlg ) DECLARE_COMPONENT( BTagTrackAugmenterAlg ) +DECLARE_COMPONENT( BTagHighLevelAugmenterAlg ) +DECLARE_COMPONENT( HighLevelBTagAlg ) /** factory entries need to have the name of the package */ diff --git a/PhysicsAnalysis/JetTagging/JetTagCalibration/src/JetTagCalibCondAlg.cxx b/PhysicsAnalysis/JetTagging/JetTagCalibration/src/JetTagCalibCondAlg.cxx index 7dbba74bc7dbc370b7d0d01c208571e4dd6b94b9..d355ea90553dd55f57501cb71b20376ccc09f3b7 100644 --- a/PhysicsAnalysis/JetTagging/JetTagCalibration/src/JetTagCalibCondAlg.cxx +++ b/PhysicsAnalysis/JetTagging/JetTagCalibration/src/JetTagCalibCondAlg.cxx @@ -211,10 +211,15 @@ namespace Analysis { //Dl1 taggers if (std::find(m_taggers.begin(), m_taggers.end(), "DL1") != m_taggers.end()) { initializeDL1("DL1"); + } + + if (std::find(m_taggers.begin(), m_taggers.end(), "DL1mu") != m_taggers.end()) { initializeDL1("DL1mu"); - initializeDL1("DL1rnn"); } + if (std::find(m_taggers.begin(), m_taggers.end(), "DL1rnn") != m_taggers.end()) { + initializeDL1("DL1rnn"); + } return StatusCode::SUCCESS; } diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/python/MultivariateTagManagerConfig.py b/PhysicsAnalysis/JetTagging/JetTagTools/python/MultivariateTagManagerConfig.py index 0d5807d2e471969a2347f1e976f7a90ad0b9e67e..1b2c372c368653495ef94fb2c4b62ba832f89b79 100644 --- a/PhysicsAnalysis/JetTagging/JetTagTools/python/MultivariateTagManagerConfig.py +++ b/PhysicsAnalysis/JetTagging/JetTagTools/python/MultivariateTagManagerConfig.py @@ -1,8 +1,7 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory -from BTagging.BTaggingFlags import BTaggingFlags from JetTagTools.DL1TagConfig import DL1TagCfg from JetTagTools.MV2TagConfig import MV2TagCfg @@ -24,6 +23,13 @@ def MultivariateTagManagerCfg(flags, name = 'MultivariateTagManager', TaggerList output: The actual tool.""" acc = ComponentAccumulator() mvtagtoollist = [] + MultivariateTagManagerAuxBranches = [] + MultivariateTagManagerAuxBranches += ['SMT_discriminant'] #ATLASRECTS-5381 + + if 'DL1rnn' in TaggerList or 'MV2c10rnn' in TaggerList: + #RNNIP output variables are needed + rnnip_outputs = ['b','c','u','tau'] + MultivariateTagManagerAuxBranches += ['rnnip_p' + x for x in rnnip_outputs] if 'DL1' in TaggerList: dl1 = acc.popToolsAndMerge(DL1TagCfg(flags, 'DL1')) @@ -68,7 +74,7 @@ def MultivariateTagManagerCfg(flags, name = 'MultivariateTagManager', TaggerList 'inputIP3DSourceName' : 'IP3D', 'inputJFSourceName' : 'JetFitter', 'MVTagToolList' : mvtagtoollist, - 'arbitraryAuxData' : BTaggingFlags.MultivariateTagManagerAuxBranches, + 'arbitraryAuxData' : MultivariateTagManagerAuxBranches, } for option in defaults: options.setdefault(option, defaults[option]) diff --git a/PhysicsAnalysis/TauID/TauDQA/CMakeLists.txt b/PhysicsAnalysis/TauID/TauDQA/CMakeLists.txt index 46cf6b861ee317679e1ca4bfcbecdf98696e5d36..2d3d731430971df6fe35a4a60a30bcad3ceef3ca 100644 --- a/PhysicsAnalysis/TauID/TauDQA/CMakeLists.txt +++ b/PhysicsAnalysis/TauID/TauDQA/CMakeLists.txt @@ -1,33 +1,15 @@ -################################################################################ -# Package: TauDQA -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( TauDQA ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - GaudiKernel - PRIVATE - Control/AthenaBaseComps - Control/AthenaMonitoring - Event/xAOD/xAODEgamma - Event/xAOD/xAODJet - Event/xAOD/xAODTau - Event/xAOD/xAODTruth - PhysicsAnalysis/TauID/TauHistUtils - PhysicsAnalysis/TruthParticleID/McParticleEvent - Tracking/TrkValidation/TrkValHistUtils ) - # External dependencies: -find_package( HepMC ) -find_package( HepPDT ) -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) +find_package( ROOT COMPONENTS Core ) # Component(s) in the package: atlas_add_component( TauDQA - src/*.cxx - src/components/*.cxx - INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} - LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${HEPMC_LIBRARIES} GaudiKernel AthenaBaseComps AthenaMonitoringLib xAODEgamma xAODJet xAODTau xAODTruth TauHistUtils McParticleEvent TrkValHistUtils TauAnalysisToolsLib ) - + src/*.h src/*.cxx src/components/*.cxx + INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} + LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel AthenaBaseComps + AthenaMonitoringLib TauAnalysisToolsLib TauHistUtils xAODJet xAODEgamma + xAODTau xAODTruth ) diff --git a/PhysicsAnalysis/TauID/TauDQA/src/PhysValTau.cxx b/PhysicsAnalysis/TauID/TauDQA/src/PhysValTau.cxx index 8202cb34952227f892e1204fab002f2ad3324b93..449780e738261893d7d8e4d77333ee88f4a0a014 100644 --- a/PhysicsAnalysis/TauID/TauDQA/src/PhysValTau.cxx +++ b/PhysicsAnalysis/TauID/TauDQA/src/PhysValTau.cxx @@ -1,7 +1,7 @@ /////////////////////// -*- C++ -*- ///////////////////////////// /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // PhysValTau.cxx @@ -10,7 +10,7 @@ /////////////////////////////////////////////////////////////////// // PhysVal includes -#include "../share/PhysValTau.h" +#include "PhysValTau.h" // STL includes #include <vector> @@ -24,7 +24,6 @@ #include "xAODTruth/TruthParticleContainer.h" #include "xAODTruth/TruthParticle.h" #include "AthenaBaseComps/AthCheckMacros.h" -#include "xAODRootAccess/TEvent.h" /////////////////////////////////////////////////////////////////// // Public methods: @@ -53,11 +52,6 @@ PhysValTau::PhysValTau(const std::string& type, declareProperty("NominalTauSelectionTool", m_nomiTauSel); } -// Destructor -/////////////// -PhysValTau::~PhysValTau() -{} - // Athena algtool's Hooks //////////////////////////// StatusCode PhysValTau::initialize() diff --git a/PhysicsAnalysis/TauID/TauDQA/share/PhysValTau.h b/PhysicsAnalysis/TauID/TauDQA/src/PhysValTau.h similarity index 67% rename from PhysicsAnalysis/TauID/TauDQA/share/PhysValTau.h rename to PhysicsAnalysis/TauID/TauDQA/src/PhysValTau.h index fc1606954626e4dbc0ffad10b43073c2d8c70364..2cebc7d14ef5aade489fea2c1465b101785b9f83 100644 --- a/PhysicsAnalysis/TauID/TauDQA/share/PhysValTau.h +++ b/PhysicsAnalysis/TauID/TauDQA/src/PhysValTau.h @@ -1,33 +1,28 @@ -///////////////////////// -*- C++ -*- ///////////////////////////// -// PhysValTau.h -// Header file for class PhysValTau -// Author: S.Binet<binet@cern.ch> -/////////////////////////////////////////////////////////////////// +// Dear emacs, this is -*- c++ -*- +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef TAUDQA_PHYSVALTAU_H #define TAUDQA_PHYSVALTAU_H // STL includes +#include <memory> #include <string> #include <vector> // FrameWork includes #include "GaudiKernel/ServiceHandle.h" -#include "AsgTools/ToolHandle.h" +#include "GaudiKernel/ToolHandle.h" // Local includes #include "AthenaMonitoring/ManagedMonitorToolBase.h" -#include "TauValidationPlots.h" #include "TauAnalysisTools/ITauTruthMatchingTool.h" #include "TauAnalysisTools/ITauSelectionTool.h" -#include <TLorentzVector.h> -//Additional includes +// Local includes +#include "TauValidationPlots.h" #include "RecoTypes.h" -// Forward declaration - -//namespace PhysVal { - class PhysValTau : public ManagedMonitorToolBase { @@ -35,41 +30,21 @@ class PhysValTau // Public methods: /////////////////////////////////////////////////////////////////// public: - - // Copy constructor: - /// Constructor with parameters: PhysValTau( const std::string& type, const std::string& name, const IInterface* parent ); - /// Destructor: - virtual ~PhysValTau(); - // Athena algtool's Hooks virtual StatusCode initialize(); virtual StatusCode bookHistograms(); virtual StatusCode fillHistograms(); virtual StatusCode procHistograms(); - - /////////////////////////////////////////////////////////////////// - // Const methods: - /////////////////////////////////////////////////////////////////// - - /////////////////////////////////////////////////////////////////// - // Non-const methods: - /////////////////////////////////////////////////////////////////// - - /////////////////////////////////////////////////////////////////// // Private data: /////////////////////////////////////////////////////////////////// private: - - /// Default constructor: - PhysValTau(); - // Containers //std::string m_TruthParticleContainerName; std::string m_TauJetContainerName; @@ -97,11 +72,4 @@ class PhysValTau }; -// I/O operators -////////////////////// - -/////////////////////////////////////////////////////////////////// -// Inline methods: -/////////////////////////////////////////////////////////////////// -//} #endif //> !TAUDQA_PHYSVALTAU_H diff --git a/PhysicsAnalysis/TauID/TauDQA/src/RecoTypes.cxx b/PhysicsAnalysis/TauID/TauDQA/src/RecoTypes.cxx deleted file mode 100644 index eab945cc2586abcc9aac2afea1cef476ffe076d3..0000000000000000000000000000000000000000 --- a/PhysicsAnalysis/TauID/TauDQA/src/RecoTypes.cxx +++ /dev/null @@ -1,18 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - - -#include "../share/RecoTypes.h" - -// RecoTypes::DecayMode GetTrueMode(Comp_Tau* trueTau) { -// int nCharged = trueTau->GetNumChargedPions(); -// int nNeutral = trueTau->GetNumNeutralPions(); -// return RecoTypes::GetDecayMode(nCharged, nNeutral); -// } - -// RecoTypes::DecayMode GetRecoMode(Comp_TauFromAlg* recoTau) { -// int nCharged = recoTau->GetNumChargedPions(); -// int nNeutral = recoTau->GetNumNeutralPions(); -// return RecoTypes::GetDecayMode(nCharged, nNeutral); -// } diff --git a/PhysicsAnalysis/TauID/TauDQA/share/RecoTypes.h b/PhysicsAnalysis/TauID/TauDQA/src/RecoTypes.h similarity index 97% rename from PhysicsAnalysis/TauID/TauDQA/share/RecoTypes.h rename to PhysicsAnalysis/TauID/TauDQA/src/RecoTypes.h index c5eb655720c609b198109bedf0fbfeb97df4320e..c7dc25f59dc5ec2be158b02f827129008cc38e4e 100644 --- a/PhysicsAnalysis/TauID/TauDQA/share/RecoTypes.h +++ b/PhysicsAnalysis/TauID/TauDQA/src/RecoTypes.h @@ -1,4 +1,7 @@ - +// Dear emacs, this is -*- c++ -*- +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// #ifndef RECOTYPES_H_ #define RECOTYPES_H_ diff --git a/PhysicsAnalysis/TauID/TauDQA/src/TauValidationPlots.cxx b/PhysicsAnalysis/TauID/TauDQA/src/TauValidationPlots.cxx index 8b80c4553c905493a9603d9a681c1f6a5fb34ee0..1e55d8a1c36a0b2359752e3e66f0f2f23a92fb73 100644 --- a/PhysicsAnalysis/TauID/TauDQA/src/TauValidationPlots.cxx +++ b/PhysicsAnalysis/TauID/TauDQA/src/TauValidationPlots.cxx @@ -1,8 +1,8 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ -#include "../share/TauValidationPlots.h" +#include "TauValidationPlots.h" TauValidationPlots::TauValidationPlots(PlotBase* pParent, std::string sDir, std::string sTauJetContainerName): PlotBase(pParent, sDir), diff --git a/PhysicsAnalysis/TauID/TauDQA/share/TauValidationPlots.h b/PhysicsAnalysis/TauID/TauDQA/src/TauValidationPlots.h similarity index 95% rename from PhysicsAnalysis/TauID/TauDQA/share/TauValidationPlots.h rename to PhysicsAnalysis/TauID/TauDQA/src/TauValidationPlots.h index 126cd4f772eb336d1f855119950356f19f5dfe1f..98c67ed0b60670ad2643c599bd6cb142325ae748 100644 --- a/PhysicsAnalysis/TauID/TauDQA/share/TauValidationPlots.h +++ b/PhysicsAnalysis/TauID/TauDQA/src/TauValidationPlots.h @@ -1,5 +1,9 @@ -#ifndef MUONPHYSVALMONITORING_MUONVALIDATIONPLOTS_H -#define MUONPHYSVALMONITORING_MUONVALIDATIONPLOTS_H +// Dear emacs, this is -*- c++ -*- +// +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +// +#ifndef TAUDQA_TAUVALIDATIONPLOTS_H +#define TAUDQA_TAUVALIDATIONPLOTS_H // PlotBase objects #include "TauHistUtils/ParamPlots.h" @@ -123,4 +127,4 @@ class TauValidationPlots:public PlotBase { }; -#endif +#endif // not TAUDQA_TAUVALIDATIONPLOTS_H diff --git a/PhysicsAnalysis/TauID/TauDQA/src/components/TauDQA_entries.cxx b/PhysicsAnalysis/TauID/TauDQA/src/components/TauDQA_entries.cxx index 062350b8b12551b08a4c1cd9b723ca5d4d12a42a..e08e2940f7958e38cf168f90165685cd8dad5584 100644 --- a/PhysicsAnalysis/TauID/TauDQA/src/components/TauDQA_entries.cxx +++ b/PhysicsAnalysis/TauID/TauDQA/src/components/TauDQA_entries.cxx @@ -1,4 +1,6 @@ -#include "../../share/PhysValTau.h" +// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + +#include "../PhysValTau.h" DECLARE_COMPONENT( PhysValTau ) diff --git a/Projects/AthGeneration/package_filters.txt b/Projects/AthGeneration/package_filters.txt index 49e632cfc35cf6556420884267e761c1457a3597..fbfb1cc57940c3a77947512cd74d39d61706138c 100644 --- a/Projects/AthGeneration/package_filters.txt +++ b/Projects/AthGeneration/package_filters.txt @@ -1,6 +1,7 @@ # # Package filtering rules for the AthGeneration project build. # ++ AsgExternal/Asg_Test + AtlasTest/TestTools + Calorimeter/CaloConditions + Calorimeter/CaloCondBlobObjs diff --git a/Projects/AthSimulation/package_filters.txt b/Projects/AthSimulation/package_filters.txt index f12581926710812c33dd35a30cf6e660af2a710d..0e75239391e880f1a8ee0073f3dfcd450014312a 100644 --- a/Projects/AthSimulation/package_filters.txt +++ b/Projects/AthSimulation/package_filters.txt @@ -2,6 +2,7 @@ # Package filtering rules for the AthSimulation project build. # ++ AsgExternal/Asg_Test + AtlasGeometryCommon/BeamPipeGeoModel + AtlasGeometryCommon/GeoModelEnvelopes + AtlasGeometryCommon/Interpreters diff --git a/Projects/Athena/cmake/PreConfig.cmake.in b/Projects/Athena/cmake/PreConfig.cmake.in index 8d08fdd5a0b5d7fd6ca88061f89bfef8827f72b3..3bf7874bda404884e5ef0c53d8460399d1eea31d 100644 --- a/Projects/Athena/cmake/PreConfig.cmake.in +++ b/Projects/Athena/cmake/PreConfig.cmake.in @@ -1,3 +1,4 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # # Pre-config script to propagate variables to downstream projects # @@ -17,4 +18,6 @@ if( Athena_FIND_QUIETLY ) endif() find_package( Acts ${_quietFlag} COMPONENTS Core ) find_package( nlohmann_json ${_quietFlag} ) +find_package( Qt5 ${_quietFlag} COMPONENTS Core OpenGL Gui PrintSupport Widgets + Sql Network ) unset( _quietFlag ) diff --git a/TileCalorimeter/TileConditions/python/TileTimingConfig.py b/TileCalorimeter/TileConditions/python/TileTimingConfig.py index 895656d69d3e42edb305161e7372c5d9731a0d07..bb900225069ccfb201ad00bf90c903da66fe41e4 100644 --- a/TileCalorimeter/TileConditions/python/TileTimingConfig.py +++ b/TileCalorimeter/TileConditions/python/TileTimingConfig.py @@ -13,8 +13,6 @@ def TileTimingCondAlgCfg(flags, **kwargs): Keyword arguments: Source -- source of Tile timing conditions (COOL, FILE). Defaults to COOL. TileTiming -- name of Tile timing conditions object. Defaults to TileTiming. - TimingType -- type of Tile timing. Defaults to run type (PED->PHY, BILAS->LAS, MONOCIS->CIS). - Possible Tile timing types: PHY, LAS, GAP/LAS, CIS. ForceOnline -- flag to use online timing in offline. Defaults to False. """ @@ -27,14 +25,9 @@ def TileTimingCondAlgCfg(flags, **kwargs): source = kwargs.get('Source', 'COOL') timing = kwargs.get('TileTiming', 'TileTiming') - timingType = kwargs.get('TimingType', runType) forceOnline = kwargs.get('ForceOnline', False) - actualTimingType = {'PHY' : 'PHY', 'PED' : 'PHY', - 'LAS' : 'LAS', 'BILAS' : 'LAS', 'GAPLAS' : 'GAP/LAS', - 'CIS' : 'CIS', 'MONOCIS' : 'CIS'} - - timingType = actualTimingType.get(timingType, timingType) + timingType = flags.Tile.TimingType if timingType not in ['PHY', 'LAS', 'GAP/LAS', 'CIS']: raise(Exception("Invalid Tile timing type: %s" % timingType)) diff --git a/TileCalorimeter/TileConfiguration/python/TileConfigFlags.py b/TileCalorimeter/TileConfiguration/python/TileConfigFlags.py index de5fb89110167ac206b10c5a3b59f4502c82b2ba..45857ba68fdd448dc24f66be045949f82f5f2378 100644 --- a/TileCalorimeter/TileConfiguration/python/TileConfigFlags.py +++ b/TileCalorimeter/TileConfiguration/python/TileConfigFlags.py @@ -31,6 +31,7 @@ def createTileConfigFlags(): tcf.addFlag('Tile.correctPedestalDifference', _correctPedestalDifference) tcf.addFlag('Tile.RawChannelContainer', _getRawChannelContainer) tcf.addFlag('Tile.useDCS', _useDCS) + tcf.addFlag('Tile.TimingType', _getTimingType) return tcf @@ -152,6 +153,13 @@ def _getRawChannelContainer(prevFlags): return rawChannelContainer +def _getTimingType(prevFlags): + # Tile timing types: PHY, LAS, GAP/LAS, CIS + timingType = {'PHY' : 'PHY', 'PED' : 'PHY', + 'LAS' : 'LAS', 'BILAS' : 'LAS', 'GAPLAS' : 'GAP/LAS', + 'CIS' : 'CIS', 'MONOCIS' : 'CIS'} + + return timingType.get(prevFlags.Tile.RunType, 'UNDEFINED') if __name__=="__main__": import sys diff --git a/TileCalorimeter/TileMonitoring/python/TileRawChannelTimeMonitorAlgorithm.py b/TileCalorimeter/TileMonitoring/python/TileRawChannelTimeMonitorAlgorithm.py index bdf98f09c2f1b9045fc1685d6e6460f17bf6eb58..120e52a4cf89ed7992abc832feec41ecccc01500 100644 --- a/TileCalorimeter/TileMonitoring/python/TileRawChannelTimeMonitorAlgorithm.py +++ b/TileCalorimeter/TileMonitoring/python/TileRawChannelTimeMonitorAlgorithm.py @@ -138,6 +138,7 @@ if __name__=='__main__': ConfigFlags.DQ.enableLumiAccess = False ConfigFlags.Tile.RunType = 'LAS' + ConfigFlags.Tile.TimingType = 'GAP/LAS' ConfigFlags.Tile.doFit = True ConfigFlags.Tile.correctTime = True ConfigFlags.Tile.doOverflowFit = False diff --git a/TileCalorimeter/TileRecUtils/python/TileDQstatusConfig.py b/TileCalorimeter/TileRecUtils/python/TileDQstatusConfig.py index 9c1f93474c26e2a9f8c5dfabdbbc31ecd7a0ff77..34298431cad477e98b78edd64f67ccc9f816aa4d 100644 --- a/TileCalorimeter/TileRecUtils/python/TileDQstatusConfig.py +++ b/TileCalorimeter/TileRecUtils/python/TileDQstatusConfig.py @@ -50,7 +50,7 @@ def TileDQstatusAlgCfg(flags, **kwargs): kwargs.setdefault('name', name) if not (flags.Input.isMC or flags.Overlay.DataOverlay or flags.Input.Format.lower() == 'pool'): - if flags.Tile.RunType == 'PHY': + if flags.Tile.RunType == 'PHY' or flags.Tile.TimingType == 'GAP/LAS': beamElemContainer = "" else: beamElemContainer = 'TileBeamElemCnt' diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.cxx b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.cxx index 736e39ca6c3075ca0543f1d4df347065213410b4..65dfdf13ac5e54a459af76799c63445ae17740ba 100644 --- a/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.cxx +++ b/Trigger/TrigMonitoring/TrigSteerMonitor/src/TrigSignatureMoniMT.cxx @@ -156,9 +156,12 @@ StatusCode TrigSignatureMoniMT::stop() { for ( const auto& seq : chain.getList("sequencers", true) ){ // example sequencer name is "Step1_FastCalo_electron", we need only information about Step + number const std::string seqName = seq.getValue(); - std::smatch stepName; - std::regex_search(seqName.begin(), seqName.end(), stepName, std::regex("^Step[0-9]+")); - chainToSteps[chain.name()].insert( stepName[0] ); + std::smatch stepNameMatch; + std::regex_search(seqName.begin(), seqName.end(), stepNameMatch, std::regex("[Ss]tep[0-9]+")); + + std::string stepName = stepNameMatch[0]; + stepName[0] = std::toupper(stepName[0]); // fix for "step1" names + chainToSteps[chain.name()].insert( stepName ); } } diff --git a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx index c8aec15e386c167079a165018f55649c461e1cd8..68afffcdf052abc46d81162a907fa1cddca20533 100644 --- a/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx +++ b/Trigger/TrigSteer/DecisionHandling/src/ComboHypo.cxx @@ -204,20 +204,19 @@ StatusCode ComboHypo::execute(const EventContext& context ) const { break; } - //keep track of the number of unique features + //keep track of the number of unique features/rois for (const ElementLink<DecisionContainer>& dEL : it->second){ uint32_t featureKey = 0, roiKey = 0; uint16_t featureIndex = 0, roiIndex = 0; - // NOTE: roiKey, roiIndex not currently used in this discrimination + // NOTE: roiKey, roiIndex are only currently used in the discrimination for L1 Decision objects (which don't have a 'feature' link) + // NOTE: We should make it configurable to choose either the feature or the ROI here, as done in the InputMaker base class when merging. ATH_CHECK( extractFeatureAndRoI(dEL, featureKey, featureIndex, roiKey, roiIndex) ); - // TODO: move this to InitialRoI for serial merging - const uint32_t featureHash = (featureKey + featureIndex); - if (featureHash == 0) { - ATH_MSG_WARNING("Disregarding feature hash of zero"); - continue; + const uint32_t uniquenessHash = (featureKey != 0 ? (featureKey + featureIndex) : (roiKey + roiIndex)); + if (uniquenessHash == 0) { + ATH_MSG_ERROR("Object has no feature, and no initialRoI. Cannot get obtain unique element to avoid double-counting."); + return StatusCode::FAILURE; } - uniqueDecisionFeatures.insert( featureHash ); - // TODO - do something with the ROI + uniqueDecisionFeatures.insert( uniquenessHash ); } // save combinations of all legs for the tools @@ -276,23 +275,18 @@ StatusCode ComboHypo::extractFeatureAndRoI(const ElementLink<DecisionContainer>& uint32_t featureClid = 0; // Note: Unused. We don't care what the type of the feature is here const bool result = (*dEL)->typelessGetObjectLink(featureString(), featureKey, featureClid, featureIndex); if (!result) { - // WARNING? - ATH_MSG_ERROR("Did not find the feature for " << dEL.dataID() << " index " << dEL.index()); + ATH_MSG_WARNING("Did not find the feature for " << dEL.dataID() << " index " << dEL.index()); } // Try and get seeding ROI data too. Don't need to be type-less here - if (m_requireUniqueROI) { - LinkInfo<TrigRoiDescriptorCollection> roiSeedLI = findLink<TrigRoiDescriptorCollection>((*dEL), initialRoIString()); - if (roiSeedLI.isValid()) { - roiKey = roiSeedLI.link.key(); - roiIndex = roiSeedLI.link.index(); - } - else { - ATH_MSG_ERROR("Did not find a seeding ROI for " << dEL.dataID() << " index " << dEL.index()); - } + LinkInfo<TrigRoiDescriptorCollection> roiSeedLI = findLink<TrigRoiDescriptorCollection>((*dEL), initialRoIString()); + if (roiSeedLI.isValid()) { + roiKey = roiSeedLI.link.key(); + roiIndex = roiSeedLI.link.index(); } return StatusCode::SUCCESS; } + StatusCode ComboHypo::fillDecisionsMap( LegDecisionsMap & dmap, const EventContext& context) const { for ( size_t inputContainerIndex = 0; inputContainerIndex < m_inputs.size(); ++inputContainerIndex ) { auto inputHandle = SG::makeHandle( m_inputs.at(inputContainerIndex), context ); diff --git a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_mt1_build.ref b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_mt1_build.ref index 1839a4a78320eb118d9a281af4e2ca1d3ce19645..02fe9ebae47a2902853740abdf666bfd197c7f9f 100644 --- a/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_mt1_build.ref +++ b/Trigger/TrigValidation/TrigAnalysisTest/share/ref_RDOtoRDOTrig_mt1_build.ref @@ -77,8 +77,8 @@ TrigSignatureMoniMT INFO HLT_e300_etcut_L1EM24VHI TrigSignatureMoniMT INFO -- #3481091923 Events 6 6 0 0 0 - - 0 TrigSignatureMoniMT INFO -- #3481091923 Features 0 0 0 - - TrigSignatureMoniMT INFO HLT_e3_etcut1step_mu6fast_L1EM8I_MU10 #2086577378 -TrigSignatureMoniMT INFO -- #2086577378 Events 5 5 - - - - - 5 -TrigSignatureMoniMT INFO -- #2086577378 Features - - - - - +TrigSignatureMoniMT INFO -- #2086577378 Events 5 5 5 - - - - 5 +TrigSignatureMoniMT INFO -- #2086577378 Features 5 - - - - TrigSignatureMoniMT INFO HLT_e3_etcut_L1EM3 #683953566 TrigSignatureMoniMT INFO -- #683953566 Events 20 20 20 20 20 - - 20 TrigSignatureMoniMT INFO -- #683953566 Features 171 1861 390 - - @@ -275,8 +275,8 @@ TrigSignatureMoniMT INFO HLT_mu6_msonly_L1MU6 #38 TrigSignatureMoniMT INFO -- #3895421032 Events 10 10 10 0 10 - - 10 TrigSignatureMoniMT INFO -- #3895421032 Features 14 0 17 - - TrigSignatureMoniMT INFO HLT_mu6_mu4_L12MU4 #1713982776 -TrigSignatureMoniMT INFO -- #1713982776 Events 4 4 - - - - - 4 -TrigSignatureMoniMT INFO -- #1713982776 Features - - - - - +TrigSignatureMoniMT INFO -- #1713982776 Events 4 4 4 4 4 4 - 4 +TrigSignatureMoniMT INFO -- #1713982776 Features 8 8 12 10 - TrigSignatureMoniMT INFO HLT_mu6fast_L1MU6 #3518031697 TrigSignatureMoniMT INFO -- #3518031697 Events 10 10 10 - - - - 10 TrigSignatureMoniMT INFO -- #3518031697 Features 14 - - - - @@ -383,8 +383,8 @@ TrigSignatureMoniMT INFO HLT_xe30_cell_L1XE10 #16 TrigSignatureMoniMT INFO -- #1649696554 Events 19 19 17 - - - - 17 TrigSignatureMoniMT INFO -- #1649696554 Features 17 - - - - TrigSignatureMoniMT INFO HLT_xe30_cell_xe30_tcpufit_L1XE10 #3768353779 -TrigSignatureMoniMT INFO -- #3768353779 Events 19 19 - - - - - 15 -TrigSignatureMoniMT INFO -- #3768353779 Features - - - - - +TrigSignatureMoniMT INFO -- #3768353779 Events 19 19 15 - - - - 15 +TrigSignatureMoniMT INFO -- #3768353779 Features 15 - - - - TrigSignatureMoniMT INFO HLT_xe30_mht_L1XE10 #3626903018 TrigSignatureMoniMT INFO -- #3626903018 Events 19 19 19 - - - - 19 TrigSignatureMoniMT INFO -- #3626903018 Features 19 - - - - @@ -401,5 +401,5 @@ TrigSignatureMoniMT INFO HLT_xe65_cell_L1XE50 #53 TrigSignatureMoniMT INFO -- #531141817 Events 10 10 7 - - - - 7 TrigSignatureMoniMT INFO -- #531141817 Features 7 - - - - TrigSignatureMoniMT INFO HLT_xe65_cell_xe110_tcpufit_L1XE50 #115518400 -TrigSignatureMoniMT INFO -- #115518400 Events 10 10 - - - - - 3 -TrigSignatureMoniMT INFO -- #115518400 Features - - - - - +TrigSignatureMoniMT INFO -- #115518400 Events 10 10 3 - - - - 3 +TrigSignatureMoniMT INFO -- #115518400 Features 3 - - - - diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_runStopRun_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_runStopRun_build.py index d822b0460d486794927af05c643ada350ec60446..b6a0761e32da4b4f2f17ab198769d4f434a20b98 100755 --- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_runStopRun_build.py +++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_HelloWorld_runStopRun_build.py @@ -6,7 +6,7 @@ # Skipping art-output which has no effect for build tests. # If you create a grid version, check art-output in existing grid tests. -from TrigValTools.TrigValSteering import Test, ExecStep +from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps from TrigP1Test import TrigP1TestSteps ex = ExecStep.ExecStep() @@ -28,5 +28,14 @@ test.check_steps = TrigP1TestSteps.default_check_steps_OHMon(test, 'run_2.root') logmerge = test.get_step("LogMerge") logmerge.extra_log_regex = 'athenaHLT-.*-.*(.out|.err)' +# Extra step comparing histograms between the two runs +rc = CheckSteps.RootCompStep("RootComp_runStopRun") +rc.input_file = 'run_2.root' +rc.reference = 'run_1.root' +rc.args += ' --output=rootcomp_runStopRun' +rc.explicit_reference = True # Don't check if reference exists at configuration time +rc.required = True # Final exit code depends on this step +test.check_steps.append(rc) + import sys sys.exit(test.run()) diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_runStopRun_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_runStopRun_build.py index 2e268a218042e8c066396d3781ee68802eb5f20f..e587b630172fcfa1884c79a4a7500ef8a5a38b04 100755 --- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_runStopRun_build.py +++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_runStopRun_build.py @@ -6,7 +6,7 @@ # Skipping art-output which has no effect for build tests. # If you create a grid version, check art-output in existing grid tests. -from TrigValTools.TrigValSteering import Test, ExecStep +from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps from TrigP1Test import TrigP1TestSteps ex = ExecStep.ExecStep() @@ -28,5 +28,14 @@ test.check_steps = TrigP1TestSteps.default_check_steps_OHMon(test, 'run_2.root') logmerge = test.get_step("LogMerge") logmerge.extra_log_regex = 'athenaHLT-.*-.*(.out|.err)' +# Extra step comparing histograms between the two runs +rc = CheckSteps.RootCompStep("RootComp_runStopRun") +rc.input_file = 'run_2.root' +rc.reference = 'run_1.root' +rc.args += ' --output=rootcomp_runStopRun' +rc.explicit_reference = True # Don't check if reference exists at configuration time +rc.required = True # Final exit code depends on this step +test.check_steps.append(rc) + import sys sys.exit(test.run()) diff --git a/Trigger/TrigValidation/TrigValTools/bin/rootcomp.py b/Trigger/TrigValidation/TrigValTools/bin/rootcomp.py index 43c73c22819ab77cb7c9d51b385419983d4411ed..8bd362668c10bbf319a4f44e50483b744808c63f 100755 --- a/Trigger/TrigValidation/TrigValTools/bin/rootcomp.py +++ b/Trigger/TrigValidation/TrigValTools/bin/rootcomp.py @@ -140,6 +140,7 @@ def main(): opts.skip += ["ErrorCodes_vs_Chains_"] opts.skip += ["Initital_RoIs_phi_vs_eta"] opts.skip += ["Time$","time_","Time_", "_time"] + opts.skip += ["HltEventLoopMgr/TotalTime"] opts.skip += ["Unpck$"] opts.skip += ["BufFreeCnt$", "CalEvtSize$"] # muon calibration buffer opts.skip += ["/TrigMemMonitor/"] # memory monitor @@ -147,6 +148,7 @@ def main(): opts.skip += ["GeneralOpInfo"] # release number, etc. opts.skip += ["MessageSvc/MessageCount"] # MessageSvc opts.skip += ["TrigSteer_.*/Rate"] # Rate monitoring + opts.skip += ["TrigSignatureMoniMT/.*Rate"] # Rate monitoring opts.skip += ["IOVDbRunRange","IOVDbBytesRead"] # conditions data IOVs and size opts.skip += ["TrigOpMonitor/.*BytesRead"] # conditions data size opts.skip += ["/ROBMonitor/DataVolumeFractionForSD"] # Volume data fraction profile diff diff --git a/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py b/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py index 7b6f469a0d6c0d3d9396fadd041b78d7d38d377b..575d4834b454a57f52f9fe53c54e380dafe6d742 100644 --- a/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py +++ b/Trigger/TrigValidation/TrigValTools/python/TrigValSteering/CheckSteps.py @@ -25,23 +25,27 @@ class RefComparisonStep(Step): super(RefComparisonStep, self).__init__(name) self.reference = None self.input_file = None + self.explicit_reference = False # True if reference doesn't exist at configuration time def configure(self, test): if self.reference is not None: + # Do nothing if the reference will be produced later + if self.explicit_reference: + return super(RefComparisonStep, self).configure(test) # Do nothing if the reference exists if os.path.isfile(self.reference): - return + return super(RefComparisonStep, self).configure(test) # Try to find the file in DATAPATH full_path = subprocess.check_output('find_data.py {}'.format(self.reference), shell=True).decode('utf-8').strip() if os.path.isfile(full_path): self.log.debug('%s using reference %s', self.name, full_path) self.reference = full_path - return + return super(RefComparisonStep, self).configure(test) else: self.log.warning( '%s failed to find reference %s - wrong path?', self.name, self.reference) - return + return super(RefComparisonStep, self).configure(test) if self.input_file is None: self.log.error('Cannot configure %s because input_file not specified', @@ -75,7 +79,7 @@ class RefComparisonStep(Step): art_input_eos, art_input_cvmfs) self.reference = None - super(RefComparisonStep, self).configure(test) + return super(RefComparisonStep, self).configure(test) class InputDependentStep(Step): diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref index d3e9f7935b9d658da1291539137d70b900a4385c..8c27088308dc3be3506f23b6fcdc7fcd554a6c23 100644 --- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref +++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref @@ -83,8 +83,8 @@ TrigSignatureMoniMT INFO HLT_e300_etcut_L1EM24VH TrigSignatureMoniMT INFO -- #3481091923 Events 20 20 0 0 0 - - 0 TrigSignatureMoniMT INFO -- #3481091923 Features 0 0 0 - - TrigSignatureMoniMT INFO HLT_e3_etcut1step_mu6fast_L1EM8I_MU10 #2086577378 -TrigSignatureMoniMT INFO -- #2086577378 Events 20 20 - - - - - 0 -TrigSignatureMoniMT INFO -- #2086577378 Features - - - - - +TrigSignatureMoniMT INFO -- #2086577378 Events 20 20 0 - - - - 0 +TrigSignatureMoniMT INFO -- #2086577378 Features 0 - - - - TrigSignatureMoniMT INFO HLT_e3_etcut_L1EM3 #683953566 TrigSignatureMoniMT INFO -- #683953566 Events 20 20 15 13 13 - - 13 TrigSignatureMoniMT INFO -- #683953566 Features 48 156 85 - - @@ -284,8 +284,8 @@ TrigSignatureMoniMT INFO HLT_mu6_msonly_L1MU6 #3 TrigSignatureMoniMT INFO -- #3895421032 Events 20 20 1 0 0 - - 0 TrigSignatureMoniMT INFO -- #3895421032 Features 1 0 0 - - TrigSignatureMoniMT INFO HLT_mu6_mu4_L12MU4 #1713982776 -TrigSignatureMoniMT INFO -- #1713982776 Events 20 20 - - - - - 0 -TrigSignatureMoniMT INFO -- #1713982776 Features - - - - - +TrigSignatureMoniMT INFO -- #1713982776 Events 20 20 1 0 0 0 - 0 +TrigSignatureMoniMT INFO -- #1713982776 Features 2 0 0 0 - TrigSignatureMoniMT INFO HLT_mu6fast_L1MU6 #3518031697 TrigSignatureMoniMT INFO -- #3518031697 Events 20 20 1 - - - - 1 TrigSignatureMoniMT INFO -- #3518031697 Features 1 - - - - @@ -401,8 +401,8 @@ TrigSignatureMoniMT INFO HLT_xe30_cell_L1XE10 #1 TrigSignatureMoniMT INFO -- #1649696554 Events 20 20 3 - - - - 3 TrigSignatureMoniMT INFO -- #1649696554 Features 3 - - - - TrigSignatureMoniMT INFO HLT_xe30_cell_xe30_tcpufit_L1XE10 #3768353779 -TrigSignatureMoniMT INFO -- #3768353779 Events 20 20 - - - - - 2 -TrigSignatureMoniMT INFO -- #3768353779 Features - - - - - +TrigSignatureMoniMT INFO -- #3768353779 Events 20 20 2 - - - - 2 +TrigSignatureMoniMT INFO -- #3768353779 Features 2 - - - - TrigSignatureMoniMT INFO HLT_xe30_mht_L1XE10 #3626903018 TrigSignatureMoniMT INFO -- #3626903018 Events 20 20 16 - - - - 16 TrigSignatureMoniMT INFO -- #3626903018 Features 16 - - - - @@ -419,5 +419,5 @@ TrigSignatureMoniMT INFO HLT_xe65_cell_L1XE50 #5 TrigSignatureMoniMT INFO -- #531141817 Events 20 20 0 - - - - 0 TrigSignatureMoniMT INFO -- #531141817 Features 0 - - - - TrigSignatureMoniMT INFO HLT_xe65_cell_xe110_tcpufit_L1XE50 #115518400 -TrigSignatureMoniMT INFO -- #115518400 Events 20 20 - - - - - 0 -TrigSignatureMoniMT INFO -- #115518400 Features - - - - - +TrigSignatureMoniMT INFO -- #115518400 Events 20 20 0 - - - - 0 +TrigSignatureMoniMT INFO -- #115518400 Features 0 - - - - diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_newJO_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_newJO_build.py index 605e2eb32412a3a4eddef1fce1c672bf5416c8b1..6f7839c41f7607aa48f661770b406ff6a86f82d2 100755 --- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_newJO_build.py +++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_newJO_build.py @@ -39,9 +39,6 @@ test.art_type = 'build' test.exec_steps = [copy_jo, pickle, run_athena] test.check_steps = CheckSteps.default_check_steps(test) -# Temporarily skip ZeroCounts check (ATR-21057) -test.check_steps.remove(test.get_step("ZeroCounts")) - # Change RegTest pattern regtest = test.get_step('RegTest') regtest.regex = 'TrigSignatureMoniMT.*HLT_.*|TrigSignatureMoniMT.*-- #[0-9]+ (Events|Features).*' diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py index cd241f6d90bc3974226356e22b29aeb334553777..793ca70c42ac86dc566a54434eb43f5971799441 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py @@ -35,6 +35,8 @@ def collectHypos( steps ): # will replace by function once dependencies are sorted if 'HypoInputDecisions' in alg.getProperties(): __log.info( "found hypo " + alg.name() + " in " +stepSeq.name() ) + if alg.getType() == 'ComboHypo': + __log.info( " with %d comboHypoTools: %s", len(alg.ComboHypoTools), ' '.join(map(str, [tool.name() for tool in alg.ComboHypoTools]))) hypos[stepSeq.name()].append( alg ) else: __log.verbose("Not a hypo" + alg.name()) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainConfigurationBase.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainConfigurationBase.py index 68a1c24e67cbc9d87b66f5bfcce7b037bc2f0933..7094f7ef2ad686a1b907cab81d92618c3333d0a1 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainConfigurationBase.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainConfigurationBase.py @@ -50,10 +50,12 @@ class ChainConfigurationBase(object): for sequenceCfg in sequenceCfgArray: seqArray.append( RecoFragmentsPool.retrieve( sequenceCfg, None)) return ChainStep(stepName, seqArray, [self.mult], [self.dict], comboToolConfs=comboTools) - + def buildChain(self, chainSteps): myChain = Chain(name = self.chainName, ChainSteps = chainSteps, L1Thresholds = [self.L1Threshold] ) return myChain + + diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTMenuJSON.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTMenuJSON.py index 8c3de86ab6c437504991d4dc0c2b931e790aebd1..c9ae9790827cc0cc2ccbfd2fb4a85c3193ddd386 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTMenuJSON.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTMenuJSON.py @@ -14,7 +14,15 @@ def __getStepsDataFromAlgSequence(HLTAllSteps): if HLTAllSteps is not None: for HLTStep in HLTAllSteps.getChildren(): if "_reco" not in HLTStep.name(): # Avoid the pre-step Filter execution + # Look for newJO reco + for Step in HLTStep.getChildren(): + for View in Step.getChildren(): + for Reco in View.getChildren(): + if "_reco" in Reco.name() and HLTStep.name() not in stepsData: + stepsData.append( HLTStep.getChildren() ) + break continue + stepsData.append( HLTStep.getChildren() ) else: __log.warn( "No HLTAllSteps sequencer, will not export per-Step data for chains.") diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py index 53c6b3eafb3e91efc530afe9d75224264fec6e4c..dd1b29d9edd5f7964dfa8c1bc8d1c21fdb1bc531 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/LS2_v1.py @@ -53,6 +53,7 @@ def setupMenu(): # this is for test only ChainProp(name='HLT_2mu6_Dr_L12MU4', groups=MultiMuonGroup), + # ChainProp(name='HLT_mu6_Dr_mu4_Dr_L12MU4', l1SeedThresholds=['MU4']*2, groups=MultiMuonGroup), # ATR-20049 ChainProp(name='HLT_mu6_mu4_L12MU4', l1SeedThresholds=['MU4']*2, groups=MultiMuonGroup), diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py index 16c8845094e5ccc2b9c8f327976f7fcf2076d397..e3a954f71084993d73400fb3fb3bb0886d41f6d6 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py @@ -248,7 +248,6 @@ class ComboMaker(AlgNode): AlgNode.__init__(self, Alg, 'HypoInputDecisions', 'HypoOutputDecisions') self.prop="MultiplicitiesMap" self.mult=list(multiplicity) - self._hypoToolConf = [] def create (self, name): log.debug("ComboMaker.create %s",name) @@ -270,24 +269,20 @@ class ComboMaker(AlgNode): cval=newdict setattr(self.Alg, self.prop, cval) - log.debug("ComboAlg %s has now these chains chain %s", self.Alg.name(), self.getPar(self.prop)) def getChains(self): cval = self.Alg.getProperties()[self.prop] return cval - def addComboHypoToolConfs(self, comboToolConfs): - self._hypoToolConf = [ HypoToolConf( tool ) for tool in comboToolConfs ] - for conf in self._hypoToolConf: - log.debug("ComboMaker.addComboHypoToolConfs %s %s", self.Alg.name(), conf.name) - def createComboHypoTools(self, chainDict): - """Ccreated the ComboHypoTools""" - if not len(self._hypoToolConf): + def createComboHypoTools(self, chainDict, comboToolConfs): + """Created the ComboHypoTools""" + if not len(comboToolConfs): return - log.debug("ComboMaker.createComboHypoTools for %s with %d tools", self.Alg.name(), len(self._hypoToolConf)) - self.Alg.ComboHypoTools = [conf.confAndCreate( chainDict ) for conf in self._hypoToolConf] + confs = [ HypoToolConf( tool ) for tool in comboToolConfs ] + log.debug("ComboMaker.createComboHypoTools for chain %s, Alg %s with %d tools", chainDict["chainName"],self.Alg.name(), len(comboToolConfs)) + self.Alg.ComboHypoTools = [conf.confAndCreate( chainDict ) for conf in confs] @@ -387,7 +382,6 @@ class MenuSequence(object): def maker(self): return self._maker - @property def hypo(self): return self._hypo @@ -396,12 +390,10 @@ class MenuSequence(object): def getOutputList(self): outputlist = [] if type(self._hypo) is list: - for hypo in self._hypo: outputlist.append(hypo.readOutputList()[0]) else: outputlist.append(self._hypo.readOutputList()[0]) - return outputlist @@ -564,10 +556,6 @@ class CAMenuSequence(MenuSequence): return self._hypo -################################################# - -#from TriggerMenuMT.HLTMenuConfig.Menu.DictFromChainName import getAllThresholdsFromItem, getUniqueThresholdsFromItem - class Chain(object): """Basic class to define the trigger menu """ @@ -637,23 +625,24 @@ class Chain(object): def createHypoTools(self): """ This is extrapolating the hypotool configuration from the chain name""" - log.debug("decodeHypoToolConfs for chain %s", self.name) + log.debug("createHypoTools for chain %s", self.name) from TriggerMenuMT.HLTMenuConfig.Menu.ChainDictTools import splitChainInDict # this spliting is only needed for chains which don't yet attach # the dictionaries to the chain steps. It should be removed # later once that migration is done. listOfChainDictsLegs = splitChainInDict(self.name) - for step in self.steps: + log.debug("createHypoTools for Step %s", step.name) if len(step.sequences) == 0: continue - - step_mult = [str(m) for m in step.multiplicity] + + if sum(step.multiplicity) >1 and not step.isCombo: + log.error("This should be an error, because step mult > 1 (%s), but step is not combo", sum(step.multiplicity)) if len(step.chainDicts) > 0: # new way to configure hypo tools, works if the chain dictionaries have been attached to the steps - log.info('%s in new hypo tool creation method', self.name) + log.info('%s in new hypo tool creation method, step mult= %d, isCombo=%d', self.name, sum(step.multiplicity), step.isCombo) for seq, onePartChainDict in zip(step.sequences, step.chainDicts): log.info(' onePartChainDict:') log.info(' ' + str(onePartChainDict)) @@ -661,23 +650,21 @@ class Chain(object): else: # legacy way, to be removed once all signatures pass the chainDicts to the steps + step_mult = [str(m) for m in step.multiplicity] log.info('%s in old hypo tool creation method', self.name) menu_mult = [ part['chainParts'][0]['multiplicity'] for part in listOfChainDictsLegs ] - #print 'step, step_mult, menu_mult: ' + step.name + ' ' + str(step_mult) + ' ' + str(menu_mult) if step_mult != menu_mult: # Probably this shouldn't happen, but it currently does - log.warning("Got multiplicty %s from chain parts, but have %s legs. This is expected only for jet chains, but it has happened for %s, using the first chain dict", menu_mult, step_mult, self.name) + log.warning("Got multiplicty %s from chain parts, but have %s legs. This is expected only for jet chains, but it has happened for %s, using the first chain dict", menu_mult, sum(step.multiplicity), self.name) firstChainDict = listOfChainDictsLegs[0] firstChainDict['chainName']= self.name # rename the chaindict to remove the leg name for seq in step.sequences: seq.createHypoTools( firstChainDict ) - else: # add one hypotool per sequence and chain part for seq, onePartChainDict in zip(step.sequences, listOfChainDictsLegs): seq.createHypoTools( onePartChainDict ) - step.createComboHypoTools(self.name) @@ -742,7 +729,6 @@ class CFSequence(object): log.debug("This CFSequence has no sequences: outputs are the Filter outputs") - def connectCombo(self): """ connect Combo to Hypos""" for seq in self.step.sequences: @@ -758,7 +744,6 @@ class CFSequence(object): log.debug("CFSequence.connectCombo: adding output to %s: %s", self.step.combo.Alg.name(), combo_output) - def __repr__(self): return "--- CFSequence ---\n + Filter: %s \n + decisions: %s\n + %s \n"%(\ self.filter.Alg.name(), self.decisions, self.step) @@ -792,29 +777,24 @@ class ChainStep(object): if self.isCombo: self.makeCombo() - - def addCombHypoTools(self, tools): + def addComboHypoTools(self, tools): self.comboToolConfs=tools - self.combo.addComboHypoToolConfs(self.comboToolConfs) def makeCombo(self): if len(self.sequences)==0: return hashableMult = tuple(self.multiplicity) self.combo = RecoFragmentsPool.retrieve(createComboAlg, None, name=CFNaming.comboHypoName(self.name), multiplicity=hashableMult) - self.combo.addComboHypoToolConfs(self.comboToolConfs) def createComboHypoTools(self, chainName): if self.isCombo: from TriggerMenuMT.HLTMenuConfig.Menu.TriggerConfigHLT import TriggerConfigHLT chainDict = TriggerConfigHLT.getChainDictFromChainName(chainName) - self.combo.createComboHypoTools(chainDict) + self.combo.createComboHypoTools(chainDict, self.comboToolConfs) - - def __repr__(self): - return "--- ChainStep %s ---\n + isCombo = %d, multiplicity = %d \n + MenuSequences = %s \n + ComboHypoTools = %s"%(self.name, self.isCombo,sum(self.multiplicity), ' '.join(map(str, [seq.name for seq in self.sequences]) ), ' '.join(map(str, [tool for tool in self.comboToolConfs]) )) + return "--- ChainStep %s ---\n + isCombo = %d, multiplicity = %d ChainDict = %s \n + MenuSequences = %s \n + ComboHypoTools = %s"%(self.name, self.isCombo, sum(self.multiplicity), ' '.join(map(str, [dic['chainName'] for dic in self.chainDicts])), ' '.join(map(str, [seq.name for seq in self.sequences]) ), ' '.join(map(str, [tool.__name__ for tool in self.comboToolConfs]))) def createComboAlg(dummyFlags, name, multiplicity): diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonDef.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonDef.py index be2f895ecba2b9ba97564c3e0fc56cf3e1069f26..03bba0544bdfb4116df40ff197bacaa6a13d3400 100755 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonDef.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonDef.py @@ -82,7 +82,6 @@ class MuonChainConfiguration(ChainConfigurationBase): # ---------------------- def assembleChain(self): chainSteps = [] - #log.debug("Assembling leg for chain " + self.chainName) stepDictionary = self.getStepDictionary() @@ -236,13 +235,10 @@ class MuonChainConfiguration(ChainConfigurationBase): return self.getStep(2,'muEFLate',[muEFLateSequenceCfg]) #-------------------- - def getmuCombDr(self): - step=self.getStep(2, 'muComb', sequenceCfgArray=[muCombSequenceCfg]) - step.addCombHypoTools([dimuDrComboHypoToolFromDict] ) + step=self.getStep(2, 'muComb', sequenceCfgArray=[muCombSequenceCfg], comboTools=[dimuDrComboHypoToolFromDict]) return step - def getmuFastDr(self): - step=self.getStep(1,"mufast", [muFastSequenceCfg] ) - step.addCombHypoTools([dimuDrComboHypoToolFromDict] ) + def getmuFastDr(self): + step=self.getStep(1,"mufast", [muFastSequenceCfg], comboTools=[dimuDrComboHypoToolFromDict] ) return step diff --git a/graphics/VP1/VP1Systems/VP1AODSystems/CMakeLists.txt b/graphics/VP1/VP1Systems/VP1AODSystems/CMakeLists.txt index 6ca48abd8e5d0db30066b5bfe8820d7002999736..ff40e66988cb2642e9cfefdd41643a3603a464d5 100644 --- a/graphics/VP1/VP1Systems/VP1AODSystems/CMakeLists.txt +++ b/graphics/VP1/VP1Systems/VP1AODSystems/CMakeLists.txt @@ -48,8 +48,7 @@ if(NOT BUILDVP1LIGHT) PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} GeoPrimitives EventPrimitives xAODBase xAODCaloEvent xAODJet xAODMissingET PathResolver TrkExInterfaces VP1HEPVis VP1Utils Qt5::Gui ) -endif() -if(BUILDVP1LIGHT) +else() # Component(s) in the package: atlas_add_library( VP1AODSystems src/*.h VP1AODSystems/*.h src/*cxx @@ -59,7 +58,7 @@ if(BUILDVP1LIGHT) Qt5::Core Qt5::Gui PRIVATE_LINK_LIBRARIES ${COIN3D_LIBRARIES} GeoPrimitives EventPrimitives xAODBase xAODCaloEvent xAODJet xAODMissingET PathResolver xAODEventInfo - VP1HEPVis VP1Utils Qt5::Gui ) + VP1HEPVis VP1Utils xAODRootAccess Qt5::Gui ) endif() # Install files from the package: diff --git a/graphics/VP1/VP1Systems/VP1AODSystems/src/VP1AODSystem.cxx b/graphics/VP1/VP1Systems/VP1AODSystems/src/VP1AODSystem.cxx index 11116056829045c9f6e54739629bebcfc4b1358e..cb336c30e83d29e4a788efbc58a47a69a916d05f 100644 --- a/graphics/VP1/VP1Systems/VP1AODSystems/src/VP1AODSystem.cxx +++ b/graphics/VP1/VP1Systems/VP1AODSystems/src/VP1AODSystem.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -67,11 +67,6 @@ #include <QTreeWidget> // XAOD -#include "xAODRootAccess/Init.h" -#include "xAODRootAccess/TEvent.h" -#include "xAODRootAccess/TStore.h" -#include "xAODRootAccess/tools/Message.h" -#include "xAODRootAccess/TAuxStore.h" #include "xAODCore/AuxContainerBase.h" #include "xAODCore/tools/ReadStats.h" #include "xAODCore/tools/IOStats.h" diff --git a/graphics/VP1/VP1Systems/VP1AODSystems/src/VertexCollHandle.h b/graphics/VP1/VP1Systems/VP1AODSystems/src/VertexCollHandle.h index 2e36aba5ddfcd071a9de1d6f8716d390fc803fdc..f1b8f96140b3a172cfce18fe8647e51ed84f3f68 100644 --- a/graphics/VP1/VP1Systems/VP1AODSystems/src/VertexCollHandle.h +++ b/graphics/VP1/VP1Systems/VP1AODSystems/src/VertexCollHandle.h @@ -26,8 +26,6 @@ //xAOD #include "xAODBase/IParticle.h" -#include "xAODRootAccess/TEvent.h" -#include "xAODRootAccessInterfaces/TVirtualEvent.h" // Qt #include <QtGui/QColor>