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
 
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::HLTMuonOfflineAnalyzer ( const edm::ParameterSet pset)
explicit

Definition at line 74 of file HLTMuonOfflineAnalyzer.cc.

75  : pset_(pset),
76  hltProcessName_(pset.getParameter<string>("hltProcessName")),
77  hltPathsToCheck_(pset.getParameter<vstring>("hltPathsToCheck")),
78  plotterContainer_(consumesCollector(), pset) {}
HLTMuonMatchAndPlotContainer plotterContainer_
vector< string > vstring
Definition: ExoticaDQM.cc:7
std::vector< std::string > hltPathsToCheck_

Member Function Documentation

◆ analyze()

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

Definition at line 144 of file HLTMuonOfflineAnalyzer.cc.

References HLTMuonMatchAndPlotContainer::analyze(), iEvent, and plotterContainer_.

144  {
146 }
HLTMuonMatchAndPlotContainer plotterContainer_
int iEvent
Definition: GenABIO.cc:224
void analyze(const edm::Event &, const edm::EventSetup &)

◆ bookHistograms()

void HLTMuonOfflineAnalyzer::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 138 of file HLTMuonOfflineAnalyzer.cc.

References HLTMuonMatchAndPlotContainer::beginRun(), and plotterContainer_.

140  {
141  plotterContainer_.beginRun(iBooker, iRun, iSetup);
142 }
HLTMuonMatchAndPlotContainer plotterContainer_
void beginRun(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &)

◆ dqmBeginRun()

void HLTMuonOfflineAnalyzer::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 105 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().

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

◆ moduleLabels()

vector< string > HLTMuonOfflineAnalyzer::moduleLabels ( const std::string &  )
private

Definition at line 80 of file HLTMuonOfflineAnalyzer.cc.

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

Referenced by dqmBeginRun().

80  {
81  vector<string> modules = hltConfig_.moduleLabels(path);
82  auto iter = modules.begin();
83  while (iter != modules.end()) {
84  if ((iter->find("Filtered") == string::npos) && (iter->find("hltL1s") == string::npos)) {
85  iter = modules.erase(iter);
86  } else if (iter->find("L1Filtered0") != string::npos) {
87  iter = modules.erase(iter);
88  } else if (iter->find("TracksFiltered") != string::npos)
89  iter = modules.erase(iter);
90  else
91  ++iter;
92  }
93  // iter = modules.begin();
94  // while (iter != modules.end()){
95  // if ((iter->find("Filtered0") == string::npos)){
96  // std::cout<< *iter << std::endl;
97  // iter = modules.erase(iter);
98  // }
99  // else ++iter;
100  // }
101 
102  return modules;
103 }
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path

Member Data Documentation

◆ hltConfig_

HLTConfigProvider HLTMuonOfflineAnalyzer::hltConfig_
private

Definition at line 58 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun(), and moduleLabels().

◆ hltPathsToCheck_

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

Definition at line 54 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun().

◆ hltProcessName_

std::string HLTMuonOfflineAnalyzer::hltProcessName_
private

Definition at line 53 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun().

◆ plotterContainer_

HLTMuonMatchAndPlotContainer HLTMuonOfflineAnalyzer::plotterContainer_
private

Definition at line 57 of file HLTMuonOfflineAnalyzer.cc.

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

◆ pset_

edm::ParameterSet HLTMuonOfflineAnalyzer::pset_
private

Definition at line 52 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun().