CMS 3D CMS Logo

L1TCSCTFClient.cc
Go to the documentation of this file.
2 
10 #include "TRandom.h"
11 using namespace edm;
12 using namespace std;
13 
15  parameters = ps;
16  initialize();
17 }
18 
20 
21 //--------------------------------------------------------
23  counterLS = 0;
24  counterEvt = 0;
25 
26  input_dir = parameters.getUntrackedParameter<string>("input_dir", "");
27  output_dir = parameters.getUntrackedParameter<string>("output_dir", "");
28  prescaleLS = parameters.getUntrackedParameter<int>("prescaleLS", -1);
29  prescaleEvt = parameters.getUntrackedParameter<int>("prescaleEvt", -1);
30 
31  m_runInEventLoop = parameters.getUntrackedParameter<bool>("runInEventLoop", false);
32  m_runInEndLumi = parameters.getUntrackedParameter<bool>("runInEndLumi", false);
33  m_runInEndRun = parameters.getUntrackedParameter<bool>("runInEndRun", false);
34  m_runInEndJob = parameters.getUntrackedParameter<bool>("runInEndJob", false);
35 }
36 
38  DQMStore::IGetter &igetter,
39  const edm::LuminosityBlock &lumiSeg,
40  const edm::EventSetup &c) {}
41 
42 //--------------------------------------------------------
45  csctferrors_ = ibooker.book1D("csctferrors_", "CSCTF Errors", 6, 0, 6);
46 
47  processHistograms(igetter);
48 }
49 
50 //--------------------------------------------------------
52  igetter.setCurrentFolder(input_dir);
53 
54  vector<string> meVec = igetter.getMEs();
55  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
56  string full_path = input_dir + "/" + (*it);
57  MonitorElement *me = igetter.get(full_path);
58  if (!me) {
59  LogInfo("TriggerDQM") << full_path << " NOT FOUND.";
60  continue;
61  }
62 
63  // But for now we only do a simple workaround
64  if ((*it) != "CSCTF_errors")
65  continue;
66  TH1F *errors = me->getTH1F();
67  csctferrors_->getTH1F()->Reset();
68  if (!errors)
69  continue;
70  for (int bin = 1; bin <= errors->GetXaxis()->GetNbins(); bin++)
71  csctferrors_->Fill(bin - 0.5, errors->GetBinContent(bin));
72  }
73 }
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
Definition: DQMStore.cc:239
static AlgebraicMatrix initialize()
void processHistograms(DQMStore::IGetter &)
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:418
virtual TH1F * getTH1F() const
L1TCSCTFClient(const edm::ParameterSet &ps)
Constructor.
std::vector< std::string > getMEs()
Definition: DQMStore.cc:455
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
~L1TCSCTFClient() override
Destructor.
HLT enums.
Definition: errors.py:1
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:437
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:424