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

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
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

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::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Private Attributes

cscdqm::Configuration config
 
DQMStoredbe
 
cscdqm::Dispatcherdispatcher
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- 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, scaleCards::path, cscdqm::Utility::regexMatch(), DQMStore::setCurrentFolder(), and cscdqm::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:654
list path
Definition: scaleCards.py:51
const HistoId getId() const
Get Histogram ID.
MonitorElement * bookString(const char *name, const char *value)
Book string.
Definition: DQMStore.cc:683
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:624
static const HistoName keys[]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
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, def, DIR_EVENTINFO, dispatcher, cscdqm::Configuration::fnPutHisto, DQMStore::get(), cscdqm::HistoDef::getHistoIdByName(), DQMStore::getMEs(), errorMatrix2Lands_multiChannel::id, cscdqm::Configuration::incNEvents(), mergeVDriftHistosByStation::name, DQMStore::setCurrentFolder(), 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);
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  {
73  std::string name = DIR_EVENTINFO;
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.
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:1468
static const char DIR_EVENTINFO[]
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1442
cscdqm::Configuration config
boost::function< void(const HistoDef &histoT, MonitorObject *&) > fnPutHisto
JetCorrectorParameters::Definitions def
Definition: classes.h:10
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
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().