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 hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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 () 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
 
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)
 
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::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 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 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 22 of file L1TRPCTFClient.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 23 of file L1TRPCTFClient.cc.

References initialize().

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

Destructor.

Definition at line 29 of file L1TRPCTFClient.cc.

29  {
30  LogInfo("TriggerDQM")<<"[TriggerDQM]: ending... ";
31 }

Member Function Documentation

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

Definition at line 65 of file L1TRPCTFClient.cc.

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

65  {
66 
67  LogInfo("TriggerDQM")<<"[TriggerDQM]: Begin Job";
68 
70 
71  m_deadChannels = ibooker.book2D("RPCTF_deadchannels",
72  "RPCTF deadchannels",
73  33, -16.5, 16.5,
74  144, -0.5, 143.5);
75  m_noisyChannels = ibooker.book2D("RPCTF_noisychannels",
76  "RPCTF noisy channels",
77  33, -16.5, 16.5,
78  144, -0.5, 143.5);
79 }
MonitorElement * m_noisyChannels
MonitorElement * m_deadChannels
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
std::string output_dir_
void L1TRPCTFClient::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 94 of file L1TRPCTFClient.cc.

94  {
95  book(ibooker);
96  processHistograms(igetter);
97 }
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 83 of file L1TRPCTFClient.cc.

References gather_cfg::cout.

84 {
85  if (verbose_) std::cout << "L1TRPCTFClient::endLuminosityBlock" << std::endl;
86 
87  if (m_runInEndLumi) {
88  book(ibooker);
89  processHistograms(igetter);
90  }
91 
92 }
void book(DQMStore::IBooker &ibooker)
void processHistograms(DQMStore::IGetter &igetter)
bool verbose_
prescale on number of events
void L1TRPCTFClient::initialize ( )
private

Definition at line 34 of file L1TRPCTFClient.cc.

34  {
35 
36  counterLS_=0;
37  counterEvt_=0;
38 
39  // base folder for the contents of this job
40  monitorName_ = parameters_.getUntrackedParameter<string>("monitorName","");
41 // cout << "Monitor name = " << monitorName_ << endl;
42  prescaleLS_ = parameters_.getUntrackedParameter<int>("prescaleLS", -1);
43 // cout << "DQM lumi section prescale = " << prescaleLS_ << " lumi section(s)"<< endl;
44  prescaleEvt_ = parameters_.getUntrackedParameter<int>("prescaleEvt", -1);
45 // cout << "DQM event prescale = " << prescaleEvt_ << " events(s)"<< endl;
46  output_dir_ = parameters_.getUntrackedParameter<string>("output_dir","");
47 // cout << "DQM output dir = " << output_dir_ << endl;
48  input_dir_ = parameters_.getUntrackedParameter<string>("input_dir","");
49 // cout << "DQM input dir = " << input_dir_ << endl;
50 
51  verbose_ = parameters_.getUntrackedParameter<bool>("verbose", false);
52 
53  m_runInEventLoop = parameters_.getUntrackedParameter<bool>("runInEventLoop", false);
54  m_runInEndLumi = parameters_.getUntrackedParameter<bool>("runInEndLumi", false);
55  m_runInEndRun = parameters_.getUntrackedParameter<bool>("runInEndRun", false);
56  m_runInEndJob = parameters_.getUntrackedParameter<bool>("runInEndJob", false);
57 
58 
59  LogInfo( "TriggerDQM");
60 
61 
62 }
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 100 of file L1TRPCTFClient.cc.

References gather_cfg::cout, DQMStore::IGetter::get(), QReport::getBadChannels(), DQMStore::IGetter::getMEs(), MonitorElement::getQReport(), MonitorElement::getQReports(), DQMStore::IGetter::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

100  {
101 
102  igetter.setCurrentFolder(input_dir_);
103 
104  {
105 
106  MonitorElement *me
107  = igetter.get( input_dir_+"/RPCTF_muons_eta_phi_bx0" );
108 
109  if (me){
110  const QReport *qreport;
111 
112  qreport = me->getQReport("DeadChannels_RPCTF_2D");
113  if (qreport) {
114  vector<dqm::me_util::Channel> badChannels = qreport->getBadChannels();
115  for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
116  channel != badChannels.end();
117  ++channel)
118  {
119  m_deadChannels->setBinContent((*channel).getBinX(),
120  (*channel).getBinY(),
121  100);
122  } // for(badchannels)
123  } //if (qreport)
124 
125  qreport = me->getQReport("HotChannels_RPCTF_2D");
126  if (qreport) {
127  vector<dqm::me_util::Channel> badChannels = qreport->getBadChannels();
128  for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
129  channel != badChannels.end();
130  ++channel)
131  {
132  // (*channel).getBinY() == 0 for NoisyChannels QTEST
133  m_noisyChannels->setBinContent((*channel).getBinX(), 100);
134  } // for(badchannels)
135  } //if (qreport)
136  // else std::cout << "dupa" << std::endl;
137  } // if (me)
138 
139 
140  }
141 
142 
143  if (verbose_)
144  {
145  std::vector<string> meVec = igetter.getMEs();
146  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
147 
148  std::string full_path = input_dir_ + "/" + (*it);
149  MonitorElement * me =igetter.get(full_path);
150 
151  // for this MEs, get list of associated QTs
152  std::vector<QReport *> Qtest_map = me->getQReports();
153 
154  if (!Qtest_map.empty()) {
155  std::cout << "Test: " << full_path << std::endl;
156  for (std::vector<QReport *>::const_iterator it = Qtest_map.begin();
157  it != Qtest_map.end();
158  ++it)
159  {
160  std::cout
161  << " Name "<< (*it)->getQRName()
162  << " Status " << (*it)->getStatus()
163  <<std::endl;
164 
165  std::vector<dqm::me_util::Channel> badChannels=(*it)->getBadChannels();
166 
167  vector<dqm::me_util::Channel>::iterator badchsit = badChannels.begin();
168  while(badchsit != badChannels.end())
169  {
170  int ix = (*badchsit).getBinX();
171  int iy = (*badchsit).getBinY();
172  std::cout << "(" << ix <<","<< iy << ") ";
173  ++badchsit;
174  }
175  std::cout << std::endl;
176 
177  }
178  }
179 
180  } //
181  }
182 
183 
184 }
MonitorElement * m_noisyChannels
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
void setBinContent(int binx, double content)
set content of bin (1-D)
const std::vector< DQMChannel > & getBadChannels() const
Definition: QReport.h:33
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:307
std::string input_dir_
MonitorElement * m_deadChannels
std::vector< QReport * > getQReports() const
get map of QReports
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:349
std::vector< std::string > getMEs()
Definition: DQMStore.cc:329
bool verbose_
prescale on number of events

Member Data Documentation

int L1TRPCTFClient::counterEvt_
private

counter

Definition at line 55 of file L1TRPCTFClient.h.

int L1TRPCTFClient::counterLS_
private

Definition at line 54 of file L1TRPCTFClient.h.

std::string L1TRPCTFClient::input_dir_
private

Definition at line 52 of file L1TRPCTFClient.h.

MonitorElement* L1TRPCTFClient::m_deadChannels
private

Definition at line 47 of file L1TRPCTFClient.h.

MonitorElement* L1TRPCTFClient::m_noisyChannels
private

Definition at line 48 of file L1TRPCTFClient.h.

MonitorElement* L1TRPCTFClient::m_phipackedbad
private

Definition at line 45 of file L1TRPCTFClient.h.

MonitorElement* L1TRPCTFClient::m_phipackeddead
private

Definition at line 46 of file L1TRPCTFClient.h.

bool L1TRPCTFClient::m_runInEndJob
private

Definition at line 64 of file L1TRPCTFClient.h.

bool L1TRPCTFClient::m_runInEndLumi
private

Definition at line 62 of file L1TRPCTFClient.h.

bool L1TRPCTFClient::m_runInEndRun
private

Definition at line 63 of file L1TRPCTFClient.h.

bool L1TRPCTFClient::m_runInEventLoop
private

Definition at line 61 of file L1TRPCTFClient.h.

std::string L1TRPCTFClient::monitorName_
private

Definition at line 51 of file L1TRPCTFClient.h.

std::string L1TRPCTFClient::output_dir_
private

Definition at line 53 of file L1TRPCTFClient.h.

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

units of lumi sections

Definition at line 57 of file L1TRPCTFClient.h.

int L1TRPCTFClient::prescaleLS_
private

counter

Definition at line 56 of file L1TRPCTFClient.h.

bool L1TRPCTFClient::verbose_
private

prescale on number of events

Definition at line 59 of file L1TRPCTFClient.h.