CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HcalTBTriggerFilter Class Reference

#include <HcalTBTriggerFilter.h>

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

Public Member Functions

bool filter (edm::Event &e, edm::EventSetup const &c) override
 
 HcalTBTriggerFilter (const edm::ParameterSet &ps)
 
 ~HcalTBTriggerFilter () override
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDFilter () 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 Attributes

bool allowBeam_
 
bool allowLaser_
 
bool allowLED_
 
bool allowPedestal_
 
bool allowPedestalInSpill_
 
bool allowPedestalOutSpill_
 
edm::EDGetTokenT< HcalTBTriggerDatatok_tb_
 

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter 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::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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

Author
J. Mans - Minnesota

Definition at line 15 of file HcalTBTriggerFilter.h.

Constructor & Destructor Documentation

HcalTBTriggerFilter::HcalTBTriggerFilter ( const edm::ParameterSet ps)

Definition at line 4 of file HcalTBTriggerFilter.cc.

References edm::ParameterSet::getParameter(), and tok_tb_.

4  :
5  allowPedestal_(ps.getParameter<bool>("AllowPedestal")),
6  allowPedestalInSpill_(ps.getParameter<bool>("AllowPedestalInSpill")),
7  allowPedestalOutSpill_(ps.getParameter<bool>("AllowPedestalOutSpill")),
8  allowLaser_(ps.getParameter<bool>("AllowLaser")),
9  allowLED_(ps.getParameter<bool>("AllowLED")),
10  allowBeam_(ps.getParameter<bool>("AllowBeam"))
11 {
12  tok_tb_ = consumes<HcalTBTriggerData>(ps.getParameter<edm::InputTag>("hcalTBTriggerDataTag"));
13 }
T getParameter(std::string const &) const
edm::EDGetTokenT< HcalTBTriggerData > tok_tb_
HcalTBTriggerFilter::~HcalTBTriggerFilter ( )
inlineoverride

Definition at line 18 of file HcalTBTriggerFilter.h.

References EnergyCorrector::c, MillePedeFileConverter_cfg::e, and filter().

18 {}

Member Function Documentation

bool HcalTBTriggerFilter::filter ( edm::Event e,
edm::EventSetup const &  c 
)
overridevirtual

Implements edm::EDFilter.

Definition at line 15 of file HcalTBTriggerFilter.cc.

References allowBeam_, allowLaser_, allowLED_, allowPedestal_, allowPedestalInSpill_, allowPedestalOutSpill_, edm::Event::getByToken(), h, tok_tb_, HcalTBTriggerData::wasBeamTrigger(), HcalTBTriggerData::wasInSpillPedestalTrigger(), HcalTBTriggerData::wasLaserTrigger(), HcalTBTriggerData::wasLEDTrigger(), HcalTBTriggerData::wasOutSpillPedestalTrigger(), and HcalTBTriggerData::wasSpillIgnorantPedestalTrigger().

Referenced by ~HcalTBTriggerFilter().

15  {
16 
18  e.getByToken(tok_tb_, h);
19 
20  bool allowed=false;
21 
22  if (h->wasBeamTrigger()) {
23  allowed=allowBeam_;
24  // if (!allowed) std::cout << "Rejecting beam trigger from " << e.id() << std::endl;
25  }
26 
27  if (h->wasLEDTrigger()) {
28  allowed=allowLED_;
29  // if (!allowed) std::cout << "Rejecting LED trigger from " << e.id() << std::endl;
30  }
31 
32  if (h->wasLaserTrigger()) {
33  allowed=allowLaser_;
34  // if (!allowed) std::cout << "Rejecting laser trigger from " << e.id() << std::endl;
35  }
36 
38  allowed=allowPedestal_;
39  // if (!allowed) std::cout << "Rejecting pedestal trigger from " << e.id() << std::endl;
40  if (allowed && h->wasInSpillPedestalTrigger() && !allowPedestalInSpill_) {
41  allowed=false;
42  // if (!allowed) std::cout << "Rejecting in-spill pedestal trigger from " << e.id() << std::endl;
43  }
44  if (allowed && h->wasOutSpillPedestalTrigger() && !allowPedestalOutSpill_) {
45  allowed=false;
46  // if (!allowed) std::cout << "Rejecting out-of-spill pedestal trigger from " << e.id() << std::endl;
47  }
48  }
49 
50  return allowed;
51 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
bool wasLEDTrigger() const
returns true if this was a LED trigger
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
bool wasOutSpillPedestalTrigger() const
returns true if this was an out-of-spill pedestal trigger
bool wasSpillIgnorantPedestalTrigger() const
returns true if this trigger was a calibration trigger
bool wasInSpillPedestalTrigger() const
returns true if this was an in-spill pedestal trigger
bool wasBeamTrigger() const
returns true if this trigger came from beam data
edm::EDGetTokenT< HcalTBTriggerData > tok_tb_
bool wasLaserTrigger() const
returns true if this was a laser trigger

Member Data Documentation

bool HcalTBTriggerFilter::allowBeam_
private

Definition at line 26 of file HcalTBTriggerFilter.h.

Referenced by filter().

bool HcalTBTriggerFilter::allowLaser_
private

Definition at line 24 of file HcalTBTriggerFilter.h.

Referenced by filter().

bool HcalTBTriggerFilter::allowLED_
private

Definition at line 25 of file HcalTBTriggerFilter.h.

Referenced by filter().

bool HcalTBTriggerFilter::allowPedestal_
private

Definition at line 21 of file HcalTBTriggerFilter.h.

Referenced by filter().

bool HcalTBTriggerFilter::allowPedestalInSpill_
private

Definition at line 22 of file HcalTBTriggerFilter.h.

Referenced by filter().

bool HcalTBTriggerFilter::allowPedestalOutSpill_
private

Definition at line 23 of file HcalTBTriggerFilter.h.

Referenced by filter().

edm::EDGetTokenT<HcalTBTriggerData> HcalTBTriggerFilter::tok_tb_
private

Definition at line 27 of file HcalTBTriggerFilter.h.

Referenced by filter(), and HcalTBTriggerFilter().