CMS 3D CMS Logo

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:
DQMEDHarvester edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 L1TCSCTFClient (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~L1TCSCTFClient ()
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
virtual void analyze (edm::Event const &, edm::EventSetup const &) final
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDHarvester (void)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 
- 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 (DQMStore::IGetter &)
 

Private Attributes

int counterEvt
 counter More...
 
int counterLS
 
MonitorElementcsctferrors_
 
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::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 14 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 metProducer_cfi::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::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 43 of file L1TCSCTFClient.cc.

References DQMStore::IBooker::book1D(), cmsPerfSuiteHarvest::output_dir, and DQMStore::IBooker::setCurrentFolder().

43  {
44 
46  csctferrors_ = ibooker.book1D("csctferrors_","CSCTF Errors",6,0,6);
47 
48  processHistograms(igetter);
49 
50 }
void processHistograms(DQMStore::IGetter &)
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * csctferrors_
std::string output_dir
void L1TCSCTFClient::dqmEndLuminosityBlock ( DQMStore::IBooker ,
DQMStore::IGetter ,
edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 39 of file L1TCSCTFClient.cc.

39  {
40 }
void L1TCSCTFClient::initialize ( )
private

Definition at line 23 of file L1TCSCTFClient.cc.

References cmsPerfSuiteHarvest::output_dir, and metProducer_cfi::parameters.

23  {
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 }
T getUntrackedParameter(std::string const &, T const &) const
bool m_runInEventLoop
prescale on number of events
int prescaleEvt
units of lumi sections
std::string input_dir
int counterEvt
counter
int prescaleLS
counter
edm::ParameterSet parameters
std::string output_dir
void L1TCSCTFClient::processHistograms ( DQMStore::IGetter igetter)
private

Definition at line 53 of file L1TCSCTFClient.cc.

References stringResolutionProvider_cfi::bin, DQMStore::IGetter::get(), DQMStore::IGetter::getMEs(), MonitorElement::getTH1F(), and DQMStore::IGetter::setCurrentFolder().

53  {
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 }
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:305
void Fill(long long x)
std::string input_dir
std::vector< std::string > getMEs(void)
Definition: DQMStore.cc:327
bin
set the eta bin as selection string.
MonitorElement * csctferrors_
TH1F * getTH1F(void) const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:347
Definition: errors.py:1

Member Data Documentation

int L1TCSCTFClient::counterEvt
private

counter

Definition at line 38 of file L1TCSCTFClient.h.

int L1TCSCTFClient::counterLS
private

Definition at line 37 of file L1TCSCTFClient.h.

MonitorElement* L1TCSCTFClient::csctferrors_
private

Definition at line 48 of file L1TCSCTFClient.h.

std::string L1TCSCTFClient::input_dir
private

Definition at line 36 of file L1TCSCTFClient.h.

bool L1TCSCTFClient::m_runInEndJob
private

Definition at line 45 of file L1TCSCTFClient.h.

bool L1TCSCTFClient::m_runInEndLumi
private

Definition at line 43 of file L1TCSCTFClient.h.

bool L1TCSCTFClient::m_runInEndRun
private

Definition at line 44 of file L1TCSCTFClient.h.

bool L1TCSCTFClient::m_runInEventLoop
private

prescale on number of events

Definition at line 42 of file L1TCSCTFClient.h.

std::string L1TCSCTFClient::output_dir
private

Definition at line 36 of file L1TCSCTFClient.h.

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

units of lumi sections

Definition at line 40 of file L1TCSCTFClient.h.

int L1TCSCTFClient::prescaleLS
private

counter

Definition at line 39 of file L1TCSCTFClient.h.