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 dqmEndRun (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 38 of file HLTMuonOfflineAnalyzer.cc.

Constructor & Destructor Documentation

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

Definition at line 75 of file HLTMuonOfflineAnalyzer.cc.

76  : pset_(pset),
77  hltProcessName_(pset.getParameter<string>("hltProcessName")),
78  hltPathsToCheck_(pset.getParameter<vstring>("hltPathsToCheck")),
79  plotterContainer_(consumesCollector(), pset) {}
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 143 of file HLTMuonOfflineAnalyzer.cc.

References HLTMuonMatchAndPlotContainer::analyze(), and plotterContainer_.

143  {
144  plotterContainer_.analyze(iEvent, iSetup);
145 }
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 137 of file HLTMuonOfflineAnalyzer.cc.

References HLTMuonMatchAndPlotContainer::beginRun(), and plotterContainer_.

139  {
140  plotterContainer_.beginRun(iBooker, iRun, iSetup);
141 }
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 104 of file HLTMuonOfflineAnalyzer.cc.

References HLTMuonMatchAndPlotContainer::addPlotter(), hltConfig_, HLTSiStripMonitoring_cff::hltPaths, hltPathsToCheck_, hltProcessName_, mps_fire::i, HLTConfigProvider::init(), dqmiolumiharvest::j, SummaryClient_cfi::labels, moduleLabels(), castor_dqm_sourceclient_file_cfg::path, plotterContainer_, pset_, and HLTConfigProvider::triggerNames().

104  {
105  // Initialize hltConfig
106  bool changedConfig;
107  if (!hltConfig_.init(iRun, iSetup, hltProcessName_, changedConfig)) {
108  LogError("HLTMuonVal") << "Initialization of HLTConfigProvider failed!!";
109  return;
110  }
111 
112  // Get the set of trigger paths we want to make plots for
113  set<string> hltPaths;
114  for (auto const &i : hltPathsToCheck_) {
115  for (auto const &j : hltConfig_.triggerNames()) {
116  if (j.find(i) != std::string::npos) {
117  hltPaths.insert(j);
118  }
119  }
120  }
121 
122  // Initialize the plotters
123  set<string>::iterator iPath;
124  vector<string>::const_iterator ilabel;
125  for (iPath = hltPaths.begin(); iPath != hltPaths.end(); iPath++) {
126  string path = *iPath;
127  vector<string> labels = moduleLabels(path);
128  bool isLastLabel = false;
129  for (ilabel = labels.begin(); ilabel != labels.end(); ilabel++) {
130  if (*ilabel == labels.back())
131  isLastLabel = true;
132  plotterContainer_.addPlotter(pset_, path, *ilabel, isLastLabel);
133  }
134  }
135 }
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::dqmEndRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 147 of file HLTMuonOfflineAnalyzer.cc.

References DEFINE_FWK_MODULE.

147  {
148  // plotterContainer_.endRun(iRun, iSetup);
149 }
vector< string > HLTMuonOfflineAnalyzer::moduleLabels ( const std::string &  )
private

Definition at line 81 of file HLTMuonOfflineAnalyzer.cc.

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

Referenced by dqmBeginRun().

81  {
82  vector<string> modules = hltConfig_.moduleLabels(path);
83  auto iter = modules.begin();
84  while (iter != modules.end()) {
85  if ((iter->find("Filtered") == string::npos) && (iter->find("hltL1s") == string::npos)) {
86  iter = modules.erase(iter);
87  } else if (iter->find("L1Filtered0") != string::npos)
88  iter = modules.erase(iter);
89  else
90  ++iter;
91  }
92  // iter = modules.begin();
93  // while (iter != modules.end()){
94  // if ((iter->find("Filtered0") == string::npos)){
95  // std::cout<< *iter << std::endl;
96  // iter = modules.erase(iter);
97  // }
98  // else ++iter;
99  // }
100 
101  return modules;
102 }
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 59 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun(), and moduleLabels().

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

Definition at line 55 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun().

std::string HLTMuonOfflineAnalyzer::hltProcessName_
private

Definition at line 54 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun().

HLTMuonMatchAndPlotContainer HLTMuonOfflineAnalyzer::plotterContainer_
private

Definition at line 58 of file HLTMuonOfflineAnalyzer.cc.

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

edm::ParameterSet HLTMuonOfflineAnalyzer::pset_
private

Definition at line 53 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun().