CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
L1TRPCTFClient Class Reference

#include <L1TRPCTFClient.h>

Inheritance diagram for L1TRPCTFClient:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1TRPCTFClient (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~L1TRPCTFClient () 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 (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endProcessBlockProduce (edm::ProcessBlock &) 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::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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 selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
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 &ibooker, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
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)
 
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 ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Private Member Functions

void book (DQMStore::IBooker &ibooker)
 
void initialize ()
 
void processHistograms (DQMStore::IGetter &igetter)
 

Private Attributes

int counterEvt_
 counter More...
 
int counterLS_
 
std::string input_dir_
 
MonitorElementm_deadChannels
 
MonitorElementm_noisyChannels
 
MonitorElementm_phipackedbad
 
MonitorElementm_phipackeddead
 
bool m_runInEndJob
 
bool m_runInEndLumi
 
bool m_runInEndRun
 
bool m_runInEventLoop
 
std::string monitorName_
 
std::string output_dir_
 
edm::ParameterSet parameters_
 
int prescaleEvt_
 units of lumi sections More...
 
int prescaleLS_
 counter More...
 
bool verbose_
 prescale on number of events 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< DQMTokenjobmegetter_
 
edm::EDPutTokenT< DQMTokenjobToken_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 21 of file L1TRPCTFClient.h.

Constructor & Destructor Documentation

◆ L1TRPCTFClient()

L1TRPCTFClient::L1TRPCTFClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 21 of file L1TRPCTFClient.cc.

References initialize().

21  {
22  parameters_ = ps;
23  initialize();
24 }
edm::ParameterSet parameters_

◆ ~L1TRPCTFClient()

L1TRPCTFClient::~L1TRPCTFClient ( )
override

Destructor.

Definition at line 26 of file L1TRPCTFClient.cc.

26 { LogInfo("TriggerDQM") << "[TriggerDQM]: ending... "; }
Log< level::Info, false > LogInfo

Member Function Documentation

◆ book()

void L1TRPCTFClient::book ( DQMStore::IBooker ibooker)
private

Definition at line 56 of file L1TRPCTFClient.cc.

References dqm::implementation::IBooker::book2D(), and dqm::implementation::NavigatorBase::setCurrentFolder().

56  {
57  LogInfo("TriggerDQM") << "[TriggerDQM]: Begin Job";
58 
60 
61  m_deadChannels = ibooker.book2D("RPCTF_deadchannels", "RPCTF deadchannels", 33, -16.5, 16.5, 144, -0.5, 143.5);
62  m_noisyChannels = ibooker.book2D("RPCTF_noisychannels", "RPCTF noisy channels", 33, -16.5, 16.5, 144, -0.5, 143.5);
63 }
MonitorElement * m_noisyChannels
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * m_deadChannels
Log< level::Info, false > LogInfo
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
std::string output_dir_

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 80 of file L1TRPCTFClient.cc.

80  {
81  book(ibooker);
82  processHistograms(igetter);
83 }
void book(DQMStore::IBooker &ibooker)
void processHistograms(DQMStore::IGetter &igetter)

◆ dqmEndLuminosityBlock()

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

Reimplemented from DQMEDHarvester.

Definition at line 67 of file L1TRPCTFClient.cc.

References gather_cfg::cout.

70  {
71  if (verbose_)
72  std::cout << "L1TRPCTFClient::endLuminosityBlock" << std::endl;
73 
74  if (m_runInEndLumi) {
75  book(ibooker);
76  processHistograms(igetter);
77  }
78 }
void book(DQMStore::IBooker &ibooker)
void processHistograms(DQMStore::IGetter &igetter)
bool verbose_
prescale on number of events

◆ initialize()

void L1TRPCTFClient::initialize ( )
private

Definition at line 29 of file L1TRPCTFClient.cc.

29  {
30  counterLS_ = 0;
31  counterEvt_ = 0;
32 
33  // base folder for the contents of this job
34  monitorName_ = parameters_.getUntrackedParameter<string>("monitorName", "");
35  // cout << "Monitor name = " << monitorName_ << endl;
36  prescaleLS_ = parameters_.getUntrackedParameter<int>("prescaleLS", -1);
37  // cout << "DQM lumi section prescale = " << prescaleLS_ << " lumi section(s)"<< endl;
38  prescaleEvt_ = parameters_.getUntrackedParameter<int>("prescaleEvt", -1);
39  // cout << "DQM event prescale = " << prescaleEvt_ << " events(s)"<< endl;
40  output_dir_ = parameters_.getUntrackedParameter<string>("output_dir", "");
41  // cout << "DQM output dir = " << output_dir_ << endl;
42  input_dir_ = parameters_.getUntrackedParameter<string>("input_dir", "");
43  // cout << "DQM input dir = " << input_dir_ << endl;
44 
45  verbose_ = parameters_.getUntrackedParameter<bool>("verbose", false);
46 
47  m_runInEventLoop = parameters_.getUntrackedParameter<bool>("runInEventLoop", false);
48  m_runInEndLumi = parameters_.getUntrackedParameter<bool>("runInEndLumi", false);
49  m_runInEndRun = parameters_.getUntrackedParameter<bool>("runInEndRun", false);
50  m_runInEndJob = parameters_.getUntrackedParameter<bool>("runInEndJob", false);
51 
52  LogInfo("TriggerDQM");
53 }
edm::ParameterSet parameters_
std::string input_dir_
T getUntrackedParameter(std::string const &, T const &) const
int prescaleEvt_
units of lumi sections
std::string monitorName_
int counterEvt_
counter
Log< level::Info, false > LogInfo
std::string output_dir_
int prescaleLS_
counter
bool verbose_
prescale on number of events

◆ processHistograms()

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

Definition at line 86 of file L1TRPCTFClient.cc.

References gather_cfg::cout, dqm::implementation::IGetter::get(), MonitorElementData::QReport::getBadChannels(), dqm::implementation::IGetter::getMEs(), hlt_dqm_clientPB-live_cfg::me, dqm::implementation::NavigatorBase::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

86  {
88 
89  {
90  MonitorElement *me = igetter.get(input_dir_ + "/RPCTF_muons_eta_phi_bx0");
91 
92  if (me) {
93  const QReport *qreport;
94 
95  qreport = me->getQReport("DeadChannels_RPCTF_2D");
96  if (qreport) {
97  vector<dqm::me_util::Channel> badChannels = qreport->getBadChannels();
98  for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
99  ++channel) {
100  m_deadChannels->setBinContent((*channel).getBinX(), (*channel).getBinY(), 100);
101  } // for(badchannels)
102  } //if (qreport)
103 
104  qreport = me->getQReport("HotChannels_RPCTF_2D");
105  if (qreport) {
106  vector<dqm::me_util::Channel> badChannels = qreport->getBadChannels();
107  for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
108  ++channel) {
109  // (*channel).getBinY() == 0 for NoisyChannels QTEST
110  m_noisyChannels->setBinContent((*channel).getBinX(), 100);
111  } // for(badchannels)
112  } //if (qreport)
113  // else std::cout << "dupa" << std::endl;
114  } // if (me)
115  }
116 
117  if (verbose_) {
118  std::vector<string> meVec = igetter.getMEs();
119  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
120  std::string full_path = input_dir_ + "/" + (*it);
121  MonitorElement *me = igetter.get(full_path);
122 
123  // for this MEs, get list of associated QTs
124  std::vector<QReport *> Qtest_map = me->getQReports();
125 
126  if (!Qtest_map.empty()) {
127  std::cout << "Test: " << full_path << std::endl;
128  for (std::vector<QReport *>::const_iterator it = Qtest_map.begin(); it != Qtest_map.end(); ++it) {
129  std::cout << " Name " << (*it)->getQRName() << " Status " << (*it)->getStatus() << std::endl;
130 
131  std::vector<dqm::me_util::Channel> badChannels = (*it)->getBadChannels();
132 
133  vector<dqm::me_util::Channel>::iterator badchsit = badChannels.begin();
134  while (badchsit != badChannels.end()) {
135  int ix = (*badchsit).getBinX();
136  int iy = (*badchsit).getBinY();
137  std::cout << "(" << ix << "," << iy << ") ";
138  ++badchsit;
139  }
140  std::cout << std::endl;
141  }
142  }
143 
144  } //
145  }
146 }
MonitorElement * m_noisyChannels
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
virtual std::vector< std::string > getMEs() const
Definition: DQMStore.cc:727
const std::vector< DQMChannel > & getBadChannels() const
std::string input_dir_
MonitorElement * m_deadChannels
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:680
bool verbose_
prescale on number of events

Member Data Documentation

◆ counterEvt_

int L1TRPCTFClient::counterEvt_
private

counter

Definition at line 51 of file L1TRPCTFClient.h.

◆ counterLS_

int L1TRPCTFClient::counterLS_
private

Definition at line 50 of file L1TRPCTFClient.h.

◆ input_dir_

std::string L1TRPCTFClient::input_dir_
private

Definition at line 48 of file L1TRPCTFClient.h.

◆ m_deadChannels

MonitorElement* L1TRPCTFClient::m_deadChannels
private

Definition at line 43 of file L1TRPCTFClient.h.

◆ m_noisyChannels

MonitorElement* L1TRPCTFClient::m_noisyChannels
private

Definition at line 44 of file L1TRPCTFClient.h.

◆ m_phipackedbad

MonitorElement* L1TRPCTFClient::m_phipackedbad
private

Definition at line 41 of file L1TRPCTFClient.h.

◆ m_phipackeddead

MonitorElement* L1TRPCTFClient::m_phipackeddead
private

Definition at line 42 of file L1TRPCTFClient.h.

◆ m_runInEndJob

bool L1TRPCTFClient::m_runInEndJob
private

Definition at line 60 of file L1TRPCTFClient.h.

◆ m_runInEndLumi

bool L1TRPCTFClient::m_runInEndLumi
private

Definition at line 58 of file L1TRPCTFClient.h.

◆ m_runInEndRun

bool L1TRPCTFClient::m_runInEndRun
private

Definition at line 59 of file L1TRPCTFClient.h.

◆ m_runInEventLoop

bool L1TRPCTFClient::m_runInEventLoop
private

Definition at line 57 of file L1TRPCTFClient.h.

◆ monitorName_

std::string L1TRPCTFClient::monitorName_
private

Definition at line 47 of file L1TRPCTFClient.h.

◆ output_dir_

std::string L1TRPCTFClient::output_dir_
private

Definition at line 49 of file L1TRPCTFClient.h.

◆ parameters_

edm::ParameterSet L1TRPCTFClient::parameters_
private

◆ prescaleEvt_

int L1TRPCTFClient::prescaleEvt_
private

units of lumi sections

Definition at line 53 of file L1TRPCTFClient.h.

◆ prescaleLS_

int L1TRPCTFClient::prescaleLS_
private

counter

Definition at line 52 of file L1TRPCTFClient.h.

◆ verbose_

bool L1TRPCTFClient::verbose_
private

prescale on number of events

Definition at line 55 of file L1TRPCTFClient.h.