CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
HLTGenValHistCollPath Class Reference

#include <HLTGenValHistCollPath.h>

Public Types

using DQMStore = dqm::legacy::DQMStore
 
using MonitorElement = dqm::legacy::MonitorElement
 

Public Member Functions

void bookHists (DQMStore::IBooker &iBooker, std::vector< edm::ParameterSet > &histConfigs, std::vector< edm::ParameterSet > &histConfigs2D)
 
void fillHists (const HLTGenValObject &obj, edm::Handle< trigger::TriggerEvent > &triggerEvent)
 
 HLTGenValHistCollPath (edm::ParameterSet pathCollConfig, HLTConfigProvider &hltConfig)
 

Static Public Member Functions

static edm::ParameterSetDescription makePSetDescription ()
 

Private Attributes

std::vector< HLTGenValHistCollFiltercollectionFilter_
 
bool doOnlyLastFilter_
 
std::vector< std::string > filters_
 
HLTConfigProvider hltConfig_
 
std::string pathString_
 
std::string pathStringName_
 
std::string triggerPath_
 

Detailed Description

Definition at line 34 of file HLTGenValHistCollPath.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 37 of file HLTGenValHistCollPath.h.

◆ MonitorElement

Definition at line 36 of file HLTGenValHistCollPath.h.

Constructor & Destructor Documentation

◆ HLTGenValHistCollPath()

HLTGenValHistCollPath::HLTGenValHistCollPath ( edm::ParameterSet  pathCollConfig,
HLTConfigProvider hltConfig 
)
explicit

Definition at line 4 of file HLTGenValHistCollPath.cc.

References edm::ParameterSet::addParameter(), collectionFilter_, doOnlyLastFilter_, ALCARECOTkAlBeamHalo_cff::filter, pdwgDoubleElectron_cfi::filterName, filters_, edm::ParameterSet::getParameter(), hltConfig_, pathString_, pathStringName_, HLTConfigProvider::saveTagsModules(), AlCaHLTBitMon_QueryRunRegistry::string, and triggerPath_.

6  triggerPath_ = pathCollConfig.getParameter<std::string>("triggerPath");
7  doOnlyLastFilter_ = pathCollConfig.getParameter<bool>("doOnlyLastFilter");
8 
9  // before creating the collections for each filter, we'll store the needed configurations in a pset
10  // we'll copy this basis multiple times and add the respective path later
11  edm::ParameterSet filterCollConfig;
12  filterCollConfig.addParameter<std::string>("objType", pathCollConfig.getParameter<std::string>("objType"));
13  filterCollConfig.addParameter<std::string>("hltProcessName",
14  pathCollConfig.getParameter<std::string>("hltProcessName"));
15  filterCollConfig.addParameter<double>("dR2limit", pathCollConfig.getParameter<double>("dR2limit"));
16  filterCollConfig.addParameter<std::string>("pathName", triggerPath_);
17 
18  pathStringName_ = triggerPath_ + "-" + pathCollConfig.getParameter<std::string>("objType");
19 
20  // this filter will be the denominator
21  edm::ParameterSet filterCollConfigStepBeforeAny = filterCollConfig;
22  filterCollConfigStepBeforeAny.addParameter<std::string>("filterName", "beforeAnyFilter");
23  collectionFilter_.emplace_back(HLTGenValHistCollFilter(filterCollConfigStepBeforeAny));
24 
25  // we'll use this to construct the string to find which filters belong to which histogram later
26  pathString_ = "";
27 
28  // getting all filters from path
30  if (doOnlyLastFilter_) {
31  edm::ParameterSet filterCollConfigOnlyLastFilter = filterCollConfig;
32  filterCollConfigOnlyLastFilter.addParameter<std::string>("filterName", filters_.back());
33  collectionFilter_.emplace_back(HLTGenValHistCollFilter(filterCollConfigOnlyLastFilter));
34 
35  // remove potential leading "-" for printing
37  if (filterName.rfind('-', 0) == 0)
38  filterName.erase(0, 1);
39 
41  } else {
42  for (auto& filter : filters_) {
43  edm::ParameterSet filterCollConfigStep = filterCollConfig;
44  filterCollConfigStep.addParameter<std::string>("filterName", filter);
45  collectionFilter_.emplace_back(HLTGenValHistCollFilter(filterCollConfigStep));
46 
47  // remove potential leading "-" for printing
49  if (filterName.rfind('-', 0) == 0)
50  filterName.erase(0, 1);
51 
53  if (filter != filters_.back())
54  pathString_ += ";";
55  }
56  }
57 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HLTConfigProvider hltConfig_
std::vector< std::string > filters_
std::vector< HLTGenValHistCollFilter > collectionFilter_
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:135
const std::vector< std::string > & saveTagsModules(unsigned int trigger) const

Member Function Documentation

◆ bookHists()

void HLTGenValHistCollPath::bookHists ( DQMStore::IBooker iBooker,
std::vector< edm::ParameterSet > &  histConfigs,
std::vector< edm::ParameterSet > &  histConfigs2D 
)

Definition at line 71 of file HLTGenValHistCollPath.cc.

References dqm::implementation::IBooker::bookString(), collectionFilter_, B2GTnPMonitor_cfi::histConfigs, pathString_, and pathStringName_.

73  {
74  if (!pathString_.empty())
75  iBooker.bookString("path-" + pathStringName_, pathString_);
76 
77  for (auto& collectionFilter : collectionFilter_)
78  collectionFilter.bookHists(iBooker, histConfigs, histConfigs2D);
79 }
std::vector< HLTGenValHistCollFilter > collectionFilter_
MonitorElement * bookString(TString const &name, TString const &value, FUNC onbooking=NOOP())
Definition: DQMStore.h:87

◆ fillHists()

void HLTGenValHistCollPath::fillHists ( const HLTGenValObject obj,
edm::Handle< trigger::TriggerEvent > &  triggerEvent 
)

Definition at line 83 of file HLTGenValHistCollPath.cc.

References collectionFilter_, getGTfromDQMFile::obj, and PDWG_DiPhoton_SD_cff::triggerEvent.

83  {
84  for (auto& collectionFilter : collectionFilter_)
85  collectionFilter.fillHists(obj, triggerEvent);
86 }
std::vector< HLTGenValHistCollFilter > collectionFilter_

◆ makePSetDescription()

edm::ParameterSetDescription HLTGenValHistCollPath::makePSetDescription ( )
static

Definition at line 59 of file HLTGenValHistCollPath.cc.

References submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

59  {
61  desc.add<std::string>("objType", "");
62  desc.add<double>("dR2limit", 0.1);
63  desc.add<bool>("doOnlyLastFilter", false);
64  desc.add<std::string>("hltProcessName", "HLT");
65  desc.add<std::string>("triggerPath", "");
66  return desc;
67 }

Member Data Documentation

◆ collectionFilter_

std::vector<HLTGenValHistCollFilter> HLTGenValHistCollPath::collectionFilter_
private

Definition at line 50 of file HLTGenValHistCollPath.h.

Referenced by bookHists(), fillHists(), and HLTGenValHistCollPath().

◆ doOnlyLastFilter_

bool HLTGenValHistCollPath::doOnlyLastFilter_
private

Definition at line 53 of file HLTGenValHistCollPath.h.

Referenced by HLTGenValHistCollPath().

◆ filters_

std::vector<std::string> HLTGenValHistCollPath::filters_
private

◆ hltConfig_

HLTConfigProvider HLTGenValHistCollPath::hltConfig_
private

Definition at line 52 of file HLTGenValHistCollPath.h.

Referenced by HLTGenValHistCollPath().

◆ pathString_

std::string HLTGenValHistCollPath::pathString_
private

Definition at line 58 of file HLTGenValHistCollPath.h.

Referenced by bookHists(), and HLTGenValHistCollPath().

◆ pathStringName_

std::string HLTGenValHistCollPath::pathStringName_
private

Definition at line 57 of file HLTGenValHistCollPath.h.

Referenced by bookHists(), and HLTGenValHistCollPath().

◆ triggerPath_

std::string HLTGenValHistCollPath::triggerPath_
private

Definition at line 49 of file HLTGenValHistCollPath.h.

Referenced by HLTGenValHistCollPath().