CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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< T > 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 (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
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 endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endProcessBlockProduce (edm::ProcessBlock &) 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< T >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex >
const & 
esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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 selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
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
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

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< DQMTokenjobmegetter_
 
edm::EDPutTokenT< DQMTokenjobToken_
 
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 ( const edm::ParameterSet ps)

Constructor.

Global stuff

Parameters
psParameters.

Definition at line 25 of file CSCOfflineClient.cc.

References config, dispatcher, edm::ParameterSet::exists(), edm::ParameterSet::getUntrackedParameter(), cscdqm::Dispatcher::init(), maskedHW, and submitPVValidationJobs::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
CSCDQM Framework frontend and Histogram Cache controller.
cscdqm::Dispatcher * dispatcher
cscdqm::Configuration config
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::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::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, mergeVDriftHistosByStation::name, cscdqm::h::PAR_REPORT_SUMMARY, fed_dqm_sourceclient-live_cfg::path, cscdqm::Utility::regexMatch(), dqm::implementation::NavigatorBase::setCurrentFolder(), cscdqm::STRING, and AlCaHLTBitMon_QueryRunRegistry::string.

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, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
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 ...
DQMStore::IBooker * ibooker
static bool regexMatch(const std::string &expression, const std::string &message)
Match RegExp expression string against string message and return result.
MonitorElement * bookString(TString const &name, TString const &value, FUNC onbooking=NOOP())
Definition: DQMStore.h:87
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[]
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:73
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.
static const HistoName keys[]
void CSCOfflineClient::dqmEndJob ( DQMStore::IBooker ib,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 88 of file CSCOfflineClient.cc.

References cscdqm::Dispatcher::book(), config, spu::def(), DIR_EVENTINFO, dispatcher, cscdqm::h::EMU_CSC_STATS_SUMMARY, cscdqm::Configuration::fnPutHisto, dqm::implementation::IGetter::get(), cscdqm::HistoDef::getHistoIdByName(), dqm::implementation::IGetter::getMEs(), cuy::ib, ibooker, gpuClustering::id, cscdqm::Configuration::incNEvents(), maskedHW, cscdqm::Dispatcher::maskHWElements(), hlt_dqm_clientPB-live_cfg::me, mergeVDriftHistosByStation::name, dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and cscdqm::Dispatcher::updateFractionAndEfficiencyHistos().

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.
int def(FILE *, FILE *, int)
int ib
Definition: cuy.py:661
uint16_t *__restrict__ id
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
std::function< void(const HistoDef &histoT, MonitorObject *&)> fnPutHisto
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 ...
DQMStore::IBooker * ibooker
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
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
EMU Level Histogram Definition.
static const char DIR_EVENTINFO[]
virtual std::vector< std::string > getMEs() const
Definition: DQMStore.cc:720
cscdqm::Configuration config
std::vector< std::string > maskedHW
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  }
void CSCOfflineClient::setup ( )
inlineprotected

EDAnalyzer Implementation

Definition at line 98 of file CSCOfflineClient.h.

98 {}

Member Data Documentation

cscdqm::Configuration CSCOfflineClient::config
private
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().