CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
HLTMuonOfflineAnalyzer Class Reference
Inheritance diagram for HLTMuonOfflineAnalyzer:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 HLTMuonOfflineAnalyzer (const edm::ParameterSet &)
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

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

Private Attributes

HLTConfigProvider hltConfig_
 
std::vector< std::string > hltPathsToCheck_
 
std::string hltProcessName_
 
HLTMuonMatchAndPlotContainer plotterContainer_
 
edm::ParameterSet pset_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 43 of file HLTMuonOfflineAnalyzer.cc.

Constructor & Destructor Documentation

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

Definition at line 90 of file HLTMuonOfflineAnalyzer.cc.

90  :
91  pset_(pset),
92  hltProcessName_(pset.getParameter<string>("hltProcessName")),
93  hltPathsToCheck_(pset.getParameter<vstring>("hltPathsToCheck")),
95 {
96 
97 }
T getParameter(std::string const &) const
HLTMuonMatchAndPlotContainer plotterContainer_
vector< string > vstring
Definition: ExoticaDQM.cc:8
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::vector< std::string > hltPathsToCheck_

Member Function Documentation

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

Definition at line 181 of file HLTMuonOfflineAnalyzer.cc.

References HLTMuonMatchAndPlotContainer::analyze(), and plotterContainer_.

183 {
184 
185  plotterContainer_.analyze(iEvent, iSetup);
186 
187 }
HLTMuonMatchAndPlotContainer plotterContainer_
void analyze(const edm::Event &, const edm::EventSetup &)
void HLTMuonOfflineAnalyzer::beginJob ( void  )
privatevirtual

Definition at line 192 of file HLTMuonOfflineAnalyzer.cc.

193 {
194 
195 }
void HLTMuonOfflineAnalyzer::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

Implements DQMEDAnalyzer.

Definition at line 170 of file HLTMuonOfflineAnalyzer.cc.

References HLTMuonMatchAndPlotContainer::beginRun(), and plotterContainer_.

172 {
173 
174  plotterContainer_.beginRun(iBooker, iRun, iSetup);
175 
176 }
HLTMuonMatchAndPlotContainer plotterContainer_
void beginRun(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &)
void HLTMuonOfflineAnalyzer::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Definition at line 132 of file HLTMuonOfflineAnalyzer.cc.

References HLTMuonMatchAndPlotContainer::addPlotter(), hltConfig_, DQMSequences_cfi::hltPaths, hltPathsToCheck_, hltProcessName_, mps_fire::i, HLTConfigProvider::init(), tablePrinter::labels, moduleLabels(), callgraph::path, listBenchmarks::pattern, plotterContainer_, pset_, and HLTConfigProvider::triggerNames().

134 {
135 
136  // Initialize hltConfig
137  bool changedConfig;
138  if (!hltConfig_.init(iRun, iSetup, hltProcessName_, changedConfig)) {
139  LogError("HLTMuonVal") << "Initialization of HLTConfigProvider failed!!";
140  return;
141  }
142 
143  // Get the set of trigger paths we want to make plots for
144  set<string> hltPaths;
145  for (size_t i = 0; i < hltPathsToCheck_.size(); i++) {
146  TPRegexp pattern(hltPathsToCheck_[i]);
147  for (size_t j = 0; j < hltConfig_.triggerNames().size(); j++)
148  if (TString(hltConfig_.triggerNames()[j]).Contains(pattern))
149  hltPaths.insert(hltConfig_.triggerNames()[j]);
150  }
151 
152  // Initialize the plotters
153  set<string>::iterator iPath;
154  vector<string>::const_iterator ilabel;
155  for (iPath = hltPaths.begin(); iPath != hltPaths.end(); iPath++) {
156  string path = * iPath;
157  vector<string> labels = moduleLabels(path);
158  bool isLastLabel = false;
159  for (ilabel = labels.begin(); ilabel != labels.end(); ilabel++) {
160  if (*ilabel == labels.back()) isLastLabel = true;
161  plotterContainer_.addPlotter(pset_, path, *ilabel,isLastLabel);
162  }
163  }
164 
165 }
HLTMuonMatchAndPlotContainer plotterContainer_
std::vector< std::string > moduleLabels(std::string)
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
void addPlotter(const edm::ParameterSet &, std::string, std::string, bool)
Add a HLTMuonMatchAndPlot for a given path.
std::vector< std::string > hltPathsToCheck_
void HLTMuonOfflineAnalyzer::endJob ( void  )
privatevirtual

Definition at line 211 of file HLTMuonOfflineAnalyzer.cc.

References DEFINE_FWK_MODULE.

212 {
213 
214 }
void HLTMuonOfflineAnalyzer::endRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Definition at line 200 of file HLTMuonOfflineAnalyzer.cc.

202 {
203 
204  // plotterContainer_.endRun(iRun, iSetup);
205 
206 }
vector< string > HLTMuonOfflineAnalyzer::moduleLabels ( std::string  )
private

Definition at line 102 of file HLTMuonOfflineAnalyzer.cc.

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

Referenced by dqmBeginRun().

103 {
104 
105  vector<string> modules = hltConfig_.moduleLabels(path);
106  vector<string>::iterator iter = modules.begin();
107  while (iter != modules.end()){
108  if ((iter->find("Filtered") == string::npos)&&(iter->find("hltL1s") == string::npos)){
109  iter = modules.erase(iter);
110  }
111  else if (iter->find("L1Filtered0") != string::npos)
112  iter = modules.erase(iter);
113  else ++iter;
114  }
115 // iter = modules.begin();
116 // while (iter != modules.end()){
117 // if ((iter->find("Filtered0") == string::npos)){
118 // std::cout<< *iter << std::endl;
119 // iter = modules.erase(iter);
120 // }
121 // else ++iter;
122 // }
123 
124 
125  return modules;
126 
127 }
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 69 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun(), and moduleLabels().

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

Definition at line 65 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun().

std::string HLTMuonOfflineAnalyzer::hltProcessName_
private

Definition at line 64 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun().

HLTMuonMatchAndPlotContainer HLTMuonOfflineAnalyzer::plotterContainer_
private

Definition at line 68 of file HLTMuonOfflineAnalyzer.cc.

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

edm::ParameterSet HLTMuonOfflineAnalyzer::pset_
private

Definition at line 63 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun().