From afb166be06b4742c34deb76bcec5c24a2e2839de Mon Sep 17 00:00:00 2001 From: Walter Lampl <Walter.Lampl@cern.ch> Date: Wed, 3 Oct 2018 15:38:34 +0200 Subject: [PATCH] make CaloTriggerTowerService const Former-commit-id: 82dd4f9f5f1024f696d4132f259965a58990f1cf --- .../CaloTriggerTool/CaloTriggerTowerService.h | 34 +++++++++---------- .../src/CaloTriggerTowerService.cxx | 34 +++++++++---------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/Calorimeter/CaloTriggerTool/CaloTriggerTool/CaloTriggerTowerService.h b/Calorimeter/CaloTriggerTool/CaloTriggerTool/CaloTriggerTowerService.h index b86404396b8..23dc0dd6d85 100755 --- a/Calorimeter/CaloTriggerTool/CaloTriggerTool/CaloTriggerTowerService.h +++ b/Calorimeter/CaloTriggerTool/CaloTriggerTool/CaloTriggerTowerService.h @@ -71,14 +71,14 @@ class CaloTriggerTowerService : public AthAlgTool * create a TT HWIdentifier from a TT Identifier * */ - HWIdentifier createTTChannelID(const Identifier & id, bool bQuiet=false); + HWIdentifier createTTChannelID(const Identifier & id, bool bQuiet=false) const; /** * create a TT Identifier from a TT HWIdentifier * */ - Identifier cnvToIdentifier(const HWIdentifier & id, bool bQuiet=false); + Identifier cnvToIdentifier(const HWIdentifier & id, bool bQuiet=false) const; /** @@ -86,7 +86,7 @@ class CaloTriggerTowerService : public AthAlgTool * */ //unsigned int createL1CoolChannelId( const HWIdentifier & id ); - L1CaloCoolChannelId createL1CoolChannelId( const HWIdentifier& id ); + L1CaloCoolChannelId createL1CoolChannelId( const HWIdentifier& id ) const; /** @@ -94,7 +94,7 @@ class CaloTriggerTowerService : public AthAlgTool * */ //HWIdentifier cnvCoolChannelIdToHWID( const unsigned int coolChannelId ); - HWIdentifier cnvCoolChannelIdToHWID( const L1CaloCoolChannelId& coolChannelId ); + HWIdentifier cnvCoolChannelIdToHWID( const L1CaloCoolChannelId& coolChannelId ) const; @@ -103,7 +103,7 @@ class CaloTriggerTowerService : public AthAlgTool * returns a TDAQ CoolChannelId corresponding to a L1CaloRxCoolChannelId * */ - L1CaloCoolChannelId cnvRxIdToCoolChannelId(const L1CaloRxCoolChannelId& rxCoolChannelId); + L1CaloCoolChannelId cnvRxIdToCoolChannelId(const L1CaloRxCoolChannelId& rxCoolChannelId) const; /** @@ -111,18 +111,18 @@ class CaloTriggerTowerService : public AthAlgTool * */ - std::vector<L1CaloRxCoolChannelId> cnvCoolChannelIdToRxId(const L1CaloCoolChannelId& ppmCoolChannelId); + std::vector<L1CaloRxCoolChannelId> cnvCoolChannelIdToRxId(const L1CaloCoolChannelId& ppmCoolChannelId) const; /** return 0 for z<0 channels and 1 for z>0 channels */ - unsigned int pos_neg(const HWIdentifier & id); + unsigned int pos_neg(const HWIdentifier & id) const; /** return the corresponding sampling of channelId: @return 0: for EM calorimeter @return 1: for HAD calorimeter @return 999: error */ - unsigned int em_had(const HWIdentifier & id); + unsigned int em_had(const HWIdentifier & id) const; /** To know if a channel belongs to the barrel, end cap or fcal parts @return 0: barrel @@ -130,7 +130,7 @@ class CaloTriggerTowerService : public AthAlgTool @return 2: fcal @return 999: error */ - unsigned int barrel_endcap_fcal(const HWIdentifier & id); + unsigned int barrel_endcap_fcal(const HWIdentifier & id) const; /** To get the type of the module connected to the channel: @return 1: PPM @@ -138,7 +138,7 @@ class CaloTriggerTowerService : public AthAlgTool @return 3: JEM @return 999: error */ - unsigned int module_type(const HWIdentifier & id); + unsigned int module_type(const HWIdentifier & id) const; // @@ -155,7 +155,7 @@ class CaloTriggerTowerService : public AthAlgTool @warning the actual mapping is offline-offline, so this method is CPU expensive. @warning this method is valid only for LAr Id so far */ - std::vector<HWIdentifier> createChannelIDvec(const HWIdentifier & id, int extTt) ; + std::vector<HWIdentifier> createChannelIDvec(const HWIdentifier & id, int extTt) const; /** return the TTOnlineID of the TT to which a LArOnlineID belongs (online-online TT-cell mapping) @@ -163,7 +163,7 @@ class CaloTriggerTowerService : public AthAlgTool @warning the actual mapping is offline-offline, so this method is CPU expensive. @warning this method is valid only for LAr Id so far */ - HWIdentifier whichTTChannelID(const HWIdentifier & id); + HWIdentifier whichTTChannelID(const HWIdentifier & id) const; /** Return a vector of offline Identifiers (corresponding helpers = @@ -171,7 +171,7 @@ class CaloTriggerTowerService : public AthAlgTool -> all layers together (Rem: equivalent to above extTt=0) <br> The call is formarded to the DB object LArTTCellMap */ - std::vector<Identifier> createCellIDvecTT(const Identifier& id) ; + std::vector<Identifier> createCellIDvecTT(const Identifier& id) const; /** Return a vector of offline Identifiers (corresponding helpers = @@ -179,24 +179,24 @@ class CaloTriggerTowerService : public AthAlgTool -> one single layer (Rem: equivalent to above extTt!=0) <br> The call is formarded to the DB object LArTTCellMap */ - std::vector<Identifier> createCellIDvecLayer(const Identifier& id) ; + std::vector<Identifier> createCellIDvecLayer(const Identifier& id) const; /** return the offline id (CaloLVL1_ID) of the TT to which a cell id (CaloCell_ID) belongs <br> The call is formarded to the DB object LArTTCellMap */ - Identifier whichTTID(const Identifier & id); + Identifier whichTTID(const Identifier & id) const; /** return true if the channel is in the lvl1 sums; <br> some channels mapped to TT are only in HLT (last HEC compartment and last cells of barrel PS) */ - bool is_in_lvl1(const HWIdentifier & id) ; + bool is_in_lvl1(const HWIdentifier & id) const; /** return true if the cell is in the lvl1 sums; <br> some channels mapped to TT are only in HLT (last HEC compartment and last cells of barrel PS) */ - bool is_in_lvl1(const Identifier & id) ; + bool is_in_lvl1(const Identifier & id) const; private: diff --git a/Calorimeter/CaloTriggerTool/src/CaloTriggerTowerService.cxx b/Calorimeter/CaloTriggerTool/src/CaloTriggerTowerService.cxx index bb60da6ccfd..9950f01c717 100755 --- a/Calorimeter/CaloTriggerTool/src/CaloTriggerTowerService.cxx +++ b/Calorimeter/CaloTriggerTool/src/CaloTriggerTowerService.cxx @@ -172,7 +172,7 @@ bool CaloTriggerTowerService::is_initialized () const //=========================================================== -HWIdentifier CaloTriggerTowerService::createTTChannelID(const Identifier & id, bool bQuiet) +HWIdentifier CaloTriggerTowerService::createTTChannelID(const Identifier & id, bool bQuiet) const { HWIdentifier invalidId (0); @@ -204,7 +204,7 @@ HWIdentifier CaloTriggerTowerService::createTTChannelID(const Identifier & id, //=========================================================================== -Identifier CaloTriggerTowerService::cnvToIdentifier(const HWIdentifier & id, bool bQuiet) +Identifier CaloTriggerTowerService::cnvToIdentifier(const HWIdentifier & id, bool bQuiet) const { Identifier invalidId (0); @@ -233,7 +233,7 @@ Identifier CaloTriggerTowerService::cnvToIdentifier(const HWIdentifier & id, bo } } -L1CaloCoolChannelId CaloTriggerTowerService::cnvRxIdToCoolChannelId(const L1CaloRxCoolChannelId& rxCoolChannelId) { +L1CaloCoolChannelId CaloTriggerTowerService::cnvRxIdToCoolChannelId(const L1CaloRxCoolChannelId& rxCoolChannelId) const { L1CaloCoolChannelId invalidId; @@ -256,7 +256,7 @@ L1CaloCoolChannelId CaloTriggerTowerService::cnvRxIdToCoolChannelId(const L1Calo } } -std::vector<L1CaloRxCoolChannelId> CaloTriggerTowerService::cnvCoolChannelIdToRxId(const L1CaloCoolChannelId& ppmCoolChannelId) { +std::vector<L1CaloRxCoolChannelId> CaloTriggerTowerService::cnvCoolChannelIdToRxId(const L1CaloCoolChannelId& ppmCoolChannelId) const { if(!m_caloTTPpmRxIdMap ) { msg() << MSG::ERROR << " No CaloTTPpmRxIdMap !" << endmsg; @@ -278,7 +278,7 @@ std::vector<L1CaloRxCoolChannelId> CaloTriggerTowerService::cnvCoolChannelIdToRx } //========================================================================== -unsigned int CaloTriggerTowerService::barrel_endcap_fcal(const HWIdentifier & id) { +unsigned int CaloTriggerTowerService::barrel_endcap_fcal(const HWIdentifier & id) const { if(!m_caloTTOnAttrIdMap) { msg() << MSG::ERROR << " No TTOnAttrIdMap !" << endmsg; @@ -292,7 +292,7 @@ unsigned int CaloTriggerTowerService::barrel_endcap_fcal(const HWIdentifier & id } //========================================================================== -unsigned int CaloTriggerTowerService::em_had(const HWIdentifier & id) { +unsigned int CaloTriggerTowerService::em_had(const HWIdentifier & id) const { if(!m_caloTTOnAttrIdMap) { msg() << MSG::ERROR << " No TTOnAttrIdMap !" << endmsg; @@ -306,7 +306,7 @@ unsigned int CaloTriggerTowerService::em_had(const HWIdentifier & id) { } //========================================================================== -unsigned int CaloTriggerTowerService::pos_neg(const HWIdentifier & id) { +unsigned int CaloTriggerTowerService::pos_neg(const HWIdentifier & id) const { if(!m_caloTTOnAttrIdMap) { msg() << MSG::ERROR << " No TTOnAttrIdMap !" << endmsg; @@ -319,7 +319,7 @@ unsigned int CaloTriggerTowerService::pos_neg(const HWIdentifier & id) { } } -unsigned int CaloTriggerTowerService::module_type(const HWIdentifier & id) { +unsigned int CaloTriggerTowerService::module_type(const HWIdentifier & id) const { if(!m_caloTTOnAttrIdMap) { @@ -335,7 +335,7 @@ unsigned int CaloTriggerTowerService::module_type(const HWIdentifier & id) { //=========================================================== -L1CaloCoolChannelId CaloTriggerTowerService::createL1CoolChannelId( const HWIdentifier & id ) { +L1CaloCoolChannelId CaloTriggerTowerService::createL1CoolChannelId( const HWIdentifier & id ) const { if(m_caloTTOnAttrIdMap) { @@ -360,7 +360,7 @@ L1CaloCoolChannelId CaloTriggerTowerService::createL1CoolChannelId( const HWIden //=========================================================== -HWIdentifier CaloTriggerTowerService::cnvCoolChannelIdToHWID( const L1CaloCoolChannelId& coolChannelId ) { +HWIdentifier CaloTriggerTowerService::cnvCoolChannelIdToHWID( const L1CaloCoolChannelId& coolChannelId ) const { unsigned int crate = coolChannelId.crate(); unsigned int module = coolChannelId.module(false); // get the physical module position @@ -375,7 +375,7 @@ HWIdentifier CaloTriggerTowerService::cnvCoolChannelIdToHWID( const L1CaloCoolCh //========================================================================== -std::vector<HWIdentifier> CaloTriggerTowerService::createChannelIDvec(const HWIdentifier & id, int extTt) +std::vector<HWIdentifier> CaloTriggerTowerService::createChannelIDvec(const HWIdentifier & id, int extTt) const { std::vector<HWIdentifier> channel_id_vec; std::vector<HWIdentifier> febs_of_tt; @@ -410,7 +410,7 @@ std::vector<HWIdentifier> CaloTriggerTowerService::createChannelIDvec(const HWId //========================================================================== -HWIdentifier CaloTriggerTowerService::whichTTChannelID(const HWIdentifier & id) +HWIdentifier CaloTriggerTowerService::whichTTChannelID(const HWIdentifier & id) const { //========================================================================== // @@ -447,7 +447,7 @@ HWIdentifier CaloTriggerTowerService::whichTTChannelID(const HWIdentifier & id) //========================================================================== std::vector<Identifier> -CaloTriggerTowerService::createCellIDvecTT(const Identifier& id) +CaloTriggerTowerService::createCellIDvecTT(const Identifier& id) const //========================================================================== { std::vector<Identifier> vec ; @@ -482,7 +482,7 @@ CaloTriggerTowerService::createCellIDvecTT(const Identifier& id) //========================================================================== std::vector<Identifier> -CaloTriggerTowerService::createCellIDvecLayer(const Identifier& id) +CaloTriggerTowerService::createCellIDvecLayer(const Identifier& id) const //========================================================================== { std::vector<Identifier> vec ; @@ -500,7 +500,7 @@ CaloTriggerTowerService::createCellIDvecLayer(const Identifier& id) } //========================================================================== -Identifier CaloTriggerTowerService::whichTTID(const Identifier & id) +Identifier CaloTriggerTowerService::whichTTID(const Identifier & id) const //========================================================================== { Identifier sid(0); @@ -526,7 +526,7 @@ Identifier CaloTriggerTowerService::whichTTID(const Identifier & id) //============================================================= -bool CaloTriggerTowerService::is_in_lvl1(const HWIdentifier & id) +bool CaloTriggerTowerService::is_in_lvl1(const HWIdentifier & id) const //============================================================= // // input = channel online id @@ -544,7 +544,7 @@ bool CaloTriggerTowerService::is_in_lvl1(const HWIdentifier & id) } //============================================================= -bool CaloTriggerTowerService::is_in_lvl1(const Identifier & id) +bool CaloTriggerTowerService::is_in_lvl1(const Identifier & id) const //============================================================= // // input = cell offline id -- GitLab