CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Attributes
popcon::EcalPedestalsHandler Class Reference

#include <EcalPedestalsHandler.h>

Inheritance diagram for popcon::EcalPedestalsHandler:
popcon::PopConSourceHandler< EcalPedestals >

Public Member Functions

bool checkPedestal (EcalPedestals::Item *item)
 
 EcalPedestalsHandler (edm::ParameterSet const &)
 
void getNewObjects () override
 
void getNewObjectsH2 ()
 
void getNewObjectsP5 ()
 
std::string id () const override
 
void readPedestal2017 ()
 
void readPedestalFile ()
 
void readPedestalTimestamp ()
 
void readPedestalTree ()
 
 ~EcalPedestalsHandler () override
 
- Public Member Functions inherited from popcon::PopConSourceHandler< EcalPedestals >
void convertFromOld ()
 
SummarydummySummary (typename OldContainer::value_type const &) const
 
void initialize (const cond::persistency::Session &dbSession, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry)
 
Ref lastPayload () const
 
cond::LogDBEntry_t const & logDBEntry () const
 
std::pair< Container const *, std::string const > operator() (const cond::persistency::Session &session, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry) const
 
 PopConSourceHandler ()
 
Container const & returnData ()
 
void sort ()
 
cond::TagInfo_t const & tagInfo () const
 
std::string const & userTextLog () const
 
virtual ~PopConSourceHandler ()
 

Public Attributes

EcalCondDBInterfaceeconn
 

Private Attributes

std::string m_filename
 
unsigned int m_firstRun
 
std::string m_gentag
 
unsigned int m_lastRun
 
std::string m_location
 
std::string m_locationsource
 
std::string m_name
 
std::string m_pass
 
std::string m_runtag
 
int m_runtype
 
std::string m_sid
 
std::string m_user
 
const EcalPedestalsmypedestals
 

Additional Inherited Members

- Public Types inherited from popcon::PopConSourceHandler< EcalPedestals >
typedef std::vector< Triplet > Container
 
typedef std::vector< std::pair< EcalPedestals *, cond::Time_t > > OldContainer
 
typedef PopConSourceHandler< EcalPedestalsself
 
typedef cond::Summary Summary
 
typedef cond::Time_t Time_t
 
typedef EcalPedestals value_type
 
- Protected Member Functions inherited from popcon::PopConSourceHandler< EcalPedestals >
int add (value_type *payload, Summary *summary, Time_t time)
 
cond::persistency::SessiondbSession () const
 
- Protected Attributes inherited from popcon::PopConSourceHandler< EcalPedestals >
OldContainer m_to_transfer
 
std::string m_userTextLog
 

Detailed Description

Definition at line 53 of file EcalPedestalsHandler.h.

Constructor & Destructor Documentation

popcon::EcalPedestalsHandler::EcalPedestalsHandler ( edm::ParameterSet const &  )

Definition at line 16 of file EcalPedestalsHandler.cc.

References gather_cfg::cout, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), m_filename, m_firstRun, m_gentag, m_lastRun, m_location, m_locationsource, m_pass, m_runtag, m_runtype, m_sid, m_user, and AlCaHLTBitMon_QueryRunRegistry::string.

17  : m_name(ps.getUntrackedParameter<std::string>("name","EcalPedestalsHandler")) {
18 
19  std::cout << "EcalPedestals Source handler constructor\n" << std::endl;
20  m_firstRun=static_cast<unsigned int>(atoi( ps.getParameter<std::string>("firstRun").c_str()));
21  m_lastRun=static_cast<unsigned int>(atoi( ps.getParameter<std::string>("lastRun").c_str()));
22  m_sid= ps.getParameter<std::string>("OnlineDBSID");
23  m_user= ps.getParameter<std::string>("OnlineDBUser");
24  m_pass= ps.getParameter<std::string>("OnlineDBPassword");
25  m_locationsource= ps.getParameter<std::string>("LocationSource");
26  m_location=ps.getParameter<std::string>("Location");
27  m_gentag=ps.getParameter<std::string>("GenTag");
28  m_runtag=ps.getParameter<std::string>("RunTag");
29  m_filename = ps.getUntrackedParameter<std::string>("filename","EcalPedestals.txt");
30  m_runtype = ps.getUntrackedParameter<int>("RunType",1);
31 
32  std::cout << m_sid<<"/"<<m_user<<"/"<<m_pass<<"/"<<m_location<<"/"<<m_gentag << std::endl;
33 
34 
35 }
popcon::EcalPedestalsHandler::~EcalPedestalsHandler ( )
override

Definition at line 37 of file EcalPedestalsHandler.cc.

37 {}

Member Function Documentation

bool popcon::EcalPedestalsHandler::checkPedestal ( EcalPedestals::Item item)

Definition at line 66 of file EcalPedestalsHandler.cc.

References EcalPedestal::mean_x1, EcalPedestal::mean_x12, EcalPedestal::mean_x6, mps_fire::result, EcalPedestal::rms_x1, EcalPedestal::rms_x12, and EcalPedestal::rms_x6.

Referenced by getNewObjectsP5().

66  {
67  // true means all is standard and OK
68  bool result=true;
69  if(item->rms_x12 >3 || item->rms_x12<=0) result=false;
70  if(item->rms_x6 >2 || item->rms_x6<=0) result=false;
71  if(item->rms_x1 >1 || item->rms_x1<=0) result=false;
72  if(item->mean_x12>300 || item->mean_x12<=100) result=false;
73  if(item->mean_x1>300 || item->mean_x1<=100) result=false;
74  if(item->mean_x6>300 || item->mean_x6<=100) result=false;
75  return result;
76 }
void popcon::EcalPedestalsHandler::getNewObjects ( )
overridevirtual

Implements popcon::PopConSourceHandler< EcalPedestals >.

Definition at line 40 of file EcalPedestalsHandler.cc.

References gather_cfg::cout, cmsRelvalreport::exit, getNewObjectsH2(), getNewObjectsP5(), m_locationsource, readPedestal2017(), readPedestalFile(), readPedestalTimestamp(), and readPedestalTree().

40  {
41  std::cout << "------- Ecal - > getNewObjects\n";
42  if(m_locationsource=="H2") {
44  } else if(m_locationsource=="P5") {
46  }
47  else if(m_locationsource=="File") {
49  }
50  else if(m_locationsource=="Tree") {
52  }
53  else if(m_locationsource=="Timestamp") {
55  }
56  else if(m_locationsource=="2017") {
58  }
59  else {
60  std::cout << " unknown location " << m_locationsource << " give up " << std::endl;
61  exit(-1);
62  }
63 }
void popcon::EcalPedestalsHandler::getNewObjectsH2 ( )

Definition at line 453 of file EcalPedestalsHandler.cc.

References gather_cfg::cout, econn, EcalCondObjectContainer< T >::endcap(), Exception, EcalCondDBInterface::fetchDataSet(), EcalCondDBInterface::fetchMonRunList(), EcalLogicID::getID2(), MonPedestalsDat::getPedMeanG1(), MonPedestalsDat::getPedMeanG12(), MonPedestalsDat::getPedMeanG6(), MonPedestalsDat::getPedRMSG1(), MonPedestalsDat::getPedRMSG12(), MonPedestalsDat::getPedRMSG6(), MonRunList::getRuns(), EEDetId::hashedIndex(), EcalCondObjectContainer< T >::insert(), cond::TagInfo_t::lastInterval, popcon::PopConSourceHandler< EcalPedestals >::lastPayload(), m_lastRun, m_pass, m_sid, popcon::PopConSourceHandler< EcalPedestals >::m_to_transfer, m_user, EcalPedestal::mean_x1, EcalPedestal::mean_x12, EcalPedestal::mean_x6, AlCaHLTBitMon_ParallelJobs::p, DetId::rawId(), EcalPedestal::rms_x1, EcalPedestal::rms_x12, EcalPedestal::rms_x6, RunTag::setGeneralTag(), MonRunTag::setGeneralTag(), LocationDef::setLocation(), RunTag::setLocationDef(), MonVersionDef::setMonitoringVersion(), MonRunList::setMonRunTag(), MonRunTag::setMonVersionDef(), MonRunList::setRunTag(), RunTypeDef::setRunType(), RunTag::setRunTypeDef(), popcon::PopConSourceHandler< EcalPedestals >::tagInfo(), and EEDetId::validDetId().

Referenced by getNewObjects().

453  {
454  unsigned int max_since=0;
455  max_since=static_cast<unsigned int>(tagInfo().lastInterval.first);
456  std::cout << "max_since : " << max_since << std::endl;
457  Ref ped_db = lastPayload();
458 
459  std::cout << "retrieved last payload " << std::endl;
460 
461 
462  // we copy the last valid record to a temporary object peds
463  EcalPedestals* peds = new EcalPedestals();
464 
465  // get from offline DB the last valid pedestal set ped_db
466  // edm::ESHandle<EcalPedestals> pedestals;
467  // esetup.get<EcalPedestalsRcd>().get(pedestals);
468 
469 
470  // only positive endcap side and
471  // x from 86 to 95
472  // y from 46 to 55
473  int ixmin=86; int ixmax=95;
474  int iymin=46; int iymax=55;
475  for(int iX=ixmin; iX<=ixmax ;++iX) {
476  for(int iY=iymin; iY<=iymax; ++iY) {
477 
478  if (EEDetId::validDetId(iX,iY,1)) {
479  EEDetId eedetidpos(iX,iY,1);
480  unsigned int hiee = eedetidpos.hashedIndex();
481  EcalPedestals::Item aped= ped_db->endcap(hiee);
482 
483  // here I copy the last valid value in the peds object
484  EcalPedestals::Item item;
485  item.mean_x1 = aped.mean_x1;
486  item.rms_x1 = aped.rms_x1;
487  item.mean_x6 = aped.mean_x6;
488  item.rms_x6 = aped.rms_x6;
489  item.mean_x12 = aped.mean_x12;
490  item.rms_x12 = aped.rms_x12;
491  peds->insert(std::make_pair(eedetidpos.rawId(),item));
492  if(iX==ixmin && iY==iymin) std::cout<<"ped12 " << item.mean_x12<< std::endl;
493 
494  }
495  }
496  }
497 
498 
499  std::cout <<"WOW: we just retrieved the last valid record from DB "<< std::endl;
500 
501 
502  // here we retrieve all the runs after the last from online DB
503 
504  std::cout << "Retrieving run list from ONLINE DB ... " << std::endl;
505 
506  std::cout << "Making connection..." << std::flush;
508  std::cout << "Done." << std::endl;
509 
510  if (!econn)
511  {
512  std::cout << " connection parameters " <<m_sid <<"/"<<m_user<<"/"<<m_pass<<std::endl;
513  throw cms::Exception("OMDS not available");
514  }
515 
516  // these are the online conditions DB classes
517  RunList my_runlist ;
518  RunTag my_runtag;
519  LocationDef my_locdef;
520  RunTypeDef my_rundef;
521 
522  my_locdef.setLocation("H2_07");
523  my_rundef.setRunType("PEDESTAL");
524  my_runtag.setLocationDef(my_locdef);
525  my_runtag.setRunTypeDef(my_rundef);
526  my_runtag.setGeneralTag("LOCAL");
527 
528 
529  // here we retrieve the Monitoring run records
530 
531  MonVersionDef monverdef;
532  monverdef.setMonitoringVersion("test01");
533 
534  MonRunTag mon_tag;
535  mon_tag.setGeneralTag("CMSSW");
536  mon_tag.setMonVersionDef(monverdef);
537  MonRunList mon_list;
538  mon_list.setMonRunTag(mon_tag);
539  mon_list.setRunTag(my_runtag);
540  // mon_list=econn->fetchMonRunList(my_runtag, mon_tag);
541  unsigned int min_run=max_since+1; // we have to add 1 to the last transferred one
542 
543  unsigned int max_run=m_lastRun;
544  mon_list=econn->fetchMonRunList(my_runtag, mon_tag,min_run,max_run );
545 
546  std::vector<MonRunIOV> mon_run_vec= mon_list.getRuns();
547  size_t mon_runs=mon_run_vec.size();
548  std::cout <<"number of Mon runs is : "<< mon_runs<< std::endl;
549 
550  if(mon_runs>0){
551 
552  for(size_t kr=0; kr<mon_runs; kr++){
553 
554  unsigned int irun=static_cast<unsigned int>(mon_run_vec[kr].getRunIOV().getRunNumber());
555 
556  std::cout << "here is first sub run : "<< mon_run_vec[kr].getSubRunNumber() << std::endl;
557  std::cout << "here is the run number: "<< mon_run_vec[kr].getRunIOV().getRunNumber() << std::endl;
558 
559  std::cout <<" retrieve the data for a given run"<< std::endl;
560 
561  if (mon_run_vec[kr].getSubRunNumber() <=1){
562 
563 
564  // retrieve the data for a given run
565  RunIOV runiov_prime = mon_run_vec[kr].getRunIOV();
566 
567  // retrieve the pedestals from OMDS for this run
568  std::map<EcalLogicID, MonPedestalsDat> dataset_mon;
569  econn->fetchDataSet(&dataset_mon, &mon_run_vec[kr]);
570  std::cout <<"OMDS record for run "<<irun <<" is made of "<< dataset_mon.size() << std::endl;
571  typedef std::map<EcalLogicID, MonPedestalsDat>::const_iterator CImon;
572  EcalLogicID ecid_xt;
573  MonPedestalsDat rd_ped;
574 
575  //int iEta=0;
576  //int iPhi=0;
577  int ix=0;
578  int iy=0;
579 
580  for (CImon p = dataset_mon.begin(); p != dataset_mon.end(); p++) {
581  ecid_xt = p->first;
582  rd_ped = p->second;
583  //int sm_num=ecid_xt.getID1();
584  int xt_num=ecid_xt.getID2(); // careful here !!! we number the channels from 1 to 1700
585 
586  //iEta=(xt_num/20)+1;
587  //iPhi=20-(xt_num-(iEta-1)*20);
588 
589  ix=95-(xt_num-1)/20;
590  iy=46+(xt_num-1)%20;
591 
592 
593  EcalPedestals::Item item;
594  item.mean_x1 =rd_ped.getPedMeanG1() ;
595  item.rms_x1 =rd_ped.getPedRMSG1();
596  item.mean_x6 =rd_ped.getPedMeanG6();
597  item.rms_x6 =rd_ped.getPedRMSG6() ;
598  item.mean_x12 =rd_ped.getPedMeanG12();
599  item.rms_x12 =rd_ped.getPedRMSG12();
600 
601  EEDetId eedetidpos(ix,iy,1);
602  // EBDetId ebdetid(iEta,iPhi);
603 
604  // here we change in the peds object only the values that are available in the online DB
605  // otherwise we keep the old value
606 
607  peds->insert(std::make_pair(eedetidpos.rawId(),item));
608  if(ix==ixmin && iy==iymin) std::cout<<"ped12 " << item.mean_x12<< std::endl;
609  }
610 
611  std::cout << "Generating popcon record for run " << irun << "..." << std::flush;
612 
613 
614  // now I copy peds in pedtemp and I ship pedtemp to popcon
615  // if I use always the same peds I always overwrite
616  // so I really have to create new objects for each new run
617  // popcon deletes everything for me
618 
619  EcalPedestals* pedtemp = new EcalPedestals();
620 
621 
622  for(int iX=ixmin; iX<=ixmax ;++iX) {
623  for(int iY=iymin; iY<=iymax; ++iY) {
624 
625  if (EEDetId::validDetId(iX,iY,1))
626  {
627  EEDetId eedetidpos(iX,iY,1);
628  unsigned int hiee = eedetidpos.hashedIndex();
629  EcalPedestals::Item aped = peds->endcap(hiee);
630 
631  EcalPedestals::Item item;
632  item.mean_x1 = aped.mean_x1;
633  item.rms_x1 = aped.rms_x1;
634  item.mean_x6 = aped.mean_x6;
635  item.rms_x6 = aped.rms_x6;
636  item.mean_x12 = aped.mean_x12;
637  item.rms_x12 = aped.rms_x12;
638  // here I copy the last valid value in the pedtemp object
639  pedtemp->insert(std::make_pair(eedetidpos.rawId(),item));
640  if(iX==ixmin && iY==iymin) std::cout<<"ped12 " << item.mean_x12<< std::endl;
641  }
642  }
643  }
644 
645 
646 
647  Time_t snc= (Time_t) irun ;
648 
649  m_to_transfer.push_back(std::make_pair((EcalPedestals*)pedtemp,snc));
650 
651  std::cout << "Ecal - > end of getNewObjectsH2 -----------\n";
652 
653  }
654  }
655  }
656  delete econn;
657  delete peds; // this is the only one that popcon does not delete
658 }
void setRunTypeDef(const RunTypeDef &runTypeDef)
Definition: RunTag.cc:70
Definition: RunTag.h:13
float getPedRMSG1() const
MonRunList fetchMonRunList(const RunTag &tag, const MonRunTag &monruntag) noexcept(false)
void setGeneralTag(std::string tag)
Definition: MonRunTag.cc:33
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
void setRunTag(const RunTag &tag)
Definition: MonRunList.cc:23
int getID2() const
Definition: EcalLogicID.cc:51
cond::ValidityInterval lastInterval
Definition: Types.h:75
float getPedMeanG12() const
float getPedRMSG12() const
void setMonVersionDef(const MonVersionDef &ver)
Definition: MonRunTag.cc:49
void setLocationDef(const LocationDef &locDef)
Definition: RunTag.cc:53
void insert(std::pair< uint32_t, Item > const &a)
std::vector< MonRunIOV > getRuns()
Definition: MonRunList.cc:46
EcalPedestalsMap EcalPedestals
Definition: EcalPedestals.h:53
void setRunType(std::string runtype)
Definition: RunTypeDef.cc:33
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
void setMonRunTag(const MonRunTag &tag)
Definition: MonRunList.cc:29
float getPedMeanG1() const
void setMonitoringVersion(std::string ver)
float getPedMeanG6() const
void setLocation(std::string loc)
Definition: LocationDef.cc:33
void setGeneralTag(std::string tag)
Definition: RunTag.cc:36
const Item & endcap(size_t hashedIndex) const
Definition: RunIOV.h:13
float getPedRMSG6() const
void popcon::EcalPedestalsHandler::getNewObjectsP5 ( )

Definition at line 78 of file EcalPedestalsHandler.cc.

References EcalCondObjectContainer< T >::barrel(), checkPedestal(), gather_cfg::cout, econn, EcalCondObjectContainer< T >::endcap(), EBDetId::ETAPHIMODE, EcalCondDBInterface::fetchDataSet(), EcalCondDBInterface::fetchMonRunList(), EcalLogicID::getID1(), EcalLogicID::getID2(), EcalLogicID::getID3(), EcalLogicID::getName(), MonPedestalsDat::getPedMeanG1(), MonPedestalsDat::getPedMeanG12(), MonPedestalsDat::getPedMeanG6(), MonPedestalsDat::getPedRMSG1(), MonPedestalsDat::getPedRMSG12(), MonPedestalsDat::getPedRMSG6(), MonRunList::getRuns(), EBDetId::hashedIndex(), EEDetId::hashedIndex(), EcalCondObjectContainer< T >::insert(), EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, cond::TagInfo_t::lastInterval, popcon::PopConSourceHandler< EcalPedestals >::lastPayload(), m_firstRun, m_gentag, m_lastRun, m_location, m_pass, m_runtag, m_sid, popcon::PopConSourceHandler< EcalPedestals >::m_to_transfer, m_user, popcon::PopConSourceHandler< EcalPedestals >::m_userTextLog, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EcalPedestal::mean_x1, EcalPedestal::mean_x12, EcalPedestal::mean_x6, min(), EBDetId::MIN_IPHI, AlCaHLTBitMon_ParallelJobs::p, DetId::rawId(), EcalPedestal::rms_x1, EcalPedestal::rms_x12, EcalPedestal::rms_x6, RunTag::setGeneralTag(), MonRunTag::setGeneralTag(), LocationDef::setLocation(), RunTag::setLocationDef(), MonVersionDef::setMonitoringVersion(), MonRunList::setMonRunTag(), MonRunTag::setMonVersionDef(), MonRunList::setRunTag(), RunTypeDef::setRunType(), RunTag::setRunTypeDef(), EBDetId::SMCRYSTALMODE, popcon::PopConSourceHandler< EcalPedestals >::tagInfo(), EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by getNewObjects().

78  {
79  std::ostringstream ss;
80  ss<<"ECAL ";
81 
82  unsigned int max_since=0;
83  max_since=static_cast<unsigned int>(tagInfo().lastInterval.first);
84  std::cout << "max_since : " << max_since << std::endl;
85  Ref ped_db = lastPayload();
86 
87  // we copy the last valid record to a temporary object peds
88  EcalPedestals* peds = new EcalPedestals();
89  std::cout << "retrieved last payload " << std::endl;
90 
91  for(int iEta=-EBDetId::MAX_IETA; iEta<=EBDetId::MAX_IETA ;++iEta) {
92  if(iEta==0) continue;
93  for(int iPhi=EBDetId::MIN_IPHI; iPhi<=EBDetId::MAX_IPHI; ++iPhi) {
94  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
95  if (EBDetId::validDetId(iEta,iPhi)) {
96  EBDetId ebdetid(iEta,iPhi,EBDetId::ETAPHIMODE);
97  EcalPedestals::const_iterator it =ped_db->find(ebdetid.rawId());
98  EcalPedestals::Item aped = (*it);
99 
100  // here I copy the last valid value in the peds object
101  EcalPedestals::Item item;
102  item.mean_x1 = aped.mean_x1;
103  item.rms_x1 = aped.rms_x1;
104  item.mean_x6 = aped.mean_x6;
105  item.rms_x6 = aped.rms_x6;
106  item.mean_x12 = aped.mean_x12;
107  item.rms_x12 = aped.rms_x12;
108 
109  peds->insert(std::make_pair(ebdetid.rawId(),item));
110  }
111  }
112  }
113 
114  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
115  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
116  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
117  if (EEDetId::validDetId(iX,iY,1)) {
118  EEDetId eedetidpos(iX,iY,1);
119 
120  EcalPedestals::const_iterator it =ped_db->find(eedetidpos.rawId());
121  EcalPedestals::Item aped = (*it);
122 
123  // unsigned int hiee = eedetidpos.hashedIndex();
124  // EcalPedestals::Item aped= ped_db->endcap(hiee);
125 
126  // here I copy the last valid value in the peds object
127  EcalPedestals::Item item;
128  item.mean_x1 = aped.mean_x1;
129  item.rms_x1 = aped.rms_x1;
130  item.mean_x6 = aped.mean_x6;
131  item.rms_x6 = aped.rms_x6;
132  item.mean_x12 = aped.mean_x12;
133  item.rms_x12 = aped.rms_x12;
134  peds->insert(std::make_pair(eedetidpos.rawId(),item));
135  }
136  if(EEDetId::validDetId(iX,iY,-1)) {
137  EEDetId eedetidneg(iX,iY,-1);
138 
139  EcalPedestals::const_iterator it =ped_db->find(eedetidneg.rawId());
140  EcalPedestals::Item aped = (*it);
141  // unsigned int hiee = eedetidneg.hashedIndex();
142  // EcalPedestals::Item aped= ped_db->endcap(hiee);
143 
144  // here I copy the last valid value in the peds object
145  EcalPedestals::Item item;
146  item.mean_x1 = aped.mean_x1;
147  item.rms_x1 = aped.rms_x1;
148  item.mean_x6 = aped.mean_x6;
149  item.rms_x6 = aped.rms_x6;
150  item.mean_x12 = aped.mean_x12;
151  item.rms_x12 = aped.rms_x12;
152  peds->insert(std::make_pair(eedetidneg.rawId(),item));
153  }
154  }
155  }
156 
157  // here we retrieve all the runs after the last from online DB
158 
159  std::cout << "Retrieving run list from ONLINE DB ... " << std::endl;
161  std::cout << "Connection done" << std::endl;
162 
163  // these are the online conditions DB classes
164  RunList my_runlist ;
165  RunTag my_runtag;
166  LocationDef my_locdef;
167  RunTypeDef my_rundef;
168 
169  my_locdef.setLocation(m_location);
170  // my_rundef.setRunType("PEDESTAL"); // 2017
171  my_rundef.setRunType(m_runtag);
172  my_runtag.setLocationDef(my_locdef);
173  my_runtag.setRunTypeDef(my_rundef);
174  my_runtag.setGeneralTag(m_gentag);
175 
176  // here we retrieve the Monitoring run records
177 
178  MonVersionDef monverdef;
179  monverdef.setMonitoringVersion("test01");
180 
181  MonRunTag mon_tag;
182  // mon_tag.setGeneralTag("CMSSW");
183  mon_tag.setGeneralTag("CMSSW-offline-private");
184  mon_tag.setMonVersionDef(monverdef);
185  MonRunList mon_list;
186  mon_list.setMonRunTag(mon_tag);
187  mon_list.setRunTag(my_runtag);
188  // mon_list=econn->fetchMonRunList(my_runtag, mon_tag);
189  unsigned int min_run=0;
190  if(m_firstRun<max_since) {
191  min_run=max_since+1; // we have to add 1 to the last transferred one
192  } else {
193  min_run=m_firstRun;
194  }
195 
196  unsigned int max_run=m_lastRun;
197  mon_list=econn->fetchMonRunList(my_runtag, mon_tag,min_run,max_run );
198 
199  std::vector<MonRunIOV> mon_run_vec= mon_list.getRuns();
200  int mon_runs = mon_run_vec.size();
201  std::cout <<"number of Mon runs is : "<< mon_runs<< std::endl;
202 
203  if(mon_runs > 0) {
204  int krmax = std::min(mon_runs, 30);
205  for(int kr = 0; kr < krmax; kr++){
206  std::cout << "-kr------: "<<kr<<std::endl;
207 
208  unsigned int irun=static_cast<unsigned int>(mon_run_vec[kr].getRunIOV().getRunNumber());
209  std::cout << "retrieve the data for run number: "<< mon_run_vec[kr].getRunIOV().getRunNumber() << std::endl;
210  if (mon_run_vec[kr].getSubRunNumber() <=1){
211 
212  // retrieve the data for a given run
213  RunIOV runiov_prime = mon_run_vec[kr].getRunIOV();
214  // retrieve the pedestals from OMDS for this run
215  std::map<EcalLogicID, MonPedestalsDat> dataset_mon;
216  econn->fetchDataSet(&dataset_mon, &mon_run_vec[kr]);
217  std::cout <<"OMDS record for run "<<irun <<" is made of "<< dataset_mon.size() << std::endl;
218  int nEB = 0, nEE = 0, nEBbad = 0, nEEbad =0;
219  typedef std::map<EcalLogicID, MonPedestalsDat>::const_iterator CImon;
220  EcalLogicID ecid_xt;
221  MonPedestalsDat rd_ped;
222 
223  // this to validate ...
224  int nbad=0;
225  for (CImon p = dataset_mon.begin(); p != dataset_mon.end(); p++) {
226  ecid_xt = p->first;
227  rd_ped = p->second;
228  int sm_num=ecid_xt.getID1();
229  int xt_num=ecid_xt.getID2();
230  int yt_num=ecid_xt.getID3();
231 
232  EcalPedestals::Item item;
233  item.mean_x1 =rd_ped.getPedMeanG1() ;
234  item.rms_x1 =rd_ped.getPedRMSG1();
235  item.mean_x6 =rd_ped.getPedMeanG6();
236  item.rms_x6 =rd_ped.getPedRMSG6() ;
237  item.mean_x12 =rd_ped.getPedMeanG12();
238  item.rms_x12 =rd_ped.getPedRMSG12();
239  /*
240  if(irun != 280216 && irun != 280218 && irun != 280259 && irun != 280261 && irun != 280392 && irun != 280394
241  && irun != 280762 && irun != 280765 && irun != 280936 && irun != 280939 && irun != 281756 && irun != 281757) {
242  */
243  if(ecid_xt.getName()=="EB_crystal_number") {
244  nEB++;
245  if(!checkPedestal(&item) ) nEBbad++;
246  }
247  else {
248  nEE++;
249  if(!checkPedestal(&item) ) nEEbad++;
250  }
251 
252  // here we check and count how many bad channels we have
253 
254  if(!checkPedestal(&item) ){
255  nbad++;
256  if(nbad < 10) std::cout <<"BAD LIST: channel " << sm_num << "/" << xt_num << "/"<< yt_num
257  << "ped/rms "<<item.mean_x12<< "/"<< item.rms_x12 << std::endl;
258  }
259  /*
260  }
261  else { // only gain 12 in these runs
262  if(ecid_xt.getName()=="EB_crystal_number") {
263  nEB++;
264  if(item.mean_x12 <= 100 || item.mean_x12 > 300 || item.rms_x12 > 3 || item.rms_x12 <= 0) {
265  nbad++;
266  nEBbad++;
267  }
268  }
269  else {
270  nEE++;
271  if(item.mean_x12 <= 100 || item.mean_x12 > 300 || item.rms_x12 > 3 || item.rms_x12 <= 0) {
272  nbad++;
273  nEEbad++;
274  }
275  }
276  } // only gain 12 in these runs
277  */
278  } // loop over all channels
279 
280  // ok or bad?
281  // a bad run is for more than 5% bad channels
282 
283  // if(nbad<(dataset_mon.size()*0.1)){
284  if(nbad<(dataset_mon.size()*0.05) && (nEB > 10200 || nEE > 2460)) {
285 
286  for (CImon p = dataset_mon.begin(); p != dataset_mon.end(); p++) {
287  ecid_xt = p->first;
288  rd_ped = p->second;
289  int sm_num=ecid_xt.getID1();
290  int xt_num=ecid_xt.getID2();
291  int yt_num=ecid_xt.getID3();
292 
293  EcalPedestals::Item item;
294  item.mean_x1 =rd_ped.getPedMeanG1() ;
295  item.rms_x1 =rd_ped.getPedRMSG1();
296  item.mean_x6 =rd_ped.getPedMeanG6();
297  item.rms_x6 =rd_ped.getPedRMSG6() ;
298  item.mean_x12 =rd_ped.getPedMeanG12();
299  item.rms_x12 =rd_ped.getPedRMSG12();
300 
301  if(ecid_xt.getName()=="EB_crystal_number") {
302  // Barrel channel
303  EBDetId ebdetid(sm_num,xt_num,EBDetId::SMCRYSTALMODE);
304 
305  // individual objects check
306  if(item.mean_x1==-1 || item.rms_x1 ==-1 || item.mean_x6==-1 ||
307  item.rms_x6==-1 || item.mean_x12==-1 || item.rms_x12==-1 ||
308  item.mean_x1==0 || item.rms_x1 ==0 || item.mean_x6==0 ||
309  item.rms_x6==0 || item.mean_x12==0 || item.rms_x12==0 ) {
310  // if one is bad we
311  // retrieve the old valid value
312  unsigned int hieb = ebdetid.hashedIndex();
313  EcalPedestals::Item previous_ped= peds->barrel(hieb);
314  if(item.mean_x1==-1 || item.mean_x1==0) item.mean_x1 =previous_ped.mean_x1;
315  if(item.rms_x1==-1 || item.rms_x1==0) item.rms_x1 =previous_ped.rms_x1;
316  if(item.mean_x6==-1 || item.mean_x6==0) item.mean_x6 =previous_ped.mean_x6;
317  if(item.rms_x6==-1 || item.rms_x6==0) item.rms_x6 =previous_ped.rms_x6;
318  if(item.mean_x12==-1 || item.mean_x12==0)item.mean_x12=previous_ped.mean_x12;
319  if(item.rms_x12==-1 || item.rms_x12==0) item.rms_x12 =previous_ped.rms_x12;
320  }
321 
322  // here we change in the peds object only the channels that are available in the online DB
323  // otherwise we keep the previous value
324  peds->insert(std::make_pair(ebdetid.rawId(),item));
325  } else {
326  // Endcap channel
327  // in this case xt_num is x
328  // yt_num is y and sm_num is the side +/- 1
329  if(EEDetId::validDetId(xt_num,yt_num,sm_num)){
330  EEDetId eedetid(xt_num,yt_num,sm_num);
331 
332  // individual objects check
333  if(item.mean_x1==-1 || item.rms_x1 ==-1 || item.mean_x6==-1 ||
334  item.rms_x6==-1 || item.mean_x12==-1 || item.rms_x12==-1 ||
335  item.mean_x1==0 || item.rms_x1 ==0 || item.mean_x6==0 ||
336  item.rms_x6==0 || item.mean_x12==0 || item.rms_x12==0 ) {
337  // if one is bad we
338  // retrieve the old valid value
339  unsigned int hiee = eedetid.hashedIndex();
340  EcalPedestals::Item previous_ped= peds->endcap(hiee);
341  if(item.mean_x1==-1 || item.mean_x1==0) item.mean_x1 =previous_ped.mean_x1;
342  if(item.rms_x1==-1 || item.rms_x1==0) item.rms_x1 =previous_ped.rms_x1;
343  if(item.mean_x6==-1 || item.mean_x6==0) item.mean_x6 =previous_ped.mean_x6;
344  if(item.rms_x6==-1 || item.rms_x6==0) item.rms_x6 =previous_ped.rms_x6;
345  if(item.mean_x12==-1 || item.mean_x12==0)item.mean_x12=previous_ped.mean_x12;
346  if(item.rms_x12==-1 || item.rms_x12==0) item.rms_x12 =previous_ped.rms_x12;
347  }
348  // here we change in the peds object only the channels that are available in the online DB
349  // otherwise we keep the previous value
350  peds->insert(std::make_pair(eedetid.rawId(),item));
351  }
352  }
353  }
354 
355  std::cout << "Generating popcon record for run " << irun << "..." << std::flush;
356  // now I copy peds in pedtemp and I ship pedtemp to popcon
357  // if I use always the same peds I always overwrite
358  // so I really have to create new objects for each new run
359  // popcon deletes everything for me
360 
361  EcalPedestals* pedtemp = new EcalPedestals();
362  for(int iEta=-EBDetId::MAX_IETA; iEta<=EBDetId::MAX_IETA ;++iEta) {
363  if(iEta==0) continue;
364  for(int iPhi=EBDetId::MIN_IPHI; iPhi<=EBDetId::MAX_IPHI; ++iPhi) {
365  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
366  if (EBDetId::validDetId(iEta,iPhi)) {
367  EBDetId ebdetid(iEta,iPhi);
368  unsigned int hiee = ebdetid.hashedIndex();
369  EcalPedestals::Item aped= peds->barrel(hiee);
370 
371  // here I copy the last valid value in the peds object
372  EcalPedestals::Item item;
373  item.mean_x1 = aped.mean_x1;
374  item.rms_x1 = aped.rms_x1;
375  item.mean_x6 = aped.mean_x6;
376  item.rms_x6 = aped.rms_x6;
377  item.mean_x12 = aped.mean_x12;
378  item.rms_x12 = aped.rms_x12;
379  // here I copy the last valid value in the pedtemp object
380  pedtemp->insert(std::make_pair(ebdetid.rawId(),item));
381  if((iEta==-1 || iEta==1) && iPhi==20){
382  float x=aped.mean_x12 ;
383  std::cout<< "channel:" <<iEta<<"/"<<iPhi<< "/" << hiee << " ped mean 12="<< x << std::endl;
384  }
385  }
386  }
387  }
388  // endcaps
389  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
390  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
391  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
392  if (EEDetId::validDetId(iX,iY,1)) {
393  EEDetId eedetid(iX,iY,1);
394  unsigned int hiee = eedetid.hashedIndex();
395  EcalPedestals::Item aped= peds->endcap(hiee);
396  // here I copy the last valid value in the peds object
397  EcalPedestals::Item item;
398  item.mean_x1 = aped.mean_x1;
399  item.rms_x1 = aped.rms_x1;
400  item.mean_x6 = aped.mean_x6;
401  item.rms_x6 = aped.rms_x6;
402  item.mean_x12 = aped.mean_x12;
403  item.rms_x12 = aped.rms_x12;
404  // here I copy the last valid value in the pedtemp object
405  pedtemp->insert(std::make_pair(eedetid.rawId(),item));
406  }
407  if (EEDetId::validDetId(iX,iY,-1)) {
408  EEDetId eedetid(iX,iY,-1);
409  unsigned int hiee = eedetid.hashedIndex();
410  EcalPedestals::Item aped= peds->endcap(hiee);
411  // here I copy the last valid value in the peds object
412  EcalPedestals::Item item;
413  item.mean_x1 = aped.mean_x1;
414  item.rms_x1 = aped.rms_x1;
415  item.mean_x6 = aped.mean_x6;
416  item.rms_x6 = aped.rms_x6;
417  item.mean_x12 = aped.mean_x12;
418  item.rms_x12 = aped.rms_x12;
419  // here I copy the last valid value in the pedtemp object
420  pedtemp->insert(std::make_pair(eedetid.rawId(),item));
421  }
422  }
423  }
424 
425  Time_t snc= (Time_t) irun ;
426  m_to_transfer.push_back(std::make_pair((EcalPedestals*)pedtemp,snc));
427 
428  ss << "Run=" << irun << "_WAS_GOOD_"<<std::endl;
429  m_userTextLog = ss.str()+";";
430  } // good run : write in DB
431  else {
432  std::cout << "Run " << irun << " was BAD !!!! not sent to the DB";
433  if(nbad >= (dataset_mon.size()*0.05))
434  std::cout << " number of bad channels = " << nbad;
435  if(nEB <= 10200)
436  std::cout << " number of EB channels = " << nEB;
437  if(nEE <= 2440)
438  std::cout << " number of EE channels = " << nEE;
439  std::cout << std::endl;
440  ss << "Run=" << irun << "_WAS_BAD_"<<std::endl;
441  m_userTextLog = ss.str()+";";
442  } // bad run : do not write in DB
443  } // SubRunNumber
444  } // loop over runs
445 
446  delete econn;
447  delete peds; // this is the only one that popcon does not delete
448  } // runs to analyze ?
449  std::cout << "Ecal - > end of getNewObjects -----------\n";
450 }
bool checkPedestal(EcalPedestals::Item *item)
void setRunTypeDef(const RunTypeDef &runTypeDef)
Definition: RunTag.cc:70
static const int MIN_IPHI
Definition: EBDetId.h:142
Definition: RunTag.h:13
float getPedRMSG1() const
MonRunList fetchMonRunList(const RunTag &tag, const MonRunTag &monruntag) noexcept(false)
void setGeneralTag(std::string tag)
Definition: MonRunTag.cc:33
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
void setRunTag(const RunTag &tag)
Definition: MonRunList.cc:23
int getID2() const
Definition: EcalLogicID.cc:51
cond::ValidityInterval lastInterval
Definition: Types.h:75
std::string getName() const
Definition: EcalLogicID.cc:36
float getPedMeanG12() const
float getPedRMSG12() const
int getID1() const
Definition: EcalLogicID.cc:46
T min(T a, T b)
Definition: MathUtil.h:58
void setMonVersionDef(const MonVersionDef &ver)
Definition: MonRunTag.cc:49
static const int ETAPHIMODE
Definition: EBDetId.h:166
void setLocationDef(const LocationDef &locDef)
Definition: RunTag.cc:53
void insert(std::pair< uint32_t, Item > const &a)
static const int IX_MAX
Definition: EEDetId.h:302
std::vector< MonRunIOV > getRuns()
Definition: MonRunList.cc:46
EcalPedestalsMap EcalPedestals
Definition: EcalPedestals.h:53
static const int MAX_IPHI
Definition: EBDetId.h:144
void setRunType(std::string runtype)
Definition: RunTypeDef.cc:33
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
std::vector< Item >::const_iterator const_iterator
static const int MAX_IETA
Definition: EBDetId.h:143
void setMonRunTag(const MonRunTag &tag)
Definition: MonRunList.cc:29
float getPedMeanG1() const
void setMonitoringVersion(std::string ver)
float getPedMeanG6() const
void setLocation(std::string loc)
Definition: LocationDef.cc:33
static const int IY_MAX
Definition: EEDetId.h:306
const Item & barrel(size_t hashedIndex) const
int getID3() const
Definition: EcalLogicID.cc:56
void setGeneralTag(std::string tag)
Definition: RunTag.cc:36
static const int SMCRYSTALMODE
Definition: EBDetId.h:167
const Item & endcap(size_t hashedIndex) const
Definition: RunIOV.h:13
float getPedRMSG6() const
std::string popcon::EcalPedestalsHandler::id ( ) const
inlineoverridevirtual
void popcon::EcalPedestalsHandler::readPedestal2017 ( )

Definition at line 744 of file EcalPedestalsHandler.cc.

References EcalCondObjectContainer< T >::barrel(), gather_cfg::cout, debug, EcalCondObjectContainer< T >::endcap(), EBDetId::ETAPHIMODE, cmsRelvalreport::exit, EBDetId::hashedIndex(), EEDetId::hashedIndex(), EcalCondObjectContainer< T >::insert(), EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, kEBChannels, kEEChannels, popcon::PopConSourceHandler< EcalPedestals >::lastPayload(), m_filename, m_firstRun, popcon::PopConSourceHandler< EcalPedestals >::m_to_transfer, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EcalPedestal::mean_x1, EcalPedestal::mean_x12, EcalPedestal::mean_x6, EBDetId::MIN_IPHI, DetId::rawId(), EcalPedestal::rms_x1, EcalPedestal::rms_x12, EcalPedestal::rms_x6, EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by getNewObjects().

744  {
745  bool debug = false;
746  std::cout << " reading local Pedestal run (2017 way)! " << m_filename << std::endl;
747 
748  // First we copy the last valid record to a temporary object peds
749  Ref ped_db = lastPayload();
750  EcalPedestals* peds = new EcalPedestals();
751  std::cout << "retrieved last payload " << std::endl;
752 
753  for(int iEta=-EBDetId::MAX_IETA; iEta<=EBDetId::MAX_IETA ;++iEta) {
754  if(iEta==0) continue;
755  for(int iPhi=EBDetId::MIN_IPHI; iPhi<=EBDetId::MAX_IPHI; ++iPhi) {
756  // make an EBDetId since we need EBDetId::rawId() to be used as the key for the pedestals
757  if (EBDetId::validDetId(iEta,iPhi)) {
758  EBDetId ebdetid(iEta,iPhi,EBDetId::ETAPHIMODE);
759  EcalPedestals::const_iterator it = ped_db->find(ebdetid.rawId());
760  EcalPedestals::Item aped = (*it);
761  // here I copy the last valid value in the peds object
762  EcalPedestals::Item item;
763  item.mean_x1 = aped.mean_x1;
764  item.rms_x1 = aped.rms_x1;
765  item.mean_x6 = aped.mean_x6;
766  item.rms_x6 = aped.rms_x6;
767  item.mean_x12 = aped.mean_x12;
768  item.rms_x12 = aped.rms_x12;
769  peds->insert(std::make_pair(ebdetid.rawId(),item));
770  }
771  }
772  }
773  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
774  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
775  // make an EEDetId since we need EEDetId::rawId() to be used as the key for the pedestals
776  if (EEDetId::validDetId(iX,iY,1)) {
777  EEDetId eedetidpos(iX,iY,1);
778  EcalPedestals::const_iterator it = ped_db->find(eedetidpos.rawId());
779  EcalPedestals::Item aped = (*it);
780  // here I copy the last valid value in the peds object
781  EcalPedestals::Item item;
782  item.mean_x1 = aped.mean_x1;
783  item.rms_x1 = aped.rms_x1;
784  item.mean_x6 = aped.mean_x6;
785  item.rms_x6 = aped.rms_x6;
786  item.mean_x12 = aped.mean_x12;
787  item.rms_x12 = aped.rms_x12;
788  peds->insert(std::make_pair(eedetidpos.rawId(),item));
789  }
790  if(EEDetId::validDetId(iX,iY,-1)) {
791  EEDetId eedetidneg(iX,iY,-1);
792  EcalPedestals::const_iterator it = ped_db->find(eedetidneg.rawId());
793  EcalPedestals::Item aped = (*it);
794  // here I copy the last valid value in the peds object
795  EcalPedestals::Item item;
796  item.mean_x1 = aped.mean_x1;
797  item.rms_x1 = aped.rms_x1;
798  item.mean_x6 = aped.mean_x6;
799  item.rms_x6 = aped.rms_x6;
800  item.mean_x12 = aped.mean_x12;
801  item.rms_x12 = aped.rms_x12;
802  peds->insert(std::make_pair(eedetidneg.rawId(),item));
803  }
804  }
805  }
806 
807  std::cout << " reading the input file " << m_filename << std::endl;
808  std::ifstream fInput;
809  fInput.open(m_filename);
810  if(!fInput.is_open()) {
811  std::cout << "ERROR : cannot open file " << m_filename << std::endl;
812  exit (1);
813  }
814  // string pos, dummyLine;
815  int hashedId;
816  float EBmean12[kEBChannels], EBrms12[kEBChannels], EBmean6[kEBChannels], EBrms6[kEBChannels], EBmean1[kEBChannels], EBrms1[kEBChannels];
817  //***************** barrel
818  // getline(fInput, dummyLine); // skip first line
819  for (int iChannel = 0; iChannel < kEBChannels; iChannel++) {
820  fInput >> hashedId >> EBmean12[iChannel] >> EBrms12[iChannel] >> EBmean6[iChannel] >> EBrms6[iChannel]
821  >> EBmean1[iChannel] >> EBrms1[iChannel];
822  if(hashedId != iChannel + 1) {
823  std::cout << m_filename << " strange hash " << hashedId << " while iChannel " << iChannel << std::endl;
824  exit(-1);
825  }
826  }
827 
828  // ***************** now EE *****************
829  float EEmean12[kEEChannels], EErms12[kEEChannels], EEmean6[kEEChannels], EErms6[kEEChannels], EEmean1[kEEChannels], EErms1[kEEChannels];
830  for (int iChannel = 0; iChannel < kEEChannels; iChannel++) {
831  fInput >> hashedId >> EEmean12[iChannel] >> EErms12[iChannel] >> EEmean6[iChannel] >> EErms6[iChannel]
832  >> EEmean1[iChannel] >> EErms1[iChannel];
833  if(hashedId != iChannel + kEBChannels + 1) {
834  std::cout << m_filename << " strange hash " << hashedId << " while iChannel " << iChannel << std::endl;
835  exit(-1);
836  }
837  }
838  fInput.close();
839 
840  EcalPedestals* ped = new EcalPedestals();
841  // barrel
842  for(int iEta=-EBDetId::MAX_IETA; iEta<=EBDetId::MAX_IETA ;++iEta) {
843  if(iEta==0) continue;
844  for(int iPhi=EBDetId::MIN_IPHI; iPhi<=EBDetId::MAX_IPHI; ++iPhi) {
845  if (EBDetId::validDetId(iEta,iPhi)) {
846  EBDetId ebdetid(iEta,iPhi);
847  unsigned int hieb = ebdetid.hashedIndex();
848  EcalPedestals::Item item;
849  EcalPedestals::Item previous_ped = peds->barrel(hieb);
850  if(debug & (EBmean12[hieb] == -999. || EBrms12[hieb] == -999. || EBmean6[hieb] == -999. || EBrms6[hieb] == -999. ||
851  EBmean1[hieb] == -999. || EBrms1[hieb] == -999.))
852  std::cout << " bad EB channel eta " << iEta << " phi " << iPhi << " " << EBmean12[hieb] << " " << EBrms12[hieb]
853  << " " << EBmean6[hieb] << " " << EBrms6[hieb] << " " << EBmean1[hieb] << " " << EBrms1[hieb] << std::endl;
854  if(EBmean1[hieb] != -999.) item.mean_x1 = EBmean1[hieb];
855  else item.mean_x1 = previous_ped.mean_x1;
856  if(EBrms1[hieb] != -999.) item.rms_x1 = EBrms1[hieb];
857  else item.rms_x1 = previous_ped.rms_x1;
858  if(EBmean6[hieb] != -999.) item.mean_x6 = EBmean6[hieb];
859  else item.mean_x6 = previous_ped.mean_x6;
860  if(EBrms6[hieb] != -999.) item.rms_x6 = EBrms6[hieb];
861  else item.rms_x6 = previous_ped.rms_x6;
862  if(EBmean12[hieb] != -999.) item.mean_x12 = EBmean12[hieb];
863  else item.mean_x12 = previous_ped.mean_x12;
864  if(EBrms12[hieb] != -999.) item.rms_x12 = EBrms12[hieb];
865  else item.rms_x12 = previous_ped.rms_x12;
866  ped->insert(std::make_pair(ebdetid.rawId(),item));
867  } // valid EBId
868  } // loop over phi
869  } // loop over eta
870  // endcaps
871  // std::ofstream fout;
872  // fout.open("Pedestal.check");
873  for(int iz = -1; iz < 2; iz = iz + 2) { // z : -1 and +1
874  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
875  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
876  if (EEDetId::validDetId(iX, iY, iz)) {
877  EEDetId eedetid(iX, iY, iz);
878  unsigned int hiee = eedetid.hashedIndex();
879  // fout << hiee << " mean 12 " << EEmean12[hiee] << std::endl;
880  EcalPedestals::Item item;
881  EcalPedestals::Item previous_ped= peds->endcap(hiee);
882  if(debug & (EEmean12[hiee] == -999. || EErms12[hiee] == -999. || EEmean6[hiee] == -999. || EErms6[hiee] == -999. ||
883  EEmean1[hiee] == -999. || EErms1[hiee] == -999.))
884  std::cout << " bad EE channel x " << iX << " y " << iY << " z" << iz << " " << EEmean12[hiee] << " " << EErms12[hiee]
885  << " " <<EEmean6[hiee] << " " << EErms6[hiee] << " " << EEmean1[hiee] << " " << EErms1[hiee] << std::endl;
886  if(EEmean1[hiee] != -999.) item.mean_x1 = EEmean1[hiee];
887  else item.mean_x1 = previous_ped.mean_x1;
888  if(EErms1[hiee] != -999.) item.rms_x1 = EErms1[hiee];
889  else item.rms_x1 = previous_ped.rms_x1;
890  if(EEmean6[hiee] != -999.) item.mean_x6 = EEmean6[hiee];
891  else item.mean_x6 = previous_ped.mean_x6;
892  if(EErms6[hiee] != -999.) item.rms_x6 = EErms6[hiee];
893  else item.rms_x6 = previous_ped.rms_x6;
894  if(EEmean12[hiee] != -999.) item.mean_x12 = EEmean12[hiee];
895  else item.mean_x12 = previous_ped.mean_x12;
896  if(EErms12[hiee] != -999.) item.rms_x12 = EErms12[hiee];
897  else item.rms_x12 = previous_ped.rms_x12;
898  ped->insert(std::make_pair(eedetid.rawId(),item));
899  } // val EEId
900  } // loop over y
901  } // loop over x
902  } // loop over z
903  // fout.close();
904 
905  unsigned int irun = m_firstRun;
906  Time_t snc= (Time_t) irun ;
907  m_to_transfer.push_back(std::make_pair((EcalPedestals*)ped,snc));
908 
909  std::cout << "Ecal - > end of readPedestalFile -----------\n";
910 }
const Int_t kEBChannels
static const int MIN_IPHI
Definition: EBDetId.h:142
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
const Int_t kEEChannels
static const int ETAPHIMODE
Definition: EBDetId.h:166
void insert(std::pair< uint32_t, Item > const &a)
static const int IX_MAX
Definition: EEDetId.h:302
EcalPedestalsMap EcalPedestals
Definition: EcalPedestals.h:53
#define debug
Definition: HDRShower.cc:19
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
std::vector< Item >::const_iterator const_iterator
static const int MAX_IETA
Definition: EBDetId.h:143
static const int IY_MAX
Definition: EEDetId.h:306
const Item & barrel(size_t hashedIndex) const
const Item & endcap(size_t hashedIndex) const
void popcon::EcalPedestalsHandler::readPedestalFile ( )

Definition at line 660 of file EcalPedestalsHandler.cc.

References gather_cfg::cout, cmsRelvalreport::exit, EBDetId::hashedIndex(), EEDetId::hashedIndex(), EcalCondObjectContainer< T >::insert(), EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, kEBChannels, kEEChannels, m_filename, m_firstRun, popcon::PopConSourceHandler< EcalPedestals >::m_to_transfer, EBDetId::MAX_IETA, EBDetId::MAX_IPHI, EcalPedestal::mean_x1, EcalPedestal::mean_x12, EcalPedestal::mean_x6, EBDetId::MIN_IPHI, DetId::rawId(), EcalPedestal::rms_x1, EcalPedestal::rms_x12, EcalPedestal::rms_x6, EBDetId::validDetId(), and EEDetId::validDetId().

Referenced by getNewObjects().

660  {
661  std::cout << " reading the input file " << m_filename << std::endl;
662  std::ifstream fInput;
663  fInput.open(m_filename);
664  if(!fInput.is_open()) {
665  std::cout << "ERROR : cannot open file " << m_filename << std::endl;
666  exit (1);
667  }
668  // string pos, dummyLine;
669  int hashedId;
670  float EBmean12[kEBChannels], EBrms12[kEBChannels], EBmean6[kEBChannels], EBrms6[kEBChannels], EBmean1[kEBChannels], EBrms1[kEBChannels];
671  //***************** barrel
672  // getline(fInput, dummyLine); // skip first line
673  for (int iChannel = 0; iChannel < kEBChannels; iChannel++) {
674  fInput >> hashedId >> EBmean12[iChannel] >> EBrms12[iChannel] >> EBmean6[iChannel] >> EBrms6[iChannel]
675  >> EBmean1[iChannel] >> EBrms1[iChannel];
676  if(hashedId != iChannel + 1) {
677  std::cout << m_filename << " strange hash " << hashedId << " while iChannel " << iChannel << std::endl;
678  exit(-1);
679  }
680  }
681 
682  // ***************** now EE *****************
683  float EEmean12[kEEChannels], EErms12[kEEChannels], EEmean6[kEEChannels], EErms6[kEEChannels], EEmean1[kEEChannels], EErms1[kEEChannels];
684  for (int iChannel = 0; iChannel < kEEChannels; iChannel++) {
685  fInput >> hashedId >> EEmean12[iChannel] >> EErms12[iChannel] >> EEmean6[iChannel] >> EErms6[iChannel]
686  >> EEmean1[iChannel] >> EErms1[iChannel];
687  if(hashedId != iChannel + kEBChannels + 1) {
688  std::cout << m_filename << " strange hash " << hashedId << " while iChannel " << iChannel << std::endl;
689  exit(-1);
690  }
691  }
692  fInput.close();
693 
694  EcalPedestals* ped = new EcalPedestals();
695  // barrel
696  for(int iEta=-EBDetId::MAX_IETA; iEta<=EBDetId::MAX_IETA ;++iEta) {
697  if(iEta==0) continue;
698  for(int iPhi=EBDetId::MIN_IPHI; iPhi<=EBDetId::MAX_IPHI; ++iPhi) {
699  if (EBDetId::validDetId(iEta,iPhi)) {
700  EBDetId ebdetid(iEta,iPhi);
701  unsigned int hieb = ebdetid.hashedIndex();
702  EcalPedestals::Item item;
703  item.mean_x1 = EBmean1[hieb];
704  item.rms_x1 = EBrms1[hieb];
705  item.mean_x6 = EBmean6[hieb];
706  item.rms_x6 = EBrms6[hieb];
707  item.mean_x12 = EBmean12[hieb];
708  item.rms_x12 = EBrms12[hieb];
709  ped->insert(std::make_pair(ebdetid.rawId(),item));
710  } // valid EBId
711  } // loop over phi
712  } // loop over eta
713  // endcaps
714  // std::ofstream fout;
715  // fout.open("Pedestal.check");
716  for(int iz = -1; iz < 2; iz = iz + 2) { // z : -1 and +1
717  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
718  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
719  if (EEDetId::validDetId(iX, iY, iz)) {
720  EEDetId eedetid(iX, iY, iz);
721  unsigned int hiee = eedetid.hashedIndex();
722  // fout << hiee << " mean 12 " << EEmean12[hiee] << std::endl;
723  EcalPedestals::Item item;
724  item.mean_x1 = EEmean1[hiee];
725  item.rms_x1 = EErms1[hiee];
726  item.mean_x6 = EEmean6[hiee];
727  item.rms_x6 = EErms6[hiee];
728  item.mean_x12 = EEmean12[hiee];
729  item.rms_x12 = EErms12[hiee];
730  ped->insert(std::make_pair(eedetid.rawId(),item));
731  } // val EEId
732  } // loop over y
733  } // loop over x
734  } // loop over z
735  // fout.close();
736 
737  unsigned int irun = m_firstRun;
738  Time_t snc= (Time_t) irun ;
739  m_to_transfer.push_back(std::make_pair((EcalPedestals*)ped,snc));
740 
741  std::cout << "Ecal - > end of readPedestalFile -----------\n";
742 }
const Int_t kEBChannels
static const int MIN_IPHI
Definition: EBDetId.h:142
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
static bool validDetId(int i, int j)
check if a valid index combination
Definition: EBDetId.h:124
const Int_t kEEChannels
void insert(std::pair< uint32_t, Item > const &a)
static const int IX_MAX
Definition: EEDetId.h:302
EcalPedestalsMap EcalPedestals
Definition: EcalPedestals.h:53
static const int MAX_IPHI
Definition: EBDetId.h:144
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
static const int IY_MAX
Definition: EEDetId.h:306
void popcon::EcalPedestalsHandler::readPedestalTimestamp ( )

Definition at line 1250 of file EcalPedestalsHandler.cc.

References funct::abs(), officialStyle::chan, gather_cfg::cout, debug, mps_splice::entry, cmsRelvalreport::exit, groupFilesInBlocks::fout, mps_fire::i, id(), EcalCondObjectContainer< T >::insert(), createfilelist::int, kChannels, kEBChannels, kEEChannels, csvLumiCalc::lumi, m_filename, m_firstRun, popcon::PopConSourceHandler< EcalPedestals >::m_to_transfer, EcalPedestal::mean_x1, EcalPedestal::mean_x12, EcalPedestal::mean_x6, Nbpedxml, muonCSCDigis_cfi::pedestal, diffTwoXMLs::r1, DetId::rawId(), EcalPedestal::rms_x1, EcalPedestal::rms_x12, EcalPedestal::rms_x6, findQualityFiles::run, AlCaHLTBitMon_QueryRunRegistry::string, ntuplemaker::time, EBDetId::unhashIndex(), and EEDetId::unhashIndex().

Referenced by getNewObjects().

1250  {
1251  bool debug = false;
1252  std::cout << " reading the root file " << m_filename << std::endl;
1253  TFile * hfile = new TFile(m_filename.c_str());
1254 
1255  TTree *treeChan = (TTree*)hfile->Get("PedChan");
1256  int iChannel = 0, ix = 0, iy = 0, iz = 0;
1257  treeChan->SetBranchAddress("Channels", &iChannel);
1258  treeChan->SetBranchAddress("x", &ix);
1259  treeChan->SetBranchAddress("y", &iy);
1260  treeChan->SetBranchAddress("z", &iz);
1261  int neventsChan = (int)treeChan->GetEntries();
1262  std::cout << "PedChan nb entries " << neventsChan << std::endl;
1263  int ringEB[kEBChannels], sideEB[kEBChannels], ixEE[kEEChannels], iyEE[kEEChannels], izEE[kEEChannels];
1264  for(int entry = 0; entry < neventsChan; entry++) {
1265  treeChan->GetEntry(entry);
1266  if(entry < kEBChannels) {
1267  ringEB[iChannel] = (abs(ix) -1)/5; // -85...-1, 1...85 give 0...16
1268  sideEB[iChannel] = 1;
1269  if(ix < 0) sideEB[iChannel] = 0;
1270  if(debug && entry%10000 == 0) std::cout << " EB channel " << iChannel << " eta " << ix << " phi " << iy
1271  << " side " << sideEB[iChannel] << " ring " << ringEB[iChannel] << std::endl;
1272  }
1273  else {
1274  ixEE[iChannel] = ix;
1275  iyEE[iChannel] = iy;
1276  izEE[iChannel] = iz;
1277  if(debug && entry%1000 == 0) std::cout << " EE channel " << iChannel << " x " << ixEE[iChannel] << " y "
1278  << iyEE[iChannel] << " z " << izEE[iChannel] << std::endl;
1279  }
1280  }
1281  /* 2016
1282  int Nbpedxml = 26;
1283  Int_t pedxml[Nbpedxml] = {271948, 273634, 273931, 274705, 275403, 276108, 276510, 277169, 278123, 278183,
1284  278246, 278389, 278499, 278693, 278858, 278888, 278931, 279728, 280129, 280263,
1285  280941, 281753, 282631, 282833, 283199, 283766};
1286  */
1287  // int Nbpedxml = 17;
1288  Int_t pedxml[Nbpedxml] = {286535, 293513, 293632, 293732, 295507, 295672, 296391, 296917, 297388, 298481,
1289  299279, 299710, 300186, 300581, 301191, 302006, 302293};
1290  Int_t run16Index = 0;
1291 
1292  Int_t fed[kChannels], chan[kChannels], id, run, run_type, seq_id, las_id, fill_num, run_num_infill, run_time, run_time_stablebeam, nxt, time[54];
1293  Float_t ped[kChannels], pedrms[kChannels], lumi, bfield;
1294  TTree *tree = (TTree*)hfile->Get("T");
1295  tree->Print();
1296  tree->SetBranchAddress("id", &id);
1297  tree->SetBranchAddress("run", &run);
1298  tree->SetBranchAddress("run_type", &run_type);
1299  tree->SetBranchAddress("seq_id", &seq_id);
1300  tree->SetBranchAddress("las_id", &las_id);
1301  tree->SetBranchAddress("fill_num", &fill_num);
1302  tree->SetBranchAddress("run_num_infill", &run_num_infill);
1303  tree->SetBranchAddress("run_time", &run_time);
1304  tree->SetBranchAddress("run_time_stablebeam", &run_time_stablebeam);
1305  tree->SetBranchAddress("lumi", &lumi);
1306  tree->SetBranchAddress("bfield", &bfield);
1307  tree->SetBranchAddress("nxt", &nxt); // nb of filled Crystals
1308  tree->SetBranchAddress("time", time);
1309  tree->SetBranchAddress("fed", fed);
1310  tree->SetBranchAddress("chan", chan);
1311  tree->SetBranchAddress("ped", ped);
1312  tree->SetBranchAddress("pedrms", pedrms);
1313  int nevents = (int)tree->GetEntries();
1314  std::cout << " nb entries " << nevents << std::endl;
1315  std::ofstream fout;
1316  fout.open("copyTimestampPedestals.txt");
1317  if(!fout.is_open()) {
1318  std::cout << "ERROR : cannot open file copyTimestampPedestals.txt" << std::endl;
1319  exit (1);
1320  }
1321  Double_t EAmean1[kChannels], EArms1[kChannels], EAmean6[kChannels], EArms6[kChannels], EAmean12[kChannels], EArms12[kChannels];
1322  for(int ich = 0; ich < kChannels; ich++) {
1323  EAmean12[ich] = 200.;
1324  EArms12[ich] = 0.;
1325  }
1326  tree->GetEntry(0);
1327  fout << " first run " << run << " fill " << fill_num << " B field " << bfield << " run type " << run_type << " seq_id " << seq_id
1328  << " las_id " << las_id << " run_num_infill " << run_num_infill << " lumi "<< lumi << " nb of Crystals " << nxt << std::endl;
1329  if(debug) {
1330  for(int ich = 0; ich < kChannels; ich++) {
1331  if(ped[ich] != 0.) {
1332  if(ich < kEBChannels)
1333  fout << " channel " << ich << " FED " << fed[ich] << " chan " << chan[ich] << " pedestal " << ped[ich] << " RMS " << pedrms[ich] << std::endl;
1334  else // EE
1335  fout << " channel " << ich << " EE channel " << ich - kEBChannels << " FED " << fed[ich] << " chan " << chan[ich]
1336  << " pedestal " << ped[ich] << " RMS " << pedrms[ich] << std::endl;
1337  }
1338  }
1339  } // debug
1340 
1341  int runold = -1, fillold = -1, firsttimeFEDold = -1;
1342  int firsttimeFED = -1;
1343  bool firstSeqAfterStable = false;
1344  int transfer = 0;
1345  int first_run_kept = (int)m_firstRun; // m_firstRun is unsigned!
1346  for(int entry = 0; entry < nevents; entry++) {
1347  tree->GetEntry(entry);
1348  if(nxt != kChannels) {
1349  // fout << " entry " << entry << " run " << run << " sequence " << seq_id << " run_time " << run_time
1350  fout << " entry " << entry << " run " << run << " sequence " << seq_id // run_time always 0!
1351  << " *********** Number of channels " << nxt;
1352  // if(seq_id == 0) { corrected Sep 15 2017
1353  fout << " rejected" << std::endl;
1354  continue;
1355  // }
1356  // else fout << std::endl;
1357  }
1358  if(las_id != 447) {
1359  fout << " entry " << entry << " run " << run << " sequence " << seq_id
1360  << " *********** laser wave length = " << las_id << std::endl;
1361  continue;
1362  }
1363  if(bfield < 3.79) {
1364  // fout << " entry " << entry << " run " << run << " sequence " << seq_id << " run_time " << run_time
1365  fout << " entry " << entry << " run " << run << " sequence " << seq_id
1366  << " *********** bfield = " << bfield << std::endl;
1367  // continue; keep these runs
1368  }
1369  fout << " entry "<< entry << " run " << run << " sequence " << seq_id;
1370  if(run_type == 1) {
1371  fout << " stable " << run_time_stablebeam;
1372  if(run_time_stablebeam < first_run_kept) {
1373  fout << " before first wanted " << m_firstRun << std::endl;
1374  continue;
1375  }
1376  }
1377  firsttimeFED = time[0];
1378  for(int ifed = 0; ifed < 54; ifed++) {
1379  // fout << " " << time[ifed];
1380  if(time[ifed] > firsttimeFEDold && firsttimeFED < time[ifed]) firsttimeFED = time[ifed]; // take the first AFTER the previous sequence one!...
1381  }
1382  if(firsttimeFED < first_run_kept) {
1383  fout << " time " << firsttimeFED << " before first wanted " << m_firstRun << std::endl;
1384  continue;
1385  }
1386  fout << " time " << firsttimeFED << std::endl;
1387  if(firsttimeFED <= firsttimeFEDold) {
1388  std::cout << " Problem finding the IOV : old one " << firsttimeFEDold << " new one " << firsttimeFED << std::endl;
1389  for(int ifed = 0; ifed < 54; ifed++)
1390  std::cout << " " << time[ifed];
1391  std::cout << std::endl << " ignore this entry " << std::endl;
1392  continue;
1393  }
1394  firsttimeFEDold = firsttimeFED;
1395 
1396  // if(run != runold) firstSeqAfterStable = false;
1397  if(fill_num != fillold) firstSeqAfterStable = false;
1398  if(run_type == 1) {
1399  if(run_time_stablebeam > 0) {
1400  if(firsttimeFED > run_time_stablebeam) {
1401  if(!firstSeqAfterStable) {
1402  firstSeqAfterStable = true;
1403  firsttimeFED = run_time_stablebeam;
1404  fout << " first sequence after stable; change the IOV " << firsttimeFED << std::endl;
1405  }
1406  }
1407  }
1408  else // problem with run_time_stablebeam
1409  fout << " *** entry " << entry << " run_time_stablebeam " << run_time_stablebeam << std::endl;
1410  } // only collision runs
1411 
1412  for(int ich = 0; ich < kChannels; ich++) {
1413  if(ped[ich] < 300 && ped[ich] > 100) {
1414  EAmean12[ich] = ped[ich];
1415  EArms12[ich] = pedrms[ich];
1416  }
1417  }
1418  // get gain 1 and 6 results
1419  bool foundNew = false;
1420  if(run != runold) {
1421  for(int i = run16Index; i < Nbpedxml; i++) {
1422  if(run > pedxml[i]) {
1423  fout << " found a new gain 1, 6 file " << pedxml[i] << " at index " << i << std::endl;
1424  run16Index++;
1425  foundNew = true;
1426  // if(runold < pedxml[i + 1]) break; why runold??
1427  if(run < pedxml[i + 1]) break;
1428  }
1429  }
1430  if(foundNew) {
1431  int Indexxml = run16Index -1;
1432  fout << " opening Pedestals_" << pedxml[Indexxml] << ".xml at index " << Indexxml << std::endl;
1433  std::ifstream fxml;
1434  fxml.open(Form("Pedestals_%i.xml",pedxml[Indexxml]));
1435  if(!fxml.is_open()) {
1436  std::cout << "ERROR : cannot open file Pedestals_" << pedxml[Indexxml] << ".xml" << std::endl;
1437  exit (1);
1438  }
1439  std::string dummyLine, mean12, rms12, bid;
1440  for(int i = 0; i < 9; i++) std::getline(fxml, dummyLine); // skip first lines
1441  // Barrel
1442  for (int iEBChannel = 0; iEBChannel < kEBChannels; iEBChannel++) {
1443  fxml >> mean12 >> rms12 >> bid;
1444  std::string stt = bid.substr(9,15);
1445  std::istringstream m6(stt);
1446  m6 >> EAmean6[iEBChannel];
1447  fxml >> bid;
1448  stt = bid.substr(8,15);
1449  std::istringstream r6(stt);
1450  r6 >> EArms6[iEBChannel];
1451  fxml >> bid;
1452  stt = bid.substr(9,15);
1453  std::istringstream m1(stt);
1454  m1 >> EAmean1[iEBChannel];
1455  fxml >> bid;
1456  stt = bid.substr(8,15);
1457  std::istringstream r1(stt);
1458  r1 >> EArms1[iEBChannel];
1459  if(debug && iEBChannel%10000 == 0) fout << " EB channel " << iEBChannel << " " << mean12 << " " << rms12
1460  << " " << EAmean6[iEBChannel] << " " << EArms6[iEBChannel]
1461  << " " << EAmean1[iEBChannel] << " " << EArms1[iEBChannel] << std::endl;
1462  for(int i = 0; i < 3; i++) std::getline(fxml, dummyLine); // skip lines
1463  }
1464  for(int i = 0; i < 6; i++) std::getline(fxml, dummyLine); // skip lines
1465  for (int iEEChannel = 0; iEEChannel < kEEChannels; iEEChannel++) {
1466  int ich = iEEChannel + kEBChannels;
1467  fxml >> mean12 >> rms12 >> bid;
1468  std::string stt = bid.substr(9,15);
1469  std::istringstream m6(stt);
1470  m6 >> EAmean6[ich];
1471  fxml >> bid;
1472  stt = bid.substr(8,15);
1473  std::istringstream r6(stt);
1474  r6 >> EArms6[ich];
1475  fxml >> bid;
1476  stt = bid.substr(9,15);
1477  std::istringstream m1(stt);
1478  m1 >> EAmean1[ich];
1479  fxml >> bid;
1480  stt = bid.substr(8,15);
1481  std::istringstream r1(stt);
1482  r1 >> EArms1[ich];
1483  if(debug && iEEChannel%1000 == 0) fout << " EE channel " << iEEChannel << " " << mean12 << " " << rms12
1484  << " " << EAmean6[ich] << " " << EArms6[ich]
1485  << " " << EAmean1[ich] << " " << EArms1[ich] << std::endl;
1486  for(int i = 0; i < 3; i++) std::getline(fxml, dummyLine); // skip lines
1487  }
1488  fxml.close();
1489  } // found a new gain 1 6 file
1490  } // check gain 1 and 6 results only for new runs
1491 
1493  EcalPedestals::Item item;
1494  for(int ich = 0; ich < kChannels; ich++) {
1495  if(debug && ich%10000 == 0) fout << " channel " << ich << " ped " << EAmean12[ich] << " RMS " << EArms12[ich] << std::endl;
1496  //
1497  item.mean_x1 = EAmean1[ich];
1498  item.rms_x1 = EArms1[ich];
1499  item.mean_x6 = EAmean6[ich];
1500  item.rms_x6 = EArms6[ich];
1501  item.mean_x12 = EAmean12[ich];
1502  item.rms_x12 = EArms12[ich];
1503  if(ich < kEBChannels) {
1504  // EBDetId ebdetid(fed, chan, EBDetId::SMCRYSTALMODE);
1505  EBDetId ebdetid = EBDetId::unhashIndex(ich);
1506  pedestal->insert(std::make_pair(ebdetid.rawId(),item));
1507  }
1508  else {
1509  // EEDetId eedetid(iX, iY, iz);
1510  int iChannel = ich - kEBChannels;
1511  EEDetId eedetid = EEDetId::unhashIndex(iChannel);
1512  pedestal->insert(std::make_pair(eedetid.rawId(),item));
1513  }
1514  } // end loop over all channels
1515  uint64_t iov = (uint64_t)firsttimeFED << 32;
1516  Time_t snc = (Time_t) iov;
1517  transfer++;
1518  fout << " entry " << entry << " transfer " << transfer << " iov " << iov << std::endl;
1519  m_to_transfer.push_back(std::make_pair((EcalPedestals*)pedestal, snc)); // time based IOV
1520  fout << " m_to_transfer " << firsttimeFED << std::endl;
1521  runold = run;
1522  fillold = fill_num;
1523  } // end loop over all entries
1524 
1525  std::cout << "Ecal - > end of readPedestalTimestamp -----------\n";
1526 }
const Int_t kEBChannels
std::string id() const override
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:99
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
const Int_t kEEChannels
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void insert(std::pair< uint32_t, Item > const &a)
EcalPedestalsMap EcalPedestals
Definition: EcalPedestals.h:53
#define debug
Definition: HDRShower.cc:19
unsigned long long uint64_t
Definition: Time.h:15
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:114
const Int_t Nbpedxml
Definition: tree.py:1
const Int_t kChannels
void popcon::EcalPedestalsHandler::readPedestalTree ( )

Definition at line 912 of file EcalPedestalsHandler.cc.

References funct::abs(), officialStyle::chan, gather_cfg::cout, mps_splice::entry, cmsRelvalreport::exit, groupFilesInBlocks::fout, mps_fire::i, id(), EcalCondObjectContainer< T >::insert(), createfilelist::int, kChannels, kEBChannels, kEEChannels, csvLumiCalc::lumi, m_filename, m_firstRun, m_runtype, popcon::PopConSourceHandler< EcalPedestals >::m_to_transfer, EcalPedestal::mean_x1, EcalPedestal::mean_x12, EcalPedestal::mean_x6, Nbpedxml, muonCSCDigis_cfi::pedestal, diffTwoXMLs::r1, DetId::rawId(), EcalPedestal::rms_x1, EcalPedestal::rms_x12, EcalPedestal::rms_x6, findQualityFiles::run, AlCaHLTBitMon_QueryRunRegistry::string, ntuplemaker::time, EBDetId::unhashIndex(), and EEDetId::unhashIndex().

Referenced by getNewObjects().

912  {
913  std::cout << " reading the root file " << m_filename << std::endl;
914  TFile * hfile = new TFile(m_filename.c_str());
915 
916  TTree *treeChan = (TTree*)hfile->Get("PedChan");
917  int iChannel = 0, ix = 0, iy = 0, iz = 0;
918  treeChan->SetBranchAddress("Channels", &iChannel);
919  treeChan->SetBranchAddress("x", &ix);
920  treeChan->SetBranchAddress("y", &iy);
921  treeChan->SetBranchAddress("z", &iz);
922  int neventsChan = (int)treeChan->GetEntries();
923  std::cout << "PedChan nb entries " << neventsChan << std::endl;
924  int ringEB[kEBChannels], sideEB[kEBChannels], ixEE[kEEChannels], iyEE[kEEChannels], izEE[kEEChannels];
925  for(int entry = 0; entry < neventsChan; entry++) {
926  treeChan->GetEntry(entry);
927  if(entry < kEBChannels) {
928  ringEB[iChannel] = (abs(ix) -1)/5; // -85...-1, 1...85 give 0...16
929  sideEB[iChannel] = 1;
930  if(ix < 0) sideEB[iChannel] = 0;
931  if(entry%10000 == 0) std::cout << " EB channel " << iChannel << " eta " << ix << " phi " << iy
932  << " side " << sideEB[iChannel] << " ring " << ringEB[iChannel] << std::endl;
933  }
934  else {
935  ixEE[iChannel] = ix;
936  iyEE[iChannel] = iy;
937  izEE[iChannel] = iz;
938  if(entry%1000 == 0) std::cout << " EE channel " << iChannel << " x " << ixEE[iChannel] << " y " << iyEE[iChannel] << " z " << izEE[iChannel] << std::endl;
939  }
940  }
941  /* 2016
942  int Nbpedxml = 26;
943  Int_t pedxml[Nbpedxml] = {271948, 273634, 273931, 274705, 275403, 276108, 276510, 277169, 278123, 278183,
944  278246, 278389, 278499, 278693, 278858, 278888, 278931, 279728, 280129, 280263,
945  280941, 281753, 282631, 282833, 283199, 283766};
946  */
947  // int Nbpedxml = 17;
948  Int_t pedxml[Nbpedxml] = {286535, 293513, 293632, 293732, 295507, 295672, 296391, 296917, 297388, 298481,
949  299279, 299710, 300186, 300581, 301191, 302006, 302293};
950  Int_t run16Index = 0;
951 
952  Int_t fed[kChannels], chan[kChannels], id, run, run_type, seq_id, las_id, fill_num, run_num_infill, run_time, run_time_stablebeam, nxt, time[54];
953  Float_t ped[kChannels], pedrms[kChannels], lumi, bfield;
954  TTree *tree = (TTree*)hfile->Get("T");
955  tree->Print();
956  tree->SetBranchAddress("id", &id);
957  tree->SetBranchAddress("run", &run);
958  tree->SetBranchAddress("run_type", &run_type);
959  tree->SetBranchAddress("seq_id", &seq_id);
960  tree->SetBranchAddress("las_id", &las_id);
961  tree->SetBranchAddress("fill_num", &fill_num);
962  tree->SetBranchAddress("run_num_infill", &run_num_infill);
963  tree->SetBranchAddress("run_time", &run_time);
964  tree->SetBranchAddress("run_time_stablebeam", &run_time_stablebeam);
965  tree->SetBranchAddress("lumi", &lumi);
966  tree->SetBranchAddress("bfield", &bfield);
967  tree->SetBranchAddress("nxt", &nxt); // nb of filled Crystals
968  tree->SetBranchAddress("time", time);
969  tree->SetBranchAddress("fed", fed);
970  tree->SetBranchAddress("chan", chan);
971  tree->SetBranchAddress("ped", ped);
972  tree->SetBranchAddress("pedrms", pedrms);
973  int nevents = (int)tree->GetEntries();
974  std::cout << " nb entries " << nevents << std::endl;
975  std::ofstream fout;
976  fout.open("copyTreePedestals.txt");
977  if(!fout.is_open()) {
978  std::cout << "ERROR : cannot open file copyTreePedestals.txt" << std::endl;
979  exit (1);
980  }
981  Double_t EAmean1[kChannels], EArms1[kChannels], EAmean6[kChannels], EArms6[kChannels], EAmean12[kChannels], EArms12[kChannels];
982  Int_t RunEntry = 0, EAentry[kChannels];
983  for(int ich = 0; ich < kChannels; ich++) {
984  EAmean12[ich] = 0;
985  EArms12[ich] = 0;
986  EAentry[ich] = 0;
987  }
988  tree->GetEntry(0);
989  fout << " first run " << run << " fill " << fill_num << " B field " << bfield << " run type " << run_type << " seq_id " << seq_id
990  << " las_id " << las_id << " run_num_infill " << run_num_infill << " lumi "<< lumi << " nb of Crystals " << nxt << std::endl;
991  for(int ich = 0; ich < kChannels; ich++) {
992  if(ped[ich] != 0.) {
993  if(ich < kEBChannels)
994  fout << " channel " << ich << " FED " << fed[ich] << " chan " << chan[ich] << " pedestal " << ped[ich] << " RMS " << pedrms[ich] << std::endl;
995  else // EE
996  fout << " channel " << ich << " EE channel " << ich - kEBChannels << " FED " << fed[ich] << " chan " << chan[ich]
997  << " pedestal " << ped[ich] << " RMS " << pedrms[ich] << std::endl;
998  }
999  }
1000 
1001  int run_type_kept = m_runtype; // 1 collision 2 cosmics 3 circulating 4 test
1002  int first_run_kept = (int)m_firstRun; // m_firstRun is unsigned!
1003  int runold = run;
1004  int firsttimeFED = -1;
1005  // int timeold = -1;
1006  for(int entry = 0; entry < nevents; entry++) {
1007  tree->GetEntry(entry);
1008  if(run < first_run_kept) {
1009  fout << " entry " << entry << " run " << run << " sequence " << seq_id << " run_time " << run_time
1010  << " before first wanted " << m_firstRun << std::endl;
1011  runold = run;
1012  continue;
1013  }
1014  if(run_type != run_type_kept) {
1015  fout << " entry " << entry << " run " << run << " sequence " << seq_id << " run_time " << run_time
1016  << " run type " << run_type << std::endl;
1017  continue; // use only wanted type runs
1018  }
1019  if(nxt != kChannels) {
1020  fout << " entry " << entry << " run " << run << " sequence " << seq_id << " run_time " << run_time
1021  << " *********** Number of channels " << nxt << std::endl;
1022  continue;
1023  }
1024  if(bfield < 3.79) {
1025  fout << " entry " << entry << " run " << run << " sequence " << seq_id << " run_time " << run_time
1026  << " *********** bfield = " << bfield << std::endl;
1027  // continue; keep these runs
1028  }
1029  if(run_type_kept == 1) { // for collision runs, keep only sequences after stable beam
1030  int time_seq = 0;
1031  for(int ifed = 0; ifed < 54; ifed++) {
1032  if(time[ifed] < run_time_stablebeam) {
1033  if(time_seq == 0)
1034  fout << " entry " << entry << " run " << run << " sequence " << seq_id << " run_time " << run_time
1035  << " *********** sequence before stable beam at " << run_time_stablebeam << " FED " << ifed << " : " << time[ifed];
1036  else
1037  fout << " FED " << ifed << " : " << time[ifed];
1038  time_seq++;
1039  }
1040  }
1041  if(time_seq != 0) {
1042  fout << " total nb " << time_seq << std::endl;
1043  continue;
1044  }
1045  } // only collision runs
1046  // if(idtime != timeold) {
1047  // std::cout << " entry "<< entry << " run " << run << " time " << idtime << " run type " << run_type << std::endl;
1048  // timeold = idtime;
1049  // }
1050  if(run == runold) {
1051  RunEntry++;
1052  for(int ich = 0; ich < kChannels; ich++) {
1053  if(ped[ich] < 300 && ped[ich] > 100) {
1054  EAmean12[ich] += ped[ich];
1055  EArms12[ich] += pedrms[ich];
1056  EAentry[ich]++;
1057  }
1058  }
1059  }
1060  else {
1061  // new run. Write the previous one
1062  // std::cout << " entry "<< entry << " fill " << fill_num << " run " << runold << " nb of events " << RunEntry
1063  // << " time " << run_time << " " << run_time_stablebeam << " " << time[0] << " run type " << run_type << std::endl;
1064  if(RunEntry == 0 || (run_type_kept == 2 && RunEntry < 6)) fout << " skiped run " << runold << " not enough entries : " << RunEntry << std::endl;
1065  else {
1066  fout << " entry "<< entry -1 << " run " << runold << " nb of events " << RunEntry;
1067  firsttimeFED = time[0];
1068  for(int ifed = 0; ifed < 54; ifed++) {
1069  fout << " " << time[ifed];
1070  if(firsttimeFED < time[ifed]) firsttimeFED = time[ifed];
1071  }
1072  fout << std::endl;
1073 
1074  // get gain 1 and 6 results
1075  bool foundNew = false;
1076  for(int i = run16Index; i < Nbpedxml; i++) {
1077  if(runold > pedxml[i]) {
1078  fout << " found a new gain 1, 6 file " << pedxml[i] << " at index " << i << std::endl;
1079  run16Index++;
1080  foundNew = true;
1081  if(runold < pedxml[i + 1]) break;
1082  }
1083  }
1084  if(foundNew) {
1085  int Indexxml = run16Index -1;
1086  fout << " opening Pedestals_" << pedxml[Indexxml] << ".xml at index " << Indexxml << std::endl;
1087  std::ifstream fxml;
1088  fxml.open(Form("Pedestals_%i.xml",pedxml[Indexxml]));
1089  if(!fxml.is_open()) {
1090  std::cout << "ERROR : cannot open file Pedestals_" << pedxml[Indexxml] << ".xml" << std::endl;
1091  exit (1);
1092  }
1093  std::string dummyLine, mean12, rms12, bid;
1094  for(int i = 0; i < 9; i++) std::getline(fxml, dummyLine); // skip first lines
1095  // Barrel
1096  for (int iEBChannel = 0; iEBChannel < kEBChannels; iEBChannel++) {
1097  fxml >> mean12 >> rms12 >> bid;
1098  // std::string stt = bid.std::substr(10,15);
1099  // istringstream ii(stt);
1100  // ii >> EBmean12[iEBChannel];
1101  // fxml >> bid;
1102  // stt = bid.substr(9,15);
1103  // istringstream r12(stt);
1104  // r12 >> EBrms12[iEBChannel];
1105  // fxml >> bid;
1106  std::string stt = bid.substr(9,15);
1107  std::istringstream m6(stt);
1108  m6 >> EAmean6[iEBChannel];
1109  fxml >> bid;
1110  stt = bid.substr(8,15);
1111  std::istringstream r6(stt);
1112  r6 >> EArms6[iEBChannel];
1113  fxml >> bid;
1114  stt = bid.substr(9,15);
1115  std::istringstream m1(stt);
1116  m1 >> EAmean1[iEBChannel];
1117  fxml >> bid;
1118  stt = bid.substr(8,15);
1119  std::istringstream r1(stt);
1120  r1 >> EArms1[iEBChannel];
1121  if(iEBChannel%10000 == 0) fout << " EB channel " << iEBChannel << " " << mean12 << " " << rms12
1122  << " " << EAmean6[iEBChannel] << " " << EArms6[iEBChannel]
1123  << " " << EAmean1[iEBChannel] << " " << EArms1[iEBChannel] << std::endl;
1124  for(int i = 0; i < 3; i++) std::getline(fxml, dummyLine); // skip lines
1125  }
1126  for(int i = 0; i < 6; i++) std::getline(fxml, dummyLine); // skip lines
1127  for (int iEEChannel = 0; iEEChannel < kEEChannels; iEEChannel++) {
1128  int ich = iEEChannel + kEBChannels;
1129  fxml >> mean12 >> rms12 >> bid;
1130  std::string stt = bid.substr(9,15);
1131  std::istringstream m6(stt);
1132  m6 >> EAmean6[ich];
1133  fxml >> bid;
1134  stt = bid.substr(8,15);
1135  std::istringstream r6(stt);
1136  r6 >> EArms6[ich];
1137  fxml >> bid;
1138  stt = bid.substr(9,15);
1139  std::istringstream m1(stt);
1140  m1 >> EAmean1[ich];
1141  fxml >> bid;
1142  stt = bid.substr(8,15);
1143  std::istringstream r1(stt);
1144  r1 >> EArms1[ich];
1145  if(iEEChannel%1000 == 0) fout << " EE channel " << iEEChannel << " " << mean12 << " " << rms12
1146  << " " << EAmean6[ich] << " " << EArms6[ich]
1147  << " " << EAmean1[ich] << " " << EArms1[ich] << std::endl;
1148  for(int i = 0; i < 3; i++) std::getline(fxml, dummyLine); // skip lines
1149  }
1150 
1151  fxml.close();
1152  }
1153  // end gain 1 and 6 results
1154 
1156  EcalPedestals::Item item;
1157  for(int ich = 0; ich < kChannels; ich++) {
1158  if(EAentry[ich] != 0) {
1159  EAmean12[ich] /= EAentry[ich];
1160  EArms12[ich] /= EAentry[ich];
1161  }
1162  else {
1163  EAmean12[ich] = 200.;
1164  EArms12[ich] = 0.;
1165  }
1166  if(ich%10000 == 0) fout << " channel " << ich << " ped " << EAmean12[ich] << " RMS " << EArms12[ich] << std::endl;
1167  //
1168  item.mean_x1 = EAmean1[ich];
1169  item.rms_x1 = EArms1[ich];
1170  item.mean_x6 = EAmean6[ich];
1171  item.rms_x6 = EArms6[ich];
1172  item.mean_x12 = EAmean12[ich];
1173  item.rms_x12 = EArms12[ich];
1174  if(ich < kEBChannels) {
1175  // EBDetId ebdetid(fed, chan, EBDetId::SMCRYSTALMODE);
1176  EBDetId ebdetid = EBDetId::unhashIndex(ich);
1177  pedestal->insert(std::make_pair(ebdetid.rawId(),item));
1178  }
1179  else {
1180  // EEDetId eedetid(iX, iY, iz);
1181  int iChannel = ich - kEBChannels;
1182  EEDetId eedetid = EEDetId::unhashIndex(iChannel);
1183  pedestal->insert(std::make_pair(eedetid.rawId(),item));
1184  }
1185  } // end loop over all channels
1186  Time_t snc= (Time_t) runold;
1187  m_to_transfer.push_back(std::make_pair((EcalPedestals*)pedestal, snc));
1188  } // skip too short cosmics runs
1189 
1190  runold = run;
1191  RunEntry = 1;
1192  for(int ich = 0; ich < kChannels; ich++) {
1193  if(ped[ich] < 300 && ped[ich] > 100) {
1194  EAmean12[ich] = ped[ich];
1195  EArms12[ich] = pedrms[ich];
1196  EAentry[ich] = 1;
1197  }
1198  else {
1199  EAmean12[ich] = 0;
1200  EArms12[ich] = 0;
1201  EAentry[ich] = 0;
1202  }
1203  }
1204  } // new run
1205  } // end loop over all entries
1206  // write also the last run
1207  fout << " last entry fill " << fill_num << " run " << runold << " nb of events " << RunEntry
1208  << " time " << run_time << " " << run_time_stablebeam << " " << time[0] << " run type " << run_type << std::endl;
1209  for(int ifed = 0; ifed < 54; ifed++)
1210  fout << " " << time[ifed];
1211  fout << std::endl;
1212  EcalPedestals* pedestal = new EcalPedestals();
1213  EcalPedestals::Item item;
1214  for(int ich = 0; ich < kChannels; ich++) {
1215  if(EAentry[ich] != 0) {
1216  EAmean12[ich] /= EAentry[ich];
1217  EArms12[ich] /= EAentry[ich];
1218  }
1219  else {
1220  EAmean12[ich] = 200.;
1221  EArms12[ich] = 0.;
1222  }
1223  if(ich%10000 == 0) fout << " channel " << ich << " ped " << EAmean12[ich] << " RMS " << EArms12[ich] << std::endl;
1224  // get gain 1 and 6 results
1225  // ...
1226  //
1227  item.mean_x1 = EAmean1[ich];
1228  item.rms_x1 = EArms1[ich];
1229  item.mean_x6 = EAmean6[ich];
1230  item.rms_x6 = EArms6[ich];
1231  item.mean_x12 = EAmean12[ich];
1232  item.rms_x12 = EArms12[ich];
1233  if(ich < kEBChannels) {
1234  // EBDetId ebdetid(fed, chan, EBDetId::SMCRYSTALMODE);
1235  EBDetId ebdetid = EBDetId::unhashIndex(ich);
1236  pedestal->insert(std::make_pair(ebdetid.rawId(),item));
1237  }
1238  else {
1239  // EEDetId eedetid(iX, iY, iz);
1240  int iChannel = ich - kEBChannels;
1241  EEDetId eedetid = EEDetId::unhashIndex(iChannel);
1242  pedestal->insert(std::make_pair(eedetid.rawId(),item));
1243  }
1244  } // end loop over all channels
1245  Time_t snc= (Time_t) runold;
1246  m_to_transfer.push_back(std::make_pair((EcalPedestals*)pedestal,snc)); // run based IOV
1247  std::cout << "Ecal - > end of readPedestalTree -----------\n";
1248 }
const Int_t kEBChannels
std::string id() const override
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:99
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
const Int_t kEEChannels
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void insert(std::pair< uint32_t, Item > const &a)
EcalPedestalsMap EcalPedestals
Definition: EcalPedestals.h:53
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:114
const Int_t Nbpedxml
Definition: tree.py:1
const Int_t kChannels

Member Data Documentation

EcalCondDBInterface* popcon::EcalPedestalsHandler::econn

Definition at line 67 of file EcalPedestalsHandler.h.

Referenced by getNewObjectsH2(), and getNewObjectsP5().

std::string popcon::EcalPedestalsHandler::m_filename
private
unsigned int popcon::EcalPedestalsHandler::m_firstRun
private
std::string popcon::EcalPedestalsHandler::m_gentag
private

Definition at line 76 of file EcalPedestalsHandler.h.

Referenced by EcalPedestalsHandler(), and getNewObjectsP5().

unsigned int popcon::EcalPedestalsHandler::m_lastRun
private

Definition at line 73 of file EcalPedestalsHandler.h.

Referenced by EcalPedestalsHandler(), getNewObjectsH2(), and getNewObjectsP5().

std::string popcon::EcalPedestalsHandler::m_location
private

Definition at line 75 of file EcalPedestalsHandler.h.

Referenced by EcalPedestalsHandler(), and getNewObjectsP5().

std::string popcon::EcalPedestalsHandler::m_locationsource
private

Definition at line 81 of file EcalPedestalsHandler.h.

Referenced by EcalPedestalsHandler(), and getNewObjects().

std::string popcon::EcalPedestalsHandler::m_name
private

Definition at line 82 of file EcalPedestalsHandler.h.

std::string popcon::EcalPedestalsHandler::m_pass
private

Definition at line 80 of file EcalPedestalsHandler.h.

Referenced by EcalPedestalsHandler(), getNewObjectsH2(), and getNewObjectsP5().

std::string popcon::EcalPedestalsHandler::m_runtag
private

Definition at line 77 of file EcalPedestalsHandler.h.

Referenced by EcalPedestalsHandler(), and getNewObjectsP5().

int popcon::EcalPedestalsHandler::m_runtype
private

Definition at line 84 of file EcalPedestalsHandler.h.

Referenced by EcalPedestalsHandler(), and readPedestalTree().

std::string popcon::EcalPedestalsHandler::m_sid
private

Definition at line 78 of file EcalPedestalsHandler.h.

Referenced by EcalPedestalsHandler(), getNewObjectsH2(), and getNewObjectsP5().

std::string popcon::EcalPedestalsHandler::m_user
private

Definition at line 79 of file EcalPedestalsHandler.h.

Referenced by EcalPedestalsHandler(), getNewObjectsH2(), and getNewObjectsP5().

const EcalPedestals* popcon::EcalPedestalsHandler::mypedestals
private

Definition at line 70 of file EcalPedestalsHandler.h.