![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
11 #include "Gaudi/Property.h"
17 #include "GaudiKernel/IToolSvc.h"
18 #include "GaudiKernel/ServiceHandle.h"
23 const std::string&
name,
26 m_onlineHelper(nullptr) ,
28 m_lvl1Helper(nullptr) ,
29 m_ttonlineHelper(nullptr)
33 declareInterface<CaloTriggerTowerService>(
this);
47 msg().setLevel(msgLevel());
49 msg()<<MSG::INFO<<
" => CaloTriggerTowerService::initialize() "<<
endmsg;
54 msg() << MSG::ERROR <<
"Unable to retrieve CaloIdManager from DetectorStore" <<
endmsg;
55 return StatusCode::FAILURE;
61 msg() << MSG::ERROR <<
"Could not access LArEM_ID helper" <<
endmsg;
62 return StatusCode::FAILURE;
68 msg() << MSG::ERROR <<
"Could not access CaloLVL1_ID helper" <<
endmsg;
69 return StatusCode::FAILURE;
75 msg() << MSG::ERROR <<
"Could not access TTOnlineID helper" <<
endmsg;
76 return StatusCode::FAILURE;
83 msg() << MSG::ERROR <<
"Could not access LArOnlineID helper" <<
endmsg;
84 return StatusCode::FAILURE;
97 TClass::GetClass (
"LArTTCell_P");
98 TClass::GetClass (
"LArTTCell_P::LArTTCell_P_t");
99 TClass::GetClass (
"std::vector<LArTTCell_P::LArTTCell_P_t>");
101 msg()<<MSG::INFO<<
" ====> ...CaloTriggerTowerService::init() OK "<<
endmsg;
102 return StatusCode::SUCCESS;
110 msg()<<MSG::INFO<<
" => CaloTriggerTowerService::finalize() "<<
endmsg;
111 return StatusCode::SUCCESS;
128 if(!caloTTOnOffIdMap ) {
129 msg() << MSG::ERROR <<
" No CaloTTOnOffIdMap !" <<
endmsg;
130 msg() << MSG::ERROR <<
" Has the DB folder holding the CaloTTOnOffIdMap been added to IOVDbSvc ? " <<
endmsg;
131 msg() << MSG::ERROR <<
" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] " <<
endmsg;
142 if(sid == invalidId) {
145 except.
message(
"HWIdentifier not found in map ") ;
160 if(!caloTTOnOffIdMap ) {
161 msg() << MSG::ERROR <<
" No CaloTTOnOffIdMap !" <<
endmsg;
162 msg() << MSG::ERROR <<
" Has the DB folder holding the CaloTTOnOffIdMap been added to IOVDbSvc ? " <<
endmsg;
163 msg() << MSG::ERROR <<
" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] " <<
endmsg;
176 except.
message(
" Online ID not found in map ") ;
189 if(!caloTTPpmRxIdMap ) {
190 msg() << MSG::ERROR <<
" No CaloTTPpmRxIdMap !" <<
endmsg;
191 msg() << MSG::ERROR <<
" Has the DB folder holding the CaloTTPpmRxIdMap been added to IOVDbSvc ? " <<
endmsg;
192 msg() << MSG::ERROR <<
" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] " <<
endmsg;
201 except.
message(
" Rx channel ID not found in map ") ;
211 if(!caloTTPpmRxIdMap ) {
212 msg() << MSG::ERROR <<
" No CaloTTPpmRxIdMap !" <<
endmsg;
213 msg() << MSG::ERROR <<
" Has the DB folder holding the CaloTTPpmRxIdMap been added to IOVDbSvc ? " <<
endmsg;
214 msg() << MSG::ERROR <<
" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] " <<
endmsg;
215 return std::vector<L1CaloRxCoolChannelId>();
219 std::vector<L1CaloRxCoolChannelId> rxChannels = caloTTPpmRxIdMap->
ppmToRxId(ppmCoolChannelId);
220 if(rxChannels.empty()) {
223 except.
message(
" Ppm channel ID not found in map ") ;
234 if(!caloTTOnAttrIdMap) {
235 msg() << MSG::ERROR <<
" No TTOnAttrIdMap !" <<
endmsg;
236 msg() << MSG::ERROR <<
" Has the DB folder holding the TTOnAttrIdMap been added to IOVDbSvc ? " <<
endmsg;
237 msg() << MSG::ERROR <<
" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] " <<
endmsg;
249 if(!caloTTOnAttrIdMap) {
250 msg() << MSG::ERROR <<
" No TTOnAttrIdMap !" <<
endmsg;
251 msg() << MSG::ERROR <<
" Has the DB folder holding the TTOnAttrIdMap been added to IOVDbSvc ? " <<
endmsg;
252 msg() << MSG::ERROR <<
" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] " <<
endmsg;
264 if(!caloTTOnAttrIdMap) {
265 msg() << MSG::ERROR <<
" No TTOnAttrIdMap !" <<
endmsg;
266 msg() << MSG::ERROR <<
" Has the DB folder holding the TTOnAttrIdMap been added to IOVDbSvc ? " <<
endmsg;
267 msg() << MSG::ERROR <<
" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] " <<
endmsg;
279 if(!caloTTOnAttrIdMap) {
280 msg() << MSG::ERROR <<
" No TTOnAttrIdMap !" <<
endmsg;
281 msg() << MSG::ERROR <<
" Has the DB folder holding the TTOnAttrIdMap been added to IOVDbSvc ? " <<
endmsg;
282 msg() << MSG::ERROR <<
" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] " <<
endmsg;
295 if(caloTTOnAttrIdMap) {
309 msg() << MSG::ERROR <<
" No CaloTTOnAttrIdMap !" <<
endmsg;
310 msg() << MSG::ERROR <<
" Has the DB folder holding the CaloTTOnAttrIdMap been added to IOVDbSvc ? " <<
endmsg;
311 msg() << MSG::ERROR <<
" IOVDbSvc.Folders+=[ FolderName + DBConnection + \"<tag>\"+TagSpec+\"</tag>\" ] " <<
endmsg;
320 unsigned int crate = coolChannelId.
crate();
322 unsigned int submodule = coolChannelId.
subModule();
333 std::vector<Identifier>
337 std::vector<Identifier>
vec ;
339 if(m_emHelper->dictionaryVersion() ==
"fullAtlas" ||
340 m_emHelper->dictionaryVersion() ==
"H8TestBeam") {
344 msg() << MSG::ERROR <<
" No TTCellMap !" <<
endmsg;
350 int maxLay=m_lvl1Helper->layer_max(regId);
352 for(
int iLay=0;iLay<=maxLay;++iLay) {
354 Identifier layId = m_lvl1Helper->layer_id(ttId,iLay);
356 std::vector<Identifier>::const_iterator
it = vecp.begin();
357 std::vector<Identifier>::const_iterator it_e = vecp.end();
358 for (;
it!=it_e; ++
it) {
369 std::vector<Identifier>
373 std::vector<Identifier>
vec ;
376 if(m_emHelper->dictionaryVersion() ==
"fullAtlas" ||
377 m_emHelper->dictionaryVersion() ==
"H8TestBeam") {
379 msg() << MSG::ERROR <<
" No TTCellMap !" <<
endmsg;
394 if(m_emHelper->dictionaryVersion() ==
"fullAtlas" ||
395 m_emHelper->dictionaryVersion() ==
"H8TestBeam") {
399 msg() << MSG::ERROR <<
" No TTCellMap !" <<
endmsg;
404 if(sid == invalidId ){
406 except.
message(
"Identifier not found in map ") ;
428 if(m_emHelper->dictionaryVersion() ==
"fullAtlas" ||
429 m_emHelper->dictionaryVersion() ==
"H8TestBeam") {
431 if(m_emHelper->is_em_barrel(
id)) {
432 int samp=m_emHelper->sampling(
id);
434 int eta=m_emHelper->eta(
id);
441 if(m_lvl1Helper->is_hec(ttId)) {
442 int layer = m_lvl1Helper->layer(ttId);
458 msg()<<MSG::INFO<<
" ====> iovCallBack " <<
endmsg;
460 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
CxxUtils::CachedPointer< const CaloTTPpmRxIdMap > m_caloTTPpmRxIdMap
int channel(const HWIdentifier id) const
const LArEM_ID * m_emHelper
pointer to the LArEM offline Id helper
std::string m_TTCellMapKey
std::string m_caloTTOnOffIdMapKey
Exception class for Calo Identifiers.
CxxUtils::CachedPointer< const LArTTCellMap > m_TTCellMap
CxxUtils::CachedPointer< const CaloTTOnOffIdMap > m_caloTTOnOffIdMap
unsigned int pos_neg(HWIdentifier channelId) const
return 0 for z<0 channels and 1 for z>0 channels
std::vector< Identifier > createCellIDvecLayer(const Identifier &id) const
Return a vector of offline Identifiers (corresponding helpers = LArEM_ID, LArHEC_ID,...
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const CaloLVL1_ID * m_lvl1Helper
pointer to the Calo TT offline Id helper
const LArEM_ID * getEM_ID(void) const
Identifier whichTTID(const Identifier &id) const
return the offline id (CaloLVL1_ID) of the TT to which a cell (CaloCell_ID) belongs
const LArOnlineID * m_onlineHelper
pointer to the LAr Online Id helper
unsigned int barrel_endcap_fcal(HWIdentifier channelId) const
To know if a channel belongs to the barrel, end cap or fcal parts.
const std::vector< Identifier > & createCellIDvec(const Identifier &id) const
Return a vector of offline Identifiers (corresponding helpers = LArEM_ID, LArHEC_ID,...
unsigned int em_had(const HWIdentifier &id) const
return the corresponding sampling of channelId:
const LArTTCellMap * getTTCellMap() const
std::vector< L1CaloRxCoolChannelId > ppmToRxId(const L1CaloCoolChannelId &ppmChannelId) const
return the corresponding Rx channels to the Ppm input one
unsigned int crate() const
std::vector< size_t > vec
HWIdentifier createSignalChannelID(const Identifier &id, bool bQuiet=false) const
return the corresponfing online Id of an offline one
std::string m_caloTTOnAttrIdMapKey
unsigned int module_type(HWIdentifier channelId) const
To get the type of the module connected to the channel:
#define IOVSVC_CALLBACK_ARGS
short hand for IOVSvc call back argument list, to be used when no access to formal arguments is neede...
unsigned int em_had(HWIdentifier channelId) const
return the corresponding sampling of channelId:
bool is_valid() const
Check if id is in a valid state.
void set(pointer_t elt) const
Set the element, assuming it is currently null.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
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 ...
HWIdentifier createTTChannelID(const Identifier &id, bool bQuiet=false) const
create a TT HWIdentifier from a TT Identifier
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
This is a StoreGate object holding the TT offline-online map.
const CaloTTOnOffIdMap * getCaloTTOnOffIdMap() const
int module(const HWIdentifier id) const
std::vector< Identifier > createCellIDvecTT(const Identifier &id) const
Return a vector of offline Identifiers (corresponding helpers = LArEM_ID, LArHEC_ID,...
Identifier cnvToIdentifier(const HWIdentifier &sid, bool bQuiet=false) const
return the corresponfing offline Id of an online one
L1CaloCoolChannelId rxToPpmId(const L1CaloRxCoolChannelId &rxChannelId) const
return the corresponfing ppm channel to the Rx input one
This class initializes the Calo (LAr and Tile) offline identifiers.
unsigned int channel() const
::StatusCode StatusCode
StatusCode definition for legacy code.
Identifier cnvToIdentifier(const HWIdentifier &id, bool bQuiet=false) const
create a TT Identifier from a TT HWIdentifier
unsigned int pos_neg(const HWIdentifier &id) const
return 0 for z<0 channels and 1 for z>0 channels
const TTOnlineID * m_ttonlineHelper
pointer to the Calo TT online Id helper
const CaloLVL1_ID * getLVL1_ID(void) const
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 c...
bool is_initialized() const
std::vector< L1CaloRxCoolChannelId > cnvCoolChannelIdToRxId(const L1CaloCoolChannelId &ppmCoolChannelId) const
returns a vector of L1CaloRxCoolChannelId corresponding to a L1CaloCoolChannelId
CxxUtils::CachedPointer< const CaloTTOnAttrIdMap > m_caloTTOnAttrIdMap
const CaloTTOnAttrIdMap * getCaloTTOnAttrIdMap() const
This is a StoreGate object holding the offline TT-cell map.
void message(const std::string &lMessage)
set error message
unsigned int barrel_endcap_fcal(const HWIdentifier &id) const
To know if a channel belongs to the barrel, end cap or fcal parts.
std::string m_caloTTPpmRxIdMapKey
void message(const std::string &l_message)
set error message
HWIdentifier cnvCoolChannelIdToHWID(const L1CaloCoolChannelId &coolChannelId) const
create an HWIdentifier from an TDAQ CoolChannelId
int submodule(const HWIdentifier id) const
unsigned int module_type(const HWIdentifier &id) const
To get the type of the module connected to the channel:
L1CaloCoolChannelId createL1CoolChannelId(const HWIdentifier &id) const
create a CoolChannelId (used by TDAQ framework) from a HWIdentifier
This is a StoreGate object holding the TT PPM to RX channels map.
HWIdentifier channelId(int crate, int module, int submodule, int channel) const
(1) create towerId from fields
pointer_t get() const
Return the current value of the element.
const CaloTTPpmRxIdMap * getCaloTTPpmRxIdMap() const
const TTOnlineID * getTTOnlineID(void) const
virtual StatusCode iovCallBack(IOVSVC_CALLBACK_ARGS)
int crate(const HWIdentifier id) const
L1CaloCoolChannelId cnvRxIdToCoolChannelId(const L1CaloRxCoolChannelId &rxCoolChannelId) const
returns a TDAQ CoolChannelId corresponding to a L1CaloRxCoolChannelId
Exception class for LAr Identifiers.
unsigned int subModule() const
CaloTriggerTowerService(const std::string &type, const std::string &name, const IInterface *parent)
constructor
unsigned int module(bool logical=true) const
void code(int lCode)
set error code number