CMS 3D CMS Logo

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

Global stuff. More...

#include <CSCOfflineClient.h>

Inheritance diagram for CSCOfflineClient:
DQMEDHarvester cscdqm::MonitorObjectProvider 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

cscdqm::MonitorObjectbookMonitorObject (const cscdqm::HistoBookRequest &p_req) override
 Book Monitor Object on Request. More...
 
 CSCOfflineClient (const edm::ParameterSet &ps)
 Constructor. More...
 
bool getCSCDetId (const unsigned int crateId, const unsigned int dmbId, CSCDetId &detId) const override
 
 ~CSCOfflineClient () 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 ()
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
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)
 
- Public Member Functions inherited from cscdqm::MonitorObjectProvider
virtual ~MonitorObjectProvider ()(false)
 

Protected Member Functions

void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void setup ()
 
- 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 Attributes

cscdqm::Configuration config
 
cscdqm::Dispatcherdispatcher
 
DQMStore::IBookeribooker
 
std::vector< std::string > maskedHW
 

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

Global stuff.

DQM Framework stuff CSC Framework stuff CSCDQM Framework stuff Local stuff Local Constants

CSC Offline DQM Client that uses CSCDQM Framework

Definition at line 67 of file CSCOfflineClient.h.

Constructor & Destructor Documentation

CSCOfflineClient::CSCOfflineClient ( const edm::ParameterSet ps)

Constructor.

Global stuff

Parameters
psParameters.

Definition at line 25 of file CSCOfflineClient.cc.

References dispatcher, edm::ParameterSet::exists(), edm::ParameterSet::getUntrackedParameter(), cscdqm::Dispatcher::init(), and maskedHW.

25  {
26 
27  edm::ParameterSet params = ps.getUntrackedParameter<edm::ParameterSet>("EventProcessor");
28  config.load(params);
29 
30  dispatcher = new cscdqm::Dispatcher(&config, const_cast<CSCOfflineClient*>(this));
31  dispatcher->init();
32 
33  if (ps.exists("MASKEDHW")) {
34  maskedHW = ps.getUntrackedParameter<std::vector<std::string> >("MASKEDHW");
35  // dispatcher->maskHWElements(maskedHW);
36  }
37 
38 }
void init()
Initialize Dispatcher: book histograms, init processor, etc.
T getUntrackedParameter(std::string const &, T const &) const
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: config.py:1
CSCDQM Framework frontend and Histogram Cache controller.
cscdqm::Dispatcher * dispatcher
std::vector< std::string > maskedHW
CSCOfflineClient::~CSCOfflineClient ( )
override

Destructor.

Definition at line 43 of file CSCOfflineClient.cc.

References dispatcher.

43  {
44  if (dispatcher) delete dispatcher;
45 }
cscdqm::Dispatcher * dispatcher

Member Function Documentation

cscdqm::MonitorObject * CSCOfflineClient::bookMonitorObject ( const cscdqm::HistoBookRequest req)
overridevirtual

Book Monitor Object on Request.

Parameters
reqRequest.
Returns
MonitorObject created.

Implements cscdqm::MonitorObjectProvider.

Definition at line 138 of file CSCOfflineClient.cc.

References DQMStore::IBooker::bookFloat(), DQMStore::IBooker::bookInt(), DQMStore::IBooker::bookString(), DQMStore::IBooker::cd(), cscdqm::HistoBookRequest::default_float, cscdqm::HistoBookRequest::default_int, cscdqm::HistoBookRequest::default_string, DIR_CRTINFO, DIR_DAQINFO, DIR_DCSINFO, DIR_EVENTINFO, cscdqm::MonitorObject::Fill(), cscdqm::FLOAT, cscdqm::HistoBookRequest::folder, cscdqm::HistoDef::getId(), cscdqm::HistoDef::getName(), cscdqm::HistoDef::getPath(), cscdqm::HistoBookRequest::hdef, cscdqm::HistoBookRequest::htype, ibooker, cscdqm::INT, cscdqm::h::keys, dataset::name, cscdqm::h::PAR_REPORT_SUMMARY, callgraph::path, cscdqm::Utility::regexMatch(), DQMStore::IBooker::setCurrentFolder(), cscdqm::STRING, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getCSCDetId().

138  {
139 
140  cscdqm::MonitorObject *me = nullptr;
141  std::string name = req.hdef->getName();
142 
143  std::string path = req.folder;
144  if (!req.hdef->getPath().empty()) {
145  path = path + req.hdef->getPath() + "/";
146  }
147 
148  ibooker->cd();
149  ibooker->setCurrentFolder(path);
150 
151  if (req.htype == cscdqm::INT) {
152  me = new CSCMonitorObject(ibooker->bookInt(name));
153  me->Fill(req.default_int);
154  } else
155  if (req.htype == cscdqm::FLOAT) {
156  if (req.hdef->getId() == cscdqm::h::PAR_REPORT_SUMMARY) {
157  ibooker->cd();
159  } else if (cscdqm::Utility::regexMatch("^PAR_DCS_", cscdqm::h::keys[req.hdef->getId()])) {
160  ibooker->cd();
162  } else if (cscdqm::Utility::regexMatch("^PAR_DAQ_", cscdqm::h::keys[req.hdef->getId()])) {
163  ibooker->cd();
165  } else if (cscdqm::Utility::regexMatch("^PAR_CRT_", cscdqm::h::keys[req.hdef->getId()])) {
166  ibooker->cd();
168  }
169  me = new CSCMonitorObject(ibooker->bookFloat(name));
170  me->Fill(req.default_float);
171  } else
172  if (req.htype == cscdqm::STRING) {
173  me = new CSCMonitorObject(ibooker->bookString(name, req.default_string));
174  }
175 
176  return me;
177 
178 }
static const char DIR_DAQINFO[]
cscdqm::MonitorObject implementation used in CSCMonitorModuleCmn
virtual void Fill(float x)=0
Monitoring Object interface used to cover Root object and provide common interface to EventProcessor ...
MonitorElement * bookInt(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * bookString(Args &&...args)
Definition: DQMStore.h:100
DQMStore::IBooker * ibooker
static bool regexMatch(const std::string &expression, const std::string &message)
Match RegExp expression string against string message and return result.
const HistoId getId() const
Get Histogram ID.
static const char DIR_DCSINFO[]
static const char DIR_EVENTINFO[]
virtual const std::string getPath() const
Get path part of the histogram (used only for DDUs and CSCs)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
static const char DIR_CRTINFO[]
virtual const std::string getName() const
Get processed histogram name. It can include additional parameter in formated name. This Name is being constructed from raw name and additional parameter.
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:112
static const HistoName keys[]
void CSCOfflineClient::dqmEndJob ( DQMStore::IBooker ib,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 89 of file CSCOfflineClient.cc.

References cscdqm::Dispatcher::book(), def, DIR_EVENTINFO, dispatcher, cscdqm::h::EMU_CSC_STATS_SUMMARY, DQMStore::IGetter::get(), cscdqm::HistoDef::getHistoIdByName(), DQMStore::IGetter::getMEs(), cuy::ib, ibooker, triggerObjects_cff::id, maskedHW, cscdqm::Dispatcher::maskHWElements(), dataset::name, DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and cscdqm::Dispatcher::updateFractionAndEfficiencyHistos().

Referenced by setup().

90 {
91  ibooker = &ib;
92  dispatcher->book();
93  if (!maskedHW.empty())
95 
96 
97  /*
98  * Putting histograms to internal cache: EMU stuff
99  */
100  ibooker->setCurrentFolder(config.getFOLDER_EMU());
101  std::vector<std::string> me_names = igetter.getMEs();
102  for (std::vector<std::string>::iterator iter = me_names.begin(); iter != me_names.end(); iter++) {
103  std::string me_name = *iter;
104  MonitorElement* me = igetter.get(config.getFOLDER_EMU() + me_name);
106  if (me && cscdqm::HistoDef::getHistoIdByName(me_name, id)) {
107  const cscdqm::EMUHistoDef def(id);
109  config.fnPutHisto(def, mo);
110  }
111  }
112 
113  /*
114  * Putting histograms to internal cache: EventInfo
115  */
116 
117  {
119  name += "reportSummaryMap";
120  MonitorElement* me = igetter.get(name);
121  if (me) {
124  config.fnPutHisto(def, mo);
125  }
126  }
127 
128  config.incNEvents();
130 
131 }
static const bool getHistoIdByName(const std::string &p_name, HistoId &p_id)
Get Histogram ID by name.
cscdqm::MonitorObject implementation used in CSCMonitorModuleCmn
void updateFractionAndEfficiencyHistos()
On demand update fraction and efficiency MOs.
Monitoring Object interface used to cover Root object and provide common interface to EventProcessor ...
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:307
DQMStore::IBooker * ibooker
Definition: config.py:1
unsigned int maskHWElements(std::vector< std::string > &tokens)
Mask HW elements from the efficiency calculations. Can be applied on runtime!
unsigned int HistoId
cscdqm::Dispatcher * dispatcher
EMU Level Histogram Definition.
static const char DIR_EVENTINFO[]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
std::vector< std::string > getMEs()
Definition: DQMStore.cc:329
JetCorrectorParameters::Definitions def
Definition: classes.h:6
std::vector< std::string > maskedHW
ib
Definition: cuy.py:660
bool CSCOfflineClient::getCSCDetId ( const unsigned int  crateId,
const unsigned int  dmbId,
CSCDetId detId 
) const
inlineoverridevirtual

MonitorObjectProvider Implementation

Implements cscdqm::MonitorObjectProvider.

Definition at line 92 of file CSCOfflineClient.h.

References bookMonitorObject().

92 { return false; }
void CSCOfflineClient::setup ( )
inlineprotected

EDAnalyzer Implementation

Definition at line 103 of file CSCOfflineClient.h.

References dqmEndJob().

103 { }

Member Data Documentation

cscdqm::Configuration CSCOfflineClient::config
private

Definition at line 80 of file CSCOfflineClient.h.

cscdqm::Dispatcher* CSCOfflineClient::dispatcher
private

Definition at line 81 of file CSCOfflineClient.h.

Referenced by CSCOfflineClient(), dqmEndJob(), and ~CSCOfflineClient().

DQMStore::IBooker* CSCOfflineClient::ibooker
private

Definition at line 83 of file CSCOfflineClient.h.

Referenced by bookMonitorObject(), and dqmEndJob().

std::vector<std::string> CSCOfflineClient::maskedHW
private

Definition at line 84 of file CSCOfflineClient.h.

Referenced by CSCOfflineClient(), and dqmEndJob().