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
HLTPhysicsDeclared Class Reference
Inheritance diagram for HLTPhysicsDeclared:
edm::EDFilter edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 HLTPhysicsDeclared (const edm::ParameterSet &)
 
 ~HLTPhysicsDeclared ()
 
- 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 Member Functions

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

Private Attributes

edm::InputTag m_gtDigis
 
bool m_invert
 

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

Definition at line 20 of file HLTPhysicsDeclared.cc.

Constructor & Destructor Documentation

HLTPhysicsDeclared::HLTPhysicsDeclared ( const edm::ParameterSet config)
explicit

Definition at line 48 of file HLTPhysicsDeclared.cc.

48  :
49  m_invert( config.getParameter<bool>("invert") ),
50  m_gtDigis( config.getParameter<edm::InputTag>("L1GtReadoutRecordTag") )
51 {
52 }
T getParameter(std::string const &) const
HLTPhysicsDeclared::~HLTPhysicsDeclared ( )

Definition at line 54 of file HLTPhysicsDeclared.cc.

55 {
56 }

Member Function Documentation

bool HLTPhysicsDeclared::filter ( edm::Event event,
const edm::EventSetup setup 
)
privatevirtual

Implements edm::EDFilter.

Definition at line 58 of file HLTPhysicsDeclared.cc.

References accept(), edm::Event::getByLabel(), edm::EventBase::isRealData(), m_gtDigis, m_invert, L1GtFdlWord::physicsDeclared(), and edm::HandleBase::whyFailed().

59 {
60  bool accept = false;
61 
62  if (event.isRealData()) {
63  // for real data, access the "physics enabled" bit in the L1 GT data
65  if (not event.getByLabel(m_gtDigis, h_gtDigis)) {
66  edm::LogWarning(h_gtDigis.whyFailed()->category()) << h_gtDigis.whyFailed()->what();
67  // not enough informations to make a decision - reject the event
68  return false;
69  } else {
70  L1GtFdlWord fdlWord = h_gtDigis->gtFdlWord();
71  if (fdlWord.physicsDeclared() == 1)
72  accept = true;
73  }
74  } else {
75  // for MC, assume the "physics enabled" bit to be always set
76  accept = true;
77  }
78 
79  // if requested, invert the filter decision
80  if (m_invert)
81  accept = not accept;
82 
83  return accept;
84 }
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:21
bool isRealData() const
Definition: EventBase.h:60
boost::shared_ptr< cms::Exception > whyFailed() const
Definition: HandleBase.h:90
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
const boost::uint16_t physicsDeclared() const
get/set &quot;physics declared&quot; bit
Definition: L1GtFdlWord.h:229

Member Data Documentation

edm::InputTag HLTPhysicsDeclared::m_gtDigis
private

Definition at line 29 of file HLTPhysicsDeclared.cc.

Referenced by filter().

bool HLTPhysicsDeclared::m_invert
private

Definition at line 28 of file HLTPhysicsDeclared.cc.

Referenced by filter().