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::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 L1TRPCTFClient (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~L1TRPCTFClient ()
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
virtual void analyze (edm::Event const &, edm::EventSetup const &) final
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDHarvester (void)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
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::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

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 ( )
virtual

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:277
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
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").c_str() );
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.size() > 0) {
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)
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:305
std::string input_dir_
MonitorElement * m_deadChannels
std::vector< std::string > getMEs(void)
Definition: DQMStore.cc:327
const std::vector< DQMChannel > & getBadChannels(void) const
Definition: QReport.h:33
std::vector< QReport * > getQReports(void) const
get map of QReports
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:347
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.