test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1TCSCTFClient.cc
Go to the documentation of this file.
2 
11 #include "TRandom.h"
12 using namespace edm;
13 using namespace std;
14 
16  parameters=ps;
17  initialize();
18 }
19 
21 
22 //--------------------------------------------------------
24  counterLS = 0;
25  counterEvt = 0;
26 
27  input_dir = parameters.getUntrackedParameter<string>("input_dir","");
28  output_dir = parameters.getUntrackedParameter<string>("output_dir","");
29  prescaleLS = parameters.getUntrackedParameter<int>("prescaleLS",-1);
30  prescaleEvt = parameters.getUntrackedParameter<int>("prescaleEvt",-1);
31 
32  m_runInEventLoop = parameters.getUntrackedParameter<bool>("runInEventLoop", false);
33  m_runInEndLumi = parameters.getUntrackedParameter<bool>("runInEndLumi", false);
34  m_runInEndRun = parameters.getUntrackedParameter<bool>("runInEndRun", false);
35  m_runInEndJob = parameters.getUntrackedParameter<bool>("runInEndJob", false);
36 
37 }
38 
40 }
41 
42 //--------------------------------------------------------
44 
46  csctferrors_ = ibooker.book1D("csctferrors_","CSCTF Errors",6,0,6);
47 
48  processHistograms(igetter);
49 
50 }
51 
52 //--------------------------------------------------------
54 
55  igetter.setCurrentFolder(input_dir);
56 
57  vector<string> meVec = igetter.getMEs();
58  for(vector<string>::const_iterator it=meVec.begin(); it!=meVec.end(); it++){
59  string full_path = input_dir + "/" + (*it);
60  MonitorElement *me =igetter.get(full_path);
61  if( !me ){
62  LogInfo("TriggerDQM")<<full_path<<" NOT FOUND.";
63  continue;
64  }
65 
66  // But for now we only do a simple workaround
67  if( (*it) != "CSCTF_errors" ) continue;
68  TH1F *errors = me->getTH1F();
69  csctferrors_->getTH1F()->Reset();
70  if(!errors) continue;
71  for(int bin=1; bin<=errors->GetXaxis()->GetNbins(); bin++)
72  csctferrors_->Fill(bin-0.5,errors->GetBinContent(bin));
73  }
74 
75 }
76 
static AlgebraicMatrix initialize()
void processHistograms(DQMStore::IGetter &)
virtual ~L1TCSCTFClient()
Destructor.
void dqmEndLuminosityBlock(DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:304
L1TCSCTFClient(const edm::ParameterSet &ps)
Constructor.
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
std::vector< std::string > getMEs(void)
Definition: DQMStore.cc:326
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
TH1F * getTH1F(void) const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:346
string output_dir
Definition: o2o.py:33
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override