CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Private Attributes

HLTTauDQMOfflineSource Class Reference

#include <HLTTauDQMOfflineSource.h>

Inheritance diagram for HLTTauDQMOfflineSource:
edm::EDAnalyzer

List of all members.

Public Member Functions

 HLTTauDQMOfflineSource (const edm::ParameterSet &)
 ~HLTTauDQMOfflineSource ()

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Fake Analyze.
void beginJob ()
 BeginJob.
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
 Luminosity Block.
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun.
void endJob ()
 Endjob.
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 DQM Client Diagnostic.
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun.

Private Attributes

std::vector< HLTTauDQMCaloPlottercaloPlotters
std::vector< edm::ParameterSetconfig_
int counterEvt_
DQMStoredbe_
bool doRefAnalysis_
double EtMax_
double HLTMatchDr_
double L1MatchDr_
std::vector< HLTTauDQML1Plotterl1Plotters
std::vector
< HLTTauDQMLitePathPlotter
litePathPlotters
int NEtaBins_
int NPhiBins_
int NPtBins_
std::vector< HLTTauDQMPathPlotterpathPlotters
int prescaleEvt_
 counter
std::vector< edm::InputTagrefObjects_
std::vector< HLTTauDQMTrkPlottertrackPlotters
edm::InputTag triggerEvent_
 every n events

Detailed Description

Definition at line 34 of file HLTTauDQMOfflineSource.h.


Constructor & Destructor Documentation

HLTTauDQMOfflineSource::HLTTauDQMOfflineSource ( const edm::ParameterSet ps)

Definition at line 12 of file HLTTauDQMOfflineSource.cc.

References caloPlotters, config_, doRefAnalysis_, EtMax_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HLTMatchDr_, i, L1MatchDr_, l1Plotters, litePathPlotters, NEtaBins_, NPhiBins_, NPtBins_, pathPlotters, prescaleEvt_, refObjects_, tmp, and trackPlotters.

                                                                          :counterEvt_(0)
{
    //Get General Monitoring Parameters
    config_                 = ps.getParameter<std::vector<edm::ParameterSet> >("MonitorSetup");
    doRefAnalysis_          = ps.getParameter<bool>("doMatching");
    NPtBins_                = ps.getUntrackedParameter<int>("PtHistoBins",20);
    NEtaBins_               = ps.getUntrackedParameter<int>("EtaHistoBins",25);
    NPhiBins_               = ps.getUntrackedParameter<int>("PhiHistoBins",32);
    EtMax_                  = ps.getUntrackedParameter<double>("EtHistoMax",100);
    L1MatchDr_              = ps.getUntrackedParameter<double>("L1MatchDeltaR",0.5);
    HLTMatchDr_             = ps.getUntrackedParameter<double>("HLTMatchDeltaR",0.3);
    
    refObjects_             = ps.getUntrackedParameter<std::vector<edm::InputTag> >("refObjects");
    
    prescaleEvt_            = ps.getUntrackedParameter<int>("prescaleEvt", -1);
    
    //Read The Configuration
    for (unsigned int i=0;i<config_.size();++i) {
        if (config_[i].getUntrackedParameter<std::string>("ConfigType") == "L1") {
            HLTTauDQML1Plotter tmp(config_[i],NPtBins_,NEtaBins_,NPhiBins_,EtMax_,doRefAnalysis_,L1MatchDr_);
            l1Plotters.push_back(tmp);
        }
        
        else if (config_[i].getUntrackedParameter<std::string>("ConfigType") == "Calo") {
            HLTTauDQMCaloPlotter tmp(config_[i],NPtBins_,NEtaBins_,NPhiBins_,EtMax_,doRefAnalysis_,HLTMatchDr_);
            caloPlotters.push_back(tmp);
        }
        
        else if (config_[i].getUntrackedParameter<std::string>("ConfigType") == "Track") {
            HLTTauDQMTrkPlotter tmp(config_[i],NPtBins_,NEtaBins_,NPhiBins_,EtMax_,doRefAnalysis_,HLTMatchDr_);
            trackPlotters.push_back(tmp);
        }
        
        else if (config_[i].getUntrackedParameter<std::string>("ConfigType") == "Path") {
            HLTTauDQMPathPlotter tmp(config_[i],doRefAnalysis_);
            pathPlotters.push_back(tmp);
        }
        
        else if (config_[i].getUntrackedParameter<std::string>("ConfigType") == "LitePath") {
            HLTTauDQMLitePathPlotter tmp(config_[i],NPtBins_,NEtaBins_,NPhiBins_,EtMax_,doRefAnalysis_,HLTMatchDr_);
            litePathPlotters.push_back(tmp);
        }
    }
}
HLTTauDQMOfflineSource::~HLTTauDQMOfflineSource ( )

Definition at line 57 of file HLTTauDQMOfflineSource.cc.

{
    
    // do anything here that needs to be done at desctruction time
    // (e.g. close files, deallocate resources etc.)
    
}

Member Function Documentation

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

Fake Analyze.

Implements edm::EDAnalyzer.

Definition at line 85 of file HLTTauDQMOfflineSource.cc.

References caloPlotters, counterEvt_, doRefAnalysis_, edm::Event::getByLabel(), i, gen::k, l1Plotters, litePathPlotters, pathPlotters, prescaleEvt_, refObjects_, and trackPlotters.

{  
    //Apply the prescaler
    if(counterEvt_ > prescaleEvt_)
    {
        //Do Analysis here
        
        //Create dummy Match Collections
        std::vector<LVColl> refC;
        
        if(doRefAnalysis_)
        {
            for(unsigned int i=0;i<refObjects_.size();++i)
            {
                Handle<LVColl> collHandle;
                if(iEvent.getByLabel(refObjects_[i],collHandle))
                {
                    refC.push_back(*collHandle);
                }
            }
        }
        
        
        
        //fill the empty slots with empty collections
        LVColl dummy;
        for(int k=refC.size();k<3;k++)
        {
            refC.push_back(dummy);
        }
        
        
        
        //Path Plotters
        for(unsigned int i=0;i<pathPlotters.size();++i)
            pathPlotters[i].analyze(iEvent,iSetup,refC);
        
        //Lite Path Plotters
        for(unsigned int i=0;i<litePathPlotters.size();++i)
            litePathPlotters[i].analyze(iEvent,iSetup,refC);
        
        //L1  Plotters
        for(unsigned int i=0;i<l1Plotters.size();++i)
            l1Plotters[i].analyze(iEvent,iSetup,refC);
        
        //Calo Plotters
        for(unsigned int i=0;i<caloPlotters.size();++i)
            caloPlotters[i].analyze(iEvent,iSetup,refC[0]);
        
        //Track Plotters
        for(unsigned int i=0;i<trackPlotters.size();++i)
            trackPlotters[i].analyze(iEvent,iSetup,refC[0]);
    }
    else
        counterEvt_++;
    
}
void HLTTauDQMOfflineSource::beginJob ( void  ) [protected, virtual]

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 68 of file HLTTauDQMOfflineSource.cc.

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

Luminosity Block.

Reimplemented from edm::EDAnalyzer.

Definition at line 78 of file HLTTauDQMOfflineSource.cc.

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

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 73 of file HLTTauDQMOfflineSource.cc.

                                                                               {
    
}
void HLTTauDQMOfflineSource::endJob ( void  ) [protected, virtual]

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 154 of file HLTTauDQMOfflineSource.cc.

                                   {
    return;
}
void HLTTauDQMOfflineSource::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
) [protected, virtual]

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 147 of file HLTTauDQMOfflineSource.cc.

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

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 151 of file HLTTauDQMOfflineSource.cc.

                                                                          {
}

Member Data Documentation

Definition at line 95 of file HLTTauDQMOfflineSource.h.

Referenced by analyze(), and HLTTauDQMOfflineSource().

Definition at line 66 of file HLTTauDQMOfflineSource.h.

Referenced by HLTTauDQMOfflineSource().

Definition at line 87 of file HLTTauDQMOfflineSource.h.

Referenced by analyze().

Definition at line 65 of file HLTTauDQMOfflineSource.h.

Definition at line 69 of file HLTTauDQMOfflineSource.h.

Referenced by analyze(), and HLTTauDQMOfflineSource().

Definition at line 73 of file HLTTauDQMOfflineSource.h.

Referenced by HLTTauDQMOfflineSource().

Definition at line 75 of file HLTTauDQMOfflineSource.h.

Referenced by HLTTauDQMOfflineSource().

Definition at line 74 of file HLTTauDQMOfflineSource.h.

Referenced by HLTTauDQMOfflineSource().

Definition at line 94 of file HLTTauDQMOfflineSource.h.

Referenced by analyze(), and HLTTauDQMOfflineSource().

Definition at line 98 of file HLTTauDQMOfflineSource.h.

Referenced by analyze(), and HLTTauDQMOfflineSource().

Definition at line 71 of file HLTTauDQMOfflineSource.h.

Referenced by HLTTauDQMOfflineSource().

Definition at line 72 of file HLTTauDQMOfflineSource.h.

Referenced by HLTTauDQMOfflineSource().

Definition at line 70 of file HLTTauDQMOfflineSource.h.

Referenced by HLTTauDQMOfflineSource().

Definition at line 97 of file HLTTauDQMOfflineSource.h.

Referenced by analyze(), and HLTTauDQMOfflineSource().

counter

Definition at line 88 of file HLTTauDQMOfflineSource.h.

Referenced by analyze(), and HLTTauDQMOfflineSource().

Definition at line 78 of file HLTTauDQMOfflineSource.h.

Referenced by analyze(), and HLTTauDQMOfflineSource().

Definition at line 96 of file HLTTauDQMOfflineSource.h.

Referenced by analyze(), and HLTTauDQMOfflineSource().

every n events

Definition at line 91 of file HLTTauDQMOfflineSource.h.