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 hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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.

24  :
25  token_(consumes<ObjCollType>(config.getParameter<edm::InputTag>("objs"))),
26  selection_(config.getParameter<std::string>("selection"))
27 {
28  produces<edm::ValueMap<bool> >();
29 }
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 32 of file HLTDQMObjSelector.cc.

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

33 {
35  desc.add<edm::InputTag>("objs", edm::InputTag(""));
36  desc.add<std::string>("selection","et > 5");
37  descriptions.add("hltDQMObjSelector", desc);
38 }
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 41 of file HLTDQMObjSelector.cc.

References objects.autophobj::filler, cmsBatch::handle, edm::HandleBase::isValid(), eostools::move(), GetRecoTauVFromDQM_MC_cff::obj, HLTDQMObjSelector< ObjType, ObjCollType >::selection_, and HLTDQMObjSelector< ObjType, ObjCollType >::token_.

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

42 {
44  event.getByToken(token_,handle);
45 
46  if(!handle.isValid()) return;
47 
48  std::vector<bool> selResults;
49  for(auto& obj : *handle){
50  selResults.push_back(selection_(obj));
51  }
52  auto valMap = std::make_unique<edm::ValueMap<bool> >();
54  filler.insert(handle, selResults.begin(), selResults.end());
55  filler.fill();
56  event.put(std::move(valMap));
57 }
bool isValid() const
Definition: HandleBase.h:74
StringCutObjectSelector< ObjType, true > selection_
edm::EDGetTokenT< ObjCollType > token_
def move(src, dest)
Definition: eostools.py:510

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