CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
GlobalSuperTightHalo2016Filter Class Reference
Inheritance diagram for GlobalSuperTightHalo2016Filter:
edm::global::EDFilter<> edm::global::EDFilterBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 GlobalSuperTightHalo2016Filter (const edm::ParameterSet &iConfig)
 
 ~GlobalSuperTightHalo2016Filter () override
 
- Public Member Functions inherited from edm::global::EDFilter<>
 EDFilter ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDFilterBase
 EDFilterBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDFilterBase () override
 
- 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 ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
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, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- 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
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

bool filter (edm::StreamID iID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
 

Private Attributes

edm::EDGetTokenT< reco::BeamHaloSummarybeamHaloSummaryToken_
 
const bool taggingMode_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDFilterBase
typedef EDFilterBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::global::EDFilterBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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

Definition at line 7 of file GlobalSuperTightHalo2016Filter.cc.

Constructor & Destructor Documentation

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

Definition at line 22 of file GlobalSuperTightHalo2016Filter.cc.

23  : taggingMode_ (iConfig.getParameter<bool> ("taggingMode"))
24  , beamHaloSummaryToken_(consumes<reco::BeamHaloSummary>(edm::InputTag("BeamHaloSummary")))
25 {
26 
27  produces<bool>();
28 }
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::BeamHaloSummary > beamHaloSummaryToken_
GlobalSuperTightHalo2016Filter::~GlobalSuperTightHalo2016Filter ( )
inlineoverride

Definition at line 12 of file GlobalSuperTightHalo2016Filter.cc.

References filter(), and iEvent.

12 {}

Member Function Documentation

bool GlobalSuperTightHalo2016Filter::filter ( edm::StreamID  iID,
edm::Event iEvent,
const edm::EventSetup iSetup 
) const
overrideprivate

Definition at line 30 of file GlobalSuperTightHalo2016Filter.cc.

References beamHaloSummaryToken_, DEFINE_FWK_MODULE, edm::Event::getByToken(), reco::BeamHaloSummary::GlobalSuperTightHaloId2016(), edm::Event::put(), and taggingMode_.

Referenced by ~GlobalSuperTightHalo2016Filter().

30  {
31 
32  edm::Handle<reco::BeamHaloSummary> beamHaloSummary;
33  iEvent.getByToken(beamHaloSummaryToken_ , beamHaloSummary);
34 
35  const bool pass = !beamHaloSummary->GlobalSuperTightHaloId2016();
36 
37  iEvent.put(std::make_unique<bool>(pass));
38 
39  return taggingMode_ || pass; // return false if it is a beamhalo event
40 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::EDGetTokenT< reco::BeamHaloSummary > beamHaloSummaryToken_
const bool GlobalSuperTightHaloId2016() const

Member Data Documentation

edm::EDGetTokenT<reco::BeamHaloSummary> GlobalSuperTightHalo2016Filter::beamHaloSummaryToken_
private

Definition at line 19 of file GlobalSuperTightHalo2016Filter.cc.

Referenced by filter().

const bool GlobalSuperTightHalo2016Filter::taggingMode_
private

Definition at line 18 of file GlobalSuperTightHalo2016Filter.cc.

Referenced by filter().