CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
HLTMuonOfflineAnalyzer Class Reference
Inheritance diagram for HLTMuonOfflineAnalyzer:

Public Member Functions

 HLTMuonOfflineAnalyzer (const edm::ParameterSet &)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 
void endRun (const edm::Run &, const edm::EventSetup &) override
 
std::vector< std::string > moduleLabels (const std::string &)
 

Private Attributes

HLTConfigProvider hltConfig_
 
std::vector< std::string > hltPathsToCheck_
 
std::string hltProcessName_
 
HLTMuonMatchAndPlotContainer plotterContainer_
 
edm::ParameterSet pset_
 

Detailed Description

Definition at line 44 of file HLTMuonOfflineAnalyzer.cc.

Constructor & Destructor Documentation

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

Definition at line 89 of file HLTMuonOfflineAnalyzer.cc.

89  :
90  pset_(pset),
91  hltProcessName_(pset.getParameter<string>("hltProcessName")),
92  hltPathsToCheck_(pset.getParameter<vstring>("hltPathsToCheck")),
93  plotterContainer_(consumesCollector(),pset)
94 {
95 
96 }
T getParameter(std::string const &) const
HLTMuonMatchAndPlotContainer plotterContainer_
vector< string > vstring
Definition: ExoticaDQM.cc:8
std::vector< std::string > hltPathsToCheck_

Member Function Documentation

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

Definition at line 181 of file HLTMuonOfflineAnalyzer.cc.

References HLTMuonMatchAndPlotContainer::analyze(), and plotterContainer_.

183 {
184 
185  plotterContainer_.analyze(iEvent, iSetup);
186 
187 }
HLTMuonMatchAndPlotContainer plotterContainer_
void analyze(const edm::Event &, const edm::EventSetup &)
void HLTMuonOfflineAnalyzer::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 170 of file HLTMuonOfflineAnalyzer.cc.

References HLTMuonMatchAndPlotContainer::beginRun(), and plotterContainer_.

172 {
173 
174  plotterContainer_.beginRun(iBooker, iRun, iSetup);
175 
176 }
HLTMuonMatchAndPlotContainer plotterContainer_
void beginRun(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &)
void HLTMuonOfflineAnalyzer::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 131 of file HLTMuonOfflineAnalyzer.cc.

References HLTMuonMatchAndPlotContainer::addPlotter(), hltConfig_, DQMSequences_cfi::hltPaths, hltPathsToCheck_, hltProcessName_, mps_fire::i, HLTConfigProvider::init(), tablePrinter::labels, moduleLabels(), callgraph::path, plotterContainer_, pset_, and HLTConfigProvider::triggerNames().

133 {
134 
135  // Initialize hltConfig
136  bool changedConfig;
137  if (!hltConfig_.init(iRun, iSetup, hltProcessName_, changedConfig)) {
138  LogError("HLTMuonVal") << "Initialization of HLTConfigProvider failed!!";
139  return;
140  }
141 
142  // Get the set of trigger paths we want to make plots for
143  set<string> hltPaths;
144  for (auto const & i : hltPathsToCheck_) {
145  for (auto const & j : hltConfig_.triggerNames()){
146  if (j.find(i) != std::string::npos){
147  hltPaths.insert(j);
148  }
149  }
150  }
151 
152  // Initialize the plotters
153  set<string>::iterator iPath;
154  vector<string>::const_iterator ilabel;
155  for (iPath = hltPaths.begin(); iPath != hltPaths.end(); iPath++) {
156  string path = * iPath;
157  vector<string> labels = moduleLabels(path);
158  bool isLastLabel = false;
159  for (ilabel = labels.begin(); ilabel != labels.end(); ilabel++) {
160  if (*ilabel == labels.back()) isLastLabel = true;
161  plotterContainer_.addPlotter(pset_, path, *ilabel,isLastLabel);
162  }
163  }
164 
165 }
HLTMuonMatchAndPlotContainer plotterContainer_
const std::vector< std::string > & triggerNames() const
names of trigger paths
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
std::vector< std::string > moduleLabels(const std::string &)
void addPlotter(const edm::ParameterSet &, std::string, std::string, bool)
Add a HLTMuonMatchAndPlot for a given path.
std::vector< std::string > hltPathsToCheck_
void HLTMuonOfflineAnalyzer::endRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 194 of file HLTMuonOfflineAnalyzer.cc.

References DEFINE_FWK_MODULE.

196 {
197 
198  // plotterContainer_.endRun(iRun, iSetup);
199 
200 }
vector< string > HLTMuonOfflineAnalyzer::moduleLabels ( const std::string &  )
private

Definition at line 101 of file HLTMuonOfflineAnalyzer.cc.

References hltConfig_, HLTConfigProvider::moduleLabels(), and electrons_cff::modules.

Referenced by dqmBeginRun().

102 {
103 
104  vector<string> modules = hltConfig_.moduleLabels(path);
105  auto iter = modules.begin();
106  while (iter != modules.end()){
107  if ((iter->find("Filtered") == string::npos)&&(iter->find("hltL1s") == string::npos)){
108  iter = modules.erase(iter);
109  }
110  else if (iter->find("L1Filtered0") != string::npos)
111  iter = modules.erase(iter);
112  else ++iter;
113  }
114 // iter = modules.begin();
115 // while (iter != modules.end()){
116 // if ((iter->find("Filtered0") == string::npos)){
117 // std::cout<< *iter << std::endl;
118 // iter = modules.erase(iter);
119 // }
120 // else ++iter;
121 // }
122 
123 
124  return modules;
125 
126 }
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path

Member Data Documentation

HLTConfigProvider HLTMuonOfflineAnalyzer::hltConfig_
private

Definition at line 68 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun(), and moduleLabels().

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

Definition at line 64 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun().

std::string HLTMuonOfflineAnalyzer::hltProcessName_
private

Definition at line 63 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun().

HLTMuonMatchAndPlotContainer HLTMuonOfflineAnalyzer::plotterContainer_
private

Definition at line 67 of file HLTMuonOfflineAnalyzer.cc.

Referenced by analyze(), bookHistograms(), and dqmBeginRun().

edm::ParameterSet HLTMuonOfflineAnalyzer::pset_
private

Definition at line 62 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun().