20 const std::string& name,
21 const IInterface* parent )
25 declareInterface<CaloTriggerTowerService>(
this);
32 ATH_MSG_INFO(
" => CaloTriggerTowerService::initialize()");
51 TClass::GetClass (
"LArTTCell_P");
52 TClass::GetClass (
"LArTTCell_P::LArTTCell_P_t");
53 TClass::GetClass (
"std::vector<LArTTCell_P::LArTTCell_P_t>");
55 return StatusCode::SUCCESS;
66 if(!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>\" ] ");
83 except.
message(
"HWIdentifier not found in map ") ;
98 if(!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>\" ] ");
114 except.
message(
" Online ID not found in map ") ;
127 if(!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>\" ] ");
139 except.
message(
" Rx channel ID not found in map ") ;
149 if(!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>\" ] ");
157 std::vector<L1CaloRxCoolChannelId> rxChannels = caloTTPpmRxIdMap->
ppmToRxId(ppmCoolChannelId);
158 if(rxChannels.empty()) {
161 except.
message(
" Ppm channel ID not found in map ") ;
172 if(!caloTTOnAttrIdMap) {
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>\" ] ");
187 if(!caloTTOnAttrIdMap) {
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>\" ] ");
202 if(!caloTTOnAttrIdMap) {
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>\" ] ");
217 if(!caloTTOnAttrIdMap) {
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>\" ] ");
233 if(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>\" ] ");
258 unsigned int crate = coolChannelId.
crate();
259 unsigned int module = coolChannelId.
module(
false);
260 unsigned int submodule = coolChannelId.
subModule();
261 unsigned int channel = coolChannelId.
channel();
271std::vector<Identifier>
275 std::vector<Identifier>
vec ;
277 if(
m_emHelper->dictionaryVersion() ==
"fullAtlas" ||
278 m_emHelper->dictionaryVersion() ==
"H8TestBeam") {
290 for(
int iLay=0;iLay<=maxLay;++iLay) {
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) {
307std::vector<Identifier>
311 std::vector<Identifier>
vec ;
314 if(
m_emHelper->dictionaryVersion() ==
"fullAtlas" ||
315 m_emHelper->dictionaryVersion() ==
"H8TestBeam") {
332 if(
m_emHelper->dictionaryVersion() ==
"fullAtlas" ||
333 m_emHelper->dictionaryVersion() ==
"H8TestBeam") {
344 except.
message(
"Identifier not found in map ") ;
366 if(
m_emHelper->dictionaryVersion() ==
"fullAtlas" ||
367 m_emHelper->dictionaryVersion() ==
"H8TestBeam") {
Scalar eta() const
pseudorapidity method
#define ATH_CHECK
Evaluate an expression and check for errors.
std::vector< size_t > vec
const ServiceHandle< StoreGateSvc > & detStore() const
Exception class for Calo Identifiers.
void code(int lCode)
set error code number
void message(const std::string &lMessage)
set error message
This class initializes the Calo (LAr and Tile) offline identifiers.
const TTOnlineID * getTTOnlineID(void) const
const CaloLVL1_ID * getLVL1_ID(void) const
const LArEM_ID * getEM_ID(void) const
unsigned int pos_neg(HWIdentifier channelId) const
return 0 for z<0 channels and 1 for z>0 channels
unsigned int barrel_endcap_fcal(HWIdentifier channelId) const
To know if a channel belongs to the barrel, end cap or fcal parts.
unsigned int module_type(HWIdentifier channelId) const
To get the type of the module connected to the channel:
unsigned int em_had(HWIdentifier channelId) const
return the corresponding sampling of channelId:
This is a StoreGate object holding the TT offline-online map.
Identifier cnvToIdentifier(const HWIdentifier &sid, bool bQuiet=false) const
return the corresponfing offline Id of an online one
HWIdentifier createSignalChannelID(const Identifier &id, bool bQuiet=false) const
return the corresponfing online Id of an offline one
This is a StoreGate object holding the TT PPM to RX channels map.
L1CaloCoolChannelId rxToPpmId(const L1CaloRxCoolChannelId &rxChannelId) const
return the corresponfing ppm channel to the Rx input one
std::vector< L1CaloRxCoolChannelId > ppmToRxId(const L1CaloCoolChannelId &ppmChannelId) const
return the corresponding Rx channels to the Ppm input one
Gaudi::Property< std::string > m_caloTTOnAttrIdMapKey
HWIdentifier createTTChannelID(const Identifier &id, bool bQuiet=false) const
create a TT HWIdentifier from a TT Identifier
const CaloTTOnAttrIdMap * getCaloTTOnAttrIdMap() const
const LArEM_ID * m_emHelper
pointer to the LArEM offline Id helper
const CaloTTOnOffIdMap * getCaloTTOnOffIdMap() const
Identifier cnvToIdentifier(const HWIdentifier &id, bool bQuiet=false) const
create a TT Identifier from a TT HWIdentifier
CxxUtils::CachedPointer< const CaloTTPpmRxIdMap > m_caloTTPpmRxIdMap
CaloTriggerTowerService(const std::string &type, const std::string &name, const IInterface *parent)
constructor
Gaudi::Property< std::string > m_caloTTOnOffIdMapKey
unsigned int pos_neg(const HWIdentifier &id) const
return 0 for z<0 channels and 1 for z>0 channels
CxxUtils::CachedPointer< const CaloTTOnAttrIdMap > m_caloTTOnAttrIdMap
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...
const LArTTCellMap * getTTCellMap() const
unsigned int module_type(const HWIdentifier &id) const
To get the type of the module connected to the channel:
std::vector< Identifier > createCellIDvecLayer(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 CaloTTPpmRxIdMap * getCaloTTPpmRxIdMap() const
unsigned int barrel_endcap_fcal(const HWIdentifier &id) const
To know if a channel belongs to the barrel, end cap or fcal parts.
std::vector< L1CaloRxCoolChannelId > cnvCoolChannelIdToRxId(const L1CaloCoolChannelId &ppmCoolChannelId) const
returns a vector of L1CaloRxCoolChannelId corresponding to a L1CaloCoolChannelId
L1CaloCoolChannelId cnvRxIdToCoolChannelId(const L1CaloRxCoolChannelId &rxCoolChannelId) const
returns a TDAQ CoolChannelId corresponding to a L1CaloRxCoolChannelId
Gaudi::Property< std::string > m_TTCellMapKey
CxxUtils::CachedPointer< const CaloTTOnOffIdMap > m_caloTTOnOffIdMap
virtual StatusCode initialize() override
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 ...
const CaloLVL1_ID * m_lvl1Helper
pointer to the Calo TT offline Id helper
const TTOnlineID * m_ttonlineHelper
pointer to the Calo TT online Id helper
HWIdentifier cnvCoolChannelIdToHWID(const L1CaloCoolChannelId &coolChannelId) const
create an HWIdentifier from an TDAQ CoolChannelId
std::vector< Identifier > createCellIDvecTT(const Identifier &id) const
Return a vector of offline Identifiers (corresponding helpers = LArEM_ID, LArHEC_ID,...
const LArOnlineID * m_onlineHelper
pointer to the LAr Online Id helper
Gaudi::Property< std::string > m_caloTTPpmRxIdMapKey
L1CaloCoolChannelId createL1CoolChannelId(const HWIdentifier &id) const
create a CoolChannelId (used by TDAQ framework) from a HWIdentifier
CxxUtils::CachedPointer< const LArTTCellMap > m_TTCellMap
bool is_valid() const
Check if id is in a valid state.
Encapsulates the ID of one channel of conditions data in COOL, ie the ID of a row in a table.
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
Infrastructure class encapsulating our known module types.
Encapsulates the ID of one Rx channel of conditions data in COOL, ie the ID of a row in a table.
Exception class for LAr Identifiers.
void message(const std::string &l_message)
set error message
This is a StoreGate object holding the offline TT-cell map.
Identifier whichTTID(const Identifier &id) const
return the offline id (CaloLVL1_ID) of the TT to which a cell (CaloCell_ID) belongs
const std::vector< Identifier > & createCellIDvec(const Identifier &id) const
Return a vector of offline Identifiers (corresponding helpers = LArEM_ID, LArHEC_ID,...