ATLAS Offline Software
Loading...
Searching...
No Matches
CaloTriggerTowerService Class Reference

Tool providing the mapping of the online and offline TriggerTower identifiers as well as the TT-cells mapping. More...

#include <CaloTriggerTowerService.h>

Inheritance diagram for CaloTriggerTowerService:
Collaboration diagram for CaloTriggerTowerService:

Public Member Functions

 CaloTriggerTowerService (const std::string &type, const std::string &name, const IInterface *parent)
 constructor
virtual StatusCode initialize () override
HWIdentifier createTTChannelID (const Identifier &id, bool bQuiet=false) const
 create a TT HWIdentifier from a TT Identifier
Identifier cnvToIdentifier (const HWIdentifier &id, bool bQuiet=false) const
 create a TT Identifier from a TT HWIdentifier
L1CaloCoolChannelId createL1CoolChannelId (const HWIdentifier &id) const
 create a CoolChannelId (used by TDAQ framework) from a HWIdentifier
HWIdentifier cnvCoolChannelIdToHWID (const L1CaloCoolChannelId &coolChannelId) const
 create an HWIdentifier from an TDAQ CoolChannelId
L1CaloCoolChannelId cnvRxIdToCoolChannelId (const L1CaloRxCoolChannelId &rxCoolChannelId) const
 returns a TDAQ CoolChannelId corresponding to a L1CaloRxCoolChannelId
std::vector< L1CaloRxCoolChannelIdcnvCoolChannelIdToRxId (const L1CaloCoolChannelId &ppmCoolChannelId) const
 returns a vector of L1CaloRxCoolChannelId corresponding to a L1CaloCoolChannelId
unsigned int pos_neg (const HWIdentifier &id) const
 return 0 for z<0 channels and 1 for z>0 channels
unsigned int em_had (const HWIdentifier &id) const
 return the corresponding sampling of channelId:
unsigned int barrel_endcap_fcal (const HWIdentifier &id) const
 To know if a channel belongs to the barrel, end cap or fcal parts.
unsigned int module_type (const HWIdentifier &id) const
 To get the type of the module connected to the channel:
std::vector< IdentifiercreateCellIDvecTT (const Identifier &id) const
 Return a vector of offline Identifiers (corresponding helpers = LArEM_ID, LArHEC_ID, LArFCAL_ID) for a TT offline id (helper=CaloLVL1_ID) -> all layers together (Rem: equivalent to above extTt=0)
The call is formarded to the DB object LArTTCellMap.
std::vector< IdentifiercreateCellIDvecLayer (const Identifier &id) const
 Return a vector of offline Identifiers (corresponding helpers = LArEM_ID, LArHEC_ID, LArFCAL_ID) for a TT-layer offline id (helper=CaloLVL1_ID) -> one single layer (Rem: equivalent to above extTt!=0)
The call is formarded to the DB object LArTTCellMap.
Identifier whichTTID (const Identifier &id) const
 return the offline id (CaloLVL1_ID) of the TT to which a cell id (CaloCell_ID) belongs
The call is formarded to the DB object LArTTCellMap
bool is_in_lvl1 (const Identifier &id) const
 return true if the cell is in the lvl1 sums;
some channels mapped to TT are only in HLT (last HEC compartment and last cells of barrel PS)
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()
 Retrieve interface ID.

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

const LArTTCellMapgetTTCellMap () const
const CaloTTOnOffIdMapgetCaloTTOnOffIdMap () const
const CaloTTOnAttrIdMapgetCaloTTOnAttrIdMap () const
const CaloTTPpmRxIdMapgetCaloTTPpmRxIdMap () const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

const LArOnlineIDm_onlineHelper {nullptr}
 pointer to the LAr Online Id helper
const LArEM_IDm_emHelper {nullptr}
 pointer to the LArEM offline Id helper
const CaloLVL1_IDm_lvl1Helper {nullptr}
 pointer to the Calo TT offline Id helper
const TTOnlineIDm_ttonlineHelper {nullptr}
 pointer to the Calo TT online Id helper
CxxUtils::CachedPointer< const LArTTCellMapm_TTCellMap
CxxUtils::CachedPointer< const CaloTTOnOffIdMapm_caloTTOnOffIdMap
CxxUtils::CachedPointer< const CaloTTOnAttrIdMapm_caloTTOnAttrIdMap
CxxUtils::CachedPointer< const CaloTTPpmRxIdMapm_caloTTPpmRxIdMap
Gaudi::Property< std::string > m_TTCellMapKey {this, "LArTTCellMapKey", "LArTTCellMapAtlas"}
Gaudi::Property< std::string > m_caloTTOnOffIdMapKey {this, "CaloTTOnOffIdMapKey", "CaloTTOnOffIdMapAtlas"}
Gaudi::Property< std::string > m_caloTTOnAttrIdMapKey {this, "CaloTTOnAttrIdMapKey", "CaloTTOnAttrIdMapAtlas"}
Gaudi::Property< std::string > m_caloTTPpmRxIdMapKey {this, "CaloTTPpmRxIdMapKey", "CaloTTPpmRxIdMapAtlas"}
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Tool providing the mapping of the online and offline TriggerTower identifiers as well as the TT-cells mapping.

Author
Arnaud Lucotte, Fabienne Ledroit
maintained by Damien Prieur

Definition at line 45 of file CaloTriggerTowerService.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ CaloTriggerTowerService()

CaloTriggerTowerService::CaloTriggerTowerService ( const std::string & type,
const std::string & name,
const IInterface * parent )

constructor

Definition at line 19 of file CaloTriggerTowerService.cxx.

22 : AthAlgTool(type,name,parent)
23{
24 // Declare additional interface
25 declareInterface<CaloTriggerTowerService>(this);
26}
AthAlgTool()
Default constructor:

Member Function Documentation

◆ barrel_endcap_fcal()

unsigned int CaloTriggerTowerService::barrel_endcap_fcal ( const HWIdentifier & id) const

To know if a channel belongs to the barrel, end cap or fcal parts.

Returns
0: barrel
1: end cap
2: fcal
999: error

Definition at line 169 of file CaloTriggerTowerService.cxx.

169 {
170
171 const CaloTTOnAttrIdMap* caloTTOnAttrIdMap = getCaloTTOnAttrIdMap();
172 if(!caloTTOnAttrIdMap) {
173 ATH_MSG_ERROR(" No TTOnAttrIdMap !");
174 ATH_MSG_ERROR(" Has the DB folder holding the TTOnAttrIdMap been added to IOVDbSvc ? ");
175 ATH_MSG_ERROR(" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] ");
176 return (0);
177 } else {
178 unsigned int barrel_endcap_fcal = caloTTOnAttrIdMap->barrel_endcap_fcal(id);
179 return barrel_endcap_fcal;
180 }
181}
#define ATH_MSG_ERROR(x)
unsigned int barrel_endcap_fcal(HWIdentifier channelId) const
To know if a channel belongs to the barrel, end cap or fcal parts.
const CaloTTOnAttrIdMap * getCaloTTOnAttrIdMap() const
unsigned int barrel_endcap_fcal(const HWIdentifier &id) const
To know if a channel belongs to the barrel, end cap or fcal parts.

◆ cnvCoolChannelIdToHWID()

HWIdentifier CaloTriggerTowerService::cnvCoolChannelIdToHWID ( const L1CaloCoolChannelId & coolChannelId) const

create an HWIdentifier from an TDAQ CoolChannelId

Definition at line 256 of file CaloTriggerTowerService.cxx.

256 {
257
258 unsigned int crate = coolChannelId.crate();
259 unsigned int module = coolChannelId.module(false); // get the physical module position
260 unsigned int submodule = coolChannelId.subModule();
261 unsigned int channel = coolChannelId.channel();
262
263 // create Athena Online Id - the physical module position is expected here (not the logical)
264 HWIdentifier channelId = m_ttonlineHelper->channelId(crate,module,submodule,channel);
265
266 return channelId;
267}
const TTOnlineID * m_ttonlineHelper
pointer to the Calo TT online Id helper
unsigned int subModule() const
unsigned int module(bool logical=true) const
Convert a typeId to a L1CaloModuleType.
unsigned int crate() const
unsigned int channel() const

◆ cnvCoolChannelIdToRxId()

std::vector< L1CaloRxCoolChannelId > CaloTriggerTowerService::cnvCoolChannelIdToRxId ( const L1CaloCoolChannelId & ppmCoolChannelId) const

returns a vector of L1CaloRxCoolChannelId corresponding to a L1CaloCoolChannelId

Definition at line 146 of file CaloTriggerTowerService.cxx.

146 {
147
148 const CaloTTPpmRxIdMap* caloTTPpmRxIdMap = getCaloTTPpmRxIdMap();
149 if(!caloTTPpmRxIdMap ) {
150 ATH_MSG_ERROR(" No CaloTTPpmRxIdMap !");
151 ATH_MSG_ERROR(" Has the DB folder holding the CaloTTPpmRxIdMap been added to IOVDbSvc ? ");
152 ATH_MSG_ERROR(" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] ");
153 return {};
154
155 } else {
156 // mapping object exist, forward the call
157 std::vector<L1CaloRxCoolChannelId> rxChannels = caloTTPpmRxIdMap->ppmToRxId(ppmCoolChannelId);
158 if(rxChannels.empty()) {
159 CaloID_Exception except;
160 except.code(6) ;
161 except.message(" Ppm channel ID not found in map ") ;
162 throw except ;
163 }
164 return rxChannels;
165 }
166}
void code(int lCode)
set error code number
void message(const std::string &lMessage)
set error message
std::vector< L1CaloRxCoolChannelId > ppmToRxId(const L1CaloCoolChannelId &ppmChannelId) const
return the corresponding Rx channels to the Ppm input one
const CaloTTPpmRxIdMap * getCaloTTPpmRxIdMap() const

◆ cnvRxIdToCoolChannelId()

L1CaloCoolChannelId CaloTriggerTowerService::cnvRxIdToCoolChannelId ( const L1CaloRxCoolChannelId & rxCoolChannelId) const

returns a TDAQ CoolChannelId corresponding to a L1CaloRxCoolChannelId

Definition at line 122 of file CaloTriggerTowerService.cxx.

122 {
123
124 L1CaloCoolChannelId invalidId;
125
126 const CaloTTPpmRxIdMap* caloTTPpmRxIdMap = getCaloTTPpmRxIdMap();
127 if(!caloTTPpmRxIdMap ) {
128 ATH_MSG_ERROR(" No CaloTTPpmRxIdMap !");
129 ATH_MSG_ERROR(" Has the DB folder holding the CaloTTPpmRxIdMap been added to IOVDbSvc ? ");
130 ATH_MSG_ERROR(" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] ");
131 return invalidId;
132
133 } else {
134 // mapping object exist, forward the call
135 L1CaloCoolChannelId ppmId = caloTTPpmRxIdMap->rxToPpmId(rxCoolChannelId);
136 if(ppmId==L1CaloCoolChannelId()) {
137 CaloID_Exception except;
138 except.code(6) ;
139 except.message(" Rx channel ID not found in map ") ;
140 throw except ;
141 }
142 return ppmId;
143 }
144}
static const ITkStripOnlineId invalidId
L1CaloCoolChannelId rxToPpmId(const L1CaloRxCoolChannelId &rxChannelId) const
return the corresponfing ppm channel to the Rx input one

◆ cnvToIdentifier()

Identifier CaloTriggerTowerService::cnvToIdentifier ( const HWIdentifier & id,
bool bQuiet = false ) const

create a TT Identifier from a TT HWIdentifier

Definition at line 93 of file CaloTriggerTowerService.cxx.

94{
95 Identifier invalidId (0);
96
97 const CaloTTOnOffIdMap* caloTTOnOffIdMap = getCaloTTOnOffIdMap();
98 if(!caloTTOnOffIdMap ) {
99 ATH_MSG_ERROR(" No CaloTTOnOffIdMap !");
100 ATH_MSG_ERROR(" Has the DB folder holding the CaloTTOnOffIdMap been added to IOVDbSvc ? ");
101 ATH_MSG_ERROR(" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] ");
102 return invalidId;
103
104 } else {
105 // mapping object exist, forward the call
106 Identifier offid = caloTTOnOffIdMap->cnvToIdentifier(id, bQuiet);
107 if(bQuiet) {
108 return offid;
109
110 } else {
111 if(!offid.is_valid()) {
112 CaloID_Exception except;
113 except.code(6) ;
114 except.message(" Online ID not found in map ") ;
115 throw except ;
116 }
117 return offid;
118 }
119 }
120}
Identifier cnvToIdentifier(const HWIdentifier &sid, bool bQuiet=false) const
return the corresponfing offline Id of an online one
const CaloTTOnOffIdMap * getCaloTTOnOffIdMap() const
bool is_valid() const
Check if id is in a valid state.

◆ createCellIDvecLayer()

std::vector< Identifier > CaloTriggerTowerService::createCellIDvecLayer ( const Identifier & id) const

Return a vector of offline Identifiers (corresponding helpers = LArEM_ID, LArHEC_ID, LArFCAL_ID) for a TT-layer offline id (helper=CaloLVL1_ID) -> one single layer (Rem: equivalent to above extTt!=0)
The call is formarded to the DB object LArTTCellMap.

Definition at line 308 of file CaloTriggerTowerService.cxx.

310{
311 std::vector<Identifier> vec ;
312 const LArTTCellMap* TTCellMap = getTTCellMap();
313
314 if(m_emHelper->dictionaryVersion() == "fullAtlas" ||
315 m_emHelper->dictionaryVersion() == "H8TestBeam") {
316 if(!TTCellMap) {
317 ATH_MSG_ERROR(" No TTCellMap !");
318 return vec;
319 }
320 vec = TTCellMap->createCellIDvec(id);
321 }
322
323 return vec;
324}
std::vector< size_t > vec
const LArEM_ID * m_emHelper
pointer to the LArEM offline Id helper
const LArTTCellMap * getTTCellMap() const
const std::vector< Identifier > & createCellIDvec(const Identifier &id) const
Return a vector of offline Identifiers (corresponding helpers = LArEM_ID, LArHEC_ID,...

◆ createCellIDvecTT()

std::vector< Identifier > CaloTriggerTowerService::createCellIDvecTT ( const Identifier & id) const

Return a vector of offline Identifiers (corresponding helpers = LArEM_ID, LArHEC_ID, LArFCAL_ID) for a TT offline id (helper=CaloLVL1_ID) -> all layers together (Rem: equivalent to above extTt=0)
The call is formarded to the DB object LArTTCellMap.

Definition at line 272 of file CaloTriggerTowerService.cxx.

274{
275 std::vector<Identifier> vec ;
276
277 if(m_emHelper->dictionaryVersion() == "fullAtlas" ||
278 m_emHelper->dictionaryVersion() == "H8TestBeam") {
279
280 const LArTTCellMap* TTCellMap = getTTCellMap();
281 if(!TTCellMap) {
282 ATH_MSG_ERROR(" No TTCellMap !");
283 return vec;
284 }
285
286 Identifier ttId=m_lvl1Helper->tower_id(id);
287 Identifier regId=m_lvl1Helper->region_id(id);
288 int maxLay=m_lvl1Helper->layer_max(regId);
289
290 for(int iLay=0;iLay<=maxLay;++iLay) {
291 // Rem: not all iLay correspond to physically existing layers
292 Identifier layId = m_lvl1Helper->layer_id(ttId,iLay);
293 std::vector<Identifier> vecp = TTCellMap->createCellIDvec(layId);
294 std::vector<Identifier>::const_iterator it = vecp.begin();
295 std::vector<Identifier>::const_iterator it_e = vecp.end();
296 for (; it!=it_e; ++it) {
297 vec.push_back(*it);
298 }
299 }
300
301 }
302
303 return vec;
304}
const CaloLVL1_ID * m_lvl1Helper
pointer to the Calo TT offline Id helper

◆ createL1CoolChannelId()

L1CaloCoolChannelId CaloTriggerTowerService::createL1CoolChannelId ( const HWIdentifier & id) const

create a CoolChannelId (used by TDAQ framework) from a HWIdentifier

Definition at line 230 of file CaloTriggerTowerService.cxx.

230 {
231
232 const CaloTTOnAttrIdMap* caloTTOnAttrIdMap = getCaloTTOnAttrIdMap();
233 if(caloTTOnAttrIdMap) {
234
235 unsigned int crate = m_ttonlineHelper->crate(id);
236 unsigned int module = m_ttonlineHelper->module(id); // this returns the physical slot position !
237 unsigned int submodule = m_ttonlineHelper->submodule(id);
238 unsigned int channel = m_ttonlineHelper->channel(id);
239
240 unsigned int module_type = caloTTOnAttrIdMap->module_type(id);
241
242 // since the module argument is the physical position and not the logical one, the logical flag is set to false
243 return L1CaloCoolChannelId(crate, L1CaloModuleType( (L1CaloModuleType::L1CaloModuleEnum) module_type), module, submodule, channel, false);
244
245 } else {
246
247 ATH_MSG_ERROR(" No CaloTTOnAttrIdMap !");
248 ATH_MSG_ERROR(" Has the DB folder holding the CaloTTOnAttrIdMap been added to IOVDbSvc ? ");
249 ATH_MSG_ERROR(" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] ");
250 return 0;
251 }
252}
unsigned int module_type(HWIdentifier channelId) const
To get the type of the module connected to the channel:
unsigned int module_type(const HWIdentifier &id) const
To get the type of the module connected to the channel:

◆ createTTChannelID()

HWIdentifier CaloTriggerTowerService::createTTChannelID ( const Identifier & id,
bool bQuiet = false ) const

create a TT HWIdentifier from a TT Identifier

Definition at line 60 of file CaloTriggerTowerService.cxx.

61{
62
63 HWIdentifier invalidId (0);
64
65 const CaloTTOnOffIdMap* caloTTOnOffIdMap = getCaloTTOnOffIdMap();
66 if(!caloTTOnOffIdMap ) {// no mapping object
67 ATH_MSG_ERROR(" No CaloTTOnOffIdMap !");
68 ATH_MSG_ERROR(" Has the DB folder holding the CaloTTOnOffIdMap been added to IOVDbSvc ? ");
69 ATH_MSG_ERROR(" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] ");
70 return invalidId;
71
72 } else {
73
74 // have mapping object, forward the call
75 HWIdentifier sid = caloTTOnOffIdMap->createSignalChannelID( id ) ;
76 if(bQuiet) {
77 return sid;
78
79 } else {
80 if(sid == invalidId) {
81 CaloID_Exception except;
82 except.code(5) ;
83 except.message("HWIdentifier not found in map ") ;
84 throw except ;
85 }
86 return sid;
87 }
88 }
89}
HWIdentifier createSignalChannelID(const Identifier &id, bool bQuiet=false) const
return the corresponfing online Id of an offline one

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ em_had()

unsigned int CaloTriggerTowerService::em_had ( const HWIdentifier & id) const

return the corresponding sampling of channelId:

Returns
0: for EM calorimeter
1: for HAD calorimeter
999: error

Definition at line 184 of file CaloTriggerTowerService.cxx.

184 {
185
186 const CaloTTOnAttrIdMap* caloTTOnAttrIdMap = getCaloTTOnAttrIdMap();
187 if(!caloTTOnAttrIdMap) {
188 ATH_MSG_ERROR(" No TTOnAttrIdMap !");
189 ATH_MSG_ERROR(" Has the DB folder holding the TTOnAttrIdMap been added to IOVDbSvc ? ");
190 ATH_MSG_ERROR(" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] ");
191 return (0);
192 } else {
193 unsigned int em_had = caloTTOnAttrIdMap->em_had(id);
194 return em_had;
195 }
196}
unsigned int em_had(HWIdentifier channelId) const
return the corresponding sampling of channelId:
unsigned int em_had(const HWIdentifier &id) const
return the corresponding sampling of channelId:

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getCaloTTOnAttrIdMap()

const CaloTTOnAttrIdMap * CaloTriggerTowerService::getCaloTTOnAttrIdMap ( ) const
private

Definition at line 419 of file CaloTriggerTowerService.cxx.

420{
421 if (!m_caloTTOnAttrIdMap.get()) {
422 const CaloTTOnAttrIdMap* caloTTOnAttrIdMap = nullptr;
423 if (detStore()->retrieve (caloTTOnAttrIdMap, m_caloTTOnAttrIdMapKey).isSuccess()) {
424 m_caloTTOnAttrIdMap.set (caloTTOnAttrIdMap);
425 }
426 }
427 return m_caloTTOnAttrIdMap.get();
428}
const ServiceHandle< StoreGateSvc > & detStore() const
Gaudi::Property< std::string > m_caloTTOnAttrIdMapKey
CxxUtils::CachedPointer< const CaloTTOnAttrIdMap > m_caloTTOnAttrIdMap

◆ getCaloTTOnOffIdMap()

const CaloTTOnOffIdMap * CaloTriggerTowerService::getCaloTTOnOffIdMap ( ) const
private

Definition at line 407 of file CaloTriggerTowerService.cxx.

408{
409 if (!m_caloTTOnOffIdMap.get()) {
410 const CaloTTOnOffIdMap* caloTTOnOffIdMap = nullptr;
411 if (detStore()->retrieve (caloTTOnOffIdMap, m_caloTTOnOffIdMapKey).isSuccess()) {
412 m_caloTTOnOffIdMap.set (caloTTOnOffIdMap);
413 }
414 }
415 return m_caloTTOnOffIdMap.get();
416}
Gaudi::Property< std::string > m_caloTTOnOffIdMapKey
CxxUtils::CachedPointer< const CaloTTOnOffIdMap > m_caloTTOnOffIdMap

◆ getCaloTTPpmRxIdMap()

const CaloTTPpmRxIdMap * CaloTriggerTowerService::getCaloTTPpmRxIdMap ( ) const
private

Definition at line 431 of file CaloTriggerTowerService.cxx.

432{
433 if (!m_caloTTPpmRxIdMap.get()) {
434 const CaloTTPpmRxIdMap* caloTTPpmRxIdMap = nullptr;
435 if (detStore()->retrieve (caloTTPpmRxIdMap, m_caloTTPpmRxIdMapKey).isSuccess()) {
436 m_caloTTPpmRxIdMap.set (caloTTPpmRxIdMap);
437 }
438 }
439 return m_caloTTPpmRxIdMap.get();
440}
CxxUtils::CachedPointer< const CaloTTPpmRxIdMap > m_caloTTPpmRxIdMap
Gaudi::Property< std::string > m_caloTTPpmRxIdMapKey

◆ getTTCellMap()

const LArTTCellMap * CaloTriggerTowerService::getTTCellMap ( ) const
private

Definition at line 395 of file CaloTriggerTowerService.cxx.

396{
397 if (!m_TTCellMap.get()) {
398 const LArTTCellMap* TTCellMap = nullptr;
399 if (detStore()->retrieve (TTCellMap, m_TTCellMapKey).isSuccess()) {
400 m_TTCellMap.set (TTCellMap);
401 }
402 }
403 return m_TTCellMap.get();
404}
Gaudi::Property< std::string > m_TTCellMapKey
CxxUtils::CachedPointer< const LArTTCellMap > m_TTCellMap

◆ initialize()

StatusCode CaloTriggerTowerService::initialize ( )
overridevirtual

Definition at line 30 of file CaloTriggerTowerService.cxx.

31{
32 ATH_MSG_INFO(" => CaloTriggerTowerService::initialize()");
33
34 const CaloIdManager* caloMgr;
35 ATH_CHECK( detStore()->retrieve(caloMgr) );
36
37 ATH_CHECK( (m_emHelper = caloMgr->getEM_ID()) != nullptr );
38 ATH_CHECK( (m_lvl1Helper = caloMgr->getLVL1_ID()) != nullptr );
39 ATH_CHECK( (m_ttonlineHelper = caloMgr->getTTOnlineID()) != nullptr );
40
41 ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") );
42
43 // Make sure the dictionaries for the LArTTCellMap persistent classes
44 // are available. We used to read this object via a conditions callback,
45 // but callbacks are not thread-friendly, so this was changed to retrieving
46 // it from detStore during event processing. However, this meant that
47 // the TClass's for the persistent objects were also being loaded
48 // at that time. As of root 6.22.00, at least, TClass can sometimes
49 // fail to properly load a dictionary when it's being run in a multithreaded
50 // context. So force the needed dictionaries to load now.
51 TClass::GetClass ("LArTTCell_P");
52 TClass::GetClass ("LArTTCell_P::LArTTCell_P_t");
53 TClass::GetClass ("std::vector<LArTTCell_P::LArTTCell_P_t>");
54
55 return StatusCode::SUCCESS;
56}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
const TTOnlineID * getTTOnlineID(void) const
const CaloLVL1_ID * getLVL1_ID(void) const
const LArEM_ID * getEM_ID(void) const
const LArOnlineID * m_onlineHelper
pointer to the LAr Online Id helper
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & CaloTriggerTowerService::interfaceID ( )
inlinestatic

Retrieve interface ID.

Definition at line 49 of file CaloTriggerTowerService.h.

static const InterfaceID IID_CaloTriggerTowerService("CaloTriggerTowerService", 1, 0)

◆ is_in_lvl1()

bool CaloTriggerTowerService::is_in_lvl1 ( const Identifier & id) const

return true if the cell is in the lvl1 sums;
some channels mapped to TT are only in HLT (last HEC compartment and last cells of barrel PS)

Definition at line 354 of file CaloTriggerTowerService.cxx.

362{
363
364 bool lvl1 = true ;
365
366 if(m_emHelper->dictionaryVersion() == "fullAtlas" ||
367 m_emHelper->dictionaryVersion() == "H8TestBeam") {
368
369 if(m_emHelper->is_em_barrel(id)) {
370 int samp=m_emHelper->sampling(id);
371 if(samp==0) {
372 int eta=m_emHelper->eta(id);
373 if(eta==60) {
374 lvl1 = false ;
375 }
376 }
377 } else {
378 Identifier ttId=whichTTID(id);
379 if(m_lvl1Helper->is_hec(ttId)) {
380 int layer = m_lvl1Helper->layer(ttId);
381 if(layer == 3){
382 lvl1 = false ;
383 }
384 }
385 }
386 } else {
387 lvl1 = false ;
388 }
389
390 return lvl1;
391
392}
Scalar eta() const
pseudorapidity method
Identifier whichTTID(const Identifier &id) const
return the offline id (CaloLVL1_ID) of the TT to which a cell id (CaloCell_ID) belongs The call is ...
@ layer
Definition HitInfo.h:79

◆ module_type()

unsigned int CaloTriggerTowerService::module_type ( const HWIdentifier & id) const

To get the type of the module connected to the channel:

Returns
1: PPM
2: CPM
3: JEM
999: error

Definition at line 213 of file CaloTriggerTowerService.cxx.

213 {
214
215
216 const CaloTTOnAttrIdMap* caloTTOnAttrIdMap = getCaloTTOnAttrIdMap();
217 if(!caloTTOnAttrIdMap) {
218 ATH_MSG_ERROR(" No TTOnAttrIdMap !");
219 ATH_MSG_ERROR(" Has the DB folder holding the TTOnAttrIdMap been added to IOVDbSvc ? ");
220 ATH_MSG_ERROR(" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] ");
221 return (0);
222 } else {
223 unsigned int module_type = caloTTOnAttrIdMap->module_type(id);
224 return module_type;
225 }
226}

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ pos_neg()

unsigned int CaloTriggerTowerService::pos_neg ( const HWIdentifier & id) const

return 0 for z<0 channels and 1 for z>0 channels

Definition at line 199 of file CaloTriggerTowerService.cxx.

199 {
200
201 const CaloTTOnAttrIdMap* caloTTOnAttrIdMap = getCaloTTOnAttrIdMap();
202 if(!caloTTOnAttrIdMap) {
203 ATH_MSG_ERROR(" No TTOnAttrIdMap !");
204 ATH_MSG_ERROR(" Has the DB folder holding the TTOnAttrIdMap been added to IOVDbSvc ? ");
205 ATH_MSG_ERROR(" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] ");
206 return (0);
207 } else {
208 unsigned int pos_neg = caloTTOnAttrIdMap->pos_neg(id);
209 return pos_neg;
210 }
211}
unsigned int pos_neg(HWIdentifier channelId) const
return 0 for z<0 channels and 1 for z>0 channels
unsigned int pos_neg(const HWIdentifier &id) const
return 0 for z<0 channels and 1 for z>0 channels

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

◆ whichTTID()

Identifier CaloTriggerTowerService::whichTTID ( const Identifier & id) const

return the offline id (CaloLVL1_ID) of the TT to which a cell id (CaloCell_ID) belongs
The call is formarded to the DB object LArTTCellMap

Definition at line 327 of file CaloTriggerTowerService.cxx.

329{
330 Identifier sid(0);
331
332 if(m_emHelper->dictionaryVersion() == "fullAtlas" ||
333 m_emHelper->dictionaryVersion() == "H8TestBeam") {
334
335 const LArTTCellMap* TTCellMap = getTTCellMap();
336 if(!TTCellMap) {
337 ATH_MSG_ERROR(" No TTCellMap !");
338 return sid;
339 }
340 sid = TTCellMap->whichTTID( id ) ;
341 Identifier invalidId (0);
342 if(sid == invalidId ){
343 LArID_Exception except;
344 except.message("Identifier not found in map ") ;
345 throw except ;
346 }
347 }
348
349 return sid;
350}
void message(const std::string &l_message)
set error message
Identifier whichTTID(const Identifier &id) const
return the offline id (CaloLVL1_ID) of the TT to which a cell (CaloCell_ID) belongs

Member Data Documentation

◆ m_caloTTOnAttrIdMap

CxxUtils::CachedPointer<const CaloTTOnAttrIdMap> CaloTriggerTowerService::m_caloTTOnAttrIdMap
private

Definition at line 184 of file CaloTriggerTowerService.h.

◆ m_caloTTOnAttrIdMapKey

Gaudi::Property<std::string> CaloTriggerTowerService::m_caloTTOnAttrIdMapKey {this, "CaloTTOnAttrIdMapKey", "CaloTTOnAttrIdMapAtlas"}
private

Definition at line 189 of file CaloTriggerTowerService.h.

189{this, "CaloTTOnAttrIdMapKey", "CaloTTOnAttrIdMapAtlas"};

◆ m_caloTTOnOffIdMap

CxxUtils::CachedPointer<const CaloTTOnOffIdMap> CaloTriggerTowerService::m_caloTTOnOffIdMap
private

Definition at line 183 of file CaloTriggerTowerService.h.

◆ m_caloTTOnOffIdMapKey

Gaudi::Property<std::string> CaloTriggerTowerService::m_caloTTOnOffIdMapKey {this, "CaloTTOnOffIdMapKey", "CaloTTOnOffIdMapAtlas"}
private

Definition at line 188 of file CaloTriggerTowerService.h.

188{this, "CaloTTOnOffIdMapKey", "CaloTTOnOffIdMapAtlas"};

◆ m_caloTTPpmRxIdMap

CxxUtils::CachedPointer<const CaloTTPpmRxIdMap> CaloTriggerTowerService::m_caloTTPpmRxIdMap
private

Definition at line 185 of file CaloTriggerTowerService.h.

◆ m_caloTTPpmRxIdMapKey

Gaudi::Property<std::string> CaloTriggerTowerService::m_caloTTPpmRxIdMapKey {this, "CaloTTPpmRxIdMapKey", "CaloTTPpmRxIdMapAtlas"}
private

Definition at line 190 of file CaloTriggerTowerService.h.

190{this, "CaloTTPpmRxIdMapKey", "CaloTTPpmRxIdMapAtlas"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_emHelper

const LArEM_ID* CaloTriggerTowerService::m_emHelper {nullptr}
private

pointer to the LArEM offline Id helper

Definition at line 176 of file CaloTriggerTowerService.h.

176{nullptr};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_lvl1Helper

const CaloLVL1_ID* CaloTriggerTowerService::m_lvl1Helper {nullptr}
private

pointer to the Calo TT offline Id helper

Definition at line 178 of file CaloTriggerTowerService.h.

178{nullptr} ;

◆ m_onlineHelper

const LArOnlineID* CaloTriggerTowerService::m_onlineHelper {nullptr}
private

pointer to the LAr Online Id helper

Definition at line 174 of file CaloTriggerTowerService.h.

174{nullptr} ;

◆ m_TTCellMap

CxxUtils::CachedPointer<const LArTTCellMap> CaloTriggerTowerService::m_TTCellMap
private

Definition at line 182 of file CaloTriggerTowerService.h.

◆ m_TTCellMapKey

Gaudi::Property<std::string> CaloTriggerTowerService::m_TTCellMapKey {this, "LArTTCellMapKey", "LArTTCellMapAtlas"}
private

Definition at line 187 of file CaloTriggerTowerService.h.

187{this, "LArTTCellMapKey", "LArTTCellMapAtlas"};

◆ m_ttonlineHelper

const TTOnlineID* CaloTriggerTowerService::m_ttonlineHelper {nullptr}
private

pointer to the Calo TT online Id helper

Definition at line 180 of file CaloTriggerTowerService.h.

180{nullptr};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: