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

void analyze (const edm::Event &, const edm::EventSetup &) override
 
virtual void beginJob ()
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 
virtual void endJob ()
 
void endRun (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_
 

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 44 of file HLTMuonOfflineAnalyzer.cc.

Constructor & Destructor Documentation

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

Definition at line 91 of file HLTMuonOfflineAnalyzer.cc.

91  :
92  pset_(pset),
93  hltProcessName_(pset.getParameter<string>("hltProcessName")),
94  hltPathsToCheck_(pset.getParameter<vstring>("hltPathsToCheck")),
96 {
97 
98 }
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 
)
overrideprivate

Definition at line 183 of file HLTMuonOfflineAnalyzer.cc.

References HLTMuonMatchAndPlotContainer::analyze(), and plotterContainer_.

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

Definition at line 194 of file HLTMuonOfflineAnalyzer.cc.

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

Implements DQMEDAnalyzer.

Definition at line 172 of file HLTMuonOfflineAnalyzer.cc.

References HLTMuonMatchAndPlotContainer::beginRun(), and plotterContainer_.

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

Definition at line 133 of file HLTMuonOfflineAnalyzer.cc.

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

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

Definition at line 213 of file HLTMuonOfflineAnalyzer.cc.

References DEFINE_FWK_MODULE.

214 {
215 
216 }
void HLTMuonOfflineAnalyzer::endRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 202 of file HLTMuonOfflineAnalyzer.cc.

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

Definition at line 103 of file HLTMuonOfflineAnalyzer.cc.

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

Referenced by dqmBeginRun().

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

Referenced by dqmBeginRun(), and moduleLabels().

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

Definition at line 66 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun().

std::string HLTMuonOfflineAnalyzer::hltProcessName_
private

Definition at line 65 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun().

HLTMuonMatchAndPlotContainer HLTMuonOfflineAnalyzer::plotterContainer_
private

Definition at line 69 of file HLTMuonOfflineAnalyzer.cc.

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

edm::ParameterSet HLTMuonOfflineAnalyzer::pset_
private

Definition at line 64 of file HLTMuonOfflineAnalyzer.cc.

Referenced by dqmBeginRun().