CMS 3D CMS Logo

HLTDQMObjSelector.cc
Go to the documentation of this file.
10 
11 template <typename ObjType, typename ObjCollType>
13 public:
15  void produce(edm::Event&, edm::EventSetup const&) override;
16  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
17 
18 private:
21 };
22 
23 template <typename ObjType, typename ObjCollType>
25  : token_(consumes<ObjCollType>(config.getParameter<edm::InputTag>("objs"))),
26  selection_(config.getParameter<std::string>("selection")) {
27  produces<edm::ValueMap<bool> >();
28 }
29 
30 template <typename ObjType, typename ObjCollType>
33  desc.add<edm::InputTag>("objs", edm::InputTag(""));
34  desc.add<std::string>("selection", "et > 5");
35  descriptions.add("hltDQMObjSelector", desc);
36 }
37 
38 template <typename ObjType, typename ObjCollType>
41  event.getByToken(token_, handle);
42 
43  if (!handle.isValid())
44  return;
45 
46  std::vector<bool> selResults;
47  for (auto& obj : *handle) {
48  selResults.push_back(selection_(obj));
49  }
50  auto valMap = std::make_unique<edm::ValueMap<bool> >();
52  filler.insert(handle, selResults.begin(), selResults.end());
53  filler.fill();
54  event.put(std::move(valMap));
55 }
56 
ConfigurationDescriptions.h
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
patZpeak.handle
handle
Definition: patZpeak.py:23
edm::EDGetTokenT< ObjCollType >
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
HLTDQMObjSelector
Definition: HLTDQMObjSelector.cc:12
EDProducer.h
HLTDQMObjSelector::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: HLTDQMObjSelector.cc:31
edm::Handle
Definition: AssociativeIterator.h:50
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
config
Definition: config.py:1
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
ParameterSetDescription.h
GsfElectron.h
EDGetToken.h
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GsfElectronFwd.h
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
trigObjTnPSource_cfi.filler
filler
Definition: trigObjTnPSource_cfi.py:21
edm::stream::EDProducer
Definition: EDProducer.h:38
edm::EventSetup
Definition: EventSetup.h:57
HLTDQMObjSelector::selection_
StringCutObjectSelector< ObjType, true > selection_
Definition: HLTDQMObjSelector.cc:20
ValueMap.h
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
StringCutObjectSelector.h
StringCutObjectSelector< ObjType, true >
EventSetup.h
edm::helper::Filler
Definition: ValueMap.h:22
HLTDQMObjSelector::HLTDQMObjSelector
HLTDQMObjSelector(const edm::ParameterSet &config)
Definition: HLTDQMObjSelector.cc:24
ParameterSet.h
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
HLTDQMObjSelector::produce
void produce(edm::Event &, edm::EventSetup const &) override
Definition: HLTDQMObjSelector.cc:39
edm::InputTag
Definition: InputTag.h:15
HLTDQMObjSelector::token_
edm::EDGetTokenT< ObjCollType > token_
Definition: HLTDQMObjSelector.cc:19