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::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > 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 beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester ()
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 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
 
std::vector< bool > const & recordProvenanceList () 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)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
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
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (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
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 13 of file L1TCSCTFClient.h.

Constructor & Destructor Documentation

◆ L1TCSCTFClient()

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

Constructor.

Definition at line 13 of file L1TCSCTFClient.cc.

13  {
14  parameters = ps;
15  initialize();
16 }

References initialize().

◆ ~L1TCSCTFClient()

L1TCSCTFClient::~L1TCSCTFClient ( )
override

Destructor.

Definition at line 18 of file L1TCSCTFClient.cc.

18 {}

Member Function Documentation

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 42 of file L1TCSCTFClient.cc.

42  {
43  ibooker.setCurrentFolder(output_dir);
44  csctferrors_ = ibooker.book1D("csctferrors_", "CSCTF Errors", 6, 0, 6);
45 
46  processHistograms(igetter);
47 }

References dqm::implementation::IBooker::book1D(), L1TRPCTF_cfi::output_dir, and dqm::implementation::NavigatorBase::setCurrentFolder().

◆ dqmEndLuminosityBlock()

void L1TCSCTFClient::dqmEndLuminosityBlock ( DQMStore::IBooker ,
DQMStore::IGetter igetter,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  c 
)
overrideprotectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 36 of file L1TCSCTFClient.cc.

39  {}

◆ initialize()

void L1TCSCTFClient::initialize ( )
private

Definition at line 21 of file L1TCSCTFClient.cc.

21  {
22  counterLS = 0;
23  counterEvt = 0;
24 
25  input_dir = parameters.getUntrackedParameter<string>("input_dir", "");
26  output_dir = parameters.getUntrackedParameter<string>("output_dir", "");
27  prescaleLS = parameters.getUntrackedParameter<int>("prescaleLS", -1);
28  prescaleEvt = parameters.getUntrackedParameter<int>("prescaleEvt", -1);
29 
30  m_runInEventLoop = parameters.getUntrackedParameter<bool>("runInEventLoop", false);
31  m_runInEndLumi = parameters.getUntrackedParameter<bool>("runInEndLumi", false);
32  m_runInEndRun = parameters.getUntrackedParameter<bool>("runInEndRun", false);
33  m_runInEndJob = parameters.getUntrackedParameter<bool>("runInEndJob", false);
34 }

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

◆ processHistograms()

void L1TCSCTFClient::processHistograms ( DQMStore::IGetter igetter)
private

Definition at line 50 of file L1TCSCTFClient.cc.

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

References newFWLiteAna::bin, dqm::implementation::IGetter::get(), dqm::implementation::IGetter::getMEs(), L1TCSCTFClient_cfi::input_dir, hlt_dqm_clientPB-live_cfg::me, and dqm::implementation::NavigatorBase::setCurrentFolder().

Member Data Documentation

◆ counterEvt

int L1TCSCTFClient::counterEvt
private

counter

Definition at line 37 of file L1TCSCTFClient.h.

◆ counterLS

int L1TCSCTFClient::counterLS
private

Definition at line 36 of file L1TCSCTFClient.h.

◆ csctferrors_

MonitorElement* L1TCSCTFClient::csctferrors_
private

Definition at line 47 of file L1TCSCTFClient.h.

◆ input_dir

std::string L1TCSCTFClient::input_dir
private

Definition at line 35 of file L1TCSCTFClient.h.

◆ m_runInEndJob

bool L1TCSCTFClient::m_runInEndJob
private

Definition at line 44 of file L1TCSCTFClient.h.

◆ m_runInEndLumi

bool L1TCSCTFClient::m_runInEndLumi
private

Definition at line 42 of file L1TCSCTFClient.h.

◆ m_runInEndRun

bool L1TCSCTFClient::m_runInEndRun
private

Definition at line 43 of file L1TCSCTFClient.h.

◆ m_runInEventLoop

bool L1TCSCTFClient::m_runInEventLoop
private

prescale on number of events

Definition at line 41 of file L1TCSCTFClient.h.

◆ output_dir

std::string L1TCSCTFClient::output_dir
private

Definition at line 35 of file L1TCSCTFClient.h.

◆ parameters

edm::ParameterSet L1TCSCTFClient::parameters
private

Definition at line 33 of file L1TCSCTFClient.h.

◆ prescaleEvt

int L1TCSCTFClient::prescaleEvt
private

units of lumi sections

Definition at line 39 of file L1TCSCTFClient.h.

◆ prescaleLS

int L1TCSCTFClient::prescaleLS
private

counter

Definition at line 38 of file L1TCSCTFClient.h.

L1TCSCTFClient::prescaleEvt
int prescaleEvt
units of lumi sections
Definition: L1TCSCTFClient.h:39
L1TCSCTFClient::csctferrors_
MonitorElement * csctferrors_
Definition: L1TCSCTFClient.h:47
L1TCSCTFClient::m_runInEndJob
bool m_runInEndJob
Definition: L1TCSCTFClient.h:44
edm::LogInfo
Definition: MessageLogger.h:254
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
L1TCSCTFClient::prescaleLS
int prescaleLS
counter
Definition: L1TCSCTFClient.h:38
dqm::legacy::MonitorElement::getTH1F
virtual TH1F * getTH1F() const
Definition: MonitorElement.h:478
L1TCSCTFClient::initialize
void initialize()
Definition: L1TCSCTFClient.cc:21
L1TCSCTFClient::input_dir
std::string input_dir
Definition: L1TCSCTFClient.h:35
parameters
parameters
Definition: BeamSpot_PayloadInspector.cc:14
errors
Definition: errors.py:1
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
L1TCSCTFClient::m_runInEndLumi
bool m_runInEndLumi
Definition: L1TCSCTFClient.h:42
L1TCSCTFClient::output_dir
std::string output_dir
Definition: L1TCSCTFClient.h:35
L1TCSCTFClient::m_runInEndRun
bool m_runInEndRun
Definition: L1TCSCTFClient.h:43
L1TCSCTFClient::counterLS
int counterLS
Definition: L1TCSCTFClient.h:36
L1TCSCTFClient::processHistograms
void processHistograms(DQMStore::IGetter &)
Definition: L1TCSCTFClient.cc:50
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:56
L1TCSCTFClient::m_runInEventLoop
bool m_runInEventLoop
prescale on number of events
Definition: L1TCSCTFClient.h:41
L1TCSCTFClient::counterEvt
int counterEvt
counter
Definition: L1TCSCTFClient.h:37