CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
L1TRPCTFClient Class Reference

#include <L1TRPCTFClient.h>

Inheritance diagram for L1TRPCTFClient:
edm::EDAnalyzer

Public Member Functions

 L1TRPCTFClient (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~L1TRPCTFClient ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Fake Analyze. More...
 
void beginJob (void)
 BeginJob. More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun. More...
 
void endJob ()
 Endjob. More...
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 DQM Client Diagnostic. More...
 
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun. More...
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Private Member Functions

void initialize ()
 
void processHistograms ()
 

Private Attributes

int counterEvt_
 counter More...
 
int counterLS_
 
DQMStoredbe_
 
std::string input_dir_
 
MonitorElementm_deadChannels
 
MonitorElementm_noisyChannels
 
MonitorElementm_phipackedbad
 
MonitorElementm_phipackeddead
 
bool m_runInEndJob
 
bool m_runInEndLumi
 
bool m_runInEndRun
 
bool m_runInEventLoop
 
std::string monitorName_
 
std::string output_dir_
 
edm::ParameterSet parameters_
 
int prescaleEvt_
 units of lumi sections More...
 
int prescaleLS_
 counter More...
 
bool verbose_
 prescale on number of events More...
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 21 of file L1TRPCTFClient.h.

Constructor & Destructor Documentation

L1TRPCTFClient::L1TRPCTFClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 23 of file L1TRPCTFClient.cc.

24 {
25  parameters_=ps;
26  initialize();
27 }
edm::ParameterSet parameters_
L1TRPCTFClient::~L1TRPCTFClient ( )
virtual

Destructor.

Definition at line 29 of file L1TRPCTFClient.cc.

29  {
30  LogInfo("TriggerDQM")<<"[TriggerDQM]: ending... ";
31 }

Member Function Documentation

void L1TRPCTFClient::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Fake Analyze.

Implements edm::EDAnalyzer.

Definition at line 110 of file L1TRPCTFClient.cc.

110  {
111  // cout << "L1TRPCTFClient::analyze" << endl;
112  counterEvt_++;
113  if (prescaleEvt_ < 1)
114  return;
115  if (prescaleEvt_ > 0 && counterEvt_ % prescaleEvt_ != 0)
116  return;
117 
118  // there is no loop on events in the offline harvesting step
119  // code here will not be executed offline
120 
121  if (m_runInEventLoop) {
122 
124  }
125 
126 }
void processHistograms()
int prescaleEvt_
units of lumi sections
int counterEvt_
counter
void L1TRPCTFClient::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 68 of file L1TRPCTFClient.cc.

References DQMStore::book2D(), dbe_, cppFunctionSkipper::operator, and DQMStore::setCurrentFolder().

68  {
69 
70  LogInfo("TriggerDQM")<<"[TriggerDQM]: Begin Job";
71 
72  // get backendinterface
74 
76 
77  m_deadChannels = dbe_->book2D("RPCTF_deadchannels",
78  "RPCTF deadchannels",
79  33, -16.5, 16.5,
80  144, -0.5, 143.5);
81  m_noisyChannels = dbe_->book2D("RPCTF_noisychannels",
82  "RPCTF noisy channels",
83  33, -16.5, 16.5,
84  144, -0.5, 143.5);
85 }
DQMStore * dbe_
MonitorElement * m_noisyChannels
MonitorElement * m_deadChannels
std::string output_dir_
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:845
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
void L1TRPCTFClient::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 91 of file L1TRPCTFClient.cc.

91  {
92  // optionally reset histograms here
93  // clientHisto->Reset();
94 }
void L1TRPCTFClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 87 of file L1TRPCTFClient.cc.

87  {
88 }
void L1TRPCTFClient::endJob ( void  )
protectedvirtual

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 139 of file L1TRPCTFClient.cc.

139  {
140 
141  if (m_runInEndJob) {
142 
144  }
145 
146 }
void processHistograms()
void L1TRPCTFClient::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
protectedvirtual

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 97 of file L1TRPCTFClient.cc.

References gather_cfg::cout.

99 {
100  if (verbose_) std::cout << "L1TRPCTFClient::endLuminosityBlock" << std::endl;
101 
102  if (m_runInEndLumi) {
103 
105  }
106 
107 }
void processHistograms()
tuple cout
Definition: gather_cfg.py:121
bool verbose_
prescale on number of events
void L1TRPCTFClient::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 129 of file L1TRPCTFClient.cc.

129  {
130 
131  if (m_runInEndRun) {
132 
134  }
135 
136 }
void processHistograms()
void L1TRPCTFClient::initialize ( )
private

Definition at line 34 of file L1TRPCTFClient.cc.

References dbe_, and cppFunctionSkipper::operator.

34  {
35 
36  counterLS_=0;
37  counterEvt_=0;
38 
39  // get back-end interface
41 
42  // base folder for the contents of this job
43  monitorName_ = parameters_.getUntrackedParameter<string>("monitorName","");
44 // cout << "Monitor name = " << monitorName_ << endl;
45  prescaleLS_ = parameters_.getUntrackedParameter<int>("prescaleLS", -1);
46 // cout << "DQM lumi section prescale = " << prescaleLS_ << " lumi section(s)"<< endl;
47  prescaleEvt_ = parameters_.getUntrackedParameter<int>("prescaleEvt", -1);
48 // cout << "DQM event prescale = " << prescaleEvt_ << " events(s)"<< endl;
49  output_dir_ = parameters_.getUntrackedParameter<string>("output_dir","");
50 // cout << "DQM output dir = " << output_dir_ << endl;
51  input_dir_ = parameters_.getUntrackedParameter<string>("input_dir","");
52 // cout << "DQM input dir = " << input_dir_ << endl;
53 
54  verbose_ = parameters_.getUntrackedParameter<bool>("verbose", false);
55 
56  m_runInEventLoop = parameters_.getUntrackedParameter<bool>("runInEventLoop", false);
57  m_runInEndLumi = parameters_.getUntrackedParameter<bool>("runInEndLumi", false);
58  m_runInEndRun = parameters_.getUntrackedParameter<bool>("runInEndRun", false);
59  m_runInEndJob = parameters_.getUntrackedParameter<bool>("runInEndJob", false);
60 
61 
62  LogInfo( "TriggerDQM");
63 
64 
65 }
DQMStore * dbe_
T getUntrackedParameter(std::string const &, T const &) const
edm::ParameterSet parameters_
std::string input_dir_
int prescaleEvt_
units of lumi sections
std::string monitorName_
int counterEvt_
counter
std::string output_dir_
int prescaleLS_
counter
bool verbose_
prescale on number of events
void L1TRPCTFClient::processHistograms ( )
private

Definition at line 150 of file L1TRPCTFClient.cc.

References gather_cfg::cout, dbe_, DQMStore::get(), QReport::getBadChannels(), DQMStore::getMEs(), MonitorElement::getQReport(), MonitorElement::getQReports(), and DQMStore::setCurrentFolder().

150  {
151 
153 
154  {
155 
156  MonitorElement *me
157  = dbe_->get( (input_dir_+"/RPCTF_muons_eta_phi_bx0").c_str() );
158 
159  if (me){
160  const QReport *qreport;
161 
162  qreport = me->getQReport("DeadChannels_RPCTF_2D");
163  if (qreport) {
164  vector<dqm::me_util::Channel> badChannels = qreport->getBadChannels();
165  for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
166  channel != badChannels.end();
167  ++channel)
168  {
169  m_deadChannels->setBinContent((*channel).getBinX(),
170  (*channel).getBinY(),
171  100);
172  } // for(badchannels)
173  } //if (qreport)
174 
175  qreport = me->getQReport("HotChannels_RPCTF_2D");
176  if (qreport) {
177  vector<dqm::me_util::Channel> badChannels = qreport->getBadChannels();
178  for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
179  channel != badChannels.end();
180  ++channel)
181  {
182  // (*channel).getBinY() == 0 for NoisyChannels QTEST
183  m_noisyChannels->setBinContent((*channel).getBinX(), 100);
184  } // for(badchannels)
185  } //if (qreport)
186  // else std::cout << "dupa" << std::endl;
187  } // if (me)
188 
189 
190  }
191 
192 
193  if (verbose_)
194  {
195  std::vector<string> meVec = dbe_->getMEs();
196  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
197 
198  std::string full_path = input_dir_ + "/" + (*it);
199  MonitorElement * me =dbe_->get(full_path);
200 
201  // for this MEs, get list of associated QTs
202  std::vector<QReport *> Qtest_map = me->getQReports();
203 
204  if (Qtest_map.size() > 0) {
205  std::cout << "Test: " << full_path << std::endl;
206  for (std::vector<QReport *>::const_iterator it = Qtest_map.begin();
207  it != Qtest_map.end();
208  ++it)
209  {
210  std::cout
211  << " Name "<< (*it)->getQRName()
212  << " Status " << (*it)->getStatus()
213  <<std::endl;
214 
215  std::vector<dqm::me_util::Channel> badChannels=(*it)->getBadChannels();
216 
217  vector<dqm::me_util::Channel>::iterator badchsit = badChannels.begin();
218  while(badchsit != badChannels.end())
219  {
220  int ix = (*badchsit).getBinX();
221  int iy = (*badchsit).getBinY();
222  std::cout << "(" << ix <<","<< iy << ") ";
223  ++badchsit;
224  }
225  std::cout << std::endl;
226 
227  }
228  }
229 
230  } //
231  }
232 
233 
234 }
DQMStore * dbe_
MonitorElement * m_noisyChannels
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to &lt;qtname&gt; (null pointer if QReport does not exist)
void setBinContent(int binx, double content)
set content of bin (1-D)
std::string input_dir_
MonitorElement * m_deadChannels
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1468
const std::vector< DQMChannel > & getBadChannels(void) const
Definition: QReport.h:33
std::vector< QReport * > getQReports(void) const
get map of QReports
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1442
tuple cout
Definition: gather_cfg.py:121
bool verbose_
prescale on number of events
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429

Member Data Documentation

int L1TRPCTFClient::counterEvt_
private

counter

Definition at line 73 of file L1TRPCTFClient.h.

int L1TRPCTFClient::counterLS_
private

Definition at line 72 of file L1TRPCTFClient.h.

DQMStore* L1TRPCTFClient::dbe_
private

Definition at line 68 of file L1TRPCTFClient.h.

std::string L1TRPCTFClient::input_dir_
private

Definition at line 70 of file L1TRPCTFClient.h.

MonitorElement* L1TRPCTFClient::m_deadChannels
private

Definition at line 64 of file L1TRPCTFClient.h.

MonitorElement* L1TRPCTFClient::m_noisyChannels
private

Definition at line 65 of file L1TRPCTFClient.h.

MonitorElement* L1TRPCTFClient::m_phipackedbad
private

Definition at line 62 of file L1TRPCTFClient.h.

MonitorElement* L1TRPCTFClient::m_phipackeddead
private

Definition at line 63 of file L1TRPCTFClient.h.

bool L1TRPCTFClient::m_runInEndJob
private

Definition at line 82 of file L1TRPCTFClient.h.

bool L1TRPCTFClient::m_runInEndLumi
private

Definition at line 80 of file L1TRPCTFClient.h.

bool L1TRPCTFClient::m_runInEndRun
private

Definition at line 81 of file L1TRPCTFClient.h.

bool L1TRPCTFClient::m_runInEventLoop
private

Definition at line 79 of file L1TRPCTFClient.h.

std::string L1TRPCTFClient::monitorName_
private

Definition at line 69 of file L1TRPCTFClient.h.

std::string L1TRPCTFClient::output_dir_
private

Definition at line 71 of file L1TRPCTFClient.h.

edm::ParameterSet L1TRPCTFClient::parameters_
private
int L1TRPCTFClient::prescaleEvt_
private

units of lumi sections

Definition at line 75 of file L1TRPCTFClient.h.

int L1TRPCTFClient::prescaleLS_
private

counter

Definition at line 74 of file L1TRPCTFClient.h.

bool L1TRPCTFClient::verbose_
private

prescale on number of events

Definition at line 77 of file L1TRPCTFClient.h.