CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

cscdqm::MonitorObjectbookMonitorObject (const cscdqm::HistoBookRequest &p_req)
 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
 
virtual ~CSCOfflineClient ()
 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 dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
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 ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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

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 config, 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
CSCDQM Framework frontend and Histogram Cache controller.
cscdqm::Dispatcher * dispatcher
cscdqm::Configuration config
std::vector< std::string > maskedHW
CSCOfflineClient::~CSCOfflineClient ( )
virtual

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

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, mergeVDriftHistosByStation::name, NULL, cscdqm::h::PAR_REPORT_SUMMARY, cmsHarvester::path, cscdqm::Utility::regexMatch(), DQMStore::IBooker::setCurrentFolder(), cscdqm::STRING, and AlCaHLTBitMon_QueryRunRegistry::string.

138  {
139 
141  std::string name = req.hdef->getName();
142 
143  std::string path = req.folder;
144  if (req.hdef->getPath().size() > 0) {
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
void cd(void)
Definition: DQMStore.cc:266
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:103
MonitorElement * bookString(Args &&...args)
Definition: DQMStore.h:97
DQMStore::IBooker * ibooker
#define NULL
Definition: scimark2.h:8
static bool regexMatch(const std::string &expression, const std::string &message)
Match RegExp expression string against string message and return result.
tuple path
else: Piece not in the list, fine.
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:274
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:109
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(), config, def, DIR_EVENTINFO, dispatcher, cscdqm::h::EMU_CSC_STATS_SUMMARY, cscdqm::Configuration::fnPutHisto, DQMStore::IGetter::get(), cscdqm::HistoDef::getHistoIdByName(), DQMStore::IGetter::getMEs(), cuy::ib, ibooker, cscdqm::Configuration::incNEvents(), maskedHW, cscdqm::Dispatcher::maskHWElements(), mergeVDriftHistosByStation::name, DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and cscdqm::Dispatcher::updateFractionAndEfficiencyHistos().

90 {
91  ibooker = &ib;
92  dispatcher->book();
93  if (maskedHW.size() != 0)
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);
105  cscdqm::HistoId id;
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.
int ib
Definition: cuy.py:660
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:302
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
EMU Level Histogram Definition.
static const char DIR_EVENTINFO[]
std::vector< std::string > getMEs(void)
Definition: DQMStore.cc:310
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
cscdqm::Configuration config
boost::function< void(const HistoDef &histoT, MonitorObject *&) > fnPutHisto
JetCorrectorParameters::Definitions def
Definition: classes.h:6
std::vector< std::string > maskedHW
bool CSCOfflineClient::getCSCDetId ( const unsigned int  crateId,
const unsigned int  dmbId,
CSCDetId detId 
) const
inlinevirtual

MonitorObjectProvider Implementation

Implements cscdqm::MonitorObjectProvider.

Definition at line 92 of file CSCOfflineClient.h.

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

EDAnalyzer Implementation

Definition at line 103 of file CSCOfflineClient.h.

103 { }

Member Data Documentation

cscdqm::Configuration CSCOfflineClient::config
private

Definition at line 80 of file CSCOfflineClient.h.

Referenced by CSCOfflineClient(), and dqmEndJob().

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