From 3f5eb8c0f70947945c9f3c8a9b27e9d50cb31ed2 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <fwinkl@cern> Date: Wed, 17 Mar 2021 14:57:06 +0100 Subject: [PATCH] TrigConfHLTData: const fixes Remove `mutable` from `m_level` member and `const` from methods modifying it. --- .../TrigConfHLTData/Root/HLTUtils.cxx | 8 ++++---- .../TrigConfHLTData/TrigConfHLTData/HLTSequence.h | 14 +++++++------- .../TrigConfHLTData/HLTTriggerElement.h | 12 ++++++------ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Trigger/TrigConfiguration/TrigConfHLTData/Root/HLTUtils.cxx b/Trigger/TrigConfiguration/TrigConfHLTData/Root/HLTUtils.cxx index 9c1e43ed8889..48ec769f5ad5 100644 --- a/Trigger/TrigConfiguration/TrigConfHLTData/Root/HLTUtils.cxx +++ b/Trigger/TrigConfiguration/TrigConfHLTData/Root/HLTUtils.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #include <iostream> @@ -69,7 +69,7 @@ namespace TrigConf { const std::set<std::string>* veto = 0 ) { if ( veto && veto->find(tename) != veto->end() ) return; - const TrigConf::HLTSequence* seq = sequenceList.getSequence(tename); + TrigConf::HLTSequence* seq = sequenceList.getSequence(tename); if ( seq==0 ) return; if(level==2) seq->setL2(); @@ -267,7 +267,7 @@ TrigConf::HLTTEUtils::allTEsProducedInL2Chain( const TrigConf::HLTChain& chain, // get the input TEs set<string> inputTEs; for(set<string>::iterator outTEIt = l2tes.begin(); outTEIt != l2tes.end(); ++outTEIt) { - const TrigConf::HLTSequence* seq = sequenceList.getSequence(*outTEIt); + TrigConf::HLTSequence* seq = sequenceList.getSequence(*outTEIt); if(seq==0) { std::stringstream str; str << "TE " << *outTEIt << " is not produced by any sequence " << std::endl; @@ -311,7 +311,7 @@ TrigConf::HLTTEUtils::allTEsProducedInEFChain( const TrigConf::HLTChain& chain, // get the input TEs set<string> inputTEs; for(set<string>::iterator outTEIt = eftes.begin(); outTEIt != eftes.end(); ++outTEIt) { - const TrigConf::HLTSequence* seq = sequenceList.getSequence(*outTEIt); + TrigConf::HLTSequence* seq = sequenceList.getSequence(*outTEIt); if(seq==0) { std::stringstream str; str << "TE " << *outTEIt << " is not produced by any sequence " << std::endl; diff --git a/Trigger/TrigConfiguration/TrigConfHLTData/TrigConfHLTData/HLTSequence.h b/Trigger/TrigConfiguration/TrigConfHLTData/TrigConfHLTData/HLTSequence.h index 991d4feb54f2..52eb89d1c06a 100644 --- a/Trigger/TrigConfiguration/TrigConfHLTData/TrigConfHLTData/HLTSequence.h +++ b/Trigger/TrigConfiguration/TrigConfHLTData/TrigConfHLTData/HLTSequence.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef TrigConf_HLTSequence @@ -67,11 +67,11 @@ namespace TrigConf { std::string concise() const; - void setL2(bool on=true) const { set(); if(on) m_level |= 0x1; else m_level &= 0x6; } - void setEF(bool on=true) const { set(); if(on) m_level |= 0x2; else m_level &= 0x5; } - void setHLT(bool on=true) const { set(); if(on) m_level = 0x4; else m_level &= 0x3; } + void setL2(bool on=true) { set(); if(on) m_level |= 0x1; else m_level &= 0x6; } + void setEF(bool on=true) { set(); if(on) m_level |= 0x2; else m_level &= 0x5; } + void setHLT(bool on=true) { set(); if(on) m_level = 0x4; else m_level &= 0x3; } - void reset() const { m_level = 0x8; } + void reset() { m_level = 0x8; } bool inL2() const { return (m_level&0x1) != 0; } bool inEF() const { return (m_level&0x2) != 0; } bool inHLT() const { return (m_level&0x4) != 0; } @@ -94,9 +94,9 @@ namespace TrigConf { HLTTriggerElement* m_topoStartTE { nullptr }; //!< only for topolical algorithms: specify output TE from previous topological Algo, for combinations // bit 0 - L2 / bit 1 - EF / bit 2 - HLT / bit 3 - unset - mutable unsigned int m_level { 0 }; //!< level where sequence is running for a given configuration (to be determined in light of the menu, this + unsigned int m_level { 0 }; //!< level where sequence is running for a given configuration (to be determined in light of the menu, this //!< is not a property of the chain per se.) In rare cases a sequence could be running explicitely in both levels - void set() const { m_level &= 0x7; } + void set() { m_level &= 0x7; } friend std::ostream & operator<<(std::ostream &, const HLTSequence &); diff --git a/Trigger/TrigConfiguration/TrigConfHLTData/TrigConfHLTData/HLTTriggerElement.h b/Trigger/TrigConfiguration/TrigConfHLTData/TrigConfHLTData/HLTTriggerElement.h index 40108c331f90..080110f0bcfd 100644 --- a/Trigger/TrigConfiguration/TrigConfHLTData/TrigConfHLTData/HLTTriggerElement.h +++ b/Trigger/TrigConfiguration/TrigConfHLTData/TrigConfHLTData/HLTTriggerElement.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef TrigConf_HLTTriggerElement @@ -69,9 +69,9 @@ namespace TrigConf { virtual void print(const std::string& indent="", unsigned int detail=1) const; virtual void writeXML(std::ofstream & xmlfile); - void setL2(bool on=true) const { set(); if(on) m_level |= 0x1; else m_level &= 0x2; } - void setEF(bool on=true) const { set(); if(on) m_level |= 0x2; else m_level &= 0x1; } - void reset() const { m_level = 0x4; } + void setL2(bool on=true) { set(); if(on) m_level |= 0x1; else m_level &= 0x2; } + void setEF(bool on=true) { set(); if(on) m_level |= 0x2; else m_level &= 0x1; } + void reset() { m_level = 0x4; } bool inL2() const { return (m_level&0x1) != 0; } bool inEF() const { return (m_level&0x2) != 0; } bool isSet() const { return (m_level&0x4) == 0; } @@ -80,9 +80,9 @@ namespace TrigConf { unsigned int m_hashId; ///< trigger element id - mutable unsigned int m_level; //!< level where TE is produced for a given configuration (to be determined in light of the menu, this + unsigned int m_level; //!< level where TE is produced for a given configuration (to be determined in light of the menu, this //!< is not a property of the TE per se.) In rare cases a sequence could be running explicitely in both levels - void set() const { m_level &= 0x3; } + void set() { m_level &= 0x3; } friend std::ostream & operator<<(std::ostream &, const TrigConf::HLTTriggerElement &); -- GitLab