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

 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 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 &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 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
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 21 of file L1TRPCTFClient.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 22 of file L1TRPCTFClient.cc.

References initialize().

22  {
23  parameters_ = ps;
24  initialize();
25 }
edm::ParameterSet parameters_
L1TRPCTFClient::~L1TRPCTFClient ( )
override

Destructor.

Definition at line 27 of file L1TRPCTFClient.cc.

27 { LogInfo("TriggerDQM") << "[TriggerDQM]: ending... "; }

Member Function Documentation

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

Definition at line 57 of file L1TRPCTFClient.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), and dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder().

57  {
58  LogInfo("TriggerDQM") << "[TriggerDQM]: Begin Job";
59 
60  ibooker.setCurrentFolder(output_dir_);
61 
62  m_deadChannels = ibooker.book2D("RPCTF_deadchannels", "RPCTF deadchannels", 33, -16.5, 16.5, 144, -0.5, 143.5);
63  m_noisyChannels = ibooker.book2D("RPCTF_noisychannels", "RPCTF noisy channels", 33, -16.5, 16.5, 144, -0.5, 143.5);
64 }
MonitorElement * m_noisyChannels
MonitorElement * m_deadChannels
std::string output_dir_
void L1TRPCTFClient::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 81 of file L1TRPCTFClient.cc.

81  {
82  book(ibooker);
83  processHistograms(igetter);
84 }
void book(DQMStore::IBooker &ibooker)
void processHistograms(DQMStore::IGetter &igetter)
void L1TRPCTFClient::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter ,
edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 68 of file L1TRPCTFClient.cc.

References gather_cfg::cout.

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

Definition at line 30 of file L1TRPCTFClient.cc.

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

Definition at line 87 of file L1TRPCTFClient.cc.

References gather_cfg::cout, dqm::dqmstoreimpl::DQMStore::IGetter::get(), QReport::getBadChannels(), dqm::dqmstoreimpl::DQMStore::IGetter::getMEs(), dqm::impl::MonitorElement::getQReport(), dqm::impl::MonitorElement::getQReports(), hlt_dqm_clientPB-live_cfg::me, dqm::dqmstoreimpl::DQMStore::IGetter::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

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

Member Data Documentation

int L1TRPCTFClient::counterEvt_
private

counter

Definition at line 51 of file L1TRPCTFClient.h.

int L1TRPCTFClient::counterLS_
private

Definition at line 50 of file L1TRPCTFClient.h.

std::string L1TRPCTFClient::input_dir_
private

Definition at line 48 of file L1TRPCTFClient.h.

MonitorElement* L1TRPCTFClient::m_deadChannels
private

Definition at line 43 of file L1TRPCTFClient.h.

MonitorElement* L1TRPCTFClient::m_noisyChannels
private

Definition at line 44 of file L1TRPCTFClient.h.

MonitorElement* L1TRPCTFClient::m_phipackedbad
private

Definition at line 41 of file L1TRPCTFClient.h.

MonitorElement* L1TRPCTFClient::m_phipackeddead
private

Definition at line 42 of file L1TRPCTFClient.h.

bool L1TRPCTFClient::m_runInEndJob
private

Definition at line 60 of file L1TRPCTFClient.h.

bool L1TRPCTFClient::m_runInEndLumi
private

Definition at line 58 of file L1TRPCTFClient.h.

bool L1TRPCTFClient::m_runInEndRun
private

Definition at line 59 of file L1TRPCTFClient.h.

bool L1TRPCTFClient::m_runInEventLoop
private

Definition at line 57 of file L1TRPCTFClient.h.

std::string L1TRPCTFClient::monitorName_
private

Definition at line 47 of file L1TRPCTFClient.h.

std::string L1TRPCTFClient::output_dir_
private

Definition at line 49 of file L1TRPCTFClient.h.

edm::ParameterSet L1TRPCTFClient::parameters_
private
int L1TRPCTFClient::prescaleEvt_
private

units of lumi sections

Definition at line 53 of file L1TRPCTFClient.h.

int L1TRPCTFClient::prescaleLS_
private

counter

Definition at line 52 of file L1TRPCTFClient.h.

bool L1TRPCTFClient::verbose_
private

prescale on number of events

Definition at line 55 of file L1TRPCTFClient.h.