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:8
std::vector< std::string > hltPathsToCheck_

Member Function Documentation

◆ analyze()

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

Definition at line 142 of file HLTMuonOfflineAnalyzer.cc.

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

142  {
144 }
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 136 of file HLTMuonOfflineAnalyzer.cc.

References HLTMuonMatchAndPlotContainer::beginRun(), and plotterContainer_.

138  {
139  plotterContainer_.beginRun(iBooker, iRun, iSetup);
140 }
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 103 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().

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