ATLAS Offline Software
LArConditionsTestAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
16 
19 
22 #include "LArElecCalib/ILArOFC.h"
23 
25 
27 
29 // CONSTRUCTOR:
31 
32 LArConditionsTestAlg::LArConditionsTestAlg(const std::string& name, ISvcLocator* pSvcLocator) :
33  AthAlgorithm(name,pSvcLocator),
34  m_onlineID(0),
35  m_testFill(false),
36  m_testCondObjs(false),
37  m_readCondObjs(false),
38  m_writeCondObjs(false),
39  m_writeCorrections(false),
40  m_applyCorrections(false),
41  m_testReadDB(false),
42  m_TB(false),
43  m_tbin(0)
44 {
45  // switch for testing Filling IOV.
46  declareProperty("TestCondObjs", m_testCondObjs);
47  declareProperty("ReadCondObjs", m_readCondObjs);
48  declareProperty("WriteCondObjs", m_writeCondObjs);
49  declareProperty("WriteCorrections", m_writeCorrections);
50  declareProperty("ApplyCorrections", m_applyCorrections);
51  declareProperty("TestFill", m_testFill);
52  declareProperty("TestReadDBDirect", m_testReadDB) ;
53  declareProperty("Testbeam", m_TB) ;
54  declareProperty("Tbin", m_tbin) ;
55 }
56 
58 // DESTRUCTOR:
60 
62 { }
63 
65 // INITIALIZE:
67 
69 {
70  ATH_MSG_DEBUG ( " TestCondObjs flag = " << m_testCondObjs );
71  ATH_MSG_DEBUG ( " ReadCondObjs flag = " << m_readCondObjs );
72  ATH_MSG_DEBUG ( " WriteCondObjs flag = " << m_writeCondObjs );
73  ATH_MSG_DEBUG ( " WriteCorrections flag = " << m_writeCorrections );
74  ATH_MSG_DEBUG ( " ApplyCorrections flag = " << m_applyCorrections );
75  ATH_MSG_DEBUG ( " TestFill flag = " << m_testFill );
76  ATH_MSG_DEBUG ( " TestReadDBDirect flag = " << m_testReadDB );
77  ATH_MSG_DEBUG ( " Testbeam flag = " << m_TB );
78 
80 
81  // Need to load authentication for RDBMS
82  // log << MSG::INFO << "Loading XMLAuthenticationService " << endmsg;
83  // pool::POOLContext::loadComponent( "POOL/Services/XMLAuthenticationService" );
84 
85  const CaloCell_ID* calocell_id = nullptr;
86  ATH_CHECK( detStore()->retrieve(calocell_id) );
87 
88  ATH_MSG_DEBUG ( "initialize done" );
89  return StatusCode::SUCCESS;
90 }
91 
93 // EXECUTE:
95 
97 {
98  ATH_MSG_DEBUG ( " retrieve DataHandle<ILArRamp> in execute " );
99 
100  if(m_testCondObjs){
101 
102  // create cache
104 // StatusCode sc = testDbObjectRead();
105 // if(sc.isFailure()) {
106 // log << MSG::ERROR << "Failed testDbObjectRead " << endmsg;
107 // return StatusCode::FAILURE;
108 // }
109 
110  }
111 
112 
113 // if(m_testCondObject){
114 // std::string key = "LArRamp";
115 // const ILArRamp* ramp = 0 ;
116 // detStore()->retrieve(ramp, key);
117 // if(!ramp) {
118 // log<< MSG::ERROR<<" Failed to get LArRamp in execute " << endmsg;
119 // return StatusCode::FAILURE ;
120 // }
121 // }
122 
123  if(m_TB){
124  const ILArOFC* ofc = nullptr;
125  ATH_CHECK( detStore()->retrieve(ofc, "LArOFC") );
126 
127  const ILArRamp* ramp = nullptr;
128  ATH_CHECK( detStore()->retrieve(ramp, "LArRamp") );
129  }
130 
131 /*
132  log << MSG::DEBUG << " retrieve DataHandle<ExampleData> in execute " <<endmsg;
133  const ExampleData* example = 0 ;
134  detStore()->retrieve( example );
135  if(!example) {
136  log<< MSG::ERROR<<" Failed to get ExampleData in execute " << endmsg;
137  }
138 */
139 
140 
141  return StatusCode::SUCCESS;
142 }
143 
144 
146 // FINALIZE:
147 // Note that it is NOT NECESSARY to run the finalize of individual
148 // sub-algorithms. The framework takes care of it.
150 
152 {
155  return StatusCode::SUCCESS;
156 }
157 
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
160 
163 {
164  // StatusCode sc;
165  ATH_MSG_INFO ("in createCompareObjects()" );
166 
167  // Create set of ids, LArRampComplete::LArCondObj
168 
169  std::vector<HWIdentifier>::const_iterator chanIt = m_onlineID->channel_begin();
170  std::vector<HWIdentifier>::const_iterator chanEnd = m_onlineID->channel_end();
171  int ichan = -1;
172  int icorr = 0;
173  float vramp = 0;
174  int gain = 0;
175  for (; chanIt != chanEnd; ++chanIt, ++ichan) {
176  // add channels with downscale factor
177  if (ichan % 1000 != 5) continue;
178 
179  // Create ramp with 3 vRamp elements
180  LArRampPTmp ramp((*chanIt), gain);
181  ramp.m_vRamp.push_back(vramp);
182  vramp += 1.0;
183  ramp.m_vRamp.push_back(vramp);
184  vramp += 1.0;
185  ramp.m_vRamp.push_back(vramp);
186  vramp += 1.0;
187  // add to cache
188  m_rampCache.push_back(ramp);
189 
190  // Change gain each time
191  gain = (gain == 2) ? 0 : gain + 1;
192 
194  // Create downscaled corrections
195  ++icorr;
196  if (icorr % 10 != 5) continue;
197  // Just change sign of ramp values
198  for (unsigned int i = 0; i < 3; ++i)ramp.m_vRamp[i] = -ramp.m_vRamp[i];
199  m_rampCorrections.push_back(ramp);
200  }
201  }
202 
203  // Print out cache and corrections
204  for (unsigned int i = 0; i < m_rampCache.size(); ++i) {
205  ATH_MSG_DEBUG ("Cache: chan, gain, ramps "
206  << m_onlineID->show_to_string(m_rampCache[i].m_channelID) << " "
207  << m_rampCache[i].m_gain << " "
208  << m_rampCache[i].m_vRamp[0] << " "
209  << m_rampCache[i].m_vRamp[1] << " "
210  << m_rampCache[i].m_vRamp[2] << " " );
211  }
212  for (unsigned int i = 0; i < m_rampCorrections.size(); ++i) {
213  ATH_MSG_DEBUG ("Corrections: chan, gain, ramps "
214  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
215  << m_rampCorrections[i].m_gain << " "
216  << m_rampCorrections[i].m_vRamp[0] << " "
217  << m_rampCorrections[i].m_vRamp[1] << " "
218  << m_rampCorrections[i].m_vRamp[2] << " " );
219  }
220 
221  ATH_MSG_DEBUG ( "End of create comparison objects " );
222  return StatusCode::SUCCESS;
223 }
224 
225 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
226 
227 inline bool operator == (const LArRampComplete::LArCondObj& r1, const LArRampPTmp& r2)
228 {
229  // Comparison of two LArRampComplete::LArCondObj objects
230  if (r1.m_vRamp.size() != r2.m_vRamp.size()) return (false);
231  for (unsigned int i = 0; i < r1.m_vRamp.size(); ++i) {
232  if (r1.m_vRamp[i] != r2.m_vRamp[i]) return (false);
233  }
234  return (true);
235 }
236 
237 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
238 
239 inline bool CorrectionCompare (const LArRampComplete::LArCondObj& r1, const LArRampPTmp& r2)
240 {
241  // Comparison of two LArRampComplete::LArCondObj objects
242  if (r1.m_vRamp.size() != r2.m_vRamp.size()) return (false);
243  for (unsigned int i = 0; i < r1.m_vRamp.size(); ++i) {
244  if (r1.m_vRamp[i] != -r2.m_vRamp[i]) return (false);
245  }
246  return (true);
247 }
248 
249 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
250 
251 inline bool operator != (const LArRampComplete::LArCondObj& r1, const LArRampPTmp& r2)
252 {
253  if(r1 == r2)return (false);
254  return (true);
255 }
256 
257 
258 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
259 
262 {
263  ATH_MSG_INFO ("in testCondObjects()" );
264 
265  static std::atomic<bool> first = true;
266  if (!first) {
267  ATH_MSG_INFO ("Multiple entries - returning" );
268  return StatusCode::SUCCESS;
269  }
270  first = false;
271 
272  typedef LArRampMC::CONTAINER CONTAINER;
273  typedef CONTAINER::chan_const_iterator chan_const_iterator;
274  typedef CONTAINER::iov_const_iterator iov_const_iterator;
275 
278 
279  const LArRampMC* ramps = 0;
280 
281  // Create SingleGroup
282  if (m_readCondObjs) {
283  const ILArRamp* iramps = 0;
284  ATH_CHECK( detStore()->retrieve(iramps, "/LArCalorimeter/LArTests/LArRampsSingleGroup") );
285  ATH_MSG_INFO ( "Retrieved ramps for LArRampsSingleGroup " );
286  ramps = dynamic_cast<const LArRampMC*>(iramps);
287  if (!ramps) {
288  ATH_MSG_ERROR ("Could not dynamic cast ILArRamp to LArRampMC" );
289  return( StatusCode::FAILURE);
290  }
291  }
292  else {
293  LArRampMC* ramps_rw = new LArRampMC;
294  ramps = ramps_rw;
295  ATH_MSG_INFO ( "Created ramps for LArRampsSingleGroup " );
296  ramps_rw->setGroupingType(LArConditionsContainerBase::SingleGroup);
297  ATH_CHECK( ramps_rw->initialize() );
298  }
299 
300  ATH_CHECK( testEachCondObject(ramps) );
301  ATH_MSG_INFO ( "Succeeded SingleGroup test " );
302 
303  if (!m_readCondObjs) {
304  // Save in DetectorStore
305  ATH_CHECK( detStore()->record(ramps, "/LArCalorimeter/LArTests/LArRampsSingleGroup") );
306  const ILArRamp* iramps = 0;
307  ATH_CHECK( detStore()->symLink(ramps, iramps) );
308 
310  if (ramps) {
311  ATH_MSG_DEBUG ( "Total number of conditions objects"
312  << ramps->totalNumberOfConditions() );
313  }
314  if (!m_writeCondObjs) {
315  // Remove conditions objects if not writing out
316  LArRampMC* ramps_rw = const_cast<LArRampMC*>(ramps);
317  if (!ramps_rw) {
318  ATH_MSG_ERROR ( "Could not const cast to LArRampMC " );
319  return StatusCode::FAILURE;
320  }
321  ramps_rw->removeConditions();
322  ATH_MSG_DEBUG ( "Removed conditions objects" );
323  }
324  ATH_MSG_DEBUG ( "Total number of conditions objects "
325  << ramps->totalNumberOfConditions() );
326  ATH_MSG_DEBUG ( "Total number of correction objects"
327  << ramps->totalNumberOfCorrections() );
328  }
329 
330  // Create SubDetectorGrouping
331  if (m_readCondObjs) {
332  const ILArRamp* iramps = 0;
333  ATH_CHECK( detStore()->retrieve(iramps, "/LArCalorimeter/LArTests/LArRampsSubDetectorGrouping") );
334  ATH_MSG_INFO ( "Retrieved ramps for LArRampsSubDetectorGrouping " );
335  ramps = dynamic_cast<const LArRampMC*>(iramps);
336  if (!ramps) {
337  ATH_MSG_ERROR ("Could not dynamic cast ILArRamp to LArRampMC" );
338  return( StatusCode::FAILURE);
339  }
340  }
341  else {
342  LArRampMC* ramps_rw = new LArRampMC;
343  ramps = ramps_rw;
344  //ramps_rw->setGroupingType(LArConditionsContainerBase::SubDetectorGrouping);
345  ATH_CHECK( ramps_rw->initialize() );
346  }
347 
348  ATH_CHECK( testEachCondObject(ramps) );
349  ATH_MSG_INFO ( "Succeeded SubDetectorGrouping test " );
350 
351  if (!m_readCondObjs) {
352  // Save in DetectorStore
353  ATH_CHECK( detStore()->record(ramps, "/LArCalorimeter/LArTests/LArRampsSubDetectorGrouping") );
354  const ILArRamp* iramps = 0;
355  ATH_CHECK( detStore()->symLink(ramps, iramps) );
357  if (ramps) {
358  ATH_MSG_DEBUG ( "Total number of conditions objects"
359  << ramps->totalNumberOfConditions() );
360  }
361  if (!m_writeCondObjs) {
362  // Remove conditions objects if not writing out
363  LArRampMC* ramps_rw = const_cast<LArRampMC*>(ramps);
364  if (!ramps_rw) {
365  ATH_MSG_ERROR ( "Could not const cast to LArRampMC " );
366  return StatusCode::FAILURE;
367  }
368  ramps_rw->removeConditions();
369  ATH_MSG_DEBUG ( "Removed conditions objects" );
370  }
371  ATH_MSG_DEBUG ( "Total number of conditions objects "
372  << ramps->totalNumberOfConditions() );
373  ATH_MSG_DEBUG ( "Total number of correction objects"
374  << ramps->totalNumberOfConditions() );
375  }
376 
377  // Create FeedThroughGrouping
378  if (m_readCondObjs) {
379  const ILArRamp* iramps = 0;
380  ATH_CHECK( detStore()->retrieve(iramps, "/LArCalorimeter/LArTests/LArRampsFeedThroughGrouping") );
381  ATH_MSG_INFO ( "Retrieved ramps for LArRampsFeedThroughGrouping " );
382  ramps = dynamic_cast<const LArRampMC*>(iramps);
383  if (!ramps) {
384  ATH_MSG_ERROR ("Could not dynamic cast ILArRamp to LArRampMC" );
385  return( StatusCode::FAILURE);
386  }
387  }
388  else {
389  LArRampMC* ramps_rw = new LArRampMC;
390  ramps = ramps_rw;
391  ramps_rw->setGroupingType(LArConditionsContainerBase::FeedThroughGrouping);
392  ATH_CHECK( ramps_rw->initialize() );
393  }
394 
395  ATH_CHECK( testEachCondObject(ramps) );
396  ATH_MSG_INFO ( "Succeeded FeedThroughGrouping test " );
397 
398  if (!m_readCondObjs) {
399  // Save in DetectorStore
400  ATH_CHECK( detStore()->record(ramps, "/LArCalorimeter/LArTests/LArRampsFeedThroughGrouping") );
401  const ILArRamp* iramps = 0;
402  ATH_CHECK( detStore()->symLink(ramps, iramps) );
404  if (ramps) {
405  ATH_MSG_DEBUG ( "Total number of conditions objects"
406  << ramps->totalNumberOfConditions() );
407  }
408  if (!m_writeCondObjs) {
409  // Remove conditions objects if not writing out
410  LArRampMC* ramps_rw = const_cast<LArRampMC*>(ramps);
411  if (!ramps_rw) {
412  ATH_MSG_ERROR ( "Could not const cast to LArRampMC " );
413  return StatusCode::FAILURE;
414  }
415  ramps_rw->removeConditions();
416  ATH_MSG_DEBUG ( "Removed conditions objects" );
417  }
418  ATH_MSG_DEBUG ( "Total number of conditions objects "
419  << ramps->totalNumberOfConditions() );
420  ATH_MSG_DEBUG ( "Total number of correction objects"
421  << ramps->totalNumberOfCorrections() );
422  }
423 
424  ATH_MSG_DEBUG ( "Statistics for LArRampsFeedThroughGrouping " );
425  ATH_MSG_DEBUG ( "Number of channels, iovs "
426  << ramps->chan_size() << " " << ramps->iov_size() );
427 
428  iov_const_iterator iovIt = ramps->iov_begin();
429  iov_const_iterator iovEnd = ramps->iov_end ();
430  msg() << MSG::DEBUG << "IOVs found: ";
431  for (; iovIt != iovEnd; ++iovIt) {
432  msg() << MSG::DEBUG << (*iovIt) << ", ";
433  }
434  msg() << MSG::DEBUG << endmsg;
435 
436  chan_const_iterator chIt = ramps->chan_begin();
437  chan_const_iterator chEnd = ramps->chan_end ();
438  for (; chIt != chEnd; ++chIt) {
439  ATH_MSG_DEBUG ( "Channel: " << (*chIt)
440  << " number of conditions: " << ramps->conditionsPerChannel((*chIt)) );
441  }
442 
443  for (unsigned int i = 0; i < ramps->nGroups(); ++i) {
444  ATH_MSG_DEBUG ( "Group: " << i
445  << " number of conditions: " << ramps->conditionsPerGroup(i) );
446  }
447  ATH_MSG_DEBUG ("");
448 
449  for (unsigned int i = 0; i < ramps->nGains(); ++i) {
450  ATH_MSG_DEBUG ( "Gain: " << i
451  << " number of conditions: " << ramps->conditionsPerGain(i) );
452  }
453  ATH_MSG_DEBUG ( "Total number of conditions objects "
454  << ramps->totalNumberOfConditions() );
455  ATH_MSG_DEBUG ( "Total number of correction objects "
456  << ramps->totalNumberOfCorrections() );
457 
458 
459  ATH_MSG_DEBUG ( "End of testCondObjects " );
460 
461  return StatusCode::SUCCESS;
462 }
463 
464 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
465 
467 LArConditionsTestAlg::testEachCondObject ATLAS_NOT_THREAD_SAFE (const LArRampMC* ramps)
468 {
469  ATH_MSG_INFO ("in testEachCondObject()" );
470  bool error = false;
471 
472  typedef LArRampMC::CONTAINER CONTAINER;
473  //typedef CONTAINER::ConstCorrectionIt ConstCorrectionIt;
474 
475  // Cast into r/w for tests
476  LArRampMC* ramps_rw = const_cast<LArRampMC*>(ramps);
477  if (!ramps_rw) {
478  ATH_MSG_ERROR ( "Could not const cast to LArRampMC " );
479  return StatusCode::FAILURE;
480  }
481 
482  if (ramps_rw->correctionsApplied())
483  ATH_CHECK(ramps_rw->undoCorrections());
484 
485  if (!m_readCondObjs) {
486  if (m_writeCondObjs) {
487 
488  for (unsigned int i = 0; i < m_rampCache.size(); ++i) {
489  ATH_MSG_DEBUG ("setPdata for chan, chan id, gain " << i << " "
490  << m_onlineID->show_to_string(m_rampCache[i].m_channelID) << " "
491  << m_rampCache[i].m_gain << " " );
492 
493  // Must copy LArRampPTmp into a LArRampComplete::LArCondObj
495  ramp.m_vRamp = m_rampCache[i].m_vRamp;
496 
497  ramps_rw->setPdata(m_rampCache[i].m_channelID,
498  ramp,
499  m_rampCache[i].m_gain);
500  }
501  }
502 
503  ATH_MSG_DEBUG ( "Finished conditions, now write corrections " );
504 
505  if (m_writeCorrections) {
506  for (unsigned int i = 0; i < m_rampCorrections.size(); ++i) {
507 
508  ATH_MSG_DEBUG ("insert corr for chan, chan id, gain " << i << " "
509  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
510  << m_rampCorrections[i].m_gain << " " );
511 
512  // Must copy LArRampPTmp into a LArRampComplete::LArCondObj
514  ramp.m_vRamp = m_rampCorrections[i].m_vRamp;
515 
516  ATH_CHECK( ramps_rw->insertCorrection(m_rampCorrections[i].m_channelID,
517  ramp,
518  m_rampCorrections[i].m_gain) );
519  }
520  }
521  }
522 
523  ATH_MSG_DEBUG ("Number of channels, iovs "
524  << ramps->chan_size() << " " << ramps->iov_size() );
525 
526  CONTAINER::chan_const_iterator chanIt1 = ramps->chan_begin();
527  CONTAINER::chan_const_iterator endChan1 = ramps->chan_end ();
528  for (unsigned int i = 0; chanIt1 != endChan1; ++chanIt1, ++i) {
529  const CONTAINER::Subset* subset = ramps->at(i);
530  ATH_MSG_DEBUG ( "Index " << i
531  << " channel " << subset->channel()
532  << " gain " << subset->gain()
533  << " groupingType " << subset->groupingType()
534  << " subsetSize " << subset->subsetSize()
535  << " correctionVecSize " << subset->correctionVecSize() );
536  if ((*chanIt1) != subset->channel()) {
537  ATH_MSG_ERROR ( "Channel numbers not the same for MultChanColl and subset: "
538  << i
539  << " multchan " << (*chanIt1)
540  << " subset " << subset->channel() );
541  error = true;
542  }
543  }
544 
545  ATH_MSG_DEBUG ("Number of channels, iovs, subsets "
546  << ramps->chan_size() << " "
547  << ramps->iov_size() << " "
548  << ramps->size() << " " );
549 
550  ATH_MSG_DEBUG ("Compare LArRampMC with cache " );
551  // Now loop over ramps and compare with cache
552  for (unsigned int i = 0; i < m_rampCache.size(); ++i) {
553 
554  LArRampComplete::LArCondObj rampP = ramps->get(m_rampCache[i].m_channelID,
555  m_rampCache[i].m_gain);
556  unsigned int coolChannel = ramps->coolChannel(m_rampCache[i].m_channelID,
557  m_rampCache[i].m_gain);
558 
559  if (!rampP.isEmpty()) {
560  ATH_MSG_DEBUG ("New : cool chan, chan id, gain, ramps "
561  << coolChannel << " "
562  << m_onlineID->show_to_string(m_rampCache[i].m_channelID) << " "
563  << m_rampCache[i].m_gain << " "
564  << rampP.m_vRamp[0] << " "
565  << rampP.m_vRamp[1] << " "
566  << rampP.m_vRamp[2] << " " );
567  }
568  else {
569  ATH_MSG_DEBUG ("New : isEmpty " );
570  }
571  ATH_MSG_DEBUG ("Cache: cool chan, chan id, gain, ramps "
572  << coolChannel << " "
573  << m_onlineID->show_to_string(m_rampCache[i].m_channelID) << " "
574  << m_rampCache[i].m_gain << " "
575  << m_rampCache[i].m_vRamp[0] << " "
576  << m_rampCache[i].m_vRamp[1] << " "
577  << m_rampCache[i].m_vRamp[2] << " "
578  << " Compare = " << (rampP == m_rampCache[i]) );
579  if (rampP != m_rampCache[i] && !rampP.isEmpty()) {
580  ATH_MSG_ERROR ("LArRampMC and cache NOT equal" );
581  error = true;
582  }
583  }
584 
585 
586  // Now loop over ramps using generic iterator and compare with cache
587  ATH_MSG_DEBUG ("Compare LArRampMC with cache using iterator " );
588  CONTAINER::ConstConditionsMapIterator rampIt;
589  CONTAINER::ConstConditionsMapIterator rampEnd;
590  for (unsigned int gain = 0; gain < 3; ++gain) {
591  rampIt = ramps->begin(gain);
592  rampEnd = ramps->end (gain);
593  for (unsigned int i = 0; i < m_rampCache.size(); ++i) {
594  // cache is not in order for gains, select the current gain
595  if (gain != m_rampCache[i].m_gain) continue;
597  HWIdentifier rampId;
598  while(rampIt != rampEnd) {
599  rampP = *rampIt;
600  rampId = rampIt.channelId();
601  ++rampIt;
602  if (!rampP.isEmpty()) break; // break out for first non-empty ramp
603  }
604  unsigned int coolChannel = ramps->coolChannel(m_rampCache[i].m_channelID,
605  m_rampCache[i].m_gain);
606  if (!rampP.isEmpty()) {
607  ATH_MSG_DEBUG ("New : cool chan, chan id, gain, ramps "
608  << coolChannel << " "
609  << m_onlineID->show_to_string(rampId) << " "
610  << m_rampCache[i].m_gain << " "
611  << rampP.m_vRamp[0] << " "
612  << rampP.m_vRamp[1] << " "
613  << rampP.m_vRamp[2] << " " );
614  }
615  else {
616  ATH_MSG_DEBUG ("New : isEmpty " );
617  }
618  ATH_MSG_DEBUG ("Cache: cool chan, chan id, gain, ramps "
619  << coolChannel << " "
620  << m_onlineID->show_to_string(m_rampCache[i].m_channelID) << " "
621  << m_rampCache[i].m_gain << " "
622  << m_rampCache[i].m_vRamp[0] << " "
623  << m_rampCache[i].m_vRamp[1] << " "
624  << m_rampCache[i].m_vRamp[2] << " "
625  << " Compare = " << (rampP == m_rampCache[i]) );
626  if (rampP != m_rampCache[i] && !rampP.isEmpty()) {
627  ATH_MSG_ERROR ("LArRampMC and cache NOT equal" );
628  error = true;
629  }
630  }
631  }
632 
633 
634 
635  // Now loop over ramps in pieces using the selector on febids to
636  // iterate and compare with cache
637  ATH_MSG_DEBUG ("Compare LArRampMC with cache using iterator and febid selection " );
638  // Loop over cache and divide the febids into three sets, where
639  // each set is an array of size 3 for the separate gains
640  std::vector<unsigned int> ids1[3];
641  std::vector<unsigned int> ids2[3];
642  std::vector<unsigned int> ids3[3];
643  for (unsigned int i = 0; i < m_rampCache.size(); ++i) {
644  if (i < m_rampCache.size()/3) {
645  unsigned int id = m_onlineID->feb_Id(m_rampCache[i].m_channelID).get_identifier32().get_compact();
646  ids1[m_rampCache[i].m_gain].push_back(id);
647  }
648  else if (i < 2*m_rampCache.size()/3) {
649  unsigned int id = m_onlineID->feb_Id(m_rampCache[i].m_channelID).get_identifier32().get_compact();
650  ids2[m_rampCache[i].m_gain].push_back(id);
651  }
652  else {
653  unsigned int id = m_onlineID->feb_Id(m_rampCache[i].m_channelID).get_identifier32().get_compact();
654  ids3[m_rampCache[i].m_gain].push_back(id);
655  }
656  }
657 
658  for (unsigned int gain = 0; gain < 3; ++gain) {
659  for (unsigned int febSet = 0; febSet < 3; ++febSet) {
660  unsigned int i0 = 0;
661  unsigned int iend = m_rampCache.size()/3;
662  if (febSet < m_rampCache.size()/3) {
663  rampIt = ramps->begin(gain, ids1[gain]);
664  msg() << MSG::DEBUG <<"FebID vec 1 : ";
665  for (unsigned int i = 0; i < ids1[gain].size(); ++i) {
666  msg() << MSG::DEBUG << m_onlineID->show_to_string(HWIdentifier(ids1[gain][i]))
667  << " ";
668  }
669  msg() << MSG::DEBUG << endmsg;
670  }
671  else if (febSet < 2*m_rampCache.size()/3) {
672  rampIt = ramps->begin(gain, ids2[gain]);
673  i0 = m_rampCache.size()/3 + 1;
674  iend = 2*m_rampCache.size()/3;
675  msg() << MSG::DEBUG <<"FebID vec 2 : ";
676  for (unsigned int i = 0; i < ids2[gain].size(); ++i) {
677  msg() << MSG::DEBUG << m_onlineID->show_to_string(HWIdentifier(ids2[gain][i]))
678  << " ";
679  }
680  msg() << MSG::DEBUG << endmsg;
681  }
682  else {
683  rampIt = ramps->begin(gain, ids3[gain]);
684  i0 = 2*m_rampCache.size()/3 + 1;
685  iend = m_rampCache.size();
686  msg() << MSG::DEBUG <<"FebID vec 3 : ";
687  for (unsigned int i = 0; i < ids3[gain].size(); ++i) {
688  msg() << MSG::DEBUG << m_onlineID->show_to_string(HWIdentifier(ids3[gain][i]))
689  << " ";
690  }
691  msg() << MSG::DEBUG << endmsg;
692  }
693 
694  rampEnd = ramps->end (gain);
695  ATH_MSG_DEBUG ("After ramps->end " );
696  for (unsigned int i = i0; i < iend; ++i) {
697  // cache is not in order for gains, select the current gain
698  if (gain != m_rampCache[i].m_gain) continue;
700  HWIdentifier rampId;
701 
702  ATH_MSG_DEBUG ("Looking for "
703  << m_onlineID->show_to_string(m_rampCache[i].m_channelID) );
704 
705  // Skip the empty channels
706  while(rampIt != rampEnd) {
707  rampP = *rampIt;
708  rampId = rampIt.channelId();
709  ++rampIt;
710  if (!rampP.isEmpty()) break; // break out for first non-empty ramp
711  }
712  unsigned int coolChannel = ramps->coolChannel(m_rampCache[i].m_channelID,
713  m_rampCache[i].m_gain);
714  if (!rampP.isEmpty()) {
715  ATH_MSG_DEBUG ("New : cool chan, chan id, gain, ramps "
716  << coolChannel << " "
717  << m_onlineID->show_to_string(rampId) << " "
718  << m_rampCache[i].m_gain << " "
719  << rampP.m_vRamp[0] << " "
720  << rampP.m_vRamp[1] << " "
721  << rampP.m_vRamp[2] << " " );
722  }
723  else {
724  ATH_MSG_DEBUG ("New : isEmpty " );
725  }
726  ATH_MSG_DEBUG ("Cache: cool chan, chan id, gain, ramps "
727  << coolChannel << " "
728  << m_onlineID->show_to_string(m_rampCache[i].m_channelID) << " "
729  << m_rampCache[i].m_gain << " "
730  << m_rampCache[i].m_vRamp[0] << " "
731  << m_rampCache[i].m_vRamp[1] << " "
732  << m_rampCache[i].m_vRamp[2] << " "
733  << " Compare = " << (rampP == m_rampCache[i]) );
734  if (rampP != m_rampCache[i] && !rampP.isEmpty()) {
735  ATH_MSG_ERROR ("LArRampMC and cache NOT equal" );
736  error = true;
737  }
738  }
739  }
740  }
741 
742  ATH_MSG_DEBUG ("Compare LArRampMC with corrections " );
743 
744  if (m_applyCorrections) {
745  for (unsigned int i = 0; i < m_rampCorrections.size(); ++i) {
746  LArRampComplete::LArCondObj rampP = ramps->get(m_rampCorrections[i].m_channelID,
747  m_rampCorrections[i].m_gain);
748  unsigned int coolChannel = ramps->coolChannel(m_rampCorrections[i].m_channelID,
749  m_rampCorrections[i].m_gain);
750  if (!rampP.isEmpty()) {
751  ATH_MSG_DEBUG ("New : cool chan, chan id, gain, ramps "
752  << coolChannel << " "
753  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
754  << m_rampCorrections[i].m_gain << " "
755  << rampP.m_vRamp[0] << " "
756  << rampP.m_vRamp[1] << " "
757  << rampP.m_vRamp[2] << " " );
758  }
759  else {
760  ATH_MSG_DEBUG ("New : isEmpty " );
761  }
762 
763  ATH_MSG_DEBUG ("Corrections: cool chan, chan id, gain, ramps "
764  << coolChannel << " "
765  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
766  << m_rampCorrections[i].m_gain << " "
767  << m_rampCorrections[i].m_vRamp[0] << " "
768  << m_rampCorrections[i].m_vRamp[1] << " "
769  << m_rampCorrections[i].m_vRamp[2] << " "
770  << " Compare = " << (CorrectionCompare(rampP, m_rampCorrections[i])) );
771  if (!CorrectionCompare(rampP, m_rampCorrections[i]) && !rampP.isEmpty()) {
772 
773  ATH_MSG_ERROR ("Before correction: LArRampMC and correction DO NOT compare - should have opposite signs for rampes" );
774  error = true;
775  }
776  }
777 
778 
779  ATH_MSG_DEBUG ("Apply corrections and compare LArRampMC with corrections " );
780  ATH_CHECK( ramps_rw->applyCorrections() );
781  ATH_MSG_DEBUG ("Corrections applied: " << ramps->correctionsApplied() );
782 
783  for (unsigned int i = 0; i < m_rampCorrections.size(); ++i) {
784  LArRampComplete::LArCondObj rampP = ramps->get(m_rampCorrections[i].m_channelID,
785  m_rampCorrections[i].m_gain);
786  unsigned int coolChannel = ramps->coolChannel(m_rampCorrections[i].m_channelID,
787  m_rampCorrections[i].m_gain);
788  if (!rampP.isEmpty()) {
789  ATH_MSG_DEBUG ("New : cool chan, chan id, gain, ramps "
790  << coolChannel << " "
791  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
792  << m_rampCorrections[i].m_gain << " "
793  << rampP.m_vRamp[0] << " "
794  << rampP.m_vRamp[1] << " "
795  << rampP.m_vRamp[2] << " " );
796  }
797  else {
798  ATH_MSG_DEBUG ("New : isEmpty " );
799  }
800  ATH_MSG_DEBUG ("Corrections: cool chan, chan id, gain, ramps "
801  << coolChannel << " "
802  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
803  << m_rampCorrections[i].m_gain << " "
804  << m_rampCorrections[i].m_vRamp[0] << " "
805  << m_rampCorrections[i].m_vRamp[1] << " "
806  << m_rampCorrections[i].m_vRamp[2] << " "
807  << " Compare = " << (rampP == m_rampCorrections[i]) );
808  if (rampP != m_rampCorrections[i] && !rampP.isEmpty()) {
809  ATH_MSG_ERROR ("After correction: LArRampMC and correction NOT equal" );
810  error = true;
811  }
812  }
813 
814  ATH_MSG_DEBUG ("Undo corrections and compare LArRampMC with corrections " );
815  ATH_CHECK( ramps_rw->undoCorrections() );
816  ATH_MSG_DEBUG ("Corrections applied: " << ramps->correctionsApplied() );
817 
818  for (unsigned int i = 0; i < m_rampCorrections.size(); ++i) {
819  LArRampComplete::LArCondObj rampP = ramps->get(m_rampCorrections[i].m_channelID,
820  m_rampCorrections[i].m_gain);
821  unsigned int coolChannel = ramps->coolChannel(m_rampCorrections[i].m_channelID,
822  m_rampCorrections[i].m_gain);
823  if (!rampP.isEmpty()) {
824  ATH_MSG_DEBUG ("New : cool chan, chan id, gain, ramps "
825  << coolChannel << " "
826  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
827  << m_rampCorrections[i].m_gain << " "
828  << rampP.m_vRamp[0] << " "
829  << rampP.m_vRamp[1] << " "
830  << rampP.m_vRamp[2] << " " );
831  }
832  else {
833  ATH_MSG_DEBUG ("New : isEmpty " );
834  }
835  ATH_MSG_DEBUG ("Corrections: cool chan, chan id, gain, ramps "
836  << coolChannel << " "
837  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
838  << m_rampCorrections[i].m_gain << " "
839  << m_rampCorrections[i].m_vRamp[0] << " "
840  << m_rampCorrections[i].m_vRamp[1] << " "
841  << m_rampCorrections[i].m_vRamp[2] << " "
842  << " Compare = " << (CorrectionCompare(rampP, m_rampCorrections[i])) );
843  if (!CorrectionCompare(rampP, m_rampCorrections[i]) && !rampP.isEmpty()) {
844 
845  ATH_MSG_ERROR ("After undo: LArRampMC and correction DO NOT compare - should have opposite signs for ramps" );
846  error = true;
847  }
848  }
849 
850  ATH_MSG_DEBUG ("2nd Apply corrections and compare LArRampMC with corrections " );
851  ATH_CHECK( ramps_rw->applyCorrections() );
852  ATH_MSG_DEBUG ("Corrections applied: " << ramps->correctionsApplied() );
853 
854  for (unsigned int i = 0; i < m_rampCorrections.size(); ++i) {
855  LArRampComplete::LArCondObj rampP = ramps->get(m_rampCorrections[i].m_channelID,
856  m_rampCorrections[i].m_gain);
857  unsigned int coolChannel = ramps->coolChannel(m_rampCorrections[i].m_channelID,
858  m_rampCorrections[i].m_gain);
859  if (!rampP.isEmpty()) {
860  ATH_MSG_DEBUG ("New : cool chan, chan id, gain, ramps "
861  << coolChannel << " "
862  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
863  << m_rampCorrections[i].m_gain << " "
864  << rampP.m_vRamp[0] << " "
865  << rampP.m_vRamp[1] << " "
866  << rampP.m_vRamp[2] << " " );
867  }
868  else {
869  ATH_MSG_DEBUG ("New : isEmpty " );
870  }
871  ATH_MSG_DEBUG ("Corrections: cool chan, chan id, gain, ramps "
872  << coolChannel << " "
873  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
874  << m_rampCorrections[i].m_gain << " "
875  << m_rampCorrections[i].m_vRamp[0] << " "
876  << m_rampCorrections[i].m_vRamp[1] << " "
877  << m_rampCorrections[i].m_vRamp[2] << " "
878  << " Compare = " << (rampP == m_rampCorrections[i]) );
879  if (rampP != m_rampCorrections[i] && !rampP.isEmpty()) {
880  ATH_MSG_ERROR ("After correction: LArRampMC and correction NOT equal" );
881  error = true;
882  }
883  }
884 
885  ATH_MSG_DEBUG ("2nd Undo corrections and compare LArRampMC with corrections " );
886  ATH_CHECK( ramps_rw->undoCorrections() );
887  ATH_MSG_DEBUG ("Corrections applied: " << ramps->correctionsApplied() );
888 
889  for (unsigned int i = 0; i < m_rampCorrections.size(); ++i) {
890  LArRampComplete::LArCondObj rampP = ramps->get(m_rampCorrections[i].m_channelID,
891  m_rampCorrections[i].m_gain);
892  unsigned int coolChannel = ramps->coolChannel(m_rampCorrections[i].m_channelID,
893  m_rampCorrections[i].m_gain);
894  if (!rampP.isEmpty()) {
895  ATH_MSG_DEBUG ("New : cool chan, chan id, gain, ramps "
896  << coolChannel << " "
897  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
898  << m_rampCorrections[i].m_gain << " "
899  << rampP.m_vRamp[0] << " "
900  << rampP.m_vRamp[1] << " "
901  << rampP.m_vRamp[2] << " " );
902  }
903  else {
904  ATH_MSG_DEBUG ("New : isEmpty " );
905  }
906  ATH_MSG_DEBUG ("Corrections: cool chan, chan id, gain, ramps "
907  << coolChannel << " "
908  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
909  << m_rampCorrections[i].m_gain << " "
910  << m_rampCorrections[i].m_vRamp[0] << " "
911  << m_rampCorrections[i].m_vRamp[1] << " "
912  << m_rampCorrections[i].m_vRamp[2] << " "
913  << " Compare = " << (CorrectionCompare(rampP, m_rampCorrections[i])) );
914  if (!CorrectionCompare(rampP, m_rampCorrections[i]) && !rampP.isEmpty()) {
915 
916  ATH_MSG_ERROR ("After undo: LArRampMC and correction DO NOT compare - should have opposite signs for ramps" );
917  error = true;
918  }
919  }
920  }
921 
922 
923  /*
924  log << MSG::DEBUG <<"Find each correction "
925  << endmsg;
926 
927  for (unsigned int i = 0; i < m_rampCorrections.size(); ++i) {
928  HWIdentifier id = m_rampCorrections[i].m_channelID;
929  unsigned int gain = m_rampCorrections[i].m_gain;
930 
931  ConstCorrectionIt it = ramps->findCorrection(id, gain);
932  // May not have any corrections
933  if (it != ramps->correctionsEnd(gain)) {
934 
935  unsigned int coolChannel = ramps->coolChannel(id, gain);
936  HWIdentifier id1((*it).first);
937  LArRampComplete::LArCondObj rampP = (*it).second;
938  if (id != id1 || rampP != m_rampCorrections[i]) {
939  log << MSG::ERROR <<"Correction retrieved with findCorrection does not match: "
940  << " i = " << i << endmsg;
941  error = true;
942  log << MSG::DEBUG <<"New : cool chan, chan id, gain, ramps "
943  << coolChannel << " "
944  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
945  << m_rampCorrections[i].m_gain << " "
946  << rampP.m_vRamp[0] << " "
947  << rampP.m_vRamp[1] << " "
948  << rampP.m_vRamp[2] << " "
949  << endmsg;
950  log << MSG::DEBUG <<"Corrections: cool chan, chan id, gain, ramps "
951  << coolChannel << " "
952  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
953  << m_rampCorrections[i].m_gain << " "
954  << m_rampCorrections[i].m_vRamp[0] << " "
955  << m_rampCorrections[i].m_vRamp[1] << " "
956  << m_rampCorrections[i].m_vRamp[2] << " "
957  << " Compare = " << (rampP == m_rampCorrections[i])
958  << endmsg;
959  }
960  }
961  else {
962  log << MSG::DEBUG <<"No corrections found "
963  << endmsg;
964  }
965  }
966  log << MSG::DEBUG <<"End - Find each correction "
967  << endmsg;
968 
969 
970  // Count the number of corrections per gain
971  unsigned int gains[3] = {0,0,0};
972  for (unsigned int i = 0; i < m_rampCorrections.size(); ++i) {
973  unsigned int gain = m_rampCorrections[i].m_gain;
974  gains[gain]++;
975  }
976  for (unsigned int i = 0; i < 3; ++i) {
977  if (gains[i] != ramps->correctionsSize(i)) {
978  log << MSG::ERROR <<"Number of corrections not same as number inserted: "
979  << gains[i] << " "
980  << ramps->correctionsSize(i) << " gain " << i
981  << endmsg;
982  error = true;
983  }
984 
985  // Check that each correction is the same using container iterator
986  unsigned int nit = 0;
987  ConstCorrectionIt it = ramps->correctionsBegin(i);
988  ConstCorrectionIt end = ramps->correctionsEnd(i);
989  unsigned int icorr = 0;
990  for (; it != end && icorr < m_rampCorrections.size(); ++it, ++nit, ++icorr) {
991  while (m_rampCorrections[icorr].m_gain != i) ++icorr;
992  HWIdentifier id = m_rampCorrections[icorr].m_channelID;
993  unsigned int gain = m_rampCorrections[icorr].m_gain;
994  unsigned int coolChannel = ramps->coolChannel(id, gain);
995  HWIdentifier id1((*it).first);
996  LArRampComplete::LArCondObj rampP = (*it).second;
997  if (id != id1 || rampP != m_rampCorrections[icorr]) {
998  log << MSG::ERROR <<"Correction retrieved with iterator does not match: "
999  << " gain = " << i
1000  << " icorr = " << icorr
1001  << " nit = " << nit
1002  << endmsg;
1003  error = true;
1004  log << MSG::DEBUG <<"New : cool chan, chan id, gain, ramps "
1005  << coolChannel << " "
1006  << m_onlineID->show_to_string(m_rampCorrections[icorr].m_channelID) << " "
1007  << m_rampCorrections[icorr].m_gain << " "
1008  << rampP.m_vRamp[0] << " "
1009  << rampP.m_vRamp[1] << " "
1010  << rampP.m_vRamp[2] << " "
1011  << endmsg;
1012  log << MSG::DEBUG <<"Corrections: cool chan, chan id, gain, ramps "
1013  << coolChannel << " "
1014  << m_onlineID->show_to_string(m_rampCorrections[icorr].m_channelID) << " "
1015  << m_rampCorrections[icorr].m_gain << " "
1016  << m_rampCorrections[icorr].m_vRamp[0] << " "
1017  << m_rampCorrections[icorr].m_vRamp[1] << " "
1018  << m_rampCorrections[icorr].m_vRamp[2] << " "
1019  << " Compare = " << (rampP == m_rampCorrections[icorr])
1020  << endmsg;
1021  }
1022  }
1023  }
1024 
1025  removed.
1026  */
1027 
1028  ATH_MSG_DEBUG ("Number of channels, iovs "
1029  << ramps->chan_size() << " " << ramps->iov_size() );
1030 
1031  std::set<unsigned int> channelNumbers;
1032  CONTAINER::chan_const_iterator chanIt = ramps->chan_begin();
1033  CONTAINER::chan_const_iterator endChan = ramps->chan_end ();
1034  for (unsigned int i = 0; chanIt != endChan; ++chanIt, ++i) {
1035  const CONTAINER::Subset* subset = ramps->at(i);
1036  ATH_MSG_DEBUG ( "Index " << i
1037  << " channel " << subset->channel()
1038  << " gain " << subset->gain()
1039  << " groupingType " << subset->groupingType()
1040  << " subsetSize " << subset->subsetSize()
1041  << " correctionVecSize " << subset->correctionVecSize() );
1042  if ((*chanIt) != subset->channel()) {
1043  ATH_MSG_ERROR ( "Channel numbers not the same for MultChanColl and subset: "
1044  << i
1045  << " multchan " << (*chanIt)
1046  << " subset " << subset->channel() );
1047  error = true;
1048  }
1049  if (!(channelNumbers.insert(subset->channel()).second)) {
1050  ATH_MSG_ERROR ( "Duplicate channel number - Index " << i
1051  << " channel " << subset->channel() );
1052  error = true;
1053  }
1054  }
1055  ATH_MSG_DEBUG ( "Channel numbers size " << channelNumbers.size()
1056  << " ramps size " << ramps->chan_size() );
1057 
1058  if (error) {
1059  ATH_MSG_ERROR ("Failing check of LArRamp - see above" );
1060  return (StatusCode::FAILURE);
1061  }
1062 
1063  ATH_MSG_DEBUG ( "End of testEachCondObject " );
1064  return StatusCode::SUCCESS;
1065 }
1066 
1067 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
1068 
1069 StatusCode
1071 {
1072 
1074  typedef ChanSet::ConstChannelIt ConstChannelIt;
1075 
1076  ATH_MSG_INFO ("in testChannelSet" );
1077 
1078  ChanSet chanSet;
1079 
1080  // corrections not always available:
1082  // add corrections to channel set
1083  for (unsigned int i = 0; i < m_rampCorrections.size(); ++i) {
1084  // Must copy LArRampPTmp into a LArRampComplete::LArCondObj
1086  ramp.m_vRamp = m_rampCorrections[i].m_vRamp;
1087  chanSet.insert(m_rampCorrections[i].m_channelID.get_identifier32().get_compact(), ramp);
1088  }
1089  // Now loop over corrections and check that they agree
1090  bool error = false;
1091  if (m_rampCorrections.size() != chanSet.size()) {
1092  ATH_MSG_ERROR ("Corrections not the same size as channel set: "
1093  << m_rampCorrections.size() << " " << chanSet.size() );
1094  return (StatusCode::FAILURE);
1095  }
1096  else {
1097  ATH_MSG_DEBUG ("Sizes OK: " << chanSet.size() );
1098  }
1099 
1100  ConstChannelIt it = chanSet.begin();
1101  ConstChannelIt itEnd = chanSet.end();
1102 
1103 
1104  unsigned int i = 0;
1105  for (; it != itEnd; ++it, ++i) {
1106 
1107  HWIdentifier id = m_rampCorrections[i].m_channelID;
1108  HWIdentifier id1((*it).first);
1109  LArRampComplete::LArCondObj rampP = (*it).second;
1110  if (id != id1 || rampP != m_rampCorrections[i]) {
1111  ATH_MSG_ERROR ("Correction retrieved with iterator does not match: "
1112  << " i = " << i );
1113  error = true;
1114  }
1115  ATH_MSG_DEBUG ("New : chan id, gain, ramps "
1116  << m_onlineID->show_to_string(id1) << " "
1117  << m_rampCorrections[i].m_gain << " "
1118  << rampP.m_vRamp[0] << " "
1119  << rampP.m_vRamp[1] << " "
1120  << rampP.m_vRamp[2] << " "
1121  );
1122  ATH_MSG_DEBUG ("Corrections: chan id, gain, ramps "
1123  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
1124  << m_rampCorrections[i].m_gain << " "
1125  << m_rampCorrections[i].m_vRamp[0] << " "
1126  << m_rampCorrections[i].m_vRamp[1] << " "
1127  << m_rampCorrections[i].m_vRamp[2] << " "
1128  << " Compare = " << (rampP == m_rampCorrections[i])
1129  );
1130  }
1131  if (!error) {
1132  ATH_MSG_DEBUG ("Iteration check OK " );
1133  }
1134 
1135  i = 0;
1136  for (; i < m_rampCorrections.size(); ++i) {
1137 
1138  unsigned int id = m_rampCorrections[i].m_channelID.get_identifier32().get_compact();
1139  it = chanSet.find(id);
1140  if (it == itEnd) {
1141  ATH_MSG_ERROR ("Could not find correction: "
1142  << " i = " << i );
1143  error = true;
1144  ATH_MSG_DEBUG ("Corrections: cool chan, chan id, gain, ramps "
1145  << m_onlineID->show_to_string(m_rampCorrections[i].m_channelID) << " "
1146  << m_rampCorrections[i].m_gain << " "
1147  << m_rampCorrections[i].m_vRamp[0] << " "
1148  << m_rampCorrections[i].m_vRamp[1] << " "
1149  << m_rampCorrections[i].m_vRamp[2] << " "
1150  );
1151  }
1152  }
1153  if (!error) {
1154  ATH_MSG_DEBUG ("Find check OK " );
1155  }
1156 
1157  if (error) {
1158  ATH_MSG_ERROR ("Failing check of channel set - see above" );
1159  return (StatusCode::FAILURE);
1160  }
1161  }
1162 
1163  return StatusCode::SUCCESS;
1164 
1165 }
1166 
1167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
1168 
1169 StatusCode
1171 {
1172  ATH_MSG_INFO ("in printCondObjects()" );
1173  return StatusCode::SUCCESS;
1174 }
1175 
1176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
1177 
1178 StatusCode
1180 {
1181  ATH_MSG_INFO ("in streamOutCondObjects()" );
1182  return StatusCode::SUCCESS;
1183 }
1184 
1185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
1186 
1187 StatusCode
1189 {
1190  ATH_MSG_INFO ("in registerCondObjects()" );
1191  return StatusCode::SUCCESS;
1192 }
1193 
1194 
1195 
1196 StatusCode
1197 LArConditionsTestAlg::testCallBack1( int& i , std::list<std::string>& l )
1198 {
1199 
1200  ATH_MSG_DEBUG ( " testing Call back function1 " );
1201  ATH_MSG_DEBUG(" int = " << i );
1202  ATH_MSG_DEBUG(" list<string> size = " << l.size() );
1203 
1204 // if(m_testCondObject){
1205 // const ILArRamp* ramp = m_ramp;
1206 // log<< MSG::DEBUG<<" Pointer to Ramp = " << ramp <<endmsg;
1207 // }
1208 
1209  return StatusCode::SUCCESS;
1210 }
1211 
1212 
1213 StatusCode LArConditionsTestAlg::testCallBack2( int& i , std::list<std::string>& l )
1214 {
1215  ATH_MSG_DEBUG ( " testing Call back function2 " );
1216  ATH_MSG_DEBUG(" int = " << i );
1217  ATH_MSG_DEBUG(" list<string> size = " << l.size() );
1218  return StatusCode::SUCCESS;
1219 }
1220 
1222 {
1223  IToolSvc* toolSvc = nullptr;
1224  ATH_CHECK( service("ToolSvc", toolSvc) );
1225 
1226 // IFillNovaIOVTool* fill;
1227 // if(StatusCode::SUCCESS != toolSvc->retrieveTool("FillNovaIOVTool",fill ))
1228 // {
1229 // log << MSG::ERROR << " Can't get FillNovaIOVTool " << endmsg;
1230 // return StatusCode::FAILURE;
1231 // }
1232 
1233 // // Make a new ExampleData object
1234 // ExampleData v;
1235 
1236 // // prepare some fake data.
1237 // int n = 3 ;
1238 // for( int i = 0; i<n; ++i ) {
1239 // ExampleData_t p ;
1240 // p.chan_id = i;
1241 // p.fArray[0] = i*100+0;
1242 // p.fArray[1] = i*100+1;
1243 // p.fArray[2] = i*100+2;
1244 // p.fArray[3] = i*100+3;
1245 // p.fArray[4] = i*100+4;
1246 // p.i = i;
1247 // p.d = i;
1248 // v.push_back(p);
1249 // }
1250 
1251 // typedef ExampleData::const_iterator IT;
1252 // IT it = v.begin();
1253 // void* vArray = (void*) &(*it);
1254 
1255 // typedef ExampleData::value_type STRUCT ;
1256 // std::string typenm = System::typeinfoName(typeid(STRUCT)) ;
1257 // std::string folder = "/lar/test/ExampleData1/ExampleDataName";
1258 // int nrow = v.size();
1259 
1260 // log<< MSG::DEBUG <<" writing " << typenm <<" through FillNovaIOVTool " <<endmsg;
1261 // log<< MSG::DEBUG <<" to folder " << folder <<endmsg;
1262 // log<< MSG::DEBUG <<" number of rows " << nrow <<endmsg;
1263 
1264  // Fill object to Nova_IOV, using validity specified in the tool.
1265 // StatusCode sc= fill->fillNovaIOV(vArray, folder,typenm,nrow) ;
1266 // if(!sc.isSuccess()) return sc ;
1267 
1268 // // put the same reference in a different folder.
1269 // std::string folder2 = "/lar/test/ExampleData2/ExampleDataName";
1270 // return fill->fillLastIOV(folder2);
1271 
1272  return StatusCode::SUCCESS;
1273 }
1274 
1275 
1276 
1277 
1279 {
1280 
1281  typedef LArRampMC::CONTAINER CONTAINER;
1282  typedef CONTAINER::Subset Subset;
1283 
1284  const LArRampMC* ramp = 0 ;
1285  ATH_CHECK( detStore()->retrieve(ramp, "LArRamp") );
1286 
1287  ATH_MSG_DEBUG ( " Found LArRampMC, key LArRamp." );
1288 
1289  // Print out channels
1290  ATH_MSG_DEBUG ( " Number of channels " << ramp->chan_size() );
1291 
1292  // Print out first 10 elements of each gain for subset
1293  CONTAINER::chan_const_iterator chanIt = ramp->chan_begin();
1294  CONTAINER::chan_const_iterator endChan = ramp->chan_end ();
1295  for (unsigned int i = 0; chanIt != endChan; ++chanIt, ++i) {
1296  unsigned int coolChan = *chanIt;
1297  const Subset* subset = ramp->at(i);
1298 
1299  ATH_MSG_DEBUG ( " Channel " << coolChan << " "
1300  << " Subset size " << subset->subsetSize()
1301  << " gain, channel, grouping type " << subset->gain() << " "
1302  << MSG::hex << subset->channel() << " " << MSG::dec
1303  << subset->groupingType() << " "
1304  );
1305 
1306  Subset::ConstSubsetIt first = subset->subsetBegin();
1307  Subset::ConstSubsetIt last = subset->subsetEnd();
1308  //for (int i = 0; i < 10 && first != last; ++i, ++first) {
1309  for (; first != last; ++first) {
1310 
1311  // select non-zero subsets
1312  if ((*first).second.size()) {
1313 
1314  ATH_MSG_DEBUG ( " FEB id "
1315  << m_onlineID->show_to_string(HWIdentifier((*first).first)) << " "
1316  );
1317  for (unsigned int k = 0; k < 5; ++k) {
1318  msg() << MSG::DEBUG << " vramp " ;
1319 // << m_onlineID->show_to_string((*first).second[k].m_channelID) << " "
1320 // << (*first).second[k].m_gain << " ";
1321  for (unsigned int j = 0; j < (*first).second[k].m_vRamp.size(); ++j) {
1322  msg() << MSG::DEBUG << (*first).second[k].m_vRamp[j] << " ";
1323  }
1324  msg() << MSG::DEBUG << endmsg;
1325  }
1326 
1327  }
1328 
1329  }
1330  }
1331 
1332 
1333  /*
1334 
1335  // Print out first 10 elements of each gain for corrections
1336  for (unsigned int gain = 0; gain < 3; ++gain) {
1337  log << MSG::DEBUG << " Gain, size "
1338  << gain << " "
1339  << ramp->correctionsSize(gain) << endmsg;
1340  CONTAINER::ConstCorrectionIt first = ramp->correctionsBegin(gain);
1341  CONTAINER::ConstCorrectionIt last = ramp->correctionsEnd(gain);
1342  for (int i = 0; i < 10 && first != last; ++i, ++first) {
1343  log << MSG::DEBUG << " id, vramp "
1344  << m_onlineID->show_to_string(HWIdentifier((*first).first)) << " ";
1345 // << m_onlineID->show_to_string((*first).second.m_channelID) << " "
1346 // << (*first).second.m_gain << " ";
1347  for (unsigned int j = 0; j < (*first).second.m_vRamp.size(); ++j) {
1348  log << MSG::DEBUG << (*first).second.m_vRamp[j] << " ";
1349  }
1350  log << MSG::DEBUG << endmsg;
1351  }
1352  }
1353 
1354  */
1355 
1356  return StatusCode::SUCCESS;
1357 
1358 }
1359 
1360 
1362 {
1363 
1364 // StatusCode sc;
1365 // MsgStream log(msgSvc(), name());
1366 // log << MSG::INFO <<"in testDCS_Objects()" <<endmsg;
1367 
1368 // log << MSG::DEBUG << "RETRIEVING ALL CONDDBMYSQLOBJECT" << endmsg;
1369 
1370 // const DataHandle<GenericDbTable> dh_b, dh_e;
1371 
1372 // sc = detStore()->retrieve(dh_b, dh_e);
1373 // if (sc.isFailure()) {
1374 // log << MSG::WARNING <<"Could not find GenericDbTable DetectorStore" <<endmsg;
1375 // return( StatusCode::SUCCESS);
1376 // }
1377 
1378 // for(; dh_b!=dh_e;++dh_b) {
1379 // const GenericDbTable* obj1 = dh_b;
1380 
1381 // //lets dump the object contents
1382 // int ncolumns = obj1->getNumColumns();
1383 // int nrows = obj1->getNumRows();
1384 
1385 // log << MSG::INFO << " Object " << dh_b.ID() << " has "
1386 // << obj1->getNumColumns() << " parameters and "
1387 // << obj1->getNumRows() << " objects" << endmsg;
1388 
1389 // std::vector<std::string> dNames;
1390 // std::vector<GenericDbTable::dataTypes> dTypes;
1391 
1392 // obj1->getNames(dNames);
1393 // obj1->getTypes(dTypes);
1394 
1395 // if (!(dNames.size()))
1396 // {
1397 // log << MSG::FATAL << "Esta tabela nao tem nada (This Table hasnothing =)" << endmsg;
1398 // }
1399 
1400 // log << MSG::INFO << "X" << dNames.size() <<"X The parameters name/types are: |";
1401 // for (unsigned int i=0; i< dNames.size(); i++) {
1402 // log << dNames[i] << " / ";
1403 // log << dTypes[i] << " | ";
1404 // log << endmsg;
1405 // }
1406 // printTable(obj1);
1407 
1408 // }
1409 
1410  return StatusCode::SUCCESS;
1411 }
1412 
1413 // void LArConditionsTestAlg::printTable(const GenericDbTable *table)
1414 // {
1415 // //********* Function that prints the ICondDBTable table ******//
1416 // // It uses the proper methos to access to the data
1417 // // that is in memory
1418 // MsgStream log(msgSvc(), name());
1419 
1420 
1421 // int ncolumns = table->getNumColumns();
1422 // int nrows = table->getNumRows();
1423 
1424 // // Now we want to handle NULL values
1425 // std::string nullVal;
1426 
1427 
1428 // if (ncolumns && nrows) {
1429 // std::vector<std::string> names; //A vector for table names
1430 // std::vector<GenericDbTable::dataTypes> types; //A vector for table types
1431 
1432 // table->getNames(names); //Retrieving column names
1433 // table->getTypes(types); //Retrieving column types
1434 
1435 // log << MSG::INFO << "------------------- Table BEGIN -------------" << endmsg;
1436 // log << MSG::INFO << "Table [" << table->getNumRows() << "]x[" << table->getNumColumns() << "]" << endmsg;
1437 
1438 // for (unsigned int i=0; i< table->getNumRows(); i++){ //for each row,
1439 
1440 
1441 // log << MSG::INFO << "{ Row " << i+1 << " Begin }" << endmsg;
1442 
1443 // std::vector<std::string> tmpStr; // temporary vector for row storage
1444 
1445 // table->getRow(i, tmpStr);
1446 
1447 // long pos=0; //Set the position in the
1448 // //tmpSrt vector
1449 
1450 // for (unsigned columnNumber=0;columnNumber<names.size();columnNumber++){
1451 // log << MSG::INFO << "Column name: " << names[columnNumber] << endmsg;
1452 
1453 // table->getNull(columnNumber, nullVal);
1454 // int n_vals;
1455 // if (GenericDbTable::kLongLong <types[columnNumber]){ //If the values in
1456 // //the column cells are
1457 // n_vals=atol(tmpStr[pos].c_str()); //arrays of some type
1458 // pos++; //Incrementing the
1459 // //position
1460 // //in the tmpStr vector
1461 // }
1462 // else {
1463 // n_vals=1; //Otherwise, the number of values is only 1
1464 // }
1465 
1466 // log << "Data in cell ["<<i+1<< "]x["<<columnNumber+1<< "]: ";
1467 // //printing the data for each cell
1468 // for (long c=pos; c< pos+n_vals; c++){
1469 // if (tmpStr[c] != nullVal) {
1470 // log << tmpStr[c];
1471 // }
1472 // else {
1473 // log << "NULL";
1474 // }
1475 // if (n_vals!=1) log << " ; ";
1476 // }
1477 
1478 // pos+=n_vals; //Incrementing the position in the
1479 // //tmpStr vector
1480 // log << endmsg;
1481 // }
1482 // log << MSG::INFO << "{ Row " << i +1 << " End }" << endmsg << endmsg;
1483 // }
1484 // log << MSG::INFO << "------------------ Table END --------------------" << endmsg;
1485 
1486 // }
1487 // else {
1488 // log << MSG::INFO << "Table empty" << endmsg;
1489 // }
1490 
1491 // }
1492 
1493 
1494 
1495 
1496 
1497 
1498 
1499 
1500 
1501 
1502 
1503 
1504 
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
LArConditionsTestAlg::m_tbin
int m_tbin
Definition: LArConditionsTestAlg.h:84
LArConditionsTestAlg::testCallBack1
StatusCode testCallBack1(IOVSVC_CALLBACK_ARGS)
Definition: LArConditionsTestAlg.cxx:1197
LArConditionsContainer::applyCorrections
StatusCode applyCorrections()
apply correction set
LArConditionsContainer::setPdata
void setPdata(const HWIdentifier id, const T &payload, unsigned int gain=0)
put payload in persistent data
LArRampP1::isEmpty
bool isEmpty() const
Definition: LArRampP1.h:29
LArConditionsContainer::removeConditions
void removeConditions()
Remove conditions leaving the corrections - may be needed to only write out the corrections when both...
LArConditionsContainer::iov_end
iov_const_iterator iov_end() const
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LArConditionsContainerBase::SingleGroup
@ SingleGroup
Definition: LArConditionsContainerBase.h:46
LArConditionsTestAlg::m_rampCache
std::vector< LArRampPTmp > m_rampCache
Definition: LArConditionsTestAlg.h:72
LArRampMC
Implementation of the interface ILArRamp for MC Derives from LArRampComplete, and implements the phi-...
Definition: LArRampMC.h:22
LArConditionsContainer::undoCorrections
StatusCode undoCorrections()
undo corrections that have been already applied
LArConditionsTestAlg::m_TB
BooleanProperty m_TB
Definition: LArConditionsTestAlg.h:83
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LArConditionsTestAlg::m_writeCorrections
BooleanProperty m_writeCorrections
Definition: LArConditionsTestAlg.h:80
LArConditionsContainer::chan_begin
chan_const_iterator chan_begin() const
Access to Channel numbers via iterators - from MultChanCollection.
LArConditionsTestAlg::testChannelSet
StatusCode testChannelSet()
Definition: LArConditionsTestAlg.cxx:1070
LArRampP1
Persistent data for LArRamp Copied from LAr.
Definition: LArRampP1.h:24
LArConditionsTestAlg::m_testReadDB
BooleanProperty m_testReadDB
Definition: LArConditionsTestAlg.h:82
LArConditionsContainer::insertCorrection
StatusCode insertCorrection(HWIdentifier id, const T &cond, unsigned int gain, bool corrChannel=true)
access to corrections -
LArRampPTmp::m_vRamp
std::vector< float > m_vRamp
Definition: LArRampPTmp.h:32
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
skel.it
it
Definition: skel.GENtoEVGEN.py:423
ATLAS_NOT_THREAD_SAFE
StatusCode LArConditionsTestAlg::testEachCondObject ATLAS_NOT_THREAD_SAFE(const LArRampMC *ramps)
Definition: LArConditionsTestAlg.cxx:467
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
ILArOFC.h
HWIdentifier
Definition: HWIdentifier.h:13
LArOnlineID_Base::channel_end
id_iterator channel_end() const
Definition: LArOnlineID_Base.cxx:1931
LArConditionsContainer::iov_begin
iov_const_iterator iov_begin() const
Access to IOVs via iterators - from MultChanCollection.
LArConditionsContainer::conditionsPerGain
unsigned int conditionsPerGain(unsigned int gain) const
Statistics: number of conditions per gain.
LArConditionsContainer::nGains
unsigned int nGains() const
Number of gain values.
ReadCondHandle.h
CaloCell_ID.h
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
LArRampP1::m_vRamp
std::vector< float > m_vRamp
Definition: LArRampP1.h:30
LArConditionsContainer::coolChannel
unsigned int coolChannel(const HWIdentifier id, unsigned int gain=0) const
Return the COOL channel number for a given online id and gain.
LArConditionsContainer< LArRampP1 >
LArConditionsTestAlg::m_rampCorrections
std::vector< LArRampPTmp > m_rampCorrections
Definition: LArConditionsTestAlg.h:73
LArConditionsTestAlg::m_readCondObjs
BooleanProperty m_readCondObjs
Definition: LArConditionsTestAlg.h:78
LArRampMC::initialize
virtual StatusCode initialize()
Initialization done after creation or read back - derived classes may augment the functionality.
Definition: LArRampMC.cxx:10
LArConditionsContainer::totalNumberOfConditions
unsigned int totalNumberOfConditions() const
Statistics: total number of conditions.
LArConditionsTestAlg::testDCS_Objects
StatusCode testDCS_Objects()
Definition: LArConditionsTestAlg.cxx:1361
LArConditionsTestAlg::m_testFill
BooleanProperty m_testFill
Definition: LArConditionsTestAlg.h:76
LArConditionsTestAlg::createCompareObjects
StatusCode createCompareObjects()
Definition: LArConditionsTestAlg.cxx:162
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
LArConditionsContainer::end
ConstConditionsMapIterator end(unsigned int gain) const
end of all channels for this gain
LArConditionsTestAlg.h
This file contains an algorithm for testing lar conditions data access.
lumiFormat.i
int i
Definition: lumiFormat.py:92
LArRampMC.h
LArConditionsTestAlg::testFillIOVDb
StatusCode testFillIOVDb()
Definition: LArConditionsTestAlg.cxx:1221
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
LArConditionsContainer::get
ConstReference get(const HWIdentifier id, unsigned int gain=0) const
get data with online identifier
ILArRamp
Definition: ILArRamp.h:12
LArConditionsTestAlg::m_applyCorrections
BooleanProperty m_applyCorrections
Definition: LArConditionsTestAlg.h:81
LArConditionsContainer::iov_size
iov_size_type iov_size() const
number of IOVs - from MultChanCollection
operator==
bool operator==(const LArRampComplete::LArCondObj &r1, const LArRampPTmp &r2)
Definition: LArConditionsTestAlg.cxx:227
LArConditionsChannelSet
template class for use for I/O of conditions data correction sets
Definition: LArConditionsChannelSet.h:37
LArConditionsChannelSet.h
This file defines the template class used for I/O of conditions data.
LArConditionsContainer::conditionsPerGroup
unsigned int conditionsPerGroup(unsigned int group) const
Statistics: number of conditions per group.
LArConditionsTestAlg::~LArConditionsTestAlg
virtual ~LArConditionsTestAlg()
Definition: LArConditionsTestAlg.cxx:61
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
LArConditionsContainer::chan_end
chan_const_iterator chan_end() const
AthAlgorithm
Definition: AthAlgorithm.h:47
LArConditionsTestAlg::testCallBack2
StatusCode testCallBack2(IOVSVC_CALLBACK_ARGS)
Definition: LArConditionsTestAlg.cxx:1213
ILArOFC
Definition: ILArOFC.h:14
LArConditionsContainer::totalNumberOfCorrections
unsigned int totalNumberOfCorrections() const
Statistics: total number of corrections.
LArConditionsContainer::chan_size
chan_size_type chan_size() const
number of channels - from MultChanCollection
LArConditionsContainer::nGroups
unsigned int nGroups() const
Number of groups - minimum is 2 (1 correction group, 1 FEB ID group)
LArRampPTmp
Persistent data for LArRamp Copied from LAr.
Definition: LArRampPTmp.h:24
defineDB.ichan
int ichan
Definition: JetTagCalibration/share/defineDB.py:28
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
errorcheck.h
Helpers for checking error return status codes and reporting errors.
LArConditionsTestAlg::registerCondObjects
StatusCode registerCondObjects()
Definition: LArConditionsTestAlg.cxx:1188
LArConditionsTestAlg::LArConditionsTestAlg
LArConditionsTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: LArConditionsTestAlg.cxx:32
AtlasDetectorID::show_to_string
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:574
LArConditionsTestAlg::m_onlineID
const LArOnlineID * m_onlineID
Definition: LArConditionsTestAlg.h:75
LArConditionsTestAlg::initialize
virtual StatusCode initialize() override
Definition: LArConditionsTestAlg.cxx:68
DeMoScan.first
bool first
Definition: DeMoScan.py:534
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LArConditionsContainer::conditionsPerChannel
unsigned int conditionsPerChannel(unsigned int coolChannel) const
Statistics: number of conditions per COOL channel.
LArConditionsContainer::begin
ConstConditionsMapIterator begin(unsigned int gain) const
get iterator for all channels for a gain
LArConditionsTestAlg::streamOutCondObjects
StatusCode streamOutCondObjects()
Definition: LArConditionsTestAlg.cxx:1179
LArConditionsTestAlg::m_writeCondObjs
BooleanProperty m_writeCondObjs
Definition: LArConditionsTestAlg.h:79
LArConditionsTestAlg::testCondObjects
StatusCode testCondObjects()
Definition: LArConditionsTestAlg.cxx:261
LArConditionsTestAlg::printCondObjects
StatusCode printCondObjects()
Definition: LArConditionsTestAlg.cxx:1170
LArConditionsTestAlg::finalize
virtual StatusCode finalize() override
Definition: LArConditionsTestAlg.cxx:151
LArConditionsTestAlg::execute
virtual StatusCode execute() override
Definition: LArConditionsTestAlg.cxx:96
LArConditionsTestAlg::m_testCondObjs
BooleanProperty m_testCondObjs
Definition: LArConditionsTestAlg.h:77
operator!=
bool operator!=(const LArRampComplete::LArCondObj &r1, const LArRampPTmp &r2)
Definition: LArConditionsTestAlg.cxx:251
error
Definition: IImpactPoint3dEstimator.h:70
ReadOfcFromCool.ofc
ofc
Definition: ReadOfcFromCool.py:110
LArConditionsContainerBase::FeedThroughGrouping
@ FeedThroughGrouping
Definition: LArConditionsContainerBase.h:48
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
LArOnlineID_Base::channel_begin
id_iterator channel_begin() const
Returns an iterator pointing to a channel identifier collection.
Definition: LArOnlineID_Base.cxx:1926
LArConditionsTestAlg::testDbObjectRead
StatusCode testDbObjectRead()
Definition: LArConditionsTestAlg.cxx:1278
fitman.k
k
Definition: fitman.py:528
LArOnlineID.h
CorrectionCompare
bool CorrectionCompare(const LArRampComplete::LArCondObj &r1, const LArRampPTmp &r2)
Definition: LArConditionsTestAlg.cxx:239
LArConditionsContainer::correctionsApplied
bool correctionsApplied() const
Have corrections been applied?