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::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1TCSCTFClient (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~L1TCSCTFClient () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQMEDHarvester ()
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &, edm::EventSetup const &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
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::ProducerBase
ProducesCollector producesCollector ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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 DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDHarvester
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 13 of file L1TCSCTFClient.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 14 of file L1TCSCTFClient.cc.

References initialize().

14  {
15  parameters = ps;
16  initialize();
17 }
L1TCSCTFClient::~L1TCSCTFClient ( )
override

Destructor.

Definition at line 19 of file L1TCSCTFClient.cc.

19 {}

Member Function Documentation

void L1TCSCTFClient::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 43 of file L1TCSCTFClient.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), L1TRPCTF_cfi::output_dir, and dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder().

43  {
44  ibooker.setCurrentFolder(output_dir);
45  csctferrors_ = ibooker.book1D("csctferrors_", "CSCTF Errors", 6, 0, 6);
46 
47  processHistograms(igetter);
48 }
void processHistograms(DQMStore::IGetter &)
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 37 of file L1TCSCTFClient.cc.

40  {}
void L1TCSCTFClient::initialize ( )
private

Definition at line 22 of file L1TCSCTFClient.cc.

References L1TCSCTFClient_cfi::input_dir, L1TRPCTF_cfi::output_dir, L1TCSCTFClient_cfi::prescaleEvt, and L1TCSCTFClient_cfi::prescaleLS.

22  {
23  counterLS = 0;
24  counterEvt = 0;
25 
26  input_dir = parameters.getUntrackedParameter<string>("input_dir", "");
27  output_dir = parameters.getUntrackedParameter<string>("output_dir", "");
28  prescaleLS = parameters.getUntrackedParameter<int>("prescaleLS", -1);
29  prescaleEvt = parameters.getUntrackedParameter<int>("prescaleEvt", -1);
30 
31  m_runInEventLoop = parameters.getUntrackedParameter<bool>("runInEventLoop", false);
32  m_runInEndLumi = parameters.getUntrackedParameter<bool>("runInEndLumi", false);
33  m_runInEndRun = parameters.getUntrackedParameter<bool>("runInEndRun", false);
34  m_runInEndJob = parameters.getUntrackedParameter<bool>("runInEndJob", false);
35 }
bool m_runInEventLoop
prescale on number of events
int prescaleEvt
units of lumi sections
std::string input_dir
int counterEvt
counter
int prescaleLS
counter
std::string output_dir
void L1TCSCTFClient::processHistograms ( DQMStore::IGetter igetter)
private

Definition at line 51 of file L1TCSCTFClient.cc.

References newFWLiteAna::bin, dqm::dqmstoreimpl::DQMStore::IGetter::get(), dqm::dqmstoreimpl::DQMStore::IGetter::getMEs(), dqm::legacy::MonitorElement::getTH1F(), L1TCSCTFClient_cfi::input_dir, hlt_dqm_clientPB-live_cfg::me, and dqm::dqmstoreimpl::DQMStore::IGetter::setCurrentFolder().

51  {
52  igetter.setCurrentFolder(input_dir);
53 
54  vector<string> meVec = igetter.getMEs();
55  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
56  string full_path = input_dir + "/" + (*it);
57  MonitorElement *me = igetter.get(full_path);
58  if (!me) {
59  LogInfo("TriggerDQM") << full_path << " NOT FOUND.";
60  continue;
61  }
62 
63  // But for now we only do a simple workaround
64  if ((*it) != "CSCTF_errors")
65  continue;
66  TH1F *errors = me->getTH1F();
67  csctferrors_->getTH1F()->Reset();
68  if (!errors)
69  continue;
70  for (int bin = 1; bin <= errors->GetXaxis()->GetNbins(); bin++)
71  csctferrors_->Fill(bin - 0.5, errors->GetBinContent(bin));
72  }
73 }
virtual TH1F * getTH1F() const
void Fill(long long x)
std::string input_dir
MonitorElement * csctferrors_
Definition: errors.py:1

Member Data Documentation

int L1TCSCTFClient::counterEvt
private

counter

Definition at line 37 of file L1TCSCTFClient.h.

int L1TCSCTFClient::counterLS
private

Definition at line 36 of file L1TCSCTFClient.h.

MonitorElement* L1TCSCTFClient::csctferrors_
private

Definition at line 47 of file L1TCSCTFClient.h.

std::string L1TCSCTFClient::input_dir
private

Definition at line 35 of file L1TCSCTFClient.h.

bool L1TCSCTFClient::m_runInEndJob
private

Definition at line 44 of file L1TCSCTFClient.h.

bool L1TCSCTFClient::m_runInEndLumi
private

Definition at line 42 of file L1TCSCTFClient.h.

bool L1TCSCTFClient::m_runInEndRun
private

Definition at line 43 of file L1TCSCTFClient.h.

bool L1TCSCTFClient::m_runInEventLoop
private

prescale on number of events

Definition at line 41 of file L1TCSCTFClient.h.

std::string L1TCSCTFClient::output_dir
private

Definition at line 35 of file L1TCSCTFClient.h.

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

units of lumi sections

Definition at line 39 of file L1TCSCTFClient.h.

int L1TCSCTFClient::prescaleLS
private

counter

Definition at line 38 of file L1TCSCTFClient.h.