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::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > 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 beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester ()
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
virtual void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &)=0
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 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
 
std::vector< bool > const & recordProvenanceList () 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)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
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 () noexcept(false)
 

Protected Member Functions

void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void setup ()
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (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
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
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::CSCOfflineClient ( const edm::ParameterSet ps)

Constructor.

Global stuff

Parameters
psParameters.

Definition at line 25 of file CSCOfflineClient.cc.

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 }

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

◆ ~CSCOfflineClient()

CSCOfflineClient::~CSCOfflineClient ( )
override

Destructor.

Definition at line 41 of file CSCOfflineClient.cc.

41  {
42  if (dispatcher)
43  delete dispatcher;
44 }

References dispatcher.

Member Function Documentation

◆ bookMonitorObject()

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.

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();
145 
146  if (req.htype == cscdqm::INT) {
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  }
164  me->Fill(req.default_float);
165  } else if (req.htype == cscdqm::STRING) {
167  }
168 
169  return me;
170 }

References dqm::implementation::IBooker::bookFloat(), dqm::implementation::IBooker::bookInt(), dqm::implementation::IBooker::bookString(), dqm::implementation::NavigatorBase::cd(), cscdqm::HistoBookRequest::default_float, cscdqm::HistoBookRequest::default_int, cscdqm::HistoBookRequest::default_string, DIR_CRTINFO, DIR_DAQINFO, DIR_DCSINFO, DIR_EVENTINFO, cscdqm::FLOAT, cscdqm::HistoBookRequest::folder, cscdqm::HistoDef::getId(), cscdqm::HistoDef::getName(), cscdqm::HistoDef::getPath(), cscdqm::HistoBookRequest::hdef, cscdqm::HistoBookRequest::htype, ibooker, cscdqm::INT, relativeConstraints::keys, hlt_dqm_clientPB-live_cfg::me, Skims_PA_cff::name, castor_dqm_sourceclient_file_cfg::path, cscdqm::Utility::regexMatch(), dqm::implementation::NavigatorBase::setCurrentFolder(), cscdqm::STRING, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ dqmEndJob()

void CSCOfflineClient::dqmEndJob ( DQMStore::IBooker ib,
DQMStore::IGetter igetter 
)
overrideprotected

Definition at line 88 of file CSCOfflineClient.cc.

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) {
119  const cscdqm::EMUHistoDef def(cscdqm::h::EMU_CSC_STATS_SUMMARY);
121  config.fnPutHisto(def, mo);
122  }
123  }
124 
125  config.incNEvents();
127 }

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

◆ getCSCDetId()

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.

86  {
87  return false;
88  }

◆ setup()

void CSCOfflineClient::setup ( )
inlineprotected

EDAnalyzer Implementation

Definition at line 98 of file CSCOfflineClient.h.

98 {}

Member Data Documentation

◆ config

cscdqm::Configuration CSCOfflineClient::config
private

◆ dispatcher

cscdqm::Dispatcher* CSCOfflineClient::dispatcher
private

Definition at line 76 of file CSCOfflineClient.h.

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

◆ ibooker

DQMStore::IBooker* CSCOfflineClient::ibooker
private

Definition at line 78 of file CSCOfflineClient.h.

Referenced by bookMonitorObject(), and dqmEndJob().

◆ maskedHW

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

Definition at line 79 of file CSCOfflineClient.h.

Referenced by CSCOfflineClient(), and dqmEndJob().

DIR_CRTINFO
static const char DIR_CRTINFO[]
Definition: CSCMonitorModule.h:62
cscdqm::HistoId
unsigned int HistoId
Definition: CSCDQM_HistoDef.h:35
dqm::implementation::IBooker::bookFloat
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
cscdqm::FLOAT
Definition: CSCDQM_MonitorObjectProvider.h:29
cscdqm::HistoBookRequest::hdef
const HistoDef * hdef
Definition: CSCDQM_MonitorObjectProvider.h:32
CSCOfflineClient::dispatcher
cscdqm::Dispatcher * dispatcher
Definition: CSCOfflineClient.h:76
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
cscdqm::Dispatcher::updateFractionAndEfficiencyHistos
void updateFractionAndEfficiencyHistos()
On demand update fraction and efficiency MOs.
Definition: CSCDQM_Dispatcher.cc:244
cscdqm::Utility::regexMatch
static bool regexMatch(const std::string &expression, const std::string &message)
Match RegExp expression string against string message and return result.
Definition: CSCDQM_Utility.cc:166
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
relativeConstraints.keys
keys
Definition: relativeConstraints.py:89
DIR_DCSINFO
static const char DIR_DCSINFO[]
Definition: CSCMonitorModule.h:60
config
Definition: config.py:1
CSCMonitorObject
cscdqm::MonitorObject implementation used in CSCMonitorModuleCmn
Definition: CSCMonitorObject.h:29
CSCOfflineClient::maskedHW
std::vector< std::string > maskedHW
Definition: CSCOfflineClient.h:79
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
cscdqm::EMUHistoDef
EMU Level Histogram Definition.
Definition: CSCDQM_HistoDef.h:258
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:674
edm::ParameterSet
Definition: ParameterSet.h:36
dqm::implementation::IBooker::bookString
MonitorElement * bookString(TString const &name, TString const &value, FUNC onbooking=NOOP())
Definition: DQMStore.h:87
cscdqm::Dispatcher::maskHWElements
unsigned int maskHWElements(std::vector< std::string > &tokens)
Mask HW elements from the efficiency calculations. Can be applied on runtime!
Definition: CSCDQM_Dispatcher.cc:177
dqm::implementation::IBooker::bookInt
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:73
cscdqm::HistoDef::getId
const HistoId getId() const
Get Histogram ID.
Definition: CSCDQM_HistoDef.h:84
cuy.ib
ib
Definition: cuy.py:662
cscdqm::HistoDef::getName
virtual const std::string getName() const
Get processed histogram name. It can include additional parameter in formated name....
Definition: CSCDQM_HistoDef.h:98
cscdqm::HistoDef::getPath
virtual const std::string getPath() const
Get path part of the histogram (used only for DDUs and CSCs)
Definition: CSCDQM_HistoDef.h:177
cscdqm::STRING
Definition: CSCDQM_MonitorObjectProvider.h:29
CSCOfflineClient::ibooker
DQMStore::IBooker * ibooker
Definition: CSCOfflineClient.h:78
cscdqm::HistoDef::getHistoIdByName
static const bool getHistoIdByName(const std::string &p_name, HistoId &p_id)
Get Histogram ID by name.
Definition: CSCDQM_HistoDef.h:223
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
cscdqm::HistoBookRequest::default_int
int default_int
Definition: CSCDQM_MonitorObjectProvider.h:50
cscdqm::INT
Definition: CSCDQM_MonitorObjectProvider.h:29
cscdqm::Dispatcher::init
void init()
Initialize Dispatcher: book histograms, init processor, etc.
Definition: CSCDQM_Dispatcher.cc:85
cscdqm::Dispatcher
CSCDQM Framework frontend and Histogram Cache controller.
Definition: CSCDQM_Dispatcher.h:115
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
cscdqm::HistoBookRequest::default_float
float default_float
Definition: CSCDQM_MonitorObjectProvider.h:51
cscdqm::MonitorObject
Monitoring Object interface used to cover Root object and provide common interface to EventProcessor ...
Definition: CSCDQM_MonitorObject.h:35
cscdqm::HistoBookRequest::folder
std::string folder
Definition: CSCDQM_MonitorObjectProvider.h:35
spu::def
int def(FILE *, FILE *, int)
Definition: SherpackUtilities.cc:14
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
DIR_EVENTINFO
static const char DIR_EVENTINFO[]
Definition: CSCMonitorModule.h:59
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
cscdqm::Dispatcher::book
void book()
Definition: CSCDQM_Dispatcher.cc:91
cscdqm::HistoBookRequest::htype
HistoType htype
Definition: CSCDQM_MonitorObjectProvider.h:33
cscdqm::HistoBookRequest::default_string
std::string default_string
Definition: CSCDQM_MonitorObjectProvider.h:52
DIR_DAQINFO
static const char DIR_DAQINFO[]
Definition: CSCMonitorModule.h:61