CMS 3D CMS Logo

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

#include <TrigObjTnPHistColl.h>

Classes

class  FilterSelector
 
class  HistColl
 
class  HistDefs
 
class  HistFiller
 
class  PathSelector
 
class  ProbeData
 
class  TrigObjVarF
 

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 

Public Member Functions

void bookHists (DQMStore::IBooker &iBooker)
 
void fill (const trigger::TriggerEvent &trigEvt, const edm::TriggerResults &trigResults, const edm::TriggerNames &trigNames) const
 
void init (const HLTConfigProvider &hltConfig)
 
 TrigObjTnPHistColl (const edm::ParameterSet &config)
 

Static Public Member Functions

static edm::ParameterSetDescription makePSetDescription ()
 

Static Private Member Functions

static const trigger::Keys getKeys (const trigger::TriggerEvent &trigEvt, const std::string &filterName)
 

Private Attributes

std::string collName_
 
PathSelector evtTrigSel_
 
std::string folderName_
 
HistDefs histDefs_
 
VarRangeCutColl< trigger::TriggerObjectprobeCuts_
 
std::vector< ProbeDataprobeHists_
 
VarRangeCutColl< trigger::TriggerObjecttagCuts_
 
FilterSelector tagFilters_
 

Detailed Description

Definition at line 86 of file TrigObjTnPHistColl.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 88 of file TrigObjTnPHistColl.h.

◆ MonitorElement

Definition at line 89 of file TrigObjTnPHistColl.h.

Constructor & Destructor Documentation

◆ TrigObjTnPHistColl()

TrigObjTnPHistColl::TrigObjTnPHistColl ( const edm::ParameterSet config)

Definition at line 12 of file TrigObjTnPHistColl.cc.

References eostools::move(), trigObjTnPSource_cfi::probeFilters, and probeHists_.

13  : tagCuts_(config.getParameter<std::vector<edm::ParameterSet>>("tagCuts")),
14  probeCuts_(config.getParameter<std::vector<edm::ParameterSet>>("probeCuts")),
15  tagFilters_(config.getParameter<edm::ParameterSet>("tagFilters")),
16  collName_(config.getParameter<std::string>("collName")),
17  folderName_(config.getParameter<std::string>("folderName")),
18  histDefs_(config.getParameter<edm::ParameterSet>("histDefs")),
19  evtTrigSel_(config.getParameter<edm::ParameterSet>("evtTrigSel"))
20 
21 {
22  auto probeFilters = config.getParameter<std::vector<std::string>>("probeFilters");
23  for (auto& probeFilter : probeFilters) {
24  probeHists_.emplace_back(ProbeData(std::move(probeFilter)));
25  }
26 }
std::vector< ProbeData > probeHists_
Definition: config.py:1
VarRangeCutColl< trigger::TriggerObject > probeCuts_
VarRangeCutColl< trigger::TriggerObject > tagCuts_
FilterSelector tagFilters_
def move(src, dest)
Definition: eostools.py:511

Member Function Documentation

◆ bookHists()

void TrigObjTnPHistColl::bookHists ( DQMStore::IBooker iBooker)

Definition at line 43 of file TrigObjTnPHistColl.cc.

References collName_, folderName_, histDefs_, probeHists_, and dqm::implementation::NavigatorBase::setCurrentFolder().

43  {
45  for (auto& probe : probeHists_) {
46  probe.bookHists(collName_, iBooker, histDefs_);
47  }
48 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
std::vector< ProbeData > probeHists_

◆ fill()

void TrigObjTnPHistColl::fill ( const trigger::TriggerEvent trigEvt,
const edm::TriggerResults trigResults,
const edm::TriggerNames trigNames 
) const

Definition at line 50 of file TrigObjTnPHistColl.cc.

References evtTrigSel_, trigger::TriggerEvent::getObjects(), TrigObjTnPHistColl::FilterSelector::getPassingKeys(), HLTEGTnPMonitor_cfi::probeColl, probeCuts_, probeHists_, tagCuts_, tagFilters_, and trigNames.

52  {
53  if (evtTrigSel_(trigResults, trigNames) == false)
54  return;
55 
56  auto tagTrigKeys = tagFilters_.getPassingKeys(trigEvt);
57  for (auto& tagKey : tagTrigKeys) {
58  const trigger::TriggerObject& tagObj = trigEvt.getObjects()[tagKey];
59  if (tagCuts_(tagObj)) {
60  for (auto& probeColl : probeHists_)
61  probeColl.fill(tagKey, trigEvt, probeCuts_);
62  }
63  }
64 }
std::vector< ProbeData > probeHists_
VarRangeCutColl< trigger::TriggerObject > probeCuts_
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:101
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:57
const trigger::Keys getPassingKeys(const trigger::TriggerEvent &trigEvt) const
VarRangeCutColl< trigger::TriggerObject > tagCuts_
FilterSelector tagFilters_

◆ getKeys()

const trigger::Keys TrigObjTnPHistColl::getKeys ( const trigger::TriggerEvent trigEvt,
const std::string &  filterName 
)
staticprivate

Definition at line 69 of file TrigObjTnPHistColl.cc.

References trigger::TriggerEvent::filterIndex(), trigger::TriggerEvent::filterKeys(), pdwgDoubleElectron_cfi::filterName, trigger::TriggerEvent::sizeFilters(), and trigger::TriggerEvent::usedProcessName().

Referenced by TrigObjTnPHistColl::ProbeData::fill(), and TrigObjTnPHistColl::FilterSelector::FilterSet::getPassingKeys().

69  {
70  edm::InputTag filterTag(filterName, "", trigEvt.usedProcessName());
71  trigger::size_type filterIndex = trigEvt.filterIndex(filterTag);
72  if (filterIndex < trigEvt.sizeFilters())
73  return trigEvt.filterKeys(filterIndex);
74  else
75  return trigger::Keys();
76 }
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:118
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:146
uint16_t size_type
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Definition: TriggerEvent.h:132
std::vector< size_type > Keys
const std::string & usedProcessName() const
getters
Definition: TriggerEvent.h:98

◆ init()

void TrigObjTnPHistColl::init ( const HLTConfigProvider hltConfig)
inline

◆ makePSetDescription()

edm::ParameterSetDescription TrigObjTnPHistColl::makePSetDescription ( )
static

Definition at line 28 of file TrigObjTnPHistColl.cc.

References submitPVResolutionJobs::desc, TrigObjTnPHistColl::FilterSelector::makePSetDescription(), TrigObjTnPHistColl::PathSelector::makePSetDescription(), TrigObjTnPHistColl::HistDefs::makePSetDescription(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by TrigObjTnPSource::fillDescriptions().

28  {
30  desc.addVPSet(
31  "tagCuts", VarRangeCut<trigger::TriggerObject>::makePSetDescription(), std::vector<edm::ParameterSet>());
32  desc.addVPSet(
33  "probeCuts", VarRangeCut<trigger::TriggerObject>::makePSetDescription(), std::vector<edm::ParameterSet>());
35  desc.add<std::string>("collName", "stdTag");
36  desc.add<std::string>("folderName", "HLT/EGM/TrigObjTnP");
38  desc.add<std::vector<std::string>>("probeFilters", std::vector<std::string>());
40  return desc;
41 }
static edm::ParameterSetDescription makePSetDescription()
static edm::ParameterSetDescription makePSetDescription()
static edm::ParameterSetDescription makePSetDescription()

Member Data Documentation

◆ collName_

std::string TrigObjTnPHistColl::collName_
private

Definition at line 242 of file TrigObjTnPHistColl.h.

Referenced by bookHists().

◆ evtTrigSel_

PathSelector TrigObjTnPHistColl::evtTrigSel_
private

Definition at line 246 of file TrigObjTnPHistColl.h.

Referenced by fill(), and init().

◆ folderName_

std::string TrigObjTnPHistColl::folderName_
private

Definition at line 243 of file TrigObjTnPHistColl.h.

Referenced by bookHists().

◆ histDefs_

HistDefs TrigObjTnPHistColl::histDefs_
private

Definition at line 244 of file TrigObjTnPHistColl.h.

Referenced by bookHists().

◆ probeCuts_

VarRangeCutColl<trigger::TriggerObject> TrigObjTnPHistColl::probeCuts_
private

Definition at line 240 of file TrigObjTnPHistColl.h.

Referenced by fill().

◆ probeHists_

std::vector<ProbeData> TrigObjTnPHistColl::probeHists_
private

Definition at line 245 of file TrigObjTnPHistColl.h.

Referenced by bookHists(), fill(), and TrigObjTnPHistColl().

◆ tagCuts_

VarRangeCutColl<trigger::TriggerObject> TrigObjTnPHistColl::tagCuts_
private

Definition at line 240 of file TrigObjTnPHistColl.h.

Referenced by fill().

◆ tagFilters_

FilterSelector TrigObjTnPHistColl::tagFilters_
private

Definition at line 241 of file TrigObjTnPHistColl.h.

Referenced by fill().