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 edm::EDConsumerBase

Public Member Functions

 L1TCSCTFClient (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~L1TCSCTFClient ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Member Functions

void initialize ()
 
void processHistograms ()
 

Private Attributes

int counterEvt
 counter More...
 
int counterLS
 
MonitorElementcsctferrors_
 
DQMStoredbe
 
std::string input_dir
 
bool m_runInEndJob
 
bool m_runInEndLumi
 
bool m_runInEndRun
 
bool m_runInEventLoop
 prescale on number of events More...
 
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
 
- 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 13 of file L1TCSCTFClient.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 15 of file L1TCSCTFClient.cc.

References initialize(), and 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 71 of file L1TCSCTFClient.cc.

References daq_dqm_sourceclient-live_cfg::prescaleEvt.

71  {
72 
73  counterEvt++;
74  if (prescaleEvt<1) return;
75  if (prescaleEvt>0 && counterEvt%prescaleEvt!=0) return;
76 
77  // there is no loop on events in the offline harvesting step
78  // code here will not be executed offline
79 
80  if (m_runInEventLoop) {
81 
83  }
84 
85 }
bool m_runInEventLoop
prescale on number of events
int prescaleEvt
units of lumi sections
void processHistograms()
int counterEvt
counter
void L1TCSCTFClient::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 43 of file L1TCSCTFClient.cc.

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

43  {
44  // get backendinterface
46 
47  // do your thing
49  csctferrors_ = dbe->book1D("csctferrors_","CSCTF Errors",6,0,6);
51 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:942
DQMStore * dbe
std::string input_dir
MonitorElement * csctferrors_
std::string output_dir
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:655
void L1TCSCTFClient::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 57 of file L1TCSCTFClient.cc.

57  {
58  // optionally reset histograms here
59 }
void L1TCSCTFClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 54 of file L1TCSCTFClient.cc.

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

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 98 of file L1TCSCTFClient.cc.

98  {
99 
100  if (m_runInEndJob) {
101 
103  }
104 
105 }
void processHistograms()
void L1TCSCTFClient::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
protectedvirtual

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 61 of file L1TCSCTFClient.cc.

61  {
62 
63  if (m_runInEndLumi) {
64 
66  }
67 
68 }
void processHistograms()
void L1TCSCTFClient::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 88 of file L1TCSCTFClient.cc.

88  {
89 
90  if (m_runInEndRun) {
91 
93  }
94 
95 }
void processHistograms()
void L1TCSCTFClient::initialize ( )
private

Definition at line 23 of file L1TCSCTFClient.cc.

References cppFunctionSkipper::operator, o2o::output_dir, Parameters::parameters, daq_dqm_sourceclient-live_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 
35  m_runInEventLoop = parameters.getUntrackedParameter<bool>("runInEventLoop", false);
36  m_runInEndLumi = parameters.getUntrackedParameter<bool>("runInEndLumi", false);
37  m_runInEndRun = parameters.getUntrackedParameter<bool>("runInEndRun", false);
38  m_runInEndJob = parameters.getUntrackedParameter<bool>("runInEndJob", false);
39 
40 }
T getUntrackedParameter(std::string const &, T const &) const
bool m_runInEventLoop
prescale on number of events
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
void L1TCSCTFClient::processHistograms ( )
private

Definition at line 108 of file L1TCSCTFClient.cc.

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

108  {
109 
111 
112  vector<string> meVec = dbe->getMEs();
113  for(vector<string>::const_iterator it=meVec.begin(); it!=meVec.end(); it++){
114  string full_path = input_dir + "/" + (*it);
115  MonitorElement *me =dbe->get(full_path);
116  if( !me ){
117  LogInfo("TriggerDQM")<<full_path<<" NOT FOUND.";
118  continue;
119  }
120 
121  // But for now we only do a simple workaround
122  if( (*it) != "CSCTF_errors" ) continue;
123  TH1F *errors = me->getTH1F();
124  csctferrors_->getTH1F()->Reset();
125  if(!errors) continue;
126  for(int bin=1; bin<=errors->GetXaxis()->GetNbins(); bin++)
127  csctferrors_->Fill(bin-0.5,errors->GetBinContent(bin));
128  }
129 
130 }
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:1693
MonitorElement * csctferrors_
TH1F * getTH1F(void) const
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1667
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:655

Member Data Documentation

int L1TCSCTFClient::counterEvt
private

counter

Definition at line 57 of file L1TCSCTFClient.h.

int L1TCSCTFClient::counterLS
private

Definition at line 56 of file L1TCSCTFClient.h.

MonitorElement* L1TCSCTFClient::csctferrors_
private

Definition at line 69 of file L1TCSCTFClient.h.

DQMStore* L1TCSCTFClient::dbe
private

Definition at line 54 of file L1TCSCTFClient.h.

std::string L1TCSCTFClient::input_dir
private

Definition at line 55 of file L1TCSCTFClient.h.

bool L1TCSCTFClient::m_runInEndJob
private

Definition at line 64 of file L1TCSCTFClient.h.

bool L1TCSCTFClient::m_runInEndLumi
private

Definition at line 62 of file L1TCSCTFClient.h.

bool L1TCSCTFClient::m_runInEndRun
private

Definition at line 63 of file L1TCSCTFClient.h.

bool L1TCSCTFClient::m_runInEventLoop
private

prescale on number of events

Definition at line 61 of file L1TCSCTFClient.h.

std::string L1TCSCTFClient::output_dir
private

Definition at line 55 of file L1TCSCTFClient.h.

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

units of lumi sections

Definition at line 59 of file L1TCSCTFClient.h.

int L1TCSCTFClient::prescaleLS
private

counter

Definition at line 58 of file L1TCSCTFClient.h.