CMS 3D CMS Logo

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