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<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

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
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (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
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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 &   
)
overridevirtual

Implements edm::stream::EDProducerBase.

Definition at line 41 of file HLTDQMObjSelector.cc.

References objects.autophobj::filler, cmsBatch::handle, edm::HandleBase::isValid(), eostools::move(), MuonAssociatorByHits_cfi::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