diff --git a/Associators/MCAssociators/include/Kernel/Particle2MCLinker.h b/Associators/MCAssociators/include/Kernel/Particle2MCLinker.h index 3a4f2fb599a29727d381c0c15ac30092558ea377..4c6255eb389e852558e2379a25bc3e2d45271507 100644 --- a/Associators/MCAssociators/include/Kernel/Particle2MCLinker.h +++ b/Associators/MCAssociators/include/Kernel/Particle2MCLinker.h @@ -93,7 +93,6 @@ public: private: const std::string& name() const { return m_parent->name(); } - const std::string& context() const { return m_parent->context(); } protected: MsgStream& debug() { return m_parent->debug(); } @@ -125,7 +124,6 @@ private: mutable Gaudi::Accumulators::MsgCounter<MSG::ERROR> m_noAlgTypeErr{m_parent, "No alg type given", 10}; mutable Gaudi::Accumulators::MsgCounter<MSG::ERROR> m_noIAlgMgrErr{m_parent, "Could not locate IAlgManager", 10}; mutable Gaudi::Accumulators::MsgCounter<MSG::ERROR> m_algoCreationErr{m_parent, "Could not create algorithm", 10}; - mutable Gaudi::Accumulators::MsgCounter<MSG::ERROR> m_setContextErr{m_parent, "Unable to set Property Context", 10}; mutable Gaudi::Accumulators::MsgCounter<MSG::ERROR> m_algInitErr{m_parent, "Error in algorithm initialization!", 10}; mutable Gaudi::Accumulators::MsgCounter<MSG::ERROR> m_setOutTableErr{m_parent, "Unable to set Property OutputTable", 10}; diff --git a/Associators/MCAssociators/include/Kernel/Particle2MCLinker.icpp b/Associators/MCAssociators/include/Kernel/Particle2MCLinker.icpp index 9692bb4a84cf065ae5d20bbb3c1d0b8ebd2ec633..65c82d9a8fb2557fee1f48effc57e434911bb351 100644 --- a/Associators/MCAssociators/include/Kernel/Particle2MCLinker.icpp +++ b/Associators/MCAssociators/include/Kernel/Particle2MCLinker.icpp @@ -84,12 +84,6 @@ StatusCode Object2MCLinker<SOURCE, PARENT>::locateAlgorithm( const std::string& ++m_algoCreationErr; return sc; } - IProperty* prop = dynamic_cast<IProperty*>( alg ); - sc = prop->setProperty( "Context", this->context() ); - if ( !sc.isSuccess() ) { - ++m_setContextErr; - return sc; - } // add the reference to the new algorithm alg->addRef(); @@ -122,15 +116,9 @@ StatusCode Object2MCLinker<SOURCE, PARENT>::setAlgInputData( IAlgorithm*& ++m_ipropWarn; return StatusCode::SUCCESS; } - // Context property is contagious (from myMother) - auto sc = prop->setProperty( "Context", context() ); - if ( !sc.isSuccess() ) { - ++m_setContextErr; - return sc; - } // Set OutputTable property to "" avoiding Relations table - sc = prop->setProperty( "OutputTable", "" ); + auto sc = prop->setProperty( "OutputTable", "" ); if ( !sc.isSuccess() ) { ++m_setOutTableErr; return sc; diff --git a/Event/RecEvent/include/Event/ProtoParticle.h b/Event/RecEvent/include/Event/ProtoParticle.h index 335711bdab5c32479c712c45ee1296ebd9cabf39..1d27d994c0e13a090dc1ca6e82e033df74299a87 100644 --- a/Event/RecEvent/include/Event/ProtoParticle.h +++ b/Event/RecEvent/include/Event/ProtoParticle.h @@ -50,11 +50,9 @@ namespace LHCb { // Namespace for locations in TDS namespace ProtoParticleLocation { - inline const std::string Charged = "Rec/ProtoP/Charged"; - inline const std::string Upstream = "Rec/ProtoP/Upstream"; - inline const std::string Neutrals = "Rec/ProtoP/Neutrals"; - inline const std::string HltCharged = "Hlt/ProtoP/Charged"; - inline const std::string HltNeutrals = "Hlt/ProtoP/Neutrals"; + inline const std::string Charged = "Rec/ProtoP/Charged"; + inline const std::string Upstream = "Rec/ProtoP/Upstream"; + inline const std::string Neutrals = "Rec/ProtoP/Neutrals"; } // namespace ProtoParticleLocation /** @class ProtoParticle ProtoParticle.h diff --git a/GaudiAlg/include/GaudiAlg/GaudiCommon.h b/GaudiAlg/include/GaudiAlg/GaudiCommon.h index d0f2f4fe5c0666d1e870d63317ec329732bebc07..b3d7723cd13d3faf784686be5361ec5af1d020a9 100644 --- a/GaudiAlg/include/GaudiAlg/GaudiCommon.h +++ b/GaudiAlg/include/GaudiAlg/GaudiCommon.h @@ -606,19 +606,8 @@ public: StatusCode runUpdate() { return updMgrSvc()->update( this ); } public: - /// Algorithm constructor - the SFINAE constraint below ensures that this is - /// constructor is only defined if PBASE derives from Algorithm - template <typename U = PBASE, typename = std::enable_if_t<std::is_base_of_v<Gaudi::Algorithm, PBASE>, U>> - GaudiCommon( std::string name, ISvcLocator* pSvcLocator ) : base_class( std::move( name ), pSvcLocator ) { - initGaudiCommonConstructor(); - } - /// Tool constructor - SFINAE-ed to insure this constructor is only defined - /// if PBASE derives from AlgTool. - template <typename U = PBASE, typename = std::enable_if_t<std::is_base_of_v<AlgTool, PBASE>, U>> - GaudiCommon( std::string type, std::string name, const IInterface* ancestor ) - : base_class( std::move( type ), std::move( name ), ancestor ) { - initGaudiCommonConstructor( this->parent() ); - } + /// constructor + using base_class::base_class; public: /** standard initialization method @@ -670,10 +659,6 @@ public: /// get the list of aquired services const Services& services() const { return m_services; } // get all services // ========================================================================== -public: - // ========================================================================== - /// Returns the "context" string. Used to identify different processing states. - const std::string& context() const { return m_context; } private: // ========================================================================== @@ -731,7 +716,6 @@ protected: "print the properties of the component"}; Gaudi::Property<bool> m_typePrint{this, "TypePrint", true, "add the actual C++ component type into the messages"}; - Gaudi::Property<std::string> m_context{this, "Context", {}, "note: overridden by parent settings"}; Gaudi::Property<std::vector<std::string>> m_counterList{ this, "CounterList", {".*"}, "RegEx list, of simple integer counters for CounterSummary"}; }; diff --git a/GaudiAlg/src/lib/GaudiCommon.icpp b/GaudiAlg/src/lib/GaudiCommon.icpp index 747a49ef7ec8298731e86955d2e02180a7253643..a32b9f02db6800feeed51f7519ecbbde9617af65 100644 --- a/GaudiAlg/src/lib/GaudiCommon.icpp +++ b/GaudiAlg/src/lib/GaudiCommon.icpp @@ -45,30 +45,6 @@ #include <fmt/format.h> #include <numeric> -// ============================================================================ -// constructor initialisation -// ============================================================================ -template <class PBASE> -void GaudiCommon<PBASE>::initGaudiCommonConstructor( const IInterface* parent ) { - // setup context from parent if available - if ( parent ) { - if ( const GaudiAlgorithm* gAlg = dynamic_cast<const GaudiAlgorithm*>( parent ) ) { - m_context = gAlg->context(); - } else if ( const GaudiTool* gTool = dynamic_cast<const GaudiTool*>( parent ) ) { - m_context = gTool->context(); - } - } - - // Get options values from IOptionsSvc - // \fixme this part is not needed because this method is called in the constructor, - // and properties are, anyway, set during the initialize... except for Context - // which might be set in the contructor by GaudiSequencer. - const auto& optsSvc = this->serviceLocator()->getOptsSvc(); - const std::string key = this->name() + ".Context"; - if ( optsSvc.has( key ) ) { this->setPropertyRepr( "Context", optsSvc.get( key ) ).ignore(); } -} -//============================================================================= - //============================================================================= // Initialise the common functionality //============================================================================= @@ -82,7 +58,6 @@ StatusCode GaudiCommon<PBASE>::initialize() { // some debug printout if ( this->msgLevel( MSG::DEBUG ) ) { this->debug() << "Initialize base class GaudiCommon<" << System::typeinfoName( typeid( PBASE ) ) << ">" << endmsg; - if ( !context().empty() ) this->debug() << "Created with context = '" << context() << "'" << endmsg; } // Set up the CounterSummarySvc May need to be changed diff --git a/GaudiAlg/src/lib/GaudiSequencer.cpp b/GaudiAlg/src/lib/GaudiSequencer.cpp index fa45cbca8560e429a922ef816686a200c26b373a..7cef8e3b0bab947bc5c4ba4a2451899c94e1fc16 100644 --- a/GaudiAlg/src/lib/GaudiSequencer.cpp +++ b/GaudiAlg/src/lib/GaudiSequencer.cpp @@ -152,11 +152,8 @@ StatusCode GaudiSequencer::decodeNames() { Gaudi::Algorithm* myAlg = nullptr; result = createSubAlgorithm( theType, theName, myAlg ); if ( myAlg ) { - // Override the default values of the special properties Context and RootInTES, + // Override the default values of the special property RootInTES, // which will be superseded by the explicit value in options (if present). - if ( !isDefault( context() ) && myAlg->hasProperty( "Context" ) ) { - myAlg->setProperty( "Context", context() ).ignore(); - } if ( !isDefault( rootInTES() ) && myAlg->hasProperty( "RootInTES" ) ) { myAlg->setProperty( "RootInTES", rootInTES() ).ignore(); } @@ -216,7 +213,6 @@ StatusCode GaudiSequencer::decodeNames() { if ( alg->name() != typ ) os << "/" << alg->name(); return os; } ); - if ( !isDefault( context() ) ) msg << ", with context '" << context() << "'"; if ( !isDefault( rootInTES() ) ) msg << ", with rootInTES '" << rootInTES() << "'"; msg << endmsg; diff --git a/GaudiAlg/tests/qmtest/refs/Aida2Root.ref b/GaudiAlg/tests/qmtest/refs/Aida2Root.ref index 130b49e80a1849eeeb41694156846f6ffeb9391b..3174eea3b418595040b97b01d48cd1d70bee794d 100644 --- a/GaudiAlg/tests/qmtest/refs/Aida2Root.ref +++ b/GaudiAlg/tests/qmtest/refs/Aida2Root.ref @@ -43,7 +43,6 @@ SimpleHistos DEBUG Property ['Name': Value] = 'HistoProduce':True SimpleHistos DEBUG Property ['Name': Value] = 'RequireObjects':[ ] SimpleHistos DEBUG Property ['Name': Value] = 'VetoObjects':[ ] SimpleHistos DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -SimpleHistos DEBUG Property ['Name': Value] = 'Context':'' SimpleHistos DEBUG Property ['Name': Value] = 'TypePrint':True SimpleHistos DEBUG Property ['Name': Value] = 'PropertiesPrint':False SimpleHistos DEBUG Property ['Name': Value] = 'ErrorsPrint':True diff --git a/GaudiAlg/tests/qmtest/refs/EvtColsEx/Write.ref b/GaudiAlg/tests/qmtest/refs/EvtColsEx/Write.ref index 0d132d15e6243938c746d303c507de26beb1d498..ea611ea9e262f389889b642e7127ce253bccd971 100644 --- a/GaudiAlg/tests/qmtest/refs/EvtColsEx/Write.ref +++ b/GaudiAlg/tests/qmtest/refs/EvtColsEx/Write.ref @@ -64,7 +64,6 @@ Fill SUCCESS Property ['Name': Value] = 'HistoProduce':True Fill SUCCESS Property ['Name': Value] = 'RequireObjects':[ ] Fill SUCCESS Property ['Name': Value] = 'VetoObjects':[ ] Fill SUCCESS Property ['Name': Value] = 'CounterList':[ '.*' ] -Fill SUCCESS Property ['Name': Value] = 'Context':'' Fill SUCCESS Property ['Name': Value] = 'TypePrint':False Fill SUCCESS Property ['Name': Value] = 'PropertiesPrint':True Fill SUCCESS Property ['Name': Value] = 'ErrorsPrint':True diff --git a/GaudiAlg/tests/qmtest/refs/GaudiCommonTests.ref b/GaudiAlg/tests/qmtest/refs/GaudiCommonTests.ref index f51b1b55f56757a94fa0d47e27b67789c4550d0d..3a4b156b1a0017d2ebee38998b7f802a6f581375 100644 --- a/GaudiAlg/tests/qmtest/refs/GaudiCommonTests.ref +++ b/GaudiAlg/tests/qmtest/refs/GaudiCommonTests.ref @@ -38,7 +38,6 @@ Test1 DEBUG List of ALL properties of GaudiCommonTests/Test1 #pro Test1 DEBUG Property ['Name': Value] = 'RequireObjects':[ ] Test1 DEBUG Property ['Name': Value] = 'VetoObjects':[ ] Test1 DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -Test1 DEBUG Property ['Name': Value] = 'Context':'' Test1 DEBUG Property ['Name': Value] = 'TypePrint':True Test1 DEBUG Property ['Name': Value] = 'PropertiesPrint':False Test1 DEBUG Property ['Name': Value] = 'ErrorsPrint':True @@ -73,7 +72,6 @@ Test2 DEBUG List of ALL properties of GaudiCommonTests/Test2 #pro Test2 DEBUG Property ['Name': Value] = 'RequireObjects':[ ] Test2 DEBUG Property ['Name': Value] = 'VetoObjects':[ ] Test2 DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -Test2 DEBUG Property ['Name': Value] = 'Context':'' Test2 DEBUG Property ['Name': Value] = 'TypePrint':True Test2 DEBUG Property ['Name': Value] = 'PropertiesPrint':False Test2 DEBUG Property ['Name': Value] = 'ErrorsPrint':True @@ -113,7 +111,6 @@ Test3 DEBUG List of ALL properties of GaudiCommonTests/Test3 #pro Test3 DEBUG Property ['Name': Value] = 'RequireObjects':[ ] Test3 DEBUG Property ['Name': Value] = 'VetoObjects':[ ] Test3 DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -Test3 DEBUG Property ['Name': Value] = 'Context':'' Test3 DEBUG Property ['Name': Value] = 'TypePrint':True Test3 DEBUG Property ['Name': Value] = 'PropertiesPrint':False Test3 DEBUG Property ['Name': Value] = 'ErrorsPrint':True @@ -149,7 +146,6 @@ Test4 DEBUG List of ALL properties of GaudiCommonTests/Test4 #pro Test4 DEBUG Property ['Name': Value] = 'RequireObjects':[ ] Test4 DEBUG Property ['Name': Value] = 'VetoObjects':[ ] Test4 DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -Test4 DEBUG Property ['Name': Value] = 'Context':'' Test4 DEBUG Property ['Name': Value] = 'TypePrint':True Test4 DEBUG Property ['Name': Value] = 'PropertiesPrint':False Test4 DEBUG Property ['Name': Value] = 'ErrorsPrint':True diff --git a/GaudiAlg/tests/qmtest/refs/Histograms_opts.ref b/GaudiAlg/tests/qmtest/refs/Histograms_opts.ref index 32bebafaa1a37e332485c733f510f3be6720fb06..42d2b72730b2cc2a5ca9eae3c3aa1124341c6027 100644 --- a/GaudiAlg/tests/qmtest/refs/Histograms_opts.ref +++ b/GaudiAlg/tests/qmtest/refs/Histograms_opts.ref @@ -39,7 +39,6 @@ SimpleHistos DEBUG Property ['Name': Value] = 'HistoProduce':True SimpleHistos DEBUG Property ['Name': Value] = 'RequireObjects':[ ] SimpleHistos DEBUG Property ['Name': Value] = 'VetoObjects':[ ] SimpleHistos DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -SimpleHistos DEBUG Property ['Name': Value] = 'Context':'' SimpleHistos DEBUG Property ['Name': Value] = 'TypePrint':True SimpleHistos DEBUG Property ['Name': Value] = 'PropertiesPrint':False SimpleHistos DEBUG Property ['Name': Value] = 'ErrorsPrint':True diff --git a/GaudiAlg/tests/qmtest/refs/Histograms_py.ref b/GaudiAlg/tests/qmtest/refs/Histograms_py.ref index 9615aa420769636fef559d1d33aae3cf68d22d97..9a4cb816045ee4c47364c8704c701e178a9d8201 100644 --- a/GaudiAlg/tests/qmtest/refs/Histograms_py.ref +++ b/GaudiAlg/tests/qmtest/refs/Histograms_py.ref @@ -30,7 +30,6 @@ SimpleHistos DEBUG Property ['Name': Value] = 'HistoProduce':True SimpleHistos DEBUG Property ['Name': Value] = 'RequireObjects':[ ] SimpleHistos DEBUG Property ['Name': Value] = 'VetoObjects':[ ] SimpleHistos DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -SimpleHistos DEBUG Property ['Name': Value] = 'Context':'' SimpleHistos DEBUG Property ['Name': Value] = 'TypePrint':True SimpleHistos DEBUG Property ['Name': Value] = 'PropertiesPrint':False SimpleHistos DEBUG Property ['Name': Value] = 'ErrorsPrint':True diff --git a/GaudiAlg/tests/qmtest/refs/gaudiconfig2/Histograms_wg.ref b/GaudiAlg/tests/qmtest/refs/gaudiconfig2/Histograms_wg.ref index 2df1de704091620613ab4bf0153c6547de636590..e1bf0aae5d779351819d0a8beeec67855b25f2c3 100644 --- a/GaudiAlg/tests/qmtest/refs/gaudiconfig2/Histograms_wg.ref +++ b/GaudiAlg/tests/qmtest/refs/gaudiconfig2/Histograms_wg.ref @@ -29,7 +29,6 @@ SimpleHistos DEBUG Property ['Name': Value] = 'HistoProduce':True SimpleHistos DEBUG Property ['Name': Value] = 'RequireObjects':[ ] SimpleHistos DEBUG Property ['Name': Value] = 'VetoObjects':[ ] SimpleHistos DEBUG Property ['Name': Value] = 'CounterList':[ '.*' ] -SimpleHistos DEBUG Property ['Name': Value] = 'Context':'' SimpleHistos DEBUG Property ['Name': Value] = 'TypePrint':True SimpleHistos DEBUG Property ['Name': Value] = 'PropertiesPrint':False SimpleHistos DEBUG Property ['Name': Value] = 'ErrorsPrint':True diff --git a/Phys/LoKiCore/src/AlgFunctors.cpp b/Phys/LoKiCore/src/AlgFunctors.cpp index ef8388f1844bd969f6bd12a014c07bbe327cef10..ebe7b080d166e1ab6a1fe90fe21ef55844675922 100644 --- a/Phys/LoKiCore/src/AlgFunctors.cpp +++ b/Phys/LoKiCore/src/AlgFunctors.cpp @@ -111,8 +111,6 @@ namespace { // ensure some magic properties are set while we create the subalgorithm so // that it effectively inherites 'our' settings -- if they have non-default // values... and are not set explicitly already. - if ( !optsSvc.isSet( typeName.name() + ".Context" ) ) - optsSvc.set( typeName.name() + ".Context", parent->context() ); if ( !optsSvc.isSet( typeName.name() + ".RootInTES" ) ) optsSvc.set( typeName.name() + ".RootInTES", parent->rootInTES() ); myIAlg = iam->algorithm( typeName, true ); diff --git a/Rich/RichInterfaces/include/RichInterfaces/IRichToolRegistry.h b/Rich/RichInterfaces/include/RichInterfaces/IRichToolRegistry.h index 3394301cf9accd873c8d2f2c619d876ec7f8ff87..9ae7ee203191379d719f251674a5a3621002fd93 100644 --- a/Rich/RichInterfaces/include/RichInterfaces/IRichToolRegistry.h +++ b/Rich/RichInterfaces/include/RichInterfaces/IRichToolRegistry.h @@ -49,16 +49,6 @@ namespace Rich { * @return The class name of the tool associated to the given "nickname" */ virtual const std::string& toolType( const std::string& nickname ) const = 0; - - /** Converts a tool "nickname" into a particular instance name - * - * Takes into account the Context of the tool. - * - * @param nickname The tool nickname for which the class name is requested - * - * @return The instance name of the tool associated to the given "nickname" - */ - virtual const std::string toolName( const std::string& nickname ) const = 0; }; } // namespace Rich diff --git a/Rich/RichKernel/include/RichKernel/RichCommonBase.h b/Rich/RichKernel/include/RichKernel/RichCommonBase.h index 4e8807fe8958c955b825aee94bb4a8891c6de858..574b7ddac17cbaba6cf0e8f68eb9c88559d9c979 100644 --- a/Rich/RichKernel/include/RichKernel/RichCommonBase.h +++ b/Rich/RichKernel/include/RichKernel/RichCommonBase.h @@ -81,12 +81,6 @@ namespace Rich { /// Pointer to Job Options Service inline Gaudi::Interfaces::IOptionsSvc& optsSvc() const noexcept { return this->serviceLocator()->getOptsSvc(); } - /** Generate a context specific TES location for the given Default location - * @param loc The Default TES location - * @return The context specific TES location for the input location - */ - std::string contextSpecificTES( const std::string& loc ) const; - /** Propagate a list oj job options from one object to another * @param from_name The name of the object to get the options from * @param to_name The name of the oject to copy the options to diff --git a/Rich/RichKernel/src/component/RichToolRegistry.cpp b/Rich/RichKernel/src/component/RichToolRegistry.cpp index ed2c9e3830a8311bf142319bfcf1ea754848ea7f..b13baf72d74081a724144340895faa6f724eae81 100644 --- a/Rich/RichKernel/src/component/RichToolRegistry.cpp +++ b/Rich/RichKernel/src/component/RichToolRegistry.cpp @@ -131,10 +131,6 @@ const std::string& Rich::ToolRegistry::toolType( const std::string& nickname ) c return m_myTools[nickname]; } -const std::string Rich::ToolRegistry::toolName( const std::string& nickname ) const { - return ( context().empty() ? nickname : context() + "_" + nickname ); -} - void Rich::ToolRegistry::addEntry( const std::string& nickname, const std::string& type ) const { if ( !m_myTools[nickname].empty() && type != m_myTools[nickname] ) { std::ostringstream mess; diff --git a/Rich/RichKernel/src/component/RichToolRegistry.h b/Rich/RichKernel/src/component/RichToolRegistry.h index c6a6b0e3e8de3dc267678df42e6d530e3df1ecdf..1cc814a2ff17b2c1cbb0803b35eacf5c942e229d 100644 --- a/Rich/RichKernel/src/component/RichToolRegistry.h +++ b/Rich/RichKernel/src/component/RichToolRegistry.h @@ -65,9 +65,6 @@ namespace Rich { // Converts a tool nickname into a particular class name const std::string& toolType( const std::string& nickname ) const override final; - // Converts a tool "nickname" into a particular instance name - const std::string toolName( const std::string& nickname ) const override final; - private: // methods /// Set up the tool mappings void setUpTools( const ToolList& toolList ); diff --git a/Rich/RichKernel/src/lib/RichCommonBase.icpp b/Rich/RichKernel/src/lib/RichCommonBase.icpp index 2f7533c03cab6582c49e1e772cbed283a9fc4722..0a6a36628a8d1657fcd7ddd9ff5b72f0ee7f74a3 100644 --- a/Rich/RichKernel/src/lib/RichCommonBase.icpp +++ b/Rich/RichKernel/src/lib/RichCommonBase.icpp @@ -32,18 +32,6 @@ // Gaudi #include <Gaudi/Interfaces/IOptionsSvc.h> -//============================================================================= -// Generate a context specific TES location for the given Default location -//============================================================================= -template <class PBASE> -std::string Rich::CommonBase<PBASE>::contextSpecificTES( const std::string& loc ) const { - const auto slash = loc.find_last_of( "/" ); - return ( slash > 0 && !this->context().empty() - ? loc.substr( 0, slash ) + "/" + this->context() + "/" + loc.substr( slash + 1 ) - : loc ); -} -//============================================================================= - //============================================================================= // Propagate a list oj job options from one object to another //=============================================================================