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 Attributes
HcalTBTriggerFilter Class Reference

#include <HcalTBTriggerFilter.h>

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

Public Member Functions

virtual bool filter (edm::Event &e, edm::EventSetup const &c)
 
 HcalTBTriggerFilter (const edm::ParameterSet &ps)
 
virtual ~HcalTBTriggerFilter ()
 
- 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 Attributes

bool allowBeam_
 
bool allowLaser_
 
bool allowLED_
 
bool allowPedestal_
 
bool allowPedestalInSpill_
 
bool allowPedestalOutSpill_
 
edm::EDGetTokenT
< HcalTBTriggerData
tok_tb_
 

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

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_
virtual HcalTBTriggerFilter::~HcalTBTriggerFilter ( )
inlinevirtual

Definition at line 18 of file HcalTBTriggerFilter.h.

18 {}

Member Function Documentation

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

Implements edm::EDFilter.

Definition at line 15 of file HcalTBTriggerFilter.cc.

References allowBeam_, allowLaser_, allowLED_, allowPedestal_, allowPedestalInSpill_, allowPedestalOutSpill_, edm::Event::getByToken(), h, and tok_tb_.

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 
37  if (h->wasInSpillPedestalTrigger() || h->wasOutSpillPedestalTrigger() || h->wasSpillIgnorantPedestalTrigger()) {
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 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
edm::EDGetTokenT< HcalTBTriggerData > tok_tb_

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().