From 1db0ef82ff5cf48d3580df64ecc19a41de0a1ab6 Mon Sep 17 00:00:00 2001 From: Tim Martin <tim.martin@cern.ch> Date: Tue, 24 May 2016 16:47:06 +0200 Subject: [PATCH] 'Change tool name to avoid clash' (TrigCostD3PDMaker-01-08-04) * Tagging TrigCostD3PDMaker-01-08-04 * Change tool name to avoid clash Former-commit-id: 95514173a186368e153b8aa11bb688e8e149b532 --- ...igConfMetadata.py => TrigCostConfMetadata.py} | 16 ++++++++-------- .../TrigCostD3PDMaker/python/addTrigCostData.py | 4 ++-- ...dataTool.cxx => TrigCostConfMetadataTool.cxx} | 14 +++++++------- ...MetadataTool.h => TrigCostConfMetadataTool.h} | 10 +++++----- .../src/components/TrigCostD3PDMaker_entries.cxx | 4 ++-- 5 files changed, 24 insertions(+), 24 deletions(-) rename PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/python/{TrigConfMetadata.py => TrigCostConfMetadata.py} (82%) rename PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/src/{TrigConfMetadataTool.cxx => TrigCostConfMetadataTool.cxx} (98%) rename PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/src/{TrigConfMetadataTool.h => TrigCostConfMetadataTool.h} (96%) diff --git a/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/python/TrigConfMetadata.py b/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/python/TrigCostConfMetadata.py similarity index 82% rename from PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/python/TrigConfMetadata.py rename to PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/python/TrigCostConfMetadata.py index 8902ab74464..e6d11edbef3 100644 --- a/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/python/TrigConfMetadata.py +++ b/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/python/TrigCostConfMetadata.py @@ -6,7 +6,7 @@ # metadata to the D3PD. # -def addTrigConfMetadata( d3pdalg = None, doCostL2 = False, doCostEF = False, doCostHLT = False, tuplePath = "" ): +def addTrigCostConfMetadata( d3pdalg = None, doCostL2 = False, doCostEF = False, doCostHLT = False, tuplePath = "" ): """Helper function that adds the necessary tool(s) and service(s) to the job to save the trigger configuration metadata to the output D3PD @@ -53,24 +53,24 @@ def addTrigConfMetadata( d3pdalg = None, doCostL2 = False, doCostEF = False, doC D3PDSvc = _d3pdSvc ) # Add the metadata tool: - _d3pdToolName = "TrigConfMetadataTool" + _d3pdToolName = "TrigCostConfMetadataTool" if not _d3pdToolName in [ t.name() for t in d3pdalg.MetadataTools ]: import TrigCostD3PDMaker if (tuplePath == ""): tuplePath = d3pdalg.TuplePath - _trigConfTool = TrigCostD3PDMaker.TrigConfMetadataTool( _d3pdToolName, - D3PDSvc = _d3pdSvc, - ConfigDir = tuplePath + "Meta" ) + _trigConfTool = TrigCostD3PDMaker.TrigCostConfMetadataTool( _d3pdToolName, + D3PDSvc = _d3pdSvc, + ConfigDir = tuplePath + "Meta" ) # Figure out if old or new style HLT if using CostMon to get correct storegate key # Old key fomat was HLT_OPI_HLT_monitoring_config if (doCostL2 == True or doCostEF == True or doCostHLT == True): - logger.info( "TrigConfMetadataTool will use passed arguments [L2="+str(doCostL2)+",EF="+str(doCostEF)+",HLT="+str(doCostHLT)+"]" ) + logger.info( "TrigCostConfMetadataTool will use passed arguments [L2="+str(doCostL2)+",EF="+str(doCostEF)+",HLT="+str(doCostHLT)+"]" ) if (doCostL2 == True or doCostEF == True): _trigConfTool.keyConfig = "HLT_TrigMonConfigCollection_OPI_EF_monitoring_config" elif (doCostHLT == True): _trigConfTool.keyConfig = "HLT_TrigMonConfigCollection_OPI_HLT_monitoring_config" else: - logger.info( "TrigConfMetadataTool will use TriggerFlags flags for config" ) + logger.info( "TrigCostConfMetadataTool will use TriggerFlags flags for config" ) from TriggerJobOpts.TriggerFlags import TriggerFlags if TriggerFlags.doHLT() and not (TriggerFlags.doEF() or TriggerFlags.doLVL2()): _trigConfTool.keyConfig = "HLT_TrigMonConfigCollection_OPI_HLT_monitoring_config" @@ -79,6 +79,6 @@ def addTrigConfMetadata( d3pdalg = None, doCostL2 = False, doCostEF = False, doC logger.info( "TrigConfMetadataTool will use the StoreGate key " + _trigConfTool.keyConfig ) d3pdalg.MetadataTools += [ _trigConfTool ] else: - logger.info( "TrigConfMetadataTool was already added to the D3PD::MakerAlg" ) + logger.info( "TrigCostConfMetadataTool was already added to the D3PD::MakerAlg" ) return diff --git a/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/python/addTrigCostData.py b/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/python/addTrigCostData.py index 18303078d75..bfff78e7939 100644 --- a/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/python/addTrigCostData.py +++ b/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/python/addTrigCostData.py @@ -59,5 +59,5 @@ def addTrigCostData(mode = "COST", fileName = "trig_cost.root", costConfigL2 = F d3pdalg.MetadataTools += [ _trigCostTool ] if (mode != "EBWEIGHT"): - from TrigCostD3PDMaker.TrigConfMetadata import addTrigConfMetadata - addTrigConfMetadata( d3pdalg, costConfigL2, costConfigEF, costConfigHLT, _tuplePath ) + from TrigCostD3PDMaker.TrigCostConfMetadata import addTrigCostConfMetadata + addTrigCostConfMetadata( d3pdalg, costConfigL2, costConfigEF, costConfigHLT, _tuplePath ) diff --git a/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/src/TrigConfMetadataTool.cxx b/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/src/TrigCostConfMetadataTool.cxx similarity index 98% rename from PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/src/TrigConfMetadataTool.cxx rename to PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/src/TrigCostConfMetadataTool.cxx index 1f94b61d2c8..927c82b9a66 100644 --- a/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/src/TrigConfMetadataTool.cxx +++ b/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/src/TrigCostConfMetadataTool.cxx @@ -31,11 +31,11 @@ #include "D3PDMakerInterfaces/ID3PD.h" // Local include(s): -#include "TrigConfMetadataTool.h" +#include "TrigCostConfMetadataTool.h" namespace D3PD { - TrigConfMetadataTool::TrigConfMetadataTool( const std::string& type, + TrigCostConfMetadataTool::TrigCostConfMetadataTool( const std::string& type, const std::string& name, const IInterface* parent ) : AthAlgTool( type, name, parent ), @@ -99,7 +99,7 @@ namespace D3PD { declareProperty( "keyConfig", m_keyConfig = "HLT_OPI_HLT_monitoring_config"); ///< [TrigMonConfig] Name of TrigerConfigurationObject } - StatusCode TrigConfMetadataTool::initialize() { + StatusCode TrigCostConfMetadataTool::initialize() { ATH_MSG_INFO( "Initializing. Package version: " << PACKAGE_VERSION ); @@ -191,7 +191,7 @@ namespace D3PD { return StatusCode::SUCCESS; } - StatusCode TrigConfMetadataTool::queryInterface( const InterfaceID& riid, + StatusCode TrigCostConfMetadataTool::queryInterface( const InterfaceID& riid, void** ppvIf ) { if( riid == IMetadataTool::interfaceID() ) { @@ -211,7 +211,7 @@ namespace D3PD { * The function is actually empty. The metadata should already be in the output * file at this point... */ - StatusCode TrigConfMetadataTool::writeMetadata( ID3PD* ) { + StatusCode TrigCostConfMetadataTool::writeMetadata( ID3PD* ) { ATH_MSG_INFO( "Trigger configuration available in the D3PD in directory: \"" << m_configDir << "\"" ); @@ -227,7 +227,7 @@ namespace D3PD { * * @param inc The incident that happened */ - void TrigConfMetadataTool::handle( const Incident& inc ) { + void TrigCostConfMetadataTool::handle( const Incident& inc ) { // // Handle trigger configuration change incidents: @@ -251,7 +251,7 @@ namespace D3PD { * To get this full summary, set UseTrigConfEventSummaries=True and * ensure that the cost monitoring infrastructure is enabled. */ - void TrigConfMetadataTool::handleNewTrigConfFromDataStore( const Incident& ) { + void TrigCostConfMetadataTool::handleNewTrigConfFromDataStore( const Incident& ) { const TrigMonConfigCollection *configCol = 0; diff --git a/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/src/TrigConfMetadataTool.h b/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/src/TrigCostConfMetadataTool.h similarity index 96% rename from PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/src/TrigConfMetadataTool.h rename to PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/src/TrigCostConfMetadataTool.h index ee90e9b1f47..946afbbece5 100644 --- a/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/src/TrigConfMetadataTool.h +++ b/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/src/TrigCostConfMetadataTool.h @@ -5,8 +5,8 @@ */ // $Id: TrigConfMetadataTool.h 603620 2014-06-25 17:55:37Z tamartin $ -#ifndef TRIGGERD3PDMAKER_TRIGCONFMETADATATOOL_H -#define TRIGGERD3PDMAKER_TRIGCONFMETADATATOOL_H +#ifndef TRIGGERD3PDMAKER_TRIGCOSTCONFMETADATATOOL_H +#define TRIGGERD3PDMAKER_TRIGCOSTCONFMETADATATOOL_H // STL include(s): #include <map> @@ -53,13 +53,13 @@ namespace D3PD { * $Revision: 603620 $ * $Date: 2014-06-25 19:55:37 +0200 (Wed, 25 Jun 2014) $ */ - class TrigConfMetadataTool : public AthAlgTool, + class TrigCostConfMetadataTool : public AthAlgTool, public IMetadataTool, public IIncidentListener { public: /// Regular AlgTool constructor - TrigConfMetadataTool( const std::string& type, const std::string& name, + TrigCostConfMetadataTool( const std::string& type, const std::string& name, const IInterface* parent ); /// AlgTool initialization function @@ -165,4 +165,4 @@ namespace D3PD { } // namespace D3PD -#endif // TRIGGERD3PDMAKER_TRIGCONFMETADATATOOL_H +#endif // TRIGGERD3PDMAKER_TRIGCOSTCONFMETADATATOOL_H diff --git a/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/src/components/TrigCostD3PDMaker_entries.cxx b/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/src/components/TrigCostD3PDMaker_entries.cxx index b0e549722b2..3ad9261e334 100644 --- a/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/src/components/TrigCostD3PDMaker_entries.cxx +++ b/PhysicsAnalysis/D3PDMaker/TrigCostD3PDMaker/src/components/TrigCostD3PDMaker_entries.cxx @@ -3,10 +3,10 @@ // Local includes #include "../TrigCostD3PDMakerTool.h" -#include "../TrigConfMetadataTool.h" +#include "../TrigCostConfMetadataTool.h" DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, TrigCostD3PDMakerTool ) -DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, TrigConfMetadataTool ) +DECLARE_NAMESPACE_TOOL_FACTORY( D3PD, TrigCostConfMetadataTool ) DECLARE_FACTORY_ENTRIES( TrigCostD3PDMaker ) { DECLARE_NAMESPACE_TOOL( D3PD, TrigCostD3PDMakerTool ) -- GitLab