85{
87
88 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{
m_cablingKey};
89 const LArOnOffIdMapping*
cabling{*cablingHdl};
90 if(!cabling){
92 return StatusCode::FAILURE;
93 }
94 SG::ReadCondHandle<LArCalibLineMapping> clHdl{
m_CLKey};
95 const LArCalibLineMapping *clCont {*clHdl};
96 if(!clCont){
98 return StatusCode::FAILURE;
99 }
100 SG::ReadCondHandle<LArFebRodMapping> rodHdl{
m_RodKey};
101 const LArFebRodMapping *rodCont {*rodHdl};
102 if(!rodCont){
104 return StatusCode::FAILURE;
105 }
106
108 ATH_MSG_DEBUG (
" Number of LArReadoutModuleIDs= " << roms.size() );
109
110 std::vector<HWIdentifier>::const_iterator
it =
m_onlineID->channel_begin();
111 std::vector<HWIdentifier>::const_iterator it_end =
m_onlineID->channel_end();
112
113 int ntot = it_end-
it;
114 ATH_MSG_DEBUG(
" Total number of online channels from LArOnlineID "
115 <<ntot );
116
117 int nch = 0;
118 int nconnected = 0;
119 int nerr=0;
120
121 int n_err_uA2MeV=0;
122 int n_err_DAC2uA=0;
123
124
125 const ILArShape* pShape=0;
127 if (!
sc.isSuccess() ){
128 ATH_MSG_ERROR (
" Failed to retrieve ILArShape from DetStore");
129 }
130
131
132 const ILArNoise* pNoise=0;
134 if (!
sc.isSuccess() ){
135 ATH_MSG_ERROR (
" Failed to retrieve ILArNoise from DetStore");
136 }
137
138
139 const ILArRamp* pRamp=0;
141 if (!
sc.isSuccess() ){
142 ATH_MSG_ERROR (
" Failed to retrieve ILArRamp from DetStore");
143 }
144
145 const ILArDAC2uA* pDAC2uA=0;
147 if (!
sc.isSuccess() ){
148 ATH_MSG_ERROR (
" Failed to retrieve ILArDAC2uA from DetStore");
149 }
150
151 const ILAruA2MeV* puA2MeV=0;
153 if (!
sc.isSuccess() ){
154 ATH_MSG_ERROR (
" Failed to retrieve ILAruA2MeV from DetStore");
155 }
156
157 const ILArAutoCorr* pAutoCorr=0;
159 if (!
sc.isSuccess() ){
160 ATH_MSG_ERROR (
" Failed to retrieve ILArAutoCorr from DetStore");
161 }
162
163 const ILArPedestal* pPedestal=0;
165 if (!
sc.isSuccess() ){
166 ATH_MSG_ERROR (
" Failed to retrieve ILArPedestal from DetStore");
167 }
168
169 const ILArfSampl* pfSampl=0;
171 if (!
sc.isSuccess() ){
172 ATH_MSG_ERROR (
" Failed to retrieve ILArfSampl from DetStore");
173 }
174
175
176 const ILArMinBias* pMinBias=0;
178 if (!
sc.isSuccess() ){
179 ATH_MSG_ERROR (
" Failed to retrieve ILArMinBias from DetStore");
180 }
181
182
183 for(;
it!=it_end;++
it) {
184 HWIdentifier sid = *
it;
185 try {
186
187 if(!
cabling->isOnlineConnected(sid))
188 continue;
189
191 {
193 {
196 }
197 }
198
199 ++nconnected;
200 Identifier
id =
cabling->cnvToIdentifier(sid);
201 HWIdentifier sid2 =
cabling->createSignalChannelID(
id);
202 ++nch ;
203 if( sid !=sid2 ) {
205 <<
" "<<sid<<
" "<<
m_onlineID->show_to_string(sid)
206 <<
" offline id = "<<
id <<
" "<<
m_onlineID->show_to_string(
id)
207 <<
" sid2 = "<< sid2 <<
" "<<
m_onlineID->show_to_string(sid2)
208 );
209 ++nerr;
210 }
211 else {
212
213
214 const std::vector<HWIdentifier>&
216 if(
calib.size()==0) {
219 }
220 else {
222 }
223
225
230 }
231
232 float f = puA2MeV->
UA2MEV( sid ) ;
234 {
237 ++n_err_uA2MeV;
238 }
241 {
244 ++n_err_DAC2uA;
245 }
246 f = pNoise->
noise( sid , 0 ) ;
248 {
251 }
252
257 }
258
259
262 if(vShape.size() ==0 || vShapeDer.size() == 0 ) {
264 <<sid.
get_compact() <<
" size = " << vShape.size() <<
" " << vShapeDer.size());
265 } else
266 {
267 if (
msgLvl(MSG::VERBOSE)) {
269 msg()<<MSG::VERBOSE<<
" Shape= " ;
270 for (
unsigned int i=0;
i < vShape.size(); ++
i){
271 msg()<<
" " << vShape[
i] ;
272 }
274 msg()<<MSG::VERBOSE<<
" ShapeDer=" ;
275 for (
unsigned int i=0;
i < vShapeDer.size(); ++
i){
276 msg()<<
" " << vShapeDer[
i] ;
277 }
279 }
280 }
281
282
283
284 float vPed = pPedestal->
pedestal( sid,0 ) ;
288 }
289
290
293
297 }
298
299
304 }
305
306 }
307 }
308 catch (LArID_Exception& except) {
309
313 }
314 }
315 ATH_MSG_DEBUG (
" Number of Connected Channel ID = " <<nconnected );
317 if(nerr>0)
ATH_MSG_ERROR (
" Number channels with incorrect mapping= " <<nerr );
318
319 if (n_err_uA2MeV!=0)
320 ATH_MSG_DEBUG (
" Number of channels without uA2MeV "<<n_err_uA2MeV);
321 if (n_err_DAC2uA!=0)
322 ATH_MSG_DEBUG (
" Number of channels without DAC2uA"<<n_err_DAC2uA);
323
324 return StatusCode::SUCCESS;
325}
#define ATH_MSG_VERBOSE(x)
const ServiceHandle< StoreGateSvc > & detStore() const
bool msgLvl(const MSG::Level lvl) const
LArVectorProxy AutoCorrRef_t
virtual AutoCorrRef_t autoCorr(const HWIdentifier &CellID, int gain) const =0
virtual const float & DAC2UA(const HWIdentifier &id) const =0
access to DAC2UA conversion factor index by Identifier, and gain setting
virtual const float & minBiasRMS(const HWIdentifier &id) const =0
access to RMS of E in minimum bias events index by Identifier
virtual const float & noise(const HWIdentifier &id, int gain) const =0
virtual float pedestal(const HWIdentifier &id, int gain) const =0
virtual RampRef_t ADC2DAC(const HWIdentifier &id, int gain) const =0
LArVectorProxy RampRef_t
This class defines the interface for accessing Ramp @stereotype Interface.
LArVectorProxy ShapeRef_t
This class defines the interface for accessing Shape (Nsample variable, Dt = 25 ns fixed) @stereotype...
virtual ShapeRef_t Shape(const HWIdentifier &id, int gain, int tbin=0, int mode=0) const =0
virtual ShapeRef_t ShapeDer(const HWIdentifier &id, int gain, int tbin=0, int mode=0) const =0
virtual const float & FSAMPL(const HWIdentifier &id) const =0
virtual const float & UA2MEV(const HWIdentifier &id) const =0
value_type get_compact() const
Get the compact id.
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
const std::vector< HWIdentifier > & calibSlotLine(const HWIdentifier id) const
SG::ReadCondHandleKey< LArFebRodMapping > m_RodKey
SG::ReadCondHandleKey< LArCalibLineMapping > m_CLKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
const std::vector< HWIdentifier > & getLArRoModIDvec() const
"iterator" on LArReadoutModuleIDs
::StatusCode StatusCode
StatusCode definition for legacy code.