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::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 ()
 
virtual ~EDFilter ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

bool allowBeam_
 
bool allowLaser_
 
bool allowLED_
 
bool allowPedestal_
 
bool allowPedestalInSpill_
 
bool allowPedestalOutSpill_
 
edm::InputTag label_
 

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter ModuleType
 
typedef WorkerT< EDFilterWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- 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::EDFilter
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Date:
2007/03/08 23:09:15
Revision:
1.1
Author
J. Mans - Minnesota

Definition at line 15 of file HcalTBTriggerFilter.h.

Constructor & Destructor Documentation

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

Definition at line 5 of file HcalTBTriggerFilter.cc.

5  :
6  allowPedestal_(ps.getParameter<bool>("AllowPedestal")),
7  allowPedestalInSpill_(ps.getParameter<bool>("AllowPedestalInSpill")),
8  allowPedestalOutSpill_(ps.getParameter<bool>("AllowPedestalOutSpill")),
9  allowLaser_(ps.getParameter<bool>("AllowLaser")),
10  allowLED_(ps.getParameter<bool>("AllowLED")),
11  allowBeam_(ps.getParameter<bool>("AllowBeam")),
13 {
14 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
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 16 of file HcalTBTriggerFilter.cc.

References allowBeam_, allowLaser_, allowLED_, allowPedestal_, allowPedestalInSpill_, allowPedestalOutSpill_, edm::Event::getByLabel(), edm::Event::getByType(), h, edm::InputTag::label(), and label_.

16  {
18 
19  if (label_.label().length()<2)
20  e.getByType(h);
21  else
22  e.getByLabel(label_,h);
23 
24  bool allowed=false;
25 
26  if (h->wasBeamTrigger()) {
27  allowed=allowBeam_;
28  // if (!allowed) std::cout << "Rejecting beam trigger from " << e.id() << std::endl;
29  }
30 
31  if (h->wasLEDTrigger()) {
32  allowed=allowLED_;
33  // if (!allowed) std::cout << "Rejecting LED trigger from " << e.id() << std::endl;
34  }
35 
36  if (h->wasLaserTrigger()) {
37  allowed=allowLaser_;
38  // if (!allowed) std::cout << "Rejecting laser trigger from " << e.id() << std::endl;
39  }
40 
41  if (h->wasInSpillPedestalTrigger() || h->wasOutSpillPedestalTrigger() || h->wasSpillIgnorantPedestalTrigger()) {
42  allowed=allowPedestal_;
43  // if (!allowed) std::cout << "Rejecting pedestal trigger from " << e.id() << std::endl;
44  if (allowed && h->wasInSpillPedestalTrigger() && !allowPedestalInSpill_) {
45  allowed=false;
46  // if (!allowed) std::cout << "Rejecting in-spill pedestal trigger from " << e.id() << std::endl;
47  }
48  if (allowed && h->wasOutSpillPedestalTrigger() && !allowPedestalOutSpill_) {
49  allowed=false;
50  // if (!allowed) std::cout << "Rejecting out-of-spill pedestal trigger from " << e.id() << std::endl;
51  }
52  }
53 
54  return allowed;
55 }
bool getByType(Handle< PROD > &result) const
Definition: Event.h:398
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
std::string const & label() const
Definition: InputTag.h:25

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::InputTag HcalTBTriggerFilter::label_
private