![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
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"
33 std::cout <<
"Cannot locate MessageSvc" << std::endl;
35 MsgStream
log(
msgSvc,
"CaloTTOnAttrIdMap");
45 log << MSG::ERROR <<
"Cannot locate DetectorStore" <<
endmsg;
52 log << MSG::ERROR <<
"Cannot retrieve online_id" <<
endmsg;
55 CaloTTOnAttrId::const_iterator
it =
m.begin();
56 CaloTTOnAttrId::const_iterator it_e =
m.end();
59 for (;
it!=it_e; ++
it) {
67 <<
" crate="<<
t.crate<<
" module="<<
t.module
68 <<
" submodule="<<
t.submodule
69 <<
" channel="<<
t.channel
70 <<
" em_had="<<
t.em_had
71 <<
" pos_neg="<<
t.pos_neg
72 <<
" barrel_endcap_fcal"<<
t.barrel_endcap_fcal
88 log<<MSG::ERROR<<
" Failed in CaloTTOnAttrIdMap::set " <<
endmsg;
89 log<<MSG::ERROR<< (std::string) except <<
endmsg ;
98 return ((*it).second).em_had;
105 std::cout <<
"Cannot locate MessageSvc" << std::endl;
108 MsgStream
log(
msgSvc,
"CaloTTOnAttrIdMap");
109 log<<MSG::ERROR<<
" Online ID not found, channelId = " <<
channelId.get_compact()<<
endmsg;
116 return ((*it).second).pos_neg;
123 std::cout <<
"Cannot locate MessageSvc" << std::endl;
126 MsgStream
log(
msgSvc,
"CaloTTOnAttrIdMap");
127 log<<MSG::ERROR<<
" Online ID not found, channelId = " <<
channelId.get_compact()<<
endmsg;
135 return ((*it).second).barrel_endcap_fcal;
142 std::cout <<
"Cannot locate MessageSvc" << std::endl;
145 MsgStream
log(
msgSvc,
"CaloTTOnAttrIdMap");
146 log<<MSG::ERROR<<
" Online ID not found, channelId = " <<
channelId.get_compact()<<
endmsg;
154 return ((*it).second).module_type;
161 std::cout <<
"Cannot locate MessageSvc" << std::endl;
164 MsgStream
log(
msgSvc,
"CaloTTOnAttrIdMap");
165 log<<MSG::ERROR<<
" Online ID not found, channelId = " <<
channelId.get_compact()<<
endmsg;
175 CaloTTOnAttrId::const_iterator
it =
d.begin();
176 CaloTTOnAttrId::const_iterator it_e =
d.end();
178 for ( ;
it!=it_e;++
it){
183 t2.module =
t.module;
184 t2.submodule=
t.submodule;
185 t2.channel =
t.channel;
187 t2.em_had =
t.em_had;
188 t2.pos_neg =
t.pos_neg;
189 t2.barrel_endcap_fcal =
t.barrel_endcap_fcal;
190 t2.module_type =
t.module_type;
199 std::vector<CaloTTOnAttrId_P::__t>::const_iterator
it =
p.m_v.begin();
200 std::vector<CaloTTOnAttrId_P::__t>::const_iterator it_e =
p.m_v.end();
203 for ( ;
it!=it_e;++
it){
208 t2.module =
t.module;
209 t2.submodule=
t.submodule;
210 t2.channel =
t.channel;
212 t2.em_had =
t.em_had;
213 t2.pos_neg =
t.pos_neg;
214 t2.barrel_endcap_fcal =
t.barrel_endcap_fcal;
215 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)
The Athena Transient Store API.
This is a StoreGate object holding the TT online-attribute map.
msgSvc
Provide convenience handles for various services.
::StatusCode StatusCode
StatusCode definition for legacy code.
void convert_to_D(const CaloTTOnAttrId_P &t, CaloTTOnAttrId &d)
def dump(buf, stdout=sys.stdout)
CaloTTOnAttrId_P m_persData
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