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

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

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

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 65 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(), maskedHW, and CalibrationSummaryClient_cfi::params.

25  {
27  config.load(params);
28 
29  dispatcher = new cscdqm::Dispatcher(&config, const_cast<CSCOfflineClient*>(this));
30  dispatcher->init();
31 
32  if (ps.exists("MASKEDHW")) {
33  maskedHW = ps.getUntrackedParameter<std::vector<std::string> >("MASKEDHW");
34  // dispatcher->maskHWElements(maskedHW);
35  }
36 }
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 41 of file CSCOfflineClient.cc.

References dispatcher.

41  {
42  if (dispatcher)
43  delete dispatcher;
44 }
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 134 of file CSCOfflineClient.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::bookFloat(), dqm::dqmstoreimpl::DQMStore::IBooker::bookInt(), dqm::dqmstoreimpl::DQMStore::IBooker::bookString(), dqm::dqmstoreimpl::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, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, cscdqm::h::PAR_REPORT_SUMMARY, castor_dqm_sourceclient_file_cfg::path, cscdqm::Utility::regexMatch(), dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), cscdqm::STRING, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getCSCDetId().

134  {
135  cscdqm::MonitorObject* me = nullptr;
136  std::string name = req.hdef->getName();
137 
138  std::string path = req.folder;
139  if (!req.hdef->getPath().empty()) {
140  path = path + req.hdef->getPath() + "/";
141  }
142 
143  ibooker->cd();
144  ibooker->setCurrentFolder(path);
145 
146  if (req.htype == cscdqm::INT) {
147  me = new CSCMonitorObject(ibooker->bookInt(name));
148  me->Fill(req.default_int);
149  } else if (req.htype == cscdqm::FLOAT) {
150  if (req.hdef->getId() == cscdqm::h::PAR_REPORT_SUMMARY) {
151  ibooker->cd();
153  } else if (cscdqm::Utility::regexMatch("^PAR_DCS_", cscdqm::h::keys[req.hdef->getId()])) {
154  ibooker->cd();
156  } else if (cscdqm::Utility::regexMatch("^PAR_DAQ_", cscdqm::h::keys[req.hdef->getId()])) {
157  ibooker->cd();
159  } else if (cscdqm::Utility::regexMatch("^PAR_CRT_", cscdqm::h::keys[req.hdef->getId()])) {
160  ibooker->cd();
162  }
163  me = new CSCMonitorObject(ibooker->bookFloat(name));
164  me->Fill(req.default_float);
165  } else if (req.htype == cscdqm::STRING) {
166  me = new CSCMonitorObject(ibooker->bookString(name, req.default_string));
167  }
168 
169  return me;
170 }
MonitorElement * bookFloat(TString const &name)
Definition: DQMStore.cc:233
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 ...
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:418
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)
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 * bookString(TString const &name, TString const &value)
Definition: DQMStore.cc:235
static const HistoName keys[]
MonitorElement * bookInt(TString const &name)
Definition: DQMStore.cc:231
void CSCOfflineClient::dqmEndJob ( DQMStore::IBooker ib,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 88 of file CSCOfflineClient.cc.

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

Referenced by setup().

88  {
89  ibooker = &ib;
90  dispatcher->book();
91  if (!maskedHW.empty())
93 
94  /*
95  * Putting histograms to internal cache: EMU stuff
96  */
97  ibooker->setCurrentFolder(config.getFOLDER_EMU());
98  std::vector<std::string> me_names = igetter.getMEs();
99  for (std::vector<std::string>::iterator iter = me_names.begin(); iter != me_names.end(); iter++) {
100  std::string me_name = *iter;
101  MonitorElement* me = igetter.get(config.getFOLDER_EMU() + me_name);
103  if (me && cscdqm::HistoDef::getHistoIdByName(me_name, id)) {
104  const cscdqm::EMUHistoDef def(id);
106  config.fnPutHisto(def, mo);
107  }
108  }
109 
110  /*
111  * Putting histograms to internal cache: EventInfo
112  */
113 
114  {
116  name += "reportSummaryMap";
117  MonitorElement* me = igetter.get(name);
118  if (me) {
121  config.fnPutHisto(def, mo);
122  }
123  }
124 
125  config.incNEvents();
127 }
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 ...
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:418
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[]
JetCorrectorParameters::Definitions def
Definition: classes.h:6
std::vector< std::string > maskedHW
ib
Definition: cuy.py:662
bool CSCOfflineClient::getCSCDetId ( const unsigned int  crateId,
const unsigned int  dmbId,
CSCDetId detId 
) const
inlineoverridevirtual

MonitorObjectProvider Implementation

Implements cscdqm::MonitorObjectProvider.

Definition at line 86 of file CSCOfflineClient.h.

References bookMonitorObject().

86  {
87  return false;
88  }
void CSCOfflineClient::setup ( )
inlineprotected

EDAnalyzer Implementation

Definition at line 98 of file CSCOfflineClient.h.

References dqmEndJob().

98 {}

Member Data Documentation

cscdqm::Configuration CSCOfflineClient::config
private

Definition at line 75 of file CSCOfflineClient.h.

cscdqm::Dispatcher* CSCOfflineClient::dispatcher
private

Definition at line 76 of file CSCOfflineClient.h.

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

DQMStore::IBooker* CSCOfflineClient::ibooker
private

Definition at line 78 of file CSCOfflineClient.h.

Referenced by bookMonitorObject(), and dqmEndJob().

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

Definition at line 79 of file CSCOfflineClient.h.

Referenced by CSCOfflineClient(), and dqmEndJob().