CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
HLTDQMObjSelector< ObjType, ObjCollType > Class Template Reference
Inheritance diagram for HLTDQMObjSelector< ObjType, ObjCollType >:
edm::stream::EDProducer<>

Public Member Functions

 HLTDQMObjSelector (const edm::ParameterSet &config)
 
void produce (edm::Event &, edm::EventSetup const &) override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

StringCutObjectSelector< ObjType, true > selection_
 
edm::EDGetTokenT< ObjCollType > token_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
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
 

Detailed Description

template<typename ObjType, typename ObjCollType>
class HLTDQMObjSelector< ObjType, ObjCollType >

Definition at line 12 of file HLTDQMObjSelector.cc.

Constructor & Destructor Documentation

◆ HLTDQMObjSelector()

template<typename ObjType , typename ObjCollType >
HLTDQMObjSelector< ObjType, ObjCollType >::HLTDQMObjSelector ( const edm::ParameterSet config)
explicit

Definition at line 24 of file HLTDQMObjSelector.cc.

25  : token_(consumes<ObjCollType>(config.getParameter<edm::InputTag>("objs"))),
26  selection_(config.getParameter<std::string>("selection")) {
27  produces<edm::ValueMap<bool> >();
28 }

Member Function Documentation

◆ fillDescriptions()

template<typename ObjType , typename ObjCollType >
void HLTDQMObjSelector< ObjType, ObjCollType >::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 31 of file HLTDQMObjSelector.cc.

31  {
33  desc.add<edm::InputTag>("objs", edm::InputTag(""));
34  desc.add<std::string>("selection", "et > 5");
35  descriptions.add("hltDQMObjSelector", desc);
36 }

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ produce()

template<typename ObjType , typename ObjCollType >
void HLTDQMObjSelector< ObjType, ObjCollType >::produce ( edm::Event event,
edm::EventSetup const &  setup 
)
override

Definition at line 39 of file HLTDQMObjSelector.cc.

39  {
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 }

References trigObjTnPSource_cfi::filler, patZpeak::handle, eostools::move(), and getGTfromDQMFile::obj.

Member Data Documentation

◆ selection_

template<typename ObjType , typename ObjCollType >
StringCutObjectSelector<ObjType, true> HLTDQMObjSelector< ObjType, ObjCollType >::selection_
private

Definition at line 20 of file HLTDQMObjSelector.cc.

◆ token_

template<typename ObjType , typename ObjCollType >
edm::EDGetTokenT<ObjCollType> HLTDQMObjSelector< ObjType, ObjCollType >::token_
private

Definition at line 19 of file HLTDQMObjSelector.cc.

patZpeak.handle
handle
Definition: patZpeak.py:23
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::Handle
Definition: AssociativeIterator.h:50
config
Definition: config.py:1
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
trigObjTnPSource_cfi.filler
filler
Definition: trigObjTnPSource_cfi.py:21
HLTDQMObjSelector::selection_
StringCutObjectSelector< ObjType, true > selection_
Definition: HLTDQMObjSelector.cc:20
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::helper::Filler
Definition: ValueMap.h:22
edm::InputTag
Definition: InputTag.h:15
HLTDQMObjSelector::token_
edm::EDGetTokenT< ObjCollType > token_
Definition: HLTDQMObjSelector.cc:19