 |
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include "GaudiKernel/ISvcLocator.h"
11 #include "GaudiKernel/Bootstrap.h"
12 #include "GaudiKernel/MsgStream.h"
13 #include "GaudiKernel/IMessageSvc.h"
32 SmartIF<IMessageSvc>
msgSvc{Gaudi::svcLocator()->service(
"MessageSvc")};
34 throw std::runtime_error(
"Cannot locate MessageSvc");
36 MsgStream
log(
msgSvc,
"CaloTTOnOffIdMap");
40 SmartIF<StoreGateSvc>
detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
42 log << MSG::ERROR <<
"Cannot locate DetectorStore" <<
endmsg;
50 log << MSG::ERROR <<
"Cannot retrieve online_id" <<
endmsg;
54 log << MSG::ERROR <<
"Cannot retrieve offline_id" <<
endmsg;
57 CaloTTOnOffId::const_iterator
it =
m.begin();
58 CaloTTOnOffId::const_iterator it_e =
m.end();
61 for (;
it!=it_e; ++
it) {
70 <<
" pn="<<
t.pn<<
" sampling="<<
t.sampling
71 <<
" region="<<
t.region
72 <<
" eta="<<
t.eta<<
" phi="<<
t.phi<<
" layer="<<
t.layer<<
" | "
73 <<
" crate="<<
t.crate<<
" module="<<
t.module
74 <<
" submodule="<<
t.submodule
75 <<
" channel="<<
t.channel
88 log<<MSG::ERROR<<
" Failed in CaloTTOnOffIdMap::set " <<
endmsg;
89 log<<MSG::ERROR<< (std::string) except <<
endmsg ;
97 std::map<Identifier,HWIdentifier>::const_iterator
it =
m_off2onIdMap.find(
id);
109 "Offline ID not found "<<
id <<
endmsg;
119 std::map<HWIdentifier,Identifier>::const_iterator
it=
m_on2offIdMap.find(sid);
144 CaloTTOnOffId::const_iterator
it =
d.begin();
145 CaloTTOnOffId::const_iterator it_e =
d.end();
147 for ( ;
it!=it_e;++
it){
152 t2.sampling =
t.sampling;
153 t2.region =
t.region;
159 t2.module =
t.module;
160 t2.submodule=
t.submodule;
161 t2.channel =
t.channel;
170 std::vector<CaloTTOnOffId_P::__t>::const_iterator
it =
p.m_v.begin();
171 std::vector<CaloTTOnOffId_P::__t>::const_iterator it_e =
p.m_v.end();
174 for ( ;
it!=it_e;++
it){
179 t2.sampling =
t.sampling;
180 t2.region =
t.region;
186 t2.module =
t.module;
187 t2.submodule=
t.submodule;
188 t2.channel =
t.channel;
CaloTTOnOffId_P m_persData
Exception class for Calo Identifiers.
Helper class for Calo TT online identifiers.
void convert_to_P(const CaloTTOnOffId &t)
value_type get_compact() const
Get the compact id.
Structure definition of the LArTTOnOffIdMap.
HWIdentifier createSignalChannelID(const Identifier &id, bool bQuiet=false) const
return the corresponfing online Id of an offline one
Identifier cnvToIdentifier(const HWIdentifier &sid, bool bQuiet=false) const
return the corresponfing offline Id of an online one
msgSvc
Provide convenience handles for various services.
std::map< Identifier, HWIdentifier > m_off2onIdMap
::StatusCode StatusCode
StatusCode definition for legacy code.
void convert_to_D(const CaloTTOnOffId_P &t, CaloTTOnOffId &d)
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
Helper class for offline TT identifiers.
Helpers for checking error return status codes and reporting errors.
This is a database object holding the TT online-offline map.
std::vector< ALFA_RawDataContainer_p1 > t2
void set(const PDATA &t)
initialize from Nova
std::map< HWIdentifier, Identifier > m_on2offIdMap
HWIdentifier channelId(int crate, int module, int submodule, int channel) const
(1) create towerId from fields
CaloTTOnOffId_P * getP()
return the persistified map
Identifier tower_id(int pos_neg_z, int sampling, int region, int eta, int phi) const
build a tower identifier
std::vector< CaloTTOnOffId_t > CaloTTOnOffId