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:
edm::EDAnalyzer cscdqm::MonitorObjectProvider 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 edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 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
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 
void beginJob ()
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 
void endJob ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &iSetup)
 
void endRun (const edm::Run &r, const edm::EventSetup &c)
 
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
 
DQMStoredbe
 
cscdqm::Dispatcherdispatcher
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

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 64 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, dbe, dispatcher, edm::ParameterSet::exists(), edm::ParameterSet::getUntrackedParameter(), cscdqm::Dispatcher::init(), cscdqm::Dispatcher::maskHWElements(), and cppFunctionSkipper::operator.

25  {
26 
27  edm::ParameterSet params = ps.getUntrackedParameter<edm::ParameterSet>("EventProcessor");
28  config.load(params);
29 
31 
32  dispatcher = new cscdqm::Dispatcher(&config, const_cast<CSCOfflineClient*>(this));
33  dispatcher->init();
34 
35  if (ps.exists("MASKEDHW")) {
36  std::vector<std::string> maskedHW = ps.getUntrackedParameter<std::vector<std::string> >("MASKEDHW");
37  dispatcher->maskHWElements(maskedHW);
38  }
39 
40 }
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.
unsigned int maskHWElements(std::vector< std::string > &tokens)
Mask HW elements from the efficiency calculations. Can be applied on runtime!
cscdqm::Dispatcher * dispatcher
cscdqm::Configuration config
CSCOfflineClient::~CSCOfflineClient ( )
virtual

Destructor.

Definition at line 45 of file CSCOfflineClient.cc.

References dispatcher.

45  {
46  if (dispatcher) delete dispatcher;
47 }
cscdqm::Dispatcher * dispatcher

Member Function Documentation

void CSCOfflineClient::analyze ( const edm::Event e,
const edm::EventSetup c 
)
inlineprotectedvirtual

Implements edm::EDAnalyzer.

Definition at line 99 of file CSCOfflineClient.h.

99 { }
void CSCOfflineClient::beginJob ( void  )
inlineprotectedvirtual

EDAnalyzer Implementation

Reimplemented from edm::EDAnalyzer.

Definition at line 96 of file CSCOfflineClient.h.

96 { }
void CSCOfflineClient::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
inlineprotectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 100 of file CSCOfflineClient.h.

100 { }
void CSCOfflineClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
inlineprotectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 97 of file CSCOfflineClient.h.

97 { }
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 93 of file CSCOfflineClient.cc.

References DQMStore::bookFloat(), DQMStore::bookInt(), DQMStore::bookString(), dbe, 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, cscdqm::INT, cscdqm::h::keys, mergeVDriftHistosByStation::name, NULL, getHLTPrescaleColumns::path, cscdqm::Utility::regexMatch(), DQMStore::setCurrentFolder(), cscdqm::STRING, and AlCaHLTBitMon_QueryRunRegistry::string.

93  {
94 
96  std::string name = req.hdef->getName();
97 
98  std::string path = req.folder;
99  if (req.hdef->getPath().size() > 0) {
100  path = path + req.hdef->getPath() + "/";
101  }
102 
103  dbe->setCurrentFolder(path);
104 
105  if (req.htype == cscdqm::INT) {
106  me = new CSCMonitorObject(dbe->bookInt(name));
107  me->Fill(req.default_int);
108  } else
109  if (req.htype == cscdqm::FLOAT) {
110  if (req.hdef->getId() == cscdqm::h::PAR_REPORT_SUMMARY) {
112  } else if (cscdqm::Utility::regexMatch("^PAR_DCS_", cscdqm::h::keys[req.hdef->getId()])) {
114  } else if (cscdqm::Utility::regexMatch("^PAR_DAQ_", cscdqm::h::keys[req.hdef->getId()])) {
116  } else if (cscdqm::Utility::regexMatch("^PAR_CRT_", cscdqm::h::keys[req.hdef->getId()])) {
118  }
119  me = new CSCMonitorObject(dbe->bookFloat(name));
120  me->Fill(req.default_float);
121  } else
122  if (req.htype == cscdqm::STRING) {
123  me = new CSCMonitorObject(dbe->bookString(name, req.default_string));
124  }
125 
126  return me;
127 
128 }
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 ...
#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.
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:809
const HistoId getId() const
Get Histogram ID.
MonitorElement * bookString(const char *name, const char *value)
Book string.
Definition: DQMStore.cc:838
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 * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:779
static const HistoName keys[]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
void CSCOfflineClient::endJob ( void  )
inlineprotectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 103 of file CSCOfflineClient.h.

103 { }
void CSCOfflineClient::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  iSetup 
)
inlineprotectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 101 of file CSCOfflineClient.h.

101 { }
void CSCOfflineClient::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 49 of file CSCOfflineClient.cc.

References config, dbe, spu::def(), DIR_EVENTINFO, dispatcher, cscdqm::Configuration::fnPutHisto, DQMStore::get(), cscdqm::HistoDef::getHistoIdByName(), DQMStore::getMEs(), cscdqm::Configuration::incNEvents(), mergeVDriftHistosByStation::name, DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and cscdqm::Dispatcher::updateFractionAndEfficiencyHistos().

49  {
50 
51  /*
52  * Putting histograms to internal cache: EMU stuff
53  */
54 
55  dbe->setCurrentFolder(config.getFOLDER_EMU());
56  std::vector<std::string> me_names = dbe->getMEs();
57  for (std::vector<std::string>::iterator iter = me_names.begin(); iter != me_names.end(); iter++) {
58  std::string me_name = *iter;
59  MonitorElement* me = dbe->get(config.getFOLDER_EMU() + me_name);
60  cscdqm::HistoId id;
61  if (me && cscdqm::HistoDef::getHistoIdByName(me_name, id)) {
62  const cscdqm::EMUHistoDef def(id);
64  config.fnPutHisto(def, mo);
65  }
66  }
67 
68  /*
69  * Putting histograms to internal cache: EventInfo
70  */
71 
72  {
74  name += "reportSummaryMap";
75  MonitorElement* me = dbe->get(name);
76  if (me) {
77  const cscdqm::EMUHistoDef def(cscdqm::h::EMU_CSC_STATS_SUMMARY);
79  config.fnPutHisto(def, mo);
80  }
81  }
82 
85 
86 }
static const bool getHistoIdByName(const std::string &p_name, HistoId &p_id)
Get Histogram ID by name.
int def(FILE *, FILE *, int)
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 ...
unsigned int HistoId
cscdqm::Dispatcher * dispatcher
EMU Level Histogram Definition.
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1623
static const char DIR_EVENTINFO[]
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1597
cscdqm::Configuration config
boost::function< void(const HistoDef &histoT, MonitorObject *&) > fnPutHisto
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
bool CSCOfflineClient::getCSCDetId ( const unsigned int  crateId,
const unsigned int  dmbId,
CSCDetId detId 
) const
inlinevirtual

MonitorObjectProvider Implementation

Implements cscdqm::MonitorObjectProvider.

Definition at line 87 of file CSCOfflineClient.h.

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

Definition at line 98 of file CSCOfflineClient.h.

98 { }

Member Data Documentation

cscdqm::Configuration CSCOfflineClient::config
private

Definition at line 77 of file CSCOfflineClient.h.

Referenced by CSCOfflineClient(), and endRun().

DQMStore* CSCOfflineClient::dbe
private

Definition at line 79 of file CSCOfflineClient.h.

Referenced by bookMonitorObject(), CSCOfflineClient(), and endRun().

cscdqm::Dispatcher* CSCOfflineClient::dispatcher
private

Definition at line 78 of file CSCOfflineClient.h.

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