CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
HLTMuonOfflineAnalyzer Class Reference
Inheritance diagram for HLTMuonOfflineAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 HLTMuonOfflineAnalyzer (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &) override
 
virtual void beginJob () override
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &) override
 
virtual void endJob () override
 
virtual void endRun (const edm::Run &, const edm::EventSetup &) override
 
std::vector< std::string > moduleLabels (std::string)
 

Private Attributes

std::vector< HLTMuonMatchAndPlotanalyzers_
 
DQMStoredbe_
 
std::string destination_
 
HLTConfigProvider hltConfig_
 
std::vector< std::string > hltPathsToCheck_
 
std::string hltProcessName_
 
edm::ParameterSet pset_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 45 of file HLTMuonOfflineAnalyzer.cc.

Constructor & Destructor Documentation

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

Definition at line 95 of file HLTMuonOfflineAnalyzer.cc.

References dbe_, destination_, cppFunctionSkipper::operator, DQMStore::setCurrentFolder(), and DQMStore::setVerbose().

95  :
96  pset_(pset),
97  hltProcessName_(pset.getParameter<string>("hltProcessName")),
98  destination_(pset.getUntrackedParameter<string>("destination")),
99  hltPathsToCheck_(pset.getParameter<vstring>("hltPathsToCheck"))
100 {
101  // Prepare the DQMStore object.
103  dbe_->setVerbose(0);
105 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
vector< string > vstring
Definition: ExoticaDQM.cc:75
void setVerbose(unsigned level)
Definition: DQMStore.cc:549
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:585
std::vector< std::string > hltPathsToCheck_

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 168 of file HLTMuonOfflineAnalyzer.cc.

References analyzers_.

170 {
171 
172  vector<HLTMuonMatchAndPlot>::iterator iter;
173  for (iter = analyzers_.begin(); iter != analyzers_.end(); ++iter) {
174  iter->analyze(iEvent, iSetup);
175  }
176 
177 }
std::vector< HLTMuonMatchAndPlot > analyzers_
void HLTMuonOfflineAnalyzer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 182 of file HLTMuonOfflineAnalyzer.cc.

183 {
184 }
void HLTMuonOfflineAnalyzer::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 128 of file HLTMuonOfflineAnalyzer.cc.

References analyzers_, hltConfig_, CreateSqliteForCondDB_cfg::hltPaths, hltPathsToCheck_, hltProcessName_, i, HLTConfigProvider::init(), j, tablePrinter::labels, moduleLabels(), getHLTPrescaleColumns::path, listBenchmarks::pattern, pset_, and HLTConfigProvider::triggerNames().

129  {
130 
131  // Initialize hltConfig
132  bool changedConfig;
133  if (!hltConfig_.init(iRun, iSetup, hltProcessName_, changedConfig)) {
134  LogError("HLTMuonVal") << "Initialization of HLTConfigProvider failed!!";
135  return;
136  }
137 
138  // Get the set of trigger paths we want to make plots for
139  set<string> hltPaths;
140  for (size_t i = 0; i < hltPathsToCheck_.size(); i++) {
141  TPRegexp pattern(hltPathsToCheck_[i]);
142  for (size_t j = 0; j < hltConfig_.triggerNames().size(); j++)
143  if (TString(hltConfig_.triggerNames()[j]).Contains(pattern))
144  hltPaths.insert(hltConfig_.triggerNames()[j]);
145  }
146 
147  // Initialize the analyzers
148  analyzers_.clear();
149  set<string>::iterator iPath;
150  for (iPath = hltPaths.begin(); iPath != hltPaths.end(); iPath++) {
151  string path = * iPath;
152  vector<string> labels = moduleLabels(path);
153  if (labels.size() > 0) {
154  HLTMuonMatchAndPlot analyzer(pset_, path, moduleLabels(path));
155  analyzers_.push_back(analyzer);
156  }
157  }
158 
159  // Call the beginRun (which books all the histograms)
160  vector<HLTMuonMatchAndPlot>::iterator iter;
161  for (iter = analyzers_.begin(); iter != analyzers_.end(); ++iter) {
162  iter->beginRun(iRun, iSetup);
163  }
164 
165 }
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > moduleLabels(std::string)
const std::vector< std::string > & triggerNames() const
names of trigger paths
int j
Definition: DBlmapReader.cc:9
std::vector< HLTMuonMatchAndPlot > analyzers_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
std::vector< std::string > hltPathsToCheck_
void HLTMuonOfflineAnalyzer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 203 of file HLTMuonOfflineAnalyzer.cc.

204 {
205 }
void HLTMuonOfflineAnalyzer::endRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 189 of file HLTMuonOfflineAnalyzer.cc.

191 {
192 
193  // vector<HLTMuonMatchAndPlot>::iterator iter;
194  // for (iter = analyzers_.begin(); iter != analyzers_.end(); ++iter) {
195  // iter->endRun(iRun, iSetup);
196  // }
197 
198 }
vector< string > HLTMuonOfflineAnalyzer::moduleLabels ( std::string  )
private

Definition at line 110 of file HLTMuonOfflineAnalyzer.cc.

References hltConfig_, and HLTConfigProvider::moduleLabels().

Referenced by beginRun().

110  {
111 
112  vector<string> modules = hltConfig_.moduleLabels(path);
113  vector<string>::iterator iter = modules.begin();
114 
115  while (iter != modules.end())
116  if (iter->find("Filtered") == string::npos)
117  iter = modules.erase(iter);
118  else
119  ++iter;
120 
121  return modules;
122 
123 }
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path

Member Data Documentation

std::vector<HLTMuonMatchAndPlot> HLTMuonOfflineAnalyzer::analyzers_
private
DQMStore* HLTMuonOfflineAnalyzer::dbe_
private

Definition at line 74 of file HLTMuonOfflineAnalyzer.cc.

Referenced by HLTMuonOfflineAnalyzer().

std::string HLTMuonOfflineAnalyzer::destination_
private

Definition at line 66 of file HLTMuonOfflineAnalyzer.cc.

Referenced by HLTMuonOfflineAnalyzer().

HLTConfigProvider HLTMuonOfflineAnalyzer::hltConfig_
private

Definition at line 71 of file HLTMuonOfflineAnalyzer.cc.

Referenced by beginRun(), and moduleLabels().

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

Definition at line 67 of file HLTMuonOfflineAnalyzer.cc.

Referenced by beginRun().

std::string HLTMuonOfflineAnalyzer::hltProcessName_
private

Definition at line 65 of file HLTMuonOfflineAnalyzer.cc.

Referenced by beginRun().

edm::ParameterSet HLTMuonOfflineAnalyzer::pset_
private

Definition at line 64 of file HLTMuonOfflineAnalyzer.cc.

Referenced by beginRun().