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) {}

Member Function Documentation

◆ analyze()

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

Definition at line 142 of file HLTMuonOfflineAnalyzer.cc.

142  {
144 }

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

◆ bookHistograms()

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

Definition at line 136 of file HLTMuonOfflineAnalyzer.cc.

138  {
139  plotterContainer_.beginRun(iBooker, iRun, iSetup);
140 }

References HLTMuonMatchAndPlotContainer::beginRun(), and plotterContainer_.

◆ dqmBeginRun()

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

Definition at line 103 of file HLTMuonOfflineAnalyzer.cc.

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 }

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

◆ moduleLabels()

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

Definition at line 80 of file HLTMuonOfflineAnalyzer.cc.

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 }

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

Referenced by dqmBeginRun().

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

SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
mps_fire.i
i
Definition: mps_fire.py:355
LogMessageMonitor_cff.modules
modules
Definition: LogMessageMonitor_cff.py:7
modules
Definition: ZHLTMatchFilter.cc:17
HLTSiStripMonitoring_cff.hltPaths
hltPaths
Definition: HLTSiStripMonitoring_cff.py:252
HLTMuonOfflineAnalyzer::pset_
edm::ParameterSet pset_
Definition: HLTMuonOfflineAnalyzer.cc:52
HLTMuonOfflineAnalyzer::hltConfig_
HLTConfigProvider hltConfig_
Definition: HLTMuonOfflineAnalyzer.cc:58
HLTMuonMatchAndPlotContainer::addPlotter
void addPlotter(const edm::ParameterSet &, std::string, std::string, bool)
Add a HLTMuonMatchAndPlot for a given path.
Definition: HLTMuonMatchAndPlotContainer.cc:42
HLTConfigProvider::moduleLabels
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
Definition: HLTConfigProvider.h:75
HLTMuonOfflineAnalyzer::moduleLabels
std::vector< std::string > moduleLabels(const std::string &)
Definition: HLTMuonOfflineAnalyzer.cc:80
HLTMuonOfflineAnalyzer::hltPathsToCheck_
std::vector< std::string > hltPathsToCheck_
Definition: HLTMuonOfflineAnalyzer.cc:54
edm::LogError
Definition: MessageLogger.h:183
HLTMuonOfflineAnalyzer::plotterContainer_
HLTMuonMatchAndPlotContainer plotterContainer_
Definition: HLTMuonOfflineAnalyzer.cc:57
iEvent
int iEvent
Definition: GenABIO.cc:224
HLTMuonOfflineAnalyzer::hltProcessName_
std::string hltProcessName_
Definition: HLTMuonOfflineAnalyzer.cc:53
HLTConfigProvider::init
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
Definition: HLTConfigProvider.cc:36
vstring
vector< string > vstring
Definition: ExoticaDQM.cc:8
HLTMuonMatchAndPlotContainer::analyze
void analyze(const edm::Event &, const edm::EventSetup &)
Definition: HLTMuonMatchAndPlotContainer.cc:69
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
HLTConfigProvider::triggerNames
const std::vector< std::string > & triggerNames() const
names of trigger paths
Definition: HLTConfigProvider.h:68
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
HLTMuonMatchAndPlotContainer::beginRun
void beginRun(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &)
Definition: HLTMuonMatchAndPlotContainer.cc:49
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27