CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

HLTMuonOfflineAnalyzer Class Reference

Inheritance diagram for HLTMuonOfflineAnalyzer:
edm::EDAnalyzer

List of all members.

Public Member Functions

 HLTMuonOfflineAnalyzer (const edm::ParameterSet &)

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginJob ()
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
virtual void endJob ()
virtual void endRun (const edm::Run &, const edm::EventSetup &)
std::vector< std::string > moduleLabels (std::string)

Private Attributes

std::vector< HLTMuonMatchAndPlotanalyzers_
DQMStoredbe_
std::string destination_
HLTConfigProvider hltConfig_
std::vector< std::string > hltPathsToCheck_
std::string hltProcessName_
edm::ParameterSet pset_

Detailed Description

Definition at line 46 of file HLTMuonOfflineAnalyzer.cc.


Constructor & Destructor Documentation

HLTMuonOfflineAnalyzer::HLTMuonOfflineAnalyzer ( const edm::ParameterSet pset) [explicit]

Definition at line 96 of file HLTMuonOfflineAnalyzer.cc.

References dbe_, destination_, cppFunctionSkipper::operator, DQMStore::setCurrentFolder(), and DQMStore::setVerbose().

                                                                       :
  pset_(pset),
  hltProcessName_(pset.getParameter<string>("hltProcessName")),
  destination_(pset.getUntrackedParameter<string>("destination")),
  hltPathsToCheck_(pset.getParameter<vstring>("hltPathsToCheck"))
{
  // Prepare the DQMStore object.
  dbe_ = edm::Service<DQMStore>().operator->();
  dbe_->setVerbose(0);
  dbe_->setCurrentFolder(destination_);
}

Member Function Documentation

void HLTMuonOfflineAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDAnalyzer.

Definition at line 169 of file HLTMuonOfflineAnalyzer.cc.

References analyzers_.

{

  vector<HLTMuonMatchAndPlot>::iterator iter;
  for (iter = analyzers_.begin(); iter != analyzers_.end(); ++iter) {
    iter->analyze(iEvent, iSetup);
  }

}
void HLTMuonOfflineAnalyzer::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 183 of file HLTMuonOfflineAnalyzer.cc.

{
}
void HLTMuonOfflineAnalyzer::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 129 of file HLTMuonOfflineAnalyzer.cc.

References analyzers_, hltConfig_, CreateSqliteForCondDB_cfg::hltPaths, hltPathsToCheck_, hltProcessName_, i, HLTConfigProvider::init(), j, reco_calib_source_client_cfg::labels, moduleLabels(), scaleCards::path, listBenchmarks::pattern, pset_, and HLTConfigProvider::triggerNames().

                                                                    {

  // Initialize hltConfig
  bool changedConfig;
  if (!hltConfig_.init(iRun, iSetup, hltProcessName_, changedConfig)) {
    LogError("HLTMuonVal") << "Initialization of HLTConfigProvider failed!!"; 
    return;
  }

  // Get the set of trigger paths we want to make plots for
  set<string> hltPaths;
  for (size_t i = 0; i < hltPathsToCheck_.size(); i++) {
    TPRegexp pattern(hltPathsToCheck_[i]);
    for (size_t j = 0; j < hltConfig_.triggerNames().size(); j++)
      if (TString(hltConfig_.triggerNames()[j]).Contains(pattern))
        hltPaths.insert(hltConfig_.triggerNames()[j]);
  }
  
  // Initialize the analyzers
  analyzers_.clear();
  set<string>::iterator iPath;
  for (iPath = hltPaths.begin(); iPath != hltPaths.end(); iPath++) {
    string path = * iPath;
    vector<string> labels = moduleLabels(path);
    if (labels.size() > 0) {
      HLTMuonMatchAndPlot analyzer(pset_, path, moduleLabels(path));
      analyzers_.push_back(analyzer);
    }
  }

  // Call the beginRun (which books all the histograms)
  vector<HLTMuonMatchAndPlot>::iterator iter;
  for (iter = analyzers_.begin(); iter != analyzers_.end(); ++iter) {
    iter->beginRun(iRun, iSetup);
  }

}
void HLTMuonOfflineAnalyzer::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 204 of file HLTMuonOfflineAnalyzer.cc.

{
}
void HLTMuonOfflineAnalyzer::endRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 190 of file HLTMuonOfflineAnalyzer.cc.

{

  // vector<HLTMuonMatchAndPlot>::iterator iter;
  // for (iter = analyzers_.begin(); iter != analyzers_.end(); ++iter) {
  //   iter->endRun(iRun, iSetup);
  // }

}
std::vector<std::string> HLTMuonOfflineAnalyzer::moduleLabels ( std::string  ) [private]

Referenced by beginRun().


Member Data Documentation

Definition at line 71 of file HLTMuonOfflineAnalyzer.cc.

Referenced by analyze(), and beginRun().

Definition at line 75 of file HLTMuonOfflineAnalyzer.cc.

Referenced by HLTMuonOfflineAnalyzer().

std::string HLTMuonOfflineAnalyzer::destination_ [private]

Definition at line 67 of file HLTMuonOfflineAnalyzer.cc.

Referenced by HLTMuonOfflineAnalyzer().

Definition at line 72 of file HLTMuonOfflineAnalyzer.cc.

Referenced by beginRun(), and HLTMuonValidator::moduleLabels().

std::vector<std::string> HLTMuonOfflineAnalyzer::hltPathsToCheck_ [private]

Definition at line 68 of file HLTMuonOfflineAnalyzer.cc.

Referenced by beginRun().

Definition at line 66 of file HLTMuonOfflineAnalyzer.cc.

Referenced by beginRun().

Definition at line 65 of file HLTMuonOfflineAnalyzer.cc.

Referenced by beginRun().