CMS 3D CMS Logo

DTLocalTriggerBaseTest Class Reference

* DQM Base for TriggerTests More...

#include <DQM/DTMonitorClient/src/DTLocalTriggerBaseTest.h>

Inheritance diagram for DTLocalTriggerBaseTest:

edm::EDAnalyzer DTLocalTriggerEfficiencyTest DTLocalTriggerLutTest DTLocalTriggerTest DTLocalTriggerTPTest

List of all members.

Public Member Functions

 DTLocalTriggerBaseTest ()
 Constructor.
virtual ~DTLocalTriggerBaseTest ()
 Destructor.

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze.
void beginJob (const edm::EventSetup &c)
 BeginJob.
void beginLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
 Perform begin lumiblock operations.
void bookCmsHistos (std::string hTag)
 Book the new MEs (CMS summary).
void bookSectorHistos (int wheel, int sector, std::string folder, std::string hTag)
 Book the new MEs (for each sector).
void bookWheelHistos (int wheel, std::string folder, std::string hTag)
 Book the new MEs (for each wheel).
std::string category ()
 Get message logger name.
void endJob ()
 Perform client diagnostic in offline.
void endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
 Perform client diagnostic in online.
std::string fullName (std::string htype)
 Create fullname from histo partial name.
template<class T>
T * getHisto (MonitorElement *me)
 Convert ME to Histogram fo type T.
std::string getMEName (std::string histoTag, std::string subfolder, const DTChamberId &chambid)
 Get the ME name.
std::pair< float, float > phiRange (const DTChamberId &id)
 Calculate phi range for histograms.
virtual void runClientDiagnostic ()=0
 Perform client analysis.
void setConfig (const edm::ParameterSet &ps, std::string name)
 Set configuration variables.
std::string & topFolder ()
 Get top folder name.

Protected Attributes

std::string baseFolder
std::map< std::string,
MonitorElement * > 
cmsME
DQMStoredbe
std::string hwSource
std::vector< std::string > hwSources
edm::ESHandle< DTGeometrymuonGeom
int nevents
unsigned int nLumiSegs
edm::ParameterSet parameters
int prescaleFactor
int run
bool runOnline
std::map< int, std::map
< std::string, MonitorElement * > > 
secME
std::string sourceFolder
std::string testName
std::string trigSource
std::vector< std::string > trigSources
std::map< int, std::map
< std::string, MonitorElement * > > 
whME


Detailed Description

* DQM Base for TriggerTests

Date
2008/11/05 11:39:46
Revision
1.4
Author:
C. Battilana S. Marcellini - INFN Bologna

Definition at line 39 of file DTLocalTriggerBaseTest.h.


Constructor & Destructor Documentation

DTLocalTriggerBaseTest::DTLocalTriggerBaseTest (  )  [inline]

Constructor.

Definition at line 44 of file DTLocalTriggerBaseTest.h.

00044 {};

DTLocalTriggerBaseTest::~DTLocalTriggerBaseTest (  )  [virtual]

Destructor.

Definition at line 36 of file DTLocalTriggerBaseTest.cc.

References category(), nevents, and testName.

00036                                                {
00037 
00038   LogVerbatim(category()) << "[" << testName << "Test]: analyzed " << nevents << " events";
00039 
00040 }


Member Function Documentation

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

Analyze.

Implements edm::EDAnalyzer.

Definition at line 62 of file DTLocalTriggerBaseTest.cc.

References category(), LogTrace, nevents, and testName.

00062                                                                                    {
00063 
00064   nevents++;
00065   LogTrace(category()) << "[" << testName << "Test]: "<<nevents<<" events";
00066 
00067 }

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

BeginJob.

Reimplemented from edm::EDAnalyzer.

Reimplemented in DTLocalTriggerEfficiencyTest, DTLocalTriggerLutTest, DTLocalTriggerTest, and DTLocalTriggerTPTest.

Definition at line 42 of file DTLocalTriggerBaseTest.cc.

References category(), edm::EventSetup::get(), muonGeom, nevents, nLumiSegs, and testName.

Referenced by DTLocalTriggerTest::beginJob(), DTLocalTriggerEfficiencyTest::beginJob(), DTLocalTriggerLutTest::beginJob(), and DTLocalTriggerTPTest::beginJob().

00042                                                                  {
00043 
00044   LogVerbatim(category()) << "[" << testName << "Test]: BeginJob";
00045   nevents = 0;
00046   nLumiSegs = 0;
00047   context.get<MuonGeometryRecord>().get(muonGeom);
00048   
00049 }

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

Perform begin lumiblock operations.

Reimplemented from edm::EDAnalyzer.

Definition at line 52 of file DTLocalTriggerBaseTest.cc.

References category(), LogTrace, edm::LuminosityBlock::run(), run, and testName.

00052                                                                                                            {
00053 
00054   LogTrace(category()) <<"[" << testName << "Test]: Begin of LS transition";
00055 
00056   // Get the run number
00057   run = lumiSeg.run();
00058 
00059 }

void DTLocalTriggerBaseTest::bookCmsHistos ( std::string  hTag  )  [protected]

Book the new MEs (CMS summary).

Referenced by DTLocalTriggerTest::beginJob(), and DTLocalTriggerLutTest::beginJob().

void DTLocalTriggerBaseTest::bookSectorHistos ( int  wheel,
int  sector,
std::string  folder,
std::string  hTag 
) [protected]

Book the new MEs (for each sector).

Referenced by DTLocalTriggerEfficiencyTest::beginJob(), DTLocalTriggerLutTest::beginJob(), DTLocalTriggerLutTest::runClientDiagnostic(), and DTLocalTriggerEfficiencyTest::runClientDiagnostic().

void DTLocalTriggerBaseTest::bookWheelHistos ( int  wheel,
std::string  folder,
std::string  hTag 
) [protected]

Book the new MEs (for each wheel).

Referenced by DTLocalTriggerTest::beginJob(), DTLocalTriggerEfficiencyTest::beginJob(), DTLocalTriggerLutTest::beginJob(), DTLocalTriggerTPTest::beginJob(), DTLocalTriggerTPTest::runClientDiagnostic(), DTLocalTriggerLutTest::runClientDiagnostic(), DTLocalTriggerEfficiencyTest::runClientDiagnostic(), and DTLocalTriggerTest::runClientDiagnostic().

std::string DTLocalTriggerBaseTest::category (  )  [inline, protected]

Get message logger name.

Definition at line 103 of file DTLocalTriggerBaseTest.h.

Referenced by analyze(), beginJob(), beginLuminosityBlock(), endJob(), DTLocalTriggerLutTest::runClientDiagnostic(), and ~DTLocalTriggerBaseTest().

00103 { return "DTDQM|DTMonitorClient|" + testName + "Test"; } ;

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

Perform client diagnostic in offline.

Reimplemented from edm::EDAnalyzer.

Definition at line 86 of file DTLocalTriggerBaseTest.cc.

References category(), dbe, DQMStore::dirExists(), LogTrace, runClientDiagnostic(), runOnline, testName, and topFolder().

00086                                    {
00087   
00088   LogTrace(category()) << "[" << testName << "Test] endjob called!";
00089 
00090   if (!runOnline) {
00091     LogVerbatim(category()) << "[" << testName << "Test] Client called in offline mode, performing client operations";
00092 
00093     if (dbe->dirExists(topFolder())) {
00094       //dbe->showDirStructure();
00095       runClientDiagnostic();
00096     }
00097     else {
00098       LogVerbatim(category()) << "[" << testName << "Test] trigger ME dir does not exist! Skipping";  
00099     }
00100 
00101   }
00102 
00103 }

void DTLocalTriggerBaseTest::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  context 
) [protected, virtual]

Perform client diagnostic in online.

Reimplemented from edm::EDAnalyzer.

Definition at line 70 of file DTLocalTriggerBaseTest.cc.

References nLumiSegs, prescaleFactor, runClientDiagnostic(), runOnline, and testName.

00070                                                                                                                {
00071   
00072   if (!runOnline) return;
00073 
00074   LogVerbatim("DTDQM|DTMonitorClient|DTLocalTriggerTest") <<"[" << testName << "Test]: End of LS transition, performing the DQM client operation";
00075 
00076   // counts number of lumiSegs and prescale
00077   nLumiSegs++;
00078   if ( nLumiSegs%prescaleFactor != 0 ) return;
00079 
00080   LogVerbatim("DTDQM|DTMonitorClient|DTLocalTriggerTest") <<"[" << testName << "Test]: "<<nLumiSegs<<" updates";  
00081   runClientDiagnostic();
00082 
00083 }

std::string DTLocalTriggerBaseTest::fullName ( std::string  htype  )  [protected]

Create fullname from histo partial name.

Referenced by DTLocalTriggerTPTest::runClientDiagnostic(), DTLocalTriggerLutTest::runClientDiagnostic(), DTLocalTriggerEfficiencyTest::runClientDiagnostic(), and DTLocalTriggerTest::runClientDiagnostic().

template<class T>
T * DTLocalTriggerBaseTest::getHisto ( MonitorElement me  )  [inline, protected]

Convert ME to Histogram fo type T.

Definition at line 132 of file DTLocalTriggerBaseTest.h.

References MonitorElement::getRootObject().

00132                                                       {
00133   return me ? dynamic_cast<T*>(me->getRootObject()) : 0;
00134 }

std::string DTLocalTriggerBaseTest::getMEName ( std::string  histoTag,
std::string  subfolder,
const DTChamberId chambid 
) [protected]

Get the ME name.

Referenced by DTLocalTriggerTPTest::runClientDiagnostic(), DTLocalTriggerLutTest::runClientDiagnostic(), DTLocalTriggerEfficiencyTest::runClientDiagnostic(), and DTLocalTriggerTest::runClientDiagnostic().

pair< float, float > DTLocalTriggerBaseTest::phiRange ( const DTChamberId id  )  [protected]

Calculate phi range for histograms.

Definition at line 290 of file DTLocalTriggerBaseTest.cc.

References DTTopology::firstChannel(), DTTopology::lastChannel(), max, min, muonGeom, GeomDet::position(), DTLayer::specificTopology(), GeomDet::toLocal(), DTTopology::wirePosition(), and x.

00290                                                                        {
00291 
00292   float min,max;
00293   int station = id.station();
00294   int sector  = id.sector(); 
00295   int wheel   = id.wheel();
00296   
00297   const DTLayer  *layer = muonGeom->layer(DTLayerId(id,1,1));
00298   DTTopology topo = layer->specificTopology();
00299   min = topo.wirePosition(topo.firstChannel());
00300   max = topo.wirePosition(topo.lastChannel());
00301 
00302   if (station == 4){
00303     
00304     const DTLayer *layer2;
00305     float lposx;
00306     
00307     if (sector == 4){
00308       layer2  = muonGeom->layer(DTLayerId(wheel,station,13,1,1));
00309       lposx = layer->toLocal(layer2->position()).x();
00310     }
00311     else if (sector == 10){
00312       layer2 = muonGeom->layer(DTLayerId(wheel,station,14,1,1));
00313       lposx = layer->toLocal(layer2->position()).x();
00314     }
00315     else
00316       return make_pair(min,max);
00317     
00318     DTTopology topo2 = layer2->specificTopology();
00319 
00320     if (lposx>0){
00321       max = lposx*.5+topo2.wirePosition(topo2.lastChannel());
00322       min -= lposx*.5;
00323     }
00324     else{
00325       min = lposx*.5+topo2.wirePosition(topo2.firstChannel());
00326       max -= lposx*.5;
00327     }
00328       
00329   }
00330   
00331   return make_pair(min,max);
00332 
00333 }

virtual void DTLocalTriggerBaseTest::runClientDiagnostic (  )  [protected, pure virtual]

Perform client analysis.

Implemented in DTLocalTriggerEfficiencyTest, DTLocalTriggerLutTest, DTLocalTriggerTest, and DTLocalTriggerTPTest.

Referenced by endJob(), and endLuminosityBlock().

void DTLocalTriggerBaseTest::setConfig ( const edm::ParameterSet ps,
std::string  name 
) [protected]

Set configuration variables.

Referenced by DTLocalTriggerEfficiencyTest::DTLocalTriggerEfficiencyTest(), DTLocalTriggerLutTest::DTLocalTriggerLutTest(), DTLocalTriggerTest::DTLocalTriggerTest(), and DTLocalTriggerTPTest::DTLocalTriggerTPTest().

std::string& DTLocalTriggerBaseTest::topFolder (  )  [inline, protected]

Get top folder name.

Definition at line 100 of file DTLocalTriggerBaseTest.h.

References baseFolder.

Referenced by endJob().

00100 { return baseFolder; } ;


Member Data Documentation

std::string DTLocalTriggerBaseTest::baseFolder [protected]

Definition at line 119 of file DTLocalTriggerBaseTest.h.

Referenced by DTLocalTriggerEfficiencyTest::DTLocalTriggerEfficiencyTest(), DTLocalTriggerLutTest::DTLocalTriggerLutTest(), DTLocalTriggerTest::DTLocalTriggerTest(), DTLocalTriggerTPTest::DTLocalTriggerTPTest(), and topFolder().

std::map<std::string,MonitorElement*> DTLocalTriggerBaseTest::cmsME [protected]

Definition at line 125 of file DTLocalTriggerBaseTest.h.

Referenced by DTLocalTriggerLutTest::runClientDiagnostic(), and DTLocalTriggerTest::runClientDiagnostic().

DQMStore* DTLocalTriggerBaseTest::dbe [protected]

Definition at line 115 of file DTLocalTriggerBaseTest.h.

Referenced by endJob(), DTLocalTriggerTPTest::runClientDiagnostic(), DTLocalTriggerLutTest::runClientDiagnostic(), DTLocalTriggerEfficiencyTest::runClientDiagnostic(), and DTLocalTriggerTest::runClientDiagnostic().

std::string DTLocalTriggerBaseTest::hwSource [protected]

Definition at line 121 of file DTLocalTriggerBaseTest.h.

Referenced by DTLocalTriggerTest::beginJob(), DTLocalTriggerEfficiencyTest::beginJob(), DTLocalTriggerLutTest::beginJob(), DTLocalTriggerTPTest::beginJob(), DTLocalTriggerTPTest::runClientDiagnostic(), DTLocalTriggerLutTest::runClientDiagnostic(), DTLocalTriggerEfficiencyTest::runClientDiagnostic(), and DTLocalTriggerTest::runClientDiagnostic().

std::vector<std::string> DTLocalTriggerBaseTest::hwSources [protected]

Definition at line 113 of file DTLocalTriggerBaseTest.h.

Referenced by DTLocalTriggerTest::beginJob(), DTLocalTriggerEfficiencyTest::beginJob(), DTLocalTriggerLutTest::beginJob(), DTLocalTriggerTPTest::beginJob(), DTLocalTriggerTPTest::runClientDiagnostic(), DTLocalTriggerLutTest::runClientDiagnostic(), DTLocalTriggerEfficiencyTest::runClientDiagnostic(), and DTLocalTriggerTest::runClientDiagnostic().

edm::ESHandle<DTGeometry> DTLocalTriggerBaseTest::muonGeom [protected]

Definition at line 122 of file DTLocalTriggerBaseTest.h.

Referenced by beginJob(), and phiRange().

int DTLocalTriggerBaseTest::nevents [protected]

Definition at line 103 of file DTLocalTriggerBaseTest.h.

Referenced by analyze(), beginJob(), and ~DTLocalTriggerBaseTest().

unsigned int DTLocalTriggerBaseTest::nLumiSegs [protected]

Definition at line 108 of file DTLocalTriggerBaseTest.h.

Referenced by beginJob(), and endLuminosityBlock().

edm::ParameterSet DTLocalTriggerBaseTest::parameters [protected]

Definition at line 117 of file DTLocalTriggerBaseTest.h.

Referenced by DTLocalTriggerTest::beginJob(), DTLocalTriggerEfficiencyTest::beginJob(), DTLocalTriggerLutTest::beginJob(), DTLocalTriggerTPTest::beginJob(), and DTLocalTriggerTest::runClientDiagnostic().

int DTLocalTriggerBaseTest::prescaleFactor [protected]

Definition at line 109 of file DTLocalTriggerBaseTest.h.

Referenced by endLuminosityBlock().

int DTLocalTriggerBaseTest::run [protected]

Definition at line 110 of file DTLocalTriggerBaseTest.h.

Referenced by beginLuminosityBlock().

bool DTLocalTriggerBaseTest::runOnline [protected]

Definition at line 118 of file DTLocalTriggerBaseTest.h.

Referenced by endJob(), and endLuminosityBlock().

std::map<int,std::map<std::string,MonitorElement*> > DTLocalTriggerBaseTest::secME [protected]

Definition at line 123 of file DTLocalTriggerBaseTest.h.

Referenced by DTLocalTriggerLutTest::runClientDiagnostic(), and DTLocalTriggerEfficiencyTest::runClientDiagnostic().

std::string DTLocalTriggerBaseTest::sourceFolder [protected]

Definition at line 116 of file DTLocalTriggerBaseTest.h.

std::string DTLocalTriggerBaseTest::testName [protected]

Definition at line 111 of file DTLocalTriggerBaseTest.h.

Referenced by analyze(), beginJob(), beginLuminosityBlock(), endJob(), endLuminosityBlock(), DTLocalTriggerLutTest::runClientDiagnostic(), and ~DTLocalTriggerBaseTest().

std::string DTLocalTriggerBaseTest::trigSource [protected]

Definition at line 120 of file DTLocalTriggerBaseTest.h.

Referenced by DTLocalTriggerTest::beginJob(), DTLocalTriggerEfficiencyTest::beginJob(), DTLocalTriggerLutTest::beginJob(), DTLocalTriggerTPTest::beginJob(), DTLocalTriggerTPTest::runClientDiagnostic(), DTLocalTriggerLutTest::runClientDiagnostic(), DTLocalTriggerEfficiencyTest::runClientDiagnostic(), and DTLocalTriggerTest::runClientDiagnostic().

std::vector<std::string> DTLocalTriggerBaseTest::trigSources [protected]

Definition at line 112 of file DTLocalTriggerBaseTest.h.

Referenced by DTLocalTriggerTest::beginJob(), DTLocalTriggerEfficiencyTest::beginJob(), DTLocalTriggerLutTest::beginJob(), DTLocalTriggerTPTest::beginJob(), DTLocalTriggerTPTest::runClientDiagnostic(), DTLocalTriggerLutTest::runClientDiagnostic(), DTLocalTriggerEfficiencyTest::runClientDiagnostic(), and DTLocalTriggerTest::runClientDiagnostic().

std::map<int,std::map<std::string,MonitorElement*> > DTLocalTriggerBaseTest::whME [protected]

Definition at line 124 of file DTLocalTriggerBaseTest.h.

Referenced by DTLocalTriggerTPTest::runClientDiagnostic(), DTLocalTriggerLutTest::runClientDiagnostic(), DTLocalTriggerEfficiencyTest::runClientDiagnostic(), and DTLocalTriggerTest::runClientDiagnostic().


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