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
L1TCSCTFClient Class Reference

#include <L1TCSCTFClient.h>

Inheritance diagram for L1TCSCTFClient:
edm::EDAnalyzer

Public Member Functions

 L1TCSCTFClient (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~L1TCSCTFClient ()
 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 ()
 

Private Attributes

int counterEvt
 counter More...
 
int counterLS
 
MonitorElementcsctferrors_
 prescale on number of events More...
 
DQMStoredbe
 
std::string input_dir
 
std::string output_dir
 
edm::ParameterSet parameters
 
int prescaleEvt
 units of lumi sections More...
 
int prescaleLS
 counter 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)
 

Detailed Description

Definition at line 13 of file L1TCSCTFClient.h.

Constructor & Destructor Documentation

L1TCSCTFClient::L1TCSCTFClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 15 of file L1TCSCTFClient.cc.

References Parameters::parameters.

15  {
16  parameters=ps;
17  initialize();
18 }
edm::ParameterSet parameters
L1TCSCTFClient::~L1TCSCTFClient ( )
virtual

Destructor.

Definition at line 20 of file L1TCSCTFClient.cc.

20 {}

Member Function Documentation

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

Fake Analyze.

Implements edm::EDAnalyzer.

Definition at line 103 of file L1TCSCTFClient.cc.

References newFWLiteAna::bin, benchmark_cfg::errors, MonitorElement::getTH1F(), and reco_calib_source_client_cfg::prescaleEvt.

103  {
104  counterEvt++;
105  if (prescaleEvt<1) return;
106  if (prescaleEvt>0 && counterEvt%prescaleEvt!=0) return;
107 
109 
110  // The code below duplicates one from endLuminosityBlock function
111  vector<string> meVec = dbe->getMEs();
112  for(vector<string>::const_iterator it=meVec.begin(); it!=meVec.end(); it++){
113  string full_path = input_dir + "/" + (*it);
114  MonitorElement *me =dbe->get(full_path);
115  if( !me ){
116  LogError("TriggerDQM")<<full_path<<" NOT FOUND.";
117  continue;
118  }
119  // But for now we only do a simple workaround
120  if( (*it) != "CSCTF_errors" ) continue;
121  TH1F *errors = me->getTH1F();
122  csctferrors_->getTH1F()->Reset();
123  if(!errors) continue;
124  for(int bin=1; bin<=errors->GetXaxis()->GetNbins(); bin++)
125  csctferrors_->Fill(bin-0.5,errors->GetBinContent(bin));
126  }
127 }
int prescaleEvt
units of lumi sections
void Fill(long long x)
DQMStore * dbe
std::string input_dir
int counterEvt
counter
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1265
MonitorElement * csctferrors_
prescale on number of events
TH1F * getTH1F(void) const
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1239
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
void L1TCSCTFClient::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 37 of file L1TCSCTFClient.cc.

References cmsCodeRules.cppFunctionSkipper::operator, and o2o::output_dir.

37  {
38  // get backendinterface
40 
41  // do your thing
43  csctferrors_ = dbe->book1D("csctferrors_","CSCTF Errors",6,0,6);
45 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
DQMStore * dbe
std::string input_dir
MonitorElement * csctferrors_
prescale on number of events
std::string output_dir
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
void L1TCSCTFClient::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 51 of file L1TCSCTFClient.cc.

51  {
52  // optionally reset histograms here
53 }
void L1TCSCTFClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 48 of file L1TCSCTFClient.cc.

48 {}
void L1TCSCTFClient::endJob ( void  )
protectedvirtual

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 133 of file L1TCSCTFClient.cc.

133 {}
void L1TCSCTFClient::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
protectedvirtual

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 55 of file L1TCSCTFClient.cc.

References newFWLiteAna::bin, benchmark_cfg::errors, and MonitorElement::getTH1F().

55  {
57 
58  vector<string> meVec = dbe->getMEs();
59  for(vector<string>::const_iterator it=meVec.begin(); it!=meVec.end(); it++){
60  string full_path = input_dir + "/" + (*it);
61  MonitorElement *me =dbe->get(full_path);
62  if( !me ){
63  LogInfo("TriggerDQM")<<full_path<<" NOT FOUND.";
64  continue;
65  }
66 
67  // The commented code below requires to be developed to support QT framework
68 /* std::vector<QReport *> Qtest_map = me->getQReports();
69  for(std::vector<QReport *>::const_iterator it=Qtest_map.begin(); it!=Qtest_map.end(); it++){
70  string qt_name = (*it)->getQRName();
71  int qt_status = (*it)->getStatus();
72 
73  switch(qt_status){
74  case dqm::qstatus::WARNING: break;
75  case dqm::qstatus::ERROR: break;
76  case dqm::qstatus::DISABLED: break;
77  case dqm::qstatus::INVALID: break;
78  case dqm::qstatus::INSUF_STAT: break;
79  default: break;
80  }
81 
82 // get bad channel list
83  std::vector<dqm::me_util::Channel> badChannels=(*it)->getBadChannels();
84  for(vector<dqm::me_util::Channel>::iterator badchsit=badChannels.begin(); badchsit!=badChannels.end(); badchsit++){
85  int ix = badchsit->getBinX();
86  int iy = badchsit->getBinY();
87  (*badchsit).getContents();
88  }
89 
90  }
91 */
92  // But for now we only do a simple workaround
93  if( (*it) != "CSCTF_errors" ) continue;
94  TH1F *errors = me->getTH1F();
95  csctferrors_->getTH1F()->Reset();
96  if(!errors) continue;
97  for(int bin=1; bin<=errors->GetXaxis()->GetNbins(); bin++)
98  csctferrors_->Fill(bin-0.5,errors->GetBinContent(bin));
99  }
100 }
void Fill(long long x)
DQMStore * dbe
std::string input_dir
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1265
MonitorElement * csctferrors_
prescale on number of events
TH1F * getTH1F(void) const
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1239
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
void L1TCSCTFClient::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 130 of file L1TCSCTFClient.cc.

130 {}
void L1TCSCTFClient::initialize ( )
private

Definition at line 23 of file L1TCSCTFClient.cc.

References cmsCodeRules.cppFunctionSkipper::operator, o2o::output_dir, Parameters::parameters, reco_calib_source_client_cfg::prescaleEvt, and reco_calib_source_client_cfg::prescaleLS.

23  {
24  counterLS = 0;
25  counterEvt = 0;
26 
27  // get back-end interface
29 
30  input_dir = parameters.getUntrackedParameter<string>("input_dir","");
31  output_dir = parameters.getUntrackedParameter<string>("output_dir","");
32  prescaleLS = parameters.getUntrackedParameter<int>("prescaleLS",-1);
33  prescaleEvt = parameters.getUntrackedParameter<int>("prescaleEvt",-1);
34 }
T getUntrackedParameter(std::string const &, T const &) const
int prescaleEvt
units of lumi sections
DQMStore * dbe
std::string input_dir
int counterEvt
counter
int prescaleLS
counter
edm::ParameterSet parameters
std::string output_dir

Member Data Documentation

int L1TCSCTFClient::counterEvt
private

counter

Definition at line 54 of file L1TCSCTFClient.h.

int L1TCSCTFClient::counterLS
private

Definition at line 53 of file L1TCSCTFClient.h.

MonitorElement* L1TCSCTFClient::csctferrors_
private

prescale on number of events

Definition at line 59 of file L1TCSCTFClient.h.

DQMStore* L1TCSCTFClient::dbe
private

Definition at line 51 of file L1TCSCTFClient.h.

std::string L1TCSCTFClient::input_dir
private

Definition at line 52 of file L1TCSCTFClient.h.

std::string L1TCSCTFClient::output_dir
private

Definition at line 52 of file L1TCSCTFClient.h.

edm::ParameterSet L1TCSCTFClient::parameters
private
int L1TCSCTFClient::prescaleEvt
private

units of lumi sections

Definition at line 56 of file L1TCSCTFClient.h.

int L1TCSCTFClient::prescaleLS
private

counter

Definition at line 55 of file L1TCSCTFClient.h.