CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
HLTStreamFilter Class Referenceabstract

#include <HLTStreamFilter.h>

Inheritance diagram for HLTStreamFilter:
edm::stream::EDFilter<> edm::stream::EDFilterBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper HLTLevel1GTSeed

Public Member Functions

 HLTStreamFilter (const edm::ParameterSet &config)
 
int module (edm::Event const &) const
 
const std::string * moduleLabel () const
 
int path (edm::Event const &) const
 
const std::string * pathName (edm::Event const &) const
 
std::pair< int, int > pmid (edm::Event const &) const
 
bool saveTags () const
 
virtual ~HLTStreamFilter ()
 
- Public Member Functions inherited from edm::stream::EDFilter<>
 EDFilter ()=default
 
- Public Member Functions inherited from edm::stream::EDFilterBase
 EDFilterBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDFilterBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

static void makeHLTFilterDescription (edm::ParameterSetDescription &desc)
 
- Static Public Member Functions inherited from edm::stream::EDFilterBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

bool filter (edm::Event &event, const edm::EventSetup &setup) overridefinal
 
virtual bool hltFilter (edm::Event &event, const edm::EventSetup &setup, trigger::TriggerFilterObjectWithRefs &filterobject)=0
 

Private Attributes

const bool saveTags_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDFilter<>
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDFilterBase
typedef EDFilterAdaptorBase 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

This class derives from EDFilter and adds a few HLT specific items. All HLT filters that wish to save summary objects for the AOD must derive from the HLTStreamFilter class.

Author
Martin Grunewald

This class derives from EDFilter and adds a few HLT specific items. Any and all HLT filters must derive from the HLTStreamFilter class!

Author
Martin Grunewald

Definition at line 29 of file HLTStreamFilter.h.

Constructor & Destructor Documentation

HLTStreamFilter::HLTStreamFilter ( const edm::ParameterSet config)
explicit

Definition at line 20 of file HLTStreamFilter.cc.

20  :
21  EDFilter(),
22  saveTags_(config.getParameter<bool>("saveTags"))
23 {
24  // register common HLTStreamFilter products
25  produces<trigger::TriggerFilterObjectWithRefs>();
26 }
T getParameter(std::string const &) const
const bool saveTags_
HLTStreamFilter::~HLTStreamFilter ( )
virtual

Definition at line 33 of file HLTStreamFilter.cc.

34 { }

Member Function Documentation

bool HLTStreamFilter::filter ( edm::Event event,
const edm::EventSetup setup 
)
finaloverrideprivatevirtual

Implements edm::stream::EDFilterBase.

Definition at line 36 of file HLTStreamFilter.cc.

References hltFilter(), module(), path(), and query::result.

36  {
37  std::auto_ptr<trigger::TriggerFilterObjectWithRefs> filterproduct( new trigger::TriggerFilterObjectWithRefs(path(event), module(event)) );
38 
39  // compute the result of the HLTStreamFilter implementation
40  bool result = hltFilter(event, setup, * filterproduct);
41 
42  // put filter object into the Event
43  event.put(filterproduct);
44 
45  // retunr the result of the HLTStreamFilter
46  return result;
47 }
int module(edm::Event const &) const
virtual bool hltFilter(edm::Event &event, const edm::EventSetup &setup, trigger::TriggerFilterObjectWithRefs &filterobject)=0
tuple result
Definition: query.py:137
int path(edm::Event const &) const
virtual bool HLTStreamFilter::hltFilter ( edm::Event event,
const edm::EventSetup setup,
trigger::TriggerFilterObjectWithRefs filterobject 
)
privatepure virtual

Implemented in HLTLevel1GTSeed.

Referenced by filter().

void HLTStreamFilter::makeHLTFilterDescription ( edm::ParameterSetDescription desc)
static

Definition at line 29 of file HLTStreamFilter.cc.

References edm::ParameterSetDescription::add().

Referenced by HLTLevel1GTSeed::fillDescriptions().

29  {
30  desc.add<bool>("saveTags",false);
31 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
int HLTStreamFilter::module ( edm::Event const &  event) const

Definition at line 53 of file HLTStreamFilter.cc.

Referenced by filter().

53  {
54  return static_cast<int>(event.moduleCallingContext()->placeInPathContext()->placeInPath());
55 }
const std::string * HLTStreamFilter::moduleLabel ( ) const

Definition at line 67 of file HLTStreamFilter.cc.

References edm::stream::EDFilterBase::moduleDescription(), and edm::ModuleDescription::moduleLabel().

67  {
68  return &moduleDescription().moduleLabel();
69 }
ModuleDescription const & moduleDescription() const
Definition: EDFilterBase.h:58
std::string const & moduleLabel() const
int HLTStreamFilter::path ( edm::Event const &  event) const

Definition at line 49 of file HLTStreamFilter.cc.

Referenced by filter().

49  {
50  return static_cast<int>(event.moduleCallingContext()->placeInPathContext()->pathContext()->pathID());
51 }
const std::string * HLTStreamFilter::pathName ( edm::Event const &  event) const

Definition at line 63 of file HLTStreamFilter.cc.

63  {
64  return &event.moduleCallingContext()->placeInPathContext()->pathContext()->pathName();
65 }
std::pair< int, int > HLTStreamFilter::pmid ( edm::Event const &  event) const

Definition at line 57 of file HLTStreamFilter.cc.

References edm::PlaceInPathContext::pathContext(), edm::PathContext::pathID(), and edm::PlaceInPathContext::placeInPath().

57  {
58  edm::PlaceInPathContext const* placeInPathContext = event.moduleCallingContext()->placeInPathContext();
59  return std::make_pair(static_cast<int>(placeInPathContext->pathContext()->pathID()),
60  static_cast<int>(placeInPathContext->placeInPath()));
61 }
PathContext const * pathContext() const
unsigned int pathID() const
Definition: PathContext.h:39
unsigned int placeInPath() const
bool HLTStreamFilter::saveTags ( ) const
inline

Definition at line 46 of file HLTStreamFilter.h.

References saveTags_.

Referenced by HLTLevel1GTSeed::hltFilter().

46  {
47  return saveTags_;
48  }
const bool saveTags_

Member Data Documentation

const bool HLTStreamFilter::saveTags_
private

Definition at line 43 of file HLTStreamFilter.h.

Referenced by saveTags().