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 hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () 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

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 }
T getParameter(std::string const &) const
StringCutObjectSelector< ObjType, true > selection_
edm::EDGetTokenT< ObjCollType > token_

Member Function Documentation

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

Definition at line 31 of file HLTDQMObjSelector.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), HLT_2018_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

31  {
33  desc.add<edm::InputTag>("objs", edm::InputTag(""));
34  desc.add<std::string>("selection", "et > 5");
35  descriptions.add("hltDQMObjSelector", desc);
36 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
template<typename ObjType , typename ObjCollType >
void HLTDQMObjSelector< ObjType, ObjCollType >::produce ( edm::Event ,
edm::EventSetup const &   
)
override

Definition at line 39 of file HLTDQMObjSelector.cc.

References trigObjTnPSource_cfi::filler, patZpeak::handle, edm::HandleBase::isValid(), eostools::move(), getGTfromDQMFile::obj, HLTDQMObjSelector< ObjType, ObjCollType >::selection_, and HLTDQMObjSelector< ObjType, ObjCollType >::token_.

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

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 }
bool isValid() const
Definition: HandleBase.h:70
StringCutObjectSelector< ObjType, true > selection_
edm::EDGetTokenT< ObjCollType > token_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

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