CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
HLTMuonOfflineAnalyzer Class Reference
Inheritance diagram for HLTMuonOfflineAnalyzer:
edm::EDAnalyzer

Public Member Functions

 HLTMuonOfflineAnalyzer (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

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_
 

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 &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

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().

96  :
97  pset_(pset),
98  hltProcessName_(pset.getParameter<string>("hltProcessName")),
99  destination_(pset.getUntrackedParameter<string>("destination")),
100  hltPathsToCheck_(pset.getParameter<vstring>("hltPathsToCheck"))
101 {
102  // Prepare the DQMStore object.
104  dbe_->setVerbose(0);
106 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void setVerbose(unsigned level)
Definition: DQMStore.cc:393
std::vector< std::string > vstring
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
std::vector< std::string > hltPathsToCheck_

Member Function Documentation

void HLTMuonOfflineAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 169 of file HLTMuonOfflineAnalyzer.cc.

References analyzers_.

171 {
172 
173  vector<HLTMuonMatchAndPlot>::iterator iter;
174  for (iter = analyzers_.begin(); iter != analyzers_.end(); ++iter) {
175  iter->analyze(iEvent, iSetup);
176  }
177 
178 }
std::vector< HLTMuonMatchAndPlot > analyzers_
void HLTMuonOfflineAnalyzer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 183 of file HLTMuonOfflineAnalyzer.cc.

184 {
185 }
void HLTMuonOfflineAnalyzer::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
privatevirtual

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().

130  {
131 
132  // Initialize hltConfig
133  bool changedConfig;
134  if (!hltConfig_.init(iRun, iSetup, hltProcessName_, changedConfig)) {
135  LogError("HLTMuonVal") << "Initialization of HLTConfigProvider failed!!";
136  return;
137  }
138 
139  // Get the set of trigger paths we want to make plots for
140  set<string> hltPaths;
141  for (size_t i = 0; i < hltPathsToCheck_.size(); i++) {
142  TPRegexp pattern(hltPathsToCheck_[i]);
143  for (size_t j = 0; j < hltConfig_.triggerNames().size(); j++)
144  if (TString(hltConfig_.triggerNames()[j]).Contains(pattern))
145  hltPaths.insert(hltConfig_.triggerNames()[j]);
146  }
147 
148  // Initialize the analyzers
149  analyzers_.clear();
150  set<string>::iterator iPath;
151  for (iPath = hltPaths.begin(); iPath != hltPaths.end(); iPath++) {
152  string path = * iPath;
153  vector<string> labels = moduleLabels(path);
154  if (labels.size() > 0) {
155  HLTMuonMatchAndPlot analyzer(pset_, path, moduleLabels(path));
156  analyzers_.push_back(analyzer);
157  }
158  }
159 
160  // Call the beginRun (which books all the histograms)
161  vector<HLTMuonMatchAndPlot>::iterator iter;
162  for (iter = analyzers_.begin(); iter != analyzers_.end(); ++iter) {
163  iter->beginRun(iRun, iSetup);
164  }
165 
166 }
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > moduleLabels(std::string)
const std::vector< std::string > & triggerNames() const
names of trigger paths
list path
Definition: scaleCards.py:51
int j
Definition: DBlmapReader.cc:9
std::vector< HLTMuonMatchAndPlot > analyzers_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
std::vector< std::string > hltPathsToCheck_
void HLTMuonOfflineAnalyzer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 204 of file HLTMuonOfflineAnalyzer.cc.

205 {
206 }
void HLTMuonOfflineAnalyzer::endRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 190 of file HLTMuonOfflineAnalyzer.cc.

192 {
193 
194  // vector<HLTMuonMatchAndPlot>::iterator iter;
195  // for (iter = analyzers_.begin(); iter != analyzers_.end(); ++iter) {
196  // iter->endRun(iRun, iSetup);
197  // }
198 
199 }
vector< string > HLTMuonOfflineAnalyzer::moduleLabels ( std::string  )
private

Definition at line 111 of file HLTMuonOfflineAnalyzer.cc.

References hltConfig_, and HLTConfigProvider::moduleLabels().

Referenced by beginRun().

111  {
112 
113  vector<string> modules = hltConfig_.moduleLabels(path);
114  vector<string>::iterator iter = modules.begin();
115 
116  while (iter != modules.end())
117  if (iter->find("Filtered") == string::npos)
118  iter = modules.erase(iter);
119  else
120  ++iter;
121 
122  return modules;
123 
124 }
list path
Definition: scaleCards.py:51
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path

Member Data Documentation

std::vector<HLTMuonMatchAndPlot> HLTMuonOfflineAnalyzer::analyzers_
private
DQMStore* HLTMuonOfflineAnalyzer::dbe_
private

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().

HLTConfigProvider HLTMuonOfflineAnalyzer::hltConfig_
private

Definition at line 72 of file HLTMuonOfflineAnalyzer.cc.

Referenced by beginRun(), and moduleLabels().

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

Definition at line 68 of file HLTMuonOfflineAnalyzer.cc.

Referenced by beginRun().

std::string HLTMuonOfflineAnalyzer::hltProcessName_
private

Definition at line 66 of file HLTMuonOfflineAnalyzer.cc.

Referenced by beginRun().

edm::ParameterSet HLTMuonOfflineAnalyzer::pset_
private

Definition at line 65 of file HLTMuonOfflineAnalyzer.cc.

Referenced by beginRun().