CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes | Private Attributes
EcalPedestalHistory Class Reference

#include <EcalPedestalHistory.h>

Inheritance diagram for EcalPedestalHistory:
edm::EDAnalyzer edm::EDConsumerBase

Public Types

enum  { kChannels = 75848, kEBChannels = 61200, kEEChannels = 14648 }
 
enum  { kGains = 3, kFirstGainId = 1 }
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 EcalPedestalHistory (const edm::ParameterSet &)
 
void endJob () override
 
 ~EcalPedestalHistory () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Public Attributes

EcalCondDBInterfaceeconn
 

Private Attributes

unsigned int cnt_evt_
 
std::string ECALType_
 
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_sid
 
std::string m_user
 
std::vector< int > maskedChannels_
 
std::vector< int > maskedEEChannels_
 
int runnumber_
 
std::string runType_
 
unsigned int startevent_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 44 of file EcalPedestalHistory.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kChannels 
kEBChannels 
kEEChannels 

Definition at line 54 of file EcalPedestalHistory.h.

54 { kChannels = 75848, kEBChannels = 61200, kEEChannels = 14648 };

◆ anonymous enum

anonymous enum
Enumerator
kGains 
kFirstGainId 

Definition at line 55 of file EcalPedestalHistory.h.

55 { kGains = 3, kFirstGainId = 1 };

Constructor & Destructor Documentation

◆ EcalPedestalHistory()

EcalPedestalHistory::EcalPedestalHistory ( const edm::ParameterSet iConfig)
explicit

Definition at line 51 of file EcalPedestalHistory.cc.

51  {
52  //====================================================================
53  //now do what ever initialization is needed
54  // EBDigiCollection_ = iConfig.getParameter<edm::InputTag>("EBDigiCollection");
55  runnumber_ = iConfig.getUntrackedParameter<int>("runnumber", -1);
56  ECALType_ = iConfig.getParameter<std::string>("ECALType");
57  runType_ = iConfig.getParameter<std::string>("runType");
58  startevent_ = iConfig.getUntrackedParameter<unsigned int>("startevent", 1);
59 
60  std::cout << "EcalPedestals Source handler constructor\n" << std::endl;
61  m_firstRun = static_cast<unsigned int>(atoi(iConfig.getParameter<std::string>("firstRun").c_str()));
62  m_lastRun = static_cast<unsigned int>(atoi(iConfig.getParameter<std::string>("lastRun").c_str()));
63  m_sid = iConfig.getParameter<std::string>("OnlineDBSID");
64  m_user = iConfig.getParameter<std::string>("OnlineDBUser");
65  m_pass = iConfig.getParameter<std::string>("OnlineDBPassword");
66  m_locationsource = iConfig.getParameter<std::string>("LocationSource");
67  m_location = iConfig.getParameter<std::string>("Location");
68  m_gentag = iConfig.getParameter<std::string>("GenTag");
69  std::cout << m_sid << "/" << m_user << "/" << m_pass << "/" << m_location << "/" << m_gentag << std::endl;
70 
71  vector<int> listDefaults;
72  listDefaults.push_back(-1);
73 
74  cnt_evt_ = 0;
75  // cout << "Exiting constructor" << endl;
76 } //constructor

References gather_cfg::cout, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~EcalPedestalHistory()

EcalPedestalHistory::~EcalPedestalHistory ( )
override

Definition at line 79 of file EcalPedestalHistory.cc.

79  {
80  //========================================================================
81  cout << "ANALYSIS FINISHED" << endl;
82 } //destructor

References gather_cfg::cout.

Member Function Documentation

◆ analyze()

void EcalPedestalHistory::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::EDAnalyzer.

Definition at line 379 of file EcalPedestalHistory.cc.

379  {
380  //========================================================================
381 
382  if (cnt_evt_ == 0) {
383  if (ECALType_ == "EB" || ECALType_ == "EA") {
384  cout << " Barrel data : nb channels " << kEBChannels << endl;
385  } else if (ECALType_ == "EE" || ECALType_ == "EA") {
386  cout << " End cap data : nb channels " << kEEChannels << endl;
387  } else {
388  cout << " strange ECALtype : " << ECALType_ << " abort " << endl;
389  return;
390  }
391  /*
392  int NbOfmaskedChannels = maskedChannels_.size();
393  cout << " Nb masked EB channels " << NbOfmaskedChannels << endl;
394  for (vector<int>::iterator iter = maskedChannels_.begin(); iter != maskedChannels_.end(); ++iter)
395  cout<< " : masked channel " << *(iter) << endl;
396  NbOfmaskedChannels = maskedEEChannels_.size();
397  cout << " Nb masked EE channels " << NbOfmaskedChannels << endl;
398  for (vector<int>::iterator iter = maskedEEChannels_.begin(); iter != maskedEEChannels_.end(); ++iter)
399  cout<< " : masked channel " << *(iter) << endl;
400  */
401  }
402  cnt_evt_++;
403 
404  cout << "Exiting analyze" << endl;
405 } //analyze

References gather_cfg::cout, kEBChannels, and kEEChannels.

◆ beginJob()

void EcalPedestalHistory::beginJob ( void  )
overridevirtual

========================================================================

Reimplemented from edm::EDAnalyzer.

Definition at line 358 of file EcalPedestalHistory.cc.

358  {
360 
361  cout << "Entering beginJob" << endl;
362 
363  cout << "Exiting beginJob" << endl;
364 } //beginJob

References gather_cfg::cout.

◆ beginRun()

void EcalPedestalHistory::beginRun ( edm::Run const &  ,
edm::EventSetup const &  c 
)
overridevirtual

========================================================================

Reimplemented from edm::EDAnalyzer.

Definition at line 85 of file EcalPedestalHistory.cc.

85  {
87 
88  cout << "Entering beginRun" << endl;
89  /* do not use any tag...
90  edm::ESHandle<EcalChannelStatus> pChannelStatus;
91  c.get<EcalChannelStatusRcd>().get(pChannelStatus);
92  const EcalChannelStatus* chStatus = pChannelStatus.product();
93  EcalChannelStatusMap::const_iterator chit;
94  for (int iChannel = 0; iChannel < kEBChannels; iChannel++) {
95  EBDetId id = EBDetId::unhashIndex(iChannel);
96  chit = chStatus->getMap().find(id.rawId());
97  if( chit != chStatus->getMap().end() ) {
98  EcalChannelStatusCode ch_code = (*chit);
99  uint16_t statusCode = ch_code.getStatusCode() & 31;
100  if(statusCode == 1 || (statusCode > 7 && statusCode < 12))
101  maskedChannels_.push_back(iChannel);
102  }
103  }
104  for (int iChannel = 0; iChannel < kEEChannels; iChannel++) {
105  EEDetId id = EEDetId::unhashIndex(iChannel);
106  chit = chStatus->getMap().find(id.rawId());
107  if( chit != chStatus->getMap().end() ) {
108  EcalChannelStatusCode ch_code = (*chit);
109  uint16_t statusCode = ch_code.getStatusCode() & 31;
110  if(statusCode == 1 || (statusCode > 7 && statusCode < 12))
111  maskedEEChannels_.push_back(iChannel);
112  }
113  }
114  */
115  TH1F** hMean = new TH1F*[15];
116  TH1F** hRMS = new TH1F*[15];
117  TFile f("PedHist.root", "RECREATE");
118 
119  typedef struct {
120  int iChannel;
121  int ix;
122  int iy;
123  int iz;
124  } Chan_t;
125  Chan_t Chan;
126  Chan.iChannel = -1;
127  Chan.ix = -1;
128  Chan.iy = -1;
129  Chan.iz = -1;
130 
131  TTree* tPedChan = new TTree("PedChan", "Channels"); // Output tree for channels
132  tPedChan->Branch("Channels", &Chan.iChannel, "iChannel/I");
133  tPedChan->Branch("x", &Chan.ix, "ix/I");
134  tPedChan->Branch("y", &Chan.iy, "iy/I");
135  tPedChan->Branch("z", &Chan.iz, "iz/I");
136  for (int iChannel = 0; iChannel < kEBChannels; iChannel++) {
137  Chan.iChannel = iChannel;
138  EBDetId myEBDetId = EBDetId::unhashIndex(iChannel);
139  Chan.ix = myEBDetId.ieta(); // -85:-1,1:85
140  Chan.iy = myEBDetId.iphi(); // 1:360
141  Chan.iz = 0;
142  if (iChannel % 10000 == 0)
143  cout << " EB channel " << iChannel << " eta " << Chan.ix << " phi " << Chan.iy << endl;
144  tPedChan->Fill();
145  }
146  for (int iChannel = 0; iChannel < kEEChannels; iChannel++) {
147  Chan.iChannel = iChannel;
148  EEDetId myEEDetId = EEDetId::unhashIndex(iChannel);
149  Chan.ix = myEEDetId.ix();
150  Chan.iy = myEEDetId.iy();
151  Chan.iz = myEEDetId.zside();
152  if (iChannel % 1000 == 0)
153  cout << " EE channel " << iChannel << " x " << Chan.ix << " y " << Chan.iy << " z " << Chan.iz << endl;
154  tPedChan->Fill();
155  }
156  tPedChan->Write();
157  tPedChan->Print();
158 
159  typedef struct {
160  int Run;
161  double Mean[kChannels];
162  double RMS[kChannels];
163  } Ped_t;
164  Ped_t PedVal;
165  PedVal.Run = -1; // initialization
166  for (int iChannel = 0; iChannel < kChannels; iChannel++) {
167  PedVal.Mean[iChannel] = -1.;
168  PedVal.RMS[iChannel] = -1.;
169  }
170  TTree* tPedHist = new TTree("PedHist", "Pedestal History"); // Output tree for pedestal mean/rms
171  tPedHist->Branch("Pedestals", &PedVal.Run, "Run/I");
172  tPedHist->Branch("Mean", PedVal.Mean, "Mean[75848]/D");
173  tPedHist->Branch("RMS", PedVal.RMS, "RMS[75848]/D");
174 
175  // here we retrieve all the runs after the last from online DB
176  std::cout << "Retrieving run list from ONLINE DB ... " << std::endl;
178  std::cout << "Connection done" << std::endl;
179  if (!econn) {
180  std::cout << " Problem with OMDS: connection parameters " << m_sid << "/" << m_user << "/" << m_pass << std::endl;
181  throw cms::Exception("OMDS not available");
182  }
183 
184  // these are the online conditions DB classes
185  RunList my_runlist;
186  RunTag my_runtag;
189 
190  my_locdef.setLocation(m_location);
191  my_rundef.setRunType("PEDESTAL");
192  my_runtag.setLocationDef(my_locdef);
193  my_runtag.setRunTypeDef(my_rundef);
194  my_runtag.setGeneralTag(m_gentag);
195 
196  // here we retrieve the Monitoring run records
197  MonVersionDef monverdef;
198  monverdef.setMonitoringVersion("test01");
199  MonRunTag mon_tag;
200  // mon_tag.setGeneralTag("CMSSW");
201  mon_tag.setGeneralTag("CMSSW-offline-private");
202  mon_tag.setMonVersionDef(monverdef);
203  MonRunList mon_list;
204  mon_list.setMonRunTag(mon_tag);
205  mon_list.setRunTag(my_runtag);
206  // mon_list=econn->fetchMonRunList(my_runtag, mon_tag);
207  unsigned int min_run = 0, max_since = 0;
208  if (m_firstRun < max_since) {
209  min_run = max_since + 1; // we have to add 1 to the last transferred one
210  } else {
211  min_run = m_firstRun;
212  }
213 
214  unsigned int max_run = m_lastRun;
215  mon_list = econn->fetchMonRunList(my_runtag, mon_tag, min_run, max_run);
216 
217  std::vector<MonRunIOV> mon_run_vec = mon_list.getRuns();
218  int mon_runs = mon_run_vec.size();
219  std::cout << "number of Mon runs is : " << mon_runs << std::endl;
220 
221  if (mon_runs > 0) {
222  int NbChan = 0;
223  for (int iChannel = 0; iChannel < kEBChannels; iChannel++) {
224  if (iChannel % 10000 == 1) {
225  hMean[NbChan] = new TH1F(Form("Mean_%i", NbChan), Form("Mean EB %i", iChannel), mon_runs, 0., mon_runs);
226  hRMS[NbChan] = new TH1F(Form("RMS_%i", NbChan), Form("RMS EB %i", iChannel), mon_runs, 0., mon_runs);
227  NbChan++;
228  }
229  }
230  for (int iChannel = 0; iChannel < kEEChannels; iChannel++) {
231  if (iChannel % 2000 == 1) {
232  hMean[NbChan] = new TH1F(Form("Mean_%i", NbChan), Form("Mean EE %i", iChannel), mon_runs, 0., mon_runs);
233  hRMS[NbChan] = new TH1F(Form("RMS_%i", NbChan), Form("RMS EE %i", iChannel), mon_runs, 0., mon_runs);
234  NbChan++;
235  }
236  }
237 
238  // int krmax = std::min(mon_runs, 30);
239  int krmax = mon_runs;
240  for (int kr = 0; kr < krmax; kr++) {
241  std::cout << "-kr------: " << kr << std::endl;
242 
243  unsigned int irun = static_cast<unsigned int>(mon_run_vec[kr].getRunIOV().getRunNumber());
244  std::cout << "retrieve the data for run number: " << irun << std::endl;
245  if (mon_run_vec[kr].getSubRunNumber() <= 1) {
246  // retrieve the data for a given run
247  RunIOV runiov_prime = mon_run_vec[kr].getRunIOV();
248  // retrieve the pedestals from OMDS for this run
249  std::map<EcalLogicID, MonPedestalsDat> dataset_mon;
250  econn->fetchDataSet(&dataset_mon, &mon_run_vec[kr]);
251  std::cout << "OMDS record for run " << irun << " is made of " << dataset_mon.size() << std::endl;
252  int nEB = 0, nEE = 0, nEBbad = 0, nEEbad = 0;
253  typedef std::map<EcalLogicID, MonPedestalsDat>::const_iterator CImon;
254  EcalLogicID ecid_xt;
255  MonPedestalsDat rd_ped;
256 
257  // this to validate ...
258  int nbad = 0;
259  for (CImon p = dataset_mon.begin(); p != dataset_mon.end(); p++) {
260  ecid_xt = p->first;
261  rd_ped = p->second;
262  int sm_num = ecid_xt.getID1();
263  int xt_num = ecid_xt.getID2();
264  int yt_num = ecid_xt.getID3();
265 
266  //checkPedestal
267  bool result = true;
268  if (rd_ped.getPedRMSG12() > 3 || rd_ped.getPedRMSG12() <= 0 || rd_ped.getPedRMSG6() > 2 ||
269  rd_ped.getPedRMSG12() <= 0 || rd_ped.getPedRMSG1() > 1 || rd_ped.getPedRMSG1() <= 0 ||
270  rd_ped.getPedMeanG12() > 300 || rd_ped.getPedMeanG12() <= 100 || rd_ped.getPedMeanG6() > 300 ||
271  rd_ped.getPedMeanG6() <= 100 || rd_ped.getPedMeanG1() > 300 || rd_ped.getPedMeanG6() <= 100)
272  result = false;
273 
274  // here we check and count how many bad channels we have
275  if (!result) {
276  nbad++;
277  if (nbad < 10)
278  std::cout << "BAD LIST: channel " << sm_num << "/" << xt_num << "/" << yt_num << "ped/rms "
279  << rd_ped.getPedMeanG12() << "/" << rd_ped.getPedRMSG12() << std::endl;
280  }
281  if (ecid_xt.getName() == "EB_crystal_number") {
282  nEB++;
283  if (!result)
284  nEBbad++;
285  } else {
286  nEE++;
287  if (!result)
288  nEEbad++;
289  }
290  } // end loop over pedestal data
291  // ok or bad? A bad run is for more than 5% bad channels
292 
293  // if(nbad<(dataset_mon.size()*0.1)){
294  if (nbad < (dataset_mon.size() * 0.05) &&
295  (nEB > 10200 || nEE > 2460)) { // this is good run, fill histo and tree
296  PedVal.Run = irun;
297  int NbChan = 0;
298  for (CImon p = dataset_mon.begin(); p != dataset_mon.end(); p++) {
299  ecid_xt = p->first;
300  rd_ped = p->second;
301  int sm_num = ecid_xt.getID1();
302  int xt_num = ecid_xt.getID2();
303  int yt_num = ecid_xt.getID3();
304 
305  if (ecid_xt.getName() == "EB_crystal_number") { // Barrel
306  EBDetId ebdetid(sm_num, xt_num, EBDetId::SMCRYSTALMODE);
307  int iChannel = ebdetid.hashedIndex();
308  if (iChannel < 0 || iChannel > 61200)
309  cout << " SM " << sm_num << " Chan in SM " << xt_num << " IChannel " << iChannel << endl;
310  if (iChannel % 10000 == 1) {
311  hMean[NbChan]->Fill(kr, rd_ped.getPedMeanG12());
312  hRMS[NbChan]->Fill(kr, rd_ped.getPedRMSG12());
313  NbChan++;
314  }
315  PedVal.Mean[iChannel] = rd_ped.getPedMeanG12();
316  PedVal.RMS[iChannel] = rd_ped.getPedRMSG12();
317  if (iChannel % 10000 == 0)
318  cout << " channel " << iChannel << " mean " << PedVal.Mean[iChannel] << " RMS " << PedVal.RMS[iChannel]
319  << endl;
320  } else { // Endcaps
321  if (EEDetId::validDetId(xt_num, yt_num, sm_num)) {
322  EEDetId eedetid(xt_num, yt_num, sm_num);
323  int iChannel = eedetid.hashedIndex();
324  if (iChannel < 0 || iChannel > 14648)
325  cout << " x " << sm_num << " y " << xt_num << " z " << yt_num << " IChannel " << iChannel << endl;
326  if (iChannel % 2000 == 1) {
327  hMean[NbChan]->Fill(kr, rd_ped.getPedMeanG12());
328  hRMS[NbChan]->Fill(kr, rd_ped.getPedRMSG12());
329  NbChan++;
330  }
331  int iChanEE = kEBChannels + iChannel;
332  // cout << " channel EE " << iChanEE << endl;
333  PedVal.Mean[iChanEE] = rd_ped.getPedMeanG12();
334  PedVal.RMS[iChanEE] = rd_ped.getPedRMSG12();
335  } // valid ee Id
336  } // Endcaps
337  } // loop over channels
338  tPedHist->Fill();
339  cout << " We got a good run " << irun << endl;
340  } // good run
341  } // mon_run_vec
342  } // loop over all runs
343  } // number of runs > 0
344  cout << "Exiting beginRun" << endl;
345  for (int NbChan = 0; NbChan < 15; NbChan++) {
346  if (hMean[NbChan]->GetEntries() > 0.) { // save only when filled!
347  hMean[NbChan]->Write();
348  hRMS[NbChan]->Write();
349  }
350  }
351  tPedHist->Write();
352  tPedHist->Print();
353  f.Close();
354 
355 } //beginRun

References gather_cfg::cout, test_db_connect::econn, Exception, f, EcalLogicID::getID1(), EcalLogicID::getID2(), EcalLogicID::getID3(), EcalLogicID::getName(), MonPedestalsDat::getPedMeanG1(), MonPedestalsDat::getPedMeanG12(), MonPedestalsDat::getPedMeanG6(), MonPedestalsDat::getPedRMSG1(), MonPedestalsDat::getPedRMSG12(), MonPedestalsDat::getPedRMSG6(), DeadROCCounter::getRunNumber(), MonRunList::getRuns(), EBDetId::hashedIndex(), EEDetId::hashedIndex(), EBDetId::ieta(), EBDetId::iphi(), EEDetId::ix(), EEDetId::iy(), kChannels, kEBChannels, kEEChannels, Mean, test_db_connect::my_locdef, test_db_connect::my_rundef, AlCaHLTBitMon_ParallelJobs::p, mps_fire::result, RMS, RunTag::setGeneralTag(), MonRunTag::setGeneralTag(), RunTag::setLocationDef(), MonVersionDef::setMonitoringVersion(), MonRunList::setMonRunTag(), MonRunTag::setMonVersionDef(), MonRunList::setRunTag(), RunTag::setRunTypeDef(), EBDetId::SMCRYSTALMODE, EBDetId::unhashIndex(), EEDetId::unhashIndex(), EEDetId::validDetId(), and EEDetId::zside().

◆ endJob()

void EcalPedestalHistory::endJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 367 of file EcalPedestalHistory.cc.

367  {
368  //========================================================================
369 
370  cout << "Entering endJob" << endl;
371  cout << "Exiting endJob" << endl;
372 } //endJob

References gather_cfg::cout.

Member Data Documentation

◆ cnt_evt_

unsigned int EcalPedestalHistory::cnt_evt_
private

Definition at line 59 of file EcalPedestalHistory.h.

◆ ECALType_

std::string EcalPedestalHistory::ECALType_
private

Definition at line 60 of file EcalPedestalHistory.h.

◆ econn

EcalCondDBInterface* EcalPedestalHistory::econn

Definition at line 52 of file EcalPedestalHistory.h.

◆ m_firstRun

unsigned int EcalPedestalHistory::m_firstRun
private

Definition at line 65 of file EcalPedestalHistory.h.

◆ m_gentag

std::string EcalPedestalHistory::m_gentag
private

Definition at line 68 of file EcalPedestalHistory.h.

◆ m_lastRun

unsigned int EcalPedestalHistory::m_lastRun
private

Definition at line 66 of file EcalPedestalHistory.h.

◆ m_location

std::string EcalPedestalHistory::m_location
private

Definition at line 67 of file EcalPedestalHistory.h.

◆ m_locationsource

std::string EcalPedestalHistory::m_locationsource
private

Definition at line 72 of file EcalPedestalHistory.h.

◆ m_name

std::string EcalPedestalHistory::m_name
private

Definition at line 73 of file EcalPedestalHistory.h.

◆ m_pass

std::string EcalPedestalHistory::m_pass
private

Definition at line 71 of file EcalPedestalHistory.h.

◆ m_sid

std::string EcalPedestalHistory::m_sid
private

Definition at line 69 of file EcalPedestalHistory.h.

◆ m_user

std::string EcalPedestalHistory::m_user
private

Definition at line 70 of file EcalPedestalHistory.h.

◆ maskedChannels_

std::vector<int> EcalPedestalHistory::maskedChannels_
private

Definition at line 63 of file EcalPedestalHistory.h.

◆ maskedEEChannels_

std::vector<int> EcalPedestalHistory::maskedEEChannels_
private

Definition at line 64 of file EcalPedestalHistory.h.

◆ runnumber_

int EcalPedestalHistory::runnumber_
private

Definition at line 58 of file EcalPedestalHistory.h.

◆ runType_

std::string EcalPedestalHistory::runType_
private

Definition at line 61 of file EcalPedestalHistory.h.

◆ startevent_

unsigned int EcalPedestalHistory::startevent_
private

Definition at line 62 of file EcalPedestalHistory.h.

MonRunList::setRunTag
void setRunTag(const RunTag &tag)
Definition: MonRunList.cc:18
EcalCondDBInterface
Definition: EcalCondDBInterface.h:37
MonPedestalsDat::getPedMeanG1
float getPedMeanG1() const
Definition: MonPedestalsDat.h:21
RunIOV
Definition: RunIOV.h:13
EBDetId::ieta
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
MonVersionDef::setMonitoringVersion
void setMonitoringVersion(std::string ver)
Definition: MonVersionDef.cc:21
EcalPedestalHistory::kFirstGainId
Definition: EcalPedestalHistory.h:55
MonRunList
Definition: MonRunList.h:16
EcalPedestalHistory::m_sid
std::string m_sid
Definition: EcalPedestalHistory.h:69
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
RunList
Definition: RunList.h:16
EBDetId
Definition: EBDetId.h:17
EcalCondDBInterface::fetchMonRunList
MonRunList fetchMonRunList(const RunTag &tag, const MonRunTag &monruntag) noexcept(false)
Definition: EcalCondDBInterface.cc:825
EEDetId::unhashIndex
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:65
RunTag
Definition: RunTag.h:13
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
gather_cfg.cout
cout
Definition: gather_cfg.py:144
MonPedestalsDat
Definition: MonPedestalsDat.h:11
EcalLogicID::getName
std::string getName() const
Definition: EcalLogicID.cc:26
EBDetId::unhashIndex
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:110
LocationDef
Definition: LocationDef.h:12
DeadROCCounter.getRunNumber
def getRunNumber(filename)
Definition: DeadROCCounter.py:7
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
EcalLogicID::getID1
int getID1() const
Definition: EcalLogicID.cc:30
EEDetId::ix
int ix() const
Definition: EEDetId.h:77
EcalPedestalHistory::m_lastRun
unsigned int m_lastRun
Definition: EcalPedestalHistory.h:66
MonRunTag::setGeneralTag
void setGeneralTag(std::string tag)
Definition: MonRunTag.cc:21
MonPedestalsDat::getPedRMSG6
float getPedRMSG6() const
Definition: MonPedestalsDat.h:33
EcalPedestalHistory::m_location
std::string m_location
Definition: EcalPedestalHistory.h:67
Mean
Definition: SiPixelActionExecutor.h:17
EcalLogicID::getID2
int getID2() const
Definition: EcalLogicID.cc:32
EcalPedestalHistory::m_pass
std::string m_pass
Definition: EcalPedestalHistory.h:71
EcalPedestalHistory::kEBChannels
Definition: EcalPedestalHistory.h:54
RunTag::setGeneralTag
void setGeneralTag(std::string tag)
Definition: RunTag.cc:24
test_db_connect.my_rundef
my_rundef
Definition: test_db_connect.py:13
MonPedestalsDat::getPedMeanG6
float getPedMeanG6() const
Definition: MonPedestalsDat.h:24
EcalPedestalHistory::runnumber_
int runnumber_
Definition: EcalPedestalHistory.h:58
EcalLogicID
Definition: EcalLogicID.h:7
MonVersionDef
Definition: MonVersionDef.h:12
EEDetId::zside
int zside() const
Definition: EEDetId.h:71
RMS
Definition: trackSplitPlot.h:34
EcalPedestalHistory::kGains
Definition: EcalPedestalHistory.h:55
EEDetId
Definition: EEDetId.h:14
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalPedestalHistory::m_firstRun
unsigned int m_firstRun
Definition: EcalPedestalHistory.h:65
RunTypeDef
Definition: RunTypeDef.h:12
test_db_connect.my_locdef
my_locdef
Definition: test_db_connect.py:11
MonPedestalsDat::getPedRMSG1
float getPedRMSG1() const
Definition: MonPedestalsDat.h:30
EcalPedestalHistory::m_locationsource
std::string m_locationsource
Definition: EcalPedestalHistory.h:72
PDRates.Run
Run
Definition: PDRates.py:133
EcalCondDBInterface::fetchDataSet
void fetchDataSet(std::map< EcalLogicID, DATT > *fillMap, IOVT *iov) noexcept(false)
Definition: EcalCondDBInterface.h:495
MonRunTag
Definition: MonRunTag.h:13
EcalPedestalHistory::kChannels
Definition: EcalPedestalHistory.h:54
EEDetId::iy
int iy() const
Definition: EEDetId.h:83
MonPedestalsDat::getPedRMSG12
float getPedRMSG12() const
Definition: MonPedestalsDat.h:36
EcalPedestalHistory::runType_
std::string runType_
Definition: EcalPedestalHistory.h:61
RunTag::setLocationDef
void setLocationDef(const LocationDef &locDef)
Definition: RunTag.cc:33
EcalPedestalHistory::startevent_
unsigned int startevent_
Definition: EcalPedestalHistory.h:62
EcalPedestalHistory::m_gentag
std::string m_gentag
Definition: EcalPedestalHistory.h:68
Exception
Definition: hltDiff.cc:245
EcalPedestalHistory::cnt_evt_
unsigned int cnt_evt_
Definition: EcalPedestalHistory.h:59
MonPedestalsDat::getPedMeanG12
float getPedMeanG12() const
Definition: MonPedestalsDat.h:27
EcalLogicID::getID3
int getID3() const
Definition: EcalLogicID.cc:34
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EcalPedestalHistory::ECALType_
std::string ECALType_
Definition: EcalPedestalHistory.h:60
MonRunList::setMonRunTag
void setMonRunTag(const MonRunTag &tag)
Definition: MonRunList.cc:23
EEDetId::validDetId
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
RunTag::setRunTypeDef
void setRunTypeDef(const RunTypeDef &runTypeDef)
Definition: RunTag.cc:42
EBDetId::iphi
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
mps_fire.result
result
Definition: mps_fire.py:311
MonRunTag::setMonVersionDef
void setMonVersionDef(const MonVersionDef &ver)
Definition: MonRunTag.cc:30
EcalPedestalHistory::kEEChannels
Definition: EcalPedestalHistory.h:54
EBDetId::SMCRYSTALMODE
static const int SMCRYSTALMODE
Definition: EBDetId.h:159
EcalPedestalHistory::econn
EcalCondDBInterface * econn
Definition: EcalPedestalHistory.h:52
EcalPedestalHistory::m_user
std::string m_user
Definition: EcalPedestalHistory.h:70
MonRunList::getRuns
std::vector< MonRunIOV > getRuns()
Definition: MonRunList.cc:32