Skip to content
Snippets Groups Projects
Commit 1ea2b29e authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'CaloTriggerTowerServiceConst' into 'master'

make CaloTriggerTowerService const

See merge request atlas/athena!14714
parents fb9198f2 82dd4f9f
No related branches found
No related tags found
No related merge requests found
...@@ -71,14 +71,14 @@ class CaloTriggerTowerService : public AthAlgTool ...@@ -71,14 +71,14 @@ class CaloTriggerTowerService : public AthAlgTool
* create a TT HWIdentifier from a TT Identifier * 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 * 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 ...@@ -86,7 +86,7 @@ class CaloTriggerTowerService : public AthAlgTool
* *
*/ */
//unsigned int createL1CoolChannelId( const HWIdentifier & id ); //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 ...@@ -94,7 +94,7 @@ class CaloTriggerTowerService : public AthAlgTool
* *
*/ */
//HWIdentifier cnvCoolChannelIdToHWID( const unsigned int coolChannelId ); //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 ...@@ -103,7 +103,7 @@ class CaloTriggerTowerService : public AthAlgTool
* returns a TDAQ CoolChannelId corresponding to a L1CaloRxCoolChannelId * 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 ...@@ -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 */ /** 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 the corresponding sampling of channelId:
@return 0: for EM calorimeter @return 0: for EM calorimeter
@return 1: for HAD calorimeter @return 1: for HAD calorimeter
@return 999: error @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 /** To know if a channel belongs to the barrel, end cap or fcal parts
@return 0: barrel @return 0: barrel
...@@ -130,7 +130,7 @@ class CaloTriggerTowerService : public AthAlgTool ...@@ -130,7 +130,7 @@ class CaloTriggerTowerService : public AthAlgTool
@return 2: fcal @return 2: fcal
@return 999: error @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: /** To get the type of the module connected to the channel:
@return 1: PPM @return 1: PPM
...@@ -138,7 +138,7 @@ class CaloTriggerTowerService : public AthAlgTool ...@@ -138,7 +138,7 @@ class CaloTriggerTowerService : public AthAlgTool
@return 3: JEM @return 3: JEM
@return 999: error @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 ...@@ -155,7 +155,7 @@ class CaloTriggerTowerService : public AthAlgTool
@warning the actual mapping is offline-offline, so this method is CPU expensive. @warning the actual mapping is offline-offline, so this method is CPU expensive.
@warning this method is valid only for LAr Id so far @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) return the TTOnlineID of the TT to which a LArOnlineID belongs (online-online TT-cell mapping)
...@@ -163,7 +163,7 @@ class CaloTriggerTowerService : public AthAlgTool ...@@ -163,7 +163,7 @@ class CaloTriggerTowerService : public AthAlgTool
@warning the actual mapping is offline-offline, so this method is CPU expensive. @warning the actual mapping is offline-offline, so this method is CPU expensive.
@warning this method is valid only for LAr Id so far @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 = Return a vector of offline Identifiers (corresponding helpers =
...@@ -171,7 +171,7 @@ class CaloTriggerTowerService : public AthAlgTool ...@@ -171,7 +171,7 @@ class CaloTriggerTowerService : public AthAlgTool
-> all layers together (Rem: equivalent to above extTt=0) <br> -> all layers together (Rem: equivalent to above extTt=0) <br>
The call is formarded to the DB object LArTTCellMap 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 = Return a vector of offline Identifiers (corresponding helpers =
...@@ -179,24 +179,24 @@ class CaloTriggerTowerService : public AthAlgTool ...@@ -179,24 +179,24 @@ class CaloTriggerTowerService : public AthAlgTool
-> one single layer (Rem: equivalent to above extTt!=0) <br> -> one single layer (Rem: equivalent to above extTt!=0) <br>
The call is formarded to the DB object LArTTCellMap 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> 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 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> 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) 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> 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) 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: private:
......
...@@ -172,7 +172,7 @@ bool CaloTriggerTowerService::is_initialized () const ...@@ -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); HWIdentifier invalidId (0);
...@@ -204,7 +204,7 @@ HWIdentifier CaloTriggerTowerService::createTTChannelID(const Identifier & id, ...@@ -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); Identifier invalidId (0);
...@@ -233,7 +233,7 @@ Identifier CaloTriggerTowerService::cnvToIdentifier(const HWIdentifier & id, bo ...@@ -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; L1CaloCoolChannelId invalidId;
...@@ -256,7 +256,7 @@ L1CaloCoolChannelId CaloTriggerTowerService::cnvRxIdToCoolChannelId(const L1Calo ...@@ -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 ) { if(!m_caloTTPpmRxIdMap ) {
msg() << MSG::ERROR << " No CaloTTPpmRxIdMap !" << endmsg; msg() << MSG::ERROR << " No CaloTTPpmRxIdMap !" << endmsg;
...@@ -278,7 +278,7 @@ std::vector<L1CaloRxCoolChannelId> CaloTriggerTowerService::cnvCoolChannelIdToRx ...@@ -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) { if(!m_caloTTOnAttrIdMap) {
msg() << MSG::ERROR << " No TTOnAttrIdMap !" << endmsg; msg() << MSG::ERROR << " No TTOnAttrIdMap !" << endmsg;
...@@ -292,7 +292,7 @@ unsigned int CaloTriggerTowerService::barrel_endcap_fcal(const HWIdentifier & id ...@@ -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) { if(!m_caloTTOnAttrIdMap) {
msg() << MSG::ERROR << " No TTOnAttrIdMap !" << endmsg; msg() << MSG::ERROR << " No TTOnAttrIdMap !" << endmsg;
...@@ -306,7 +306,7 @@ unsigned int CaloTriggerTowerService::em_had(const HWIdentifier & id) { ...@@ -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) { if(!m_caloTTOnAttrIdMap) {
msg() << MSG::ERROR << " No TTOnAttrIdMap !" << endmsg; msg() << MSG::ERROR << " No TTOnAttrIdMap !" << endmsg;
...@@ -319,7 +319,7 @@ unsigned int CaloTriggerTowerService::pos_neg(const HWIdentifier & id) { ...@@ -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) { if(!m_caloTTOnAttrIdMap) {
...@@ -335,7 +335,7 @@ unsigned int CaloTriggerTowerService::module_type(const HWIdentifier & id) { ...@@ -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) { if(m_caloTTOnAttrIdMap) {
...@@ -360,7 +360,7 @@ L1CaloCoolChannelId CaloTriggerTowerService::createL1CoolChannelId( const HWIden ...@@ -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 crate = coolChannelId.crate();
unsigned int module = coolChannelId.module(false); // get the physical module position unsigned int module = coolChannelId.module(false); // get the physical module position
...@@ -375,7 +375,7 @@ HWIdentifier CaloTriggerTowerService::cnvCoolChannelIdToHWID( const L1CaloCoolCh ...@@ -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> channel_id_vec;
std::vector<HWIdentifier> febs_of_tt; std::vector<HWIdentifier> febs_of_tt;
...@@ -410,7 +410,7 @@ std::vector<HWIdentifier> CaloTriggerTowerService::createChannelIDvec(const HWId ...@@ -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) ...@@ -447,7 +447,7 @@ HWIdentifier CaloTriggerTowerService::whichTTChannelID(const HWIdentifier & id)
//========================================================================== //==========================================================================
std::vector<Identifier> std::vector<Identifier>
CaloTriggerTowerService::createCellIDvecTT(const Identifier& id) CaloTriggerTowerService::createCellIDvecTT(const Identifier& id) const
//========================================================================== //==========================================================================
{ {
std::vector<Identifier> vec ; std::vector<Identifier> vec ;
...@@ -482,7 +482,7 @@ CaloTriggerTowerService::createCellIDvecTT(const Identifier& id) ...@@ -482,7 +482,7 @@ CaloTriggerTowerService::createCellIDvecTT(const Identifier& id)
//========================================================================== //==========================================================================
std::vector<Identifier> std::vector<Identifier>
CaloTriggerTowerService::createCellIDvecLayer(const Identifier& id) CaloTriggerTowerService::createCellIDvecLayer(const Identifier& id) const
//========================================================================== //==========================================================================
{ {
std::vector<Identifier> vec ; std::vector<Identifier> vec ;
...@@ -500,7 +500,7 @@ CaloTriggerTowerService::createCellIDvecLayer(const Identifier& id) ...@@ -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); Identifier sid(0);
...@@ -526,7 +526,7 @@ Identifier CaloTriggerTowerService::whichTTID(const Identifier & id) ...@@ -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 // input = channel online id
...@@ -544,7 +544,7 @@ bool CaloTriggerTowerService::is_in_lvl1(const HWIdentifier & 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 // input = cell offline id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment