|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #include "GaudiKernel/ISvcLocator.h"
10 #include "GaudiKernel/Bootstrap.h"
11 #include "GaudiKernel/MsgStream.h"
12 #include "GaudiKernel/IMessageSvc.h"
31 SmartIF<IMessageSvc>
msgSvc{Gaudi::svcLocator()->service(
"MessageSvc")};
33 throw std::runtime_error(
"Cannot locate MessageSvc");
35 MsgStream
log(
msgSvc,
"CaloTTOnAttrIdMap");
39 SmartIF<StoreGateSvc>
detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
41 log << MSG::ERROR <<
"Cannot locate DetectorStore" <<
endmsg;
45 if(
detStore->retrieve(online_id).isFailure()){
46 log << MSG::ERROR <<
"Cannot retrieve online_id" <<
endmsg;
49 CaloTTOnAttrId::const_iterator
it =
m.begin();
50 CaloTTOnAttrId::const_iterator it_e =
m.end();
53 for (;
it!=it_e; ++
it) {
61 <<
" crate="<<
t.crate<<
" module="<<
t.module
62 <<
" submodule="<<
t.submodule
63 <<
" channel="<<
t.channel
64 <<
" em_had="<<
t.em_had
65 <<
" pos_neg="<<
t.pos_neg
66 <<
" barrel_endcap_fcal"<<
t.barrel_endcap_fcal
84 log<<MSG::ERROR<<
" Failed in CaloTTOnAttrIdMap::set " <<
endmsg;
85 log<<MSG::ERROR<< (std::string) except <<
endmsg ;
94 return ((*it).second).em_had;
99 "Online ID not found, channelId = " <<
channelId.get_compact() <<
endmsg;
107 return ((*it).second).pos_neg;
112 "Online ID not found, channelId = " <<
channelId.get_compact() <<
endmsg;
120 return ((*it).second).barrel_endcap_fcal;
125 "Online ID not found, channelId = " <<
channelId.get_compact() <<
endmsg;
133 return ((*it).second).module_type;
138 "Online ID not found, channelId = " <<
channelId.get_compact() <<
endmsg;
148 CaloTTOnAttrId::const_iterator
it =
d.begin();
149 CaloTTOnAttrId::const_iterator it_e =
d.end();
151 for ( ;
it!=it_e;++
it){
156 t2.module =
t.module;
157 t2.submodule=
t.submodule;
158 t2.channel =
t.channel;
160 t2.em_had =
t.em_had;
161 t2.pos_neg =
t.pos_neg;
162 t2.barrel_endcap_fcal =
t.barrel_endcap_fcal;
163 t2.module_type =
t.module_type;
172 std::vector<CaloTTOnAttrId_P::__t>::const_iterator
it =
p.m_v.begin();
173 std::vector<CaloTTOnAttrId_P::__t>::const_iterator it_e =
p.m_v.end();
176 for ( ;
it!=it_e;++
it){
181 t2.module =
t.module;
182 t2.submodule=
t.submodule;
183 t2.channel =
t.channel;
185 t2.em_had =
t.em_had;
186 t2.pos_neg =
t.pos_neg;
187 t2.barrel_endcap_fcal =
t.barrel_endcap_fcal;
188 t2.module_type =
t.module_type;
Structure definition of the LArTTOnAttrIdMap.
Exception class for Calo Identifiers.
CaloTTOnAttrId_P * getP()
return the persistified map
unsigned int pos_neg(HWIdentifier channelId) const
return 0 for z<0 channels and 1 for z>0 channels
Helper class for Calo TT online identifiers.
unsigned int barrel_endcap_fcal(HWIdentifier channelId) const
To know if a channel belongs to the barrel, end cap or fcal parts.
std::vector< CaloTTOnAttrId_t > CaloTTOnAttrId
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:
void convert_to_P(const CaloTTOnAttrId &t)
This is a StoreGate object holding the TT online-attribute map.
msgSvc
Provide convenience handles for various services.
void convert_to_D(const CaloTTOnAttrId_P &t, CaloTTOnAttrId &d)
CaloTTOnAttrId_P m_persData
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
Helpers for checking error return status codes and reporting errors.
std::map< HWIdentifier, AttrStruct > m_on2attrIdMap
std::vector< ALFA_RawDataContainer_p1 > t2
This is a database object holding the TT online-attribute map.
HWIdentifier channelId(int crate, int module, int submodule, int channel) const
(1) create towerId from fields
unsigned int barrel_endcap_fcal
void set(const PDATA &t)
initialize from Nova