CMS 3D CMS Logo

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

#include <DPGAnalysis/SiStripTools/plugins/EventWithHistoryEDFilter.cc>

Inheritance diagram for EventWithHistoryEDFilter:
edm::EDFilter edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 EventWithHistoryEDFilter (const edm::ParameterSet &)
 
 ~EventWithHistoryEDFilter ()
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDFilter ()
 
- 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 ()
 

Private Member Functions

virtual void beginJob () override
 
virtual void endJob () override
 
virtual bool filter (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

bool _debu
 
std::vector
< EventWithHistoryFilter
_ehfilters
 

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 44 of file EventWithHistoryEDFilter.cc.

Constructor & Destructor Documentation

EventWithHistoryEDFilter::EventWithHistoryEDFilter ( const edm::ParameterSet iConfig)
explicit

Definition at line 72 of file EventWithHistoryEDFilter.cc.

References _ehfilters, edm::EDConsumerBase::consumesCollector(), filter(), and edm::ParameterSet::getUntrackedParameter().

72  :
73  _ehfilters(),
74  _debu(iConfig.getUntrackedParameter<bool>("debugPrint",false))
75 {
76  //now do what ever initialization is needed
77 
78  std::vector<edm::ParameterSet> filterconfigs(iConfig.getUntrackedParameter<std::vector<edm::ParameterSet> >
79  ("filterConfigurations",std::vector<edm::ParameterSet>()));
80 
81  for(std::vector<edm::ParameterSet>::iterator ps=filterconfigs.begin();
82  ps!=filterconfigs.end();++ps) {
83 
84  ps->augment(iConfig.getUntrackedParameter<edm::ParameterSet>("commonConfiguration",edm::ParameterSet()));
85 
87  _ehfilters.push_back(filter);
88 
89  }
90 
91 
92 }
T getUntrackedParameter(std::string const &, T const &) const
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::vector< EventWithHistoryFilter > _ehfilters
virtual bool filter(edm::Event &, const edm::EventSetup &) override
EventWithHistoryEDFilter::~EventWithHistoryEDFilter ( )

Definition at line 95 of file EventWithHistoryEDFilter.cc.

96 {
97 
98  // do anything here that needs to be done at desctruction time
99  // (e.g. close files, deallocate resources etc.)
100 
101 }

Member Function Documentation

void EventWithHistoryEDFilter::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDFilter.

Definition at line 130 of file EventWithHistoryEDFilter.cc.

131 {}
void EventWithHistoryEDFilter::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDFilter.

Definition at line 135 of file EventWithHistoryEDFilter.cc.

135  {
136 }
bool EventWithHistoryEDFilter::filter ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDFilter.

Definition at line 110 of file EventWithHistoryEDFilter.cc.

References _debu, and _ehfilters.

Referenced by EventWithHistoryEDFilter(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filter(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setDataAccessor(), and Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView().

111 {
112 
113  bool selected = false;
114 
115  for(std::vector<EventWithHistoryFilter>::const_iterator filter=_ehfilters.begin();
116  filter!=_ehfilters.end();++filter) {
117 
118  selected = selected || filter->selected(iEvent,iSetup);
119 
120  }
121 
122  if(_debu && selected ) edm::LogInfo("SELECTED") << "selected event";
123 
124  return selected;
125 
126 }
std::vector< EventWithHistoryFilter > _ehfilters
virtual bool filter(edm::Event &, const edm::EventSetup &) override

Member Data Documentation

bool EventWithHistoryEDFilter::_debu
private

Definition at line 58 of file EventWithHistoryEDFilter.cc.

Referenced by filter().

std::vector<EventWithHistoryFilter> EventWithHistoryEDFilter::_ehfilters
private

Definition at line 57 of file EventWithHistoryEDFilter.cc.

Referenced by EventWithHistoryEDFilter(), and filter().