CMS 3D CMS Logo

CSCMonitorModuleCmn Class Reference

Common CSC DQM Module that uses CSCDQM Framework. More...

#include <DQM/CSCMonitorModule/interface/CSCMonitorModuleCmn.h>

Inheritance diagram for CSCMonitorModuleCmn:

edm::EDAnalyzer cscdqm::MonitorObjectProvider

List of all members.

Public Member Functions

cscdqm::MonitorObjectbookMonitorObject (const cscdqm::HistoBookRequest &p_req)
 CSCMonitorModuleCmn (const edm::ParameterSet &ps)
const CSCDetId getCSCDetId (const unsigned int crateId, const unsigned int dmbId) const
virtual ~CSCMonitorModuleCmn ()

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
void beginJob (const edm::EventSetup &c)
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
void beginRun (const edm::Run &r, const edm::EventSetup &c)
void endJob ()
void endRun (const edm::Run &r, const edm::EventSetup &c)
void setup ()

Private Attributes

cscdqm::Configuration config
DQMStoredbe
cscdqm::Dispatcher dispatcher
edm::InputTag inputTag
const CSCCrateMappcrate
 Pointer to crate mapping from database.


Detailed Description

Common CSC DQM Module that uses CSCDQM Framework.

Definition at line 60 of file CSCMonitorModuleCmn.h.


Constructor & Destructor Documentation

CSCMonitorModuleCmn::CSCMonitorModuleCmn ( const edm::ParameterSet ps  ) 

Definition at line 21 of file CSCMonitorModuleCmn.cc.

References config, dbe, edm::ParameterSet::getUntrackedParameter(), cscdqm::Configuration::load(), and params.

00021                                                                   : 
00022 dispatcher(&config, const_cast<CSCMonitorModuleCmn*>(this)), inputTag(INPUT_TAG_LABEL) {
00023 
00024   edm::ParameterSet params = ps.getUntrackedParameter<edm::ParameterSet>("EventProcessor");
00025   config.load(params);
00026    
00027   dbe = edm::Service<DQMStore>().operator->();
00028 
00029   //dispatcher.getCollection()->printCollection();
00030   //throw cscdqm::Exception("End of game");
00031 
00032 }

CSCMonitorModuleCmn::~CSCMonitorModuleCmn (  )  [virtual]

Definition at line 34 of file CSCMonitorModuleCmn.cc.

00034                                           {
00035 }


Member Function Documentation

void CSCMonitorModuleCmn::analyze ( const edm::Event e,
const edm::EventSetup c 
) [protected, virtual]

Implements edm::EDAnalyzer.

Definition at line 46 of file CSCMonitorModuleCmn.cc.

References dispatcher, edm::EventSetup::get(), inputTag, pcrate, and edm::ESHandle< T >::product().

00046                                                                            {
00047 
00048   // Get crate mapping from database
00049   edm::ESHandle<CSCCrateMap> hcrate;
00050   c.get<CSCCrateMapRcd>().get(hcrate);
00051   pcrate = hcrate.product();
00052     
00053   dispatcher.processEvent(e, inputTag);
00054 
00055 }

void CSCMonitorModuleCmn::beginJob ( const edm::EventSetup c  )  [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 37 of file CSCMonitorModuleCmn.cc.

00037                                                          {
00038 }

void CSCMonitorModuleCmn::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
) [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 57 of file CSCMonitorModuleCmn.cc.

00057                                                                                                               {
00058 }

void CSCMonitorModuleCmn::beginRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 40 of file CSCMonitorModuleCmn.cc.

00040                                                                           {
00041 }

cscdqm::MonitorObject * CSCMonitorModuleCmn::bookMonitorObject ( const cscdqm::HistoBookRequest p_req  )  [virtual]

Implements cscdqm::MonitorObjectProvider.

Definition at line 21 of file CSCMonitorModuleCmn_HistoProvider.cc.

References DQMStore::book1D(), DQMStore::book2D(), DQMStore::book3D(), DQMStore::bookFloat(), DQMStore::bookInt(), DQMStore::bookProfile(), DQMStore::bookProfile2D(), DQMStore::bookString(), dbe, cscdqm::HistoBookRequest::default_float, cscdqm::HistoBookRequest::default_int, cscdqm::HistoBookRequest::default_string, DIR_EVENTINFO, cscdqm::MonitorObject::Fill(), cscdqm::FLOAT, cscdqm::HistoBookRequest::folder, cscdqm::H1D, cscdqm::H2D, cscdqm::H3D, cscdqm::HistoBookRequest::hdef, cscdqm::HistoBookRequest::highX, cscdqm::HistoBookRequest::highY, cscdqm::HistoBookRequest::highZ, cscdqm::HistoBookRequest::htype, cscdqm::INT, cscdqm::HistoBookRequest::lowX, cscdqm::HistoBookRequest::lowY, cscdqm::HistoBookRequest::lowZ, me, names, cscdqm::HistoBookRequest::nchX, cscdqm::HistoBookRequest::nchY, cscdqm::HistoBookRequest::nchZ, NULL, cscdqm::HistoBookRequest::option, cscdqm::PROFILE, cscdqm::PROFILE2D, DQMStore::setCurrentFolder(), cscdqm::STRING, and cscdqm::HistoBookRequest::title.

00021                                                                                              {
00022 
00023   cscdqm::MonitorObject *me = NULL;
00024 
00025   dbe->setCurrentFolder(req.folder);
00026 
00027   switch (req.htype) {
00028     case cscdqm::INT:
00029       me = new CSCMonitorObject(dbe->bookInt(req.hdef->getName()));
00030       me->Fill(req.default_int);
00031       break;
00032     case cscdqm::FLOAT:
00033       if (std::string(req.hdef->getName()).compare(cscdqm::h::names[cscdqm::h::PAR_REPORT_SUMMARY]) == 0) {
00034         dbe->setCurrentFolder(DIR_EVENTINFO);
00035       }
00036       me = new CSCMonitorObject(dbe->bookFloat(req.hdef->getName()));
00037       me->Fill(req.default_float);
00038       break;
00039     case cscdqm::STRING:
00040       me = new CSCMonitorObject(dbe->bookString(req.hdef->getName(), req.default_string));
00041       break;
00042     case cscdqm::H1D: 
00043       me = new CSCMonitorObject(dbe->book1D(req.hdef->getName(), req.title, req.nchX, req.lowX, req.highX));
00044       break;
00045     case cscdqm::H2D:
00046       if (std::string(req.hdef->getHistoName()).compare(cscdqm::h::names[cscdqm::h::EMU_CSC_STATS_SUMMARY]) == 0) {
00047         dbe->setCurrentFolder(DIR_EVENTINFO);
00048       } else {
00049         me = new CSCMonitorObject(dbe->book2D(req.hdef->getName(), req.title, req.nchX, req.lowX, req.highX, req.nchY, req.lowY, req.highY));
00050       }
00051       break;
00052     case cscdqm::H3D:
00053       me = new CSCMonitorObject(dbe->book3D(req.hdef->getName(), req.title, req.nchX, req.lowX, req.highX, req.nchY, req.lowY, req.highY, req.nchZ, req.lowZ, req.highZ));
00054       break;
00055     case cscdqm::PROFILE:
00056       me = new CSCMonitorObject(dbe->bookProfile(req.hdef->getName(), req.title, req.nchX, req.lowX, req.highX, req.nchY, req.lowY, req.highY, req.option.c_str()));
00057       break;
00058     case cscdqm::PROFILE2D:
00059       me = new CSCMonitorObject(dbe->bookProfile2D(req.hdef->getName(), req.title, req.nchX, req.lowX, req.highX, req.nchY, req.lowY, req.highY, req.nchZ, req.lowZ, req.highZ, req.option.c_str()));
00060       break;
00061   }
00062 
00063   return me;
00064 
00065 }

void CSCMonitorModuleCmn::endJob ( void   )  [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 63 of file CSCMonitorModuleCmn.cc.

00063                                  {
00064 }

void CSCMonitorModuleCmn::endRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 60 of file CSCMonitorModuleCmn.cc.

00060                                                                         {
00061 }

const CSCDetId CSCMonitorModuleCmn::getCSCDetId ( const unsigned int  crateId,
const unsigned int  dmbId 
) const [inline, virtual]

Implements cscdqm::MonitorObjectProvider.

Definition at line 87 of file CSCMonitorModuleCmn.h.

References CSCCrateMap::detId(), and pcrate.

00087                                                                                            { 
00088       return pcrate->detId(crateId, dmbId, 0, 0); 
00089     }

void CSCMonitorModuleCmn::setup (  )  [protected]

Definition at line 43 of file CSCMonitorModuleCmn.cc.

00043                                 {
00044 }


Member Data Documentation

cscdqm::Configuration CSCMonitorModuleCmn::config [private]

Definition at line 73 of file CSCMonitorModuleCmn.h.

Referenced by CSCMonitorModuleCmn().

DQMStore* CSCMonitorModuleCmn::dbe [private]

Definition at line 75 of file CSCMonitorModuleCmn.h.

Referenced by bookMonitorObject(), and CSCMonitorModuleCmn().

cscdqm::Dispatcher CSCMonitorModuleCmn::dispatcher [private]

Definition at line 74 of file CSCMonitorModuleCmn.h.

Referenced by analyze().

edm::InputTag CSCMonitorModuleCmn::inputTag [private]

Definition at line 76 of file CSCMonitorModuleCmn.h.

Referenced by analyze().

const CSCCrateMap* CSCMonitorModuleCmn::pcrate [private]

Pointer to crate mapping from database.

Definition at line 79 of file CSCMonitorModuleCmn.h.

Referenced by analyze(), and getCSCDetId().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:22 2009 for CMSSW by  doxygen 1.5.4