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::EDConsumerBase 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 &)
 
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
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDFilter
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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

Definition at line 19 of file HLTPhysicsDeclared.cc.

Constructor & Destructor Documentation

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

Definition at line 42 of file HLTPhysicsDeclared.cc.

42  :
43  m_invert( config.getParameter<bool>("invert") ),
44  m_gtDigis( config.getParameter<edm::InputTag>("L1GtReadoutRecordTag") )
45 {
46 }
T getParameter(std::string const &) const
HLTPhysicsDeclared::~HLTPhysicsDeclared ( )

Definition at line 48 of file HLTPhysicsDeclared.cc.

49 {
50 }

Member Function Documentation

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

Implements edm::EDFilter.

Definition at line 52 of file HLTPhysicsDeclared.cc.

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

53 {
54  bool accept = false;
55 
56  if (event.isRealData()) {
57  // for real data, access the "physics enabled" bit in the L1 GT data
59  if (not event.getByLabel(m_gtDigis, h_gtDigis)) {
60  edm::LogWarning(h_gtDigis.whyFailed()->category()) << h_gtDigis.whyFailed()->what();
61  // not enough informations to make a decision - reject the event
62  return false;
63  } else {
64  L1GtFdlWord fdlWord = h_gtDigis->gtFdlWord();
65  if (fdlWord.physicsDeclared() == 1)
66  accept = true;
67  }
68  } else {
69  // for MC, assume the "physics enabled" bit to be always set
70  accept = true;
71  }
72 
73  // if requested, invert the filter decision
74  if (m_invert)
75  accept = not accept;
76 
77  return accept;
78 }
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:22
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:361
const cms_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 28 of file HLTPhysicsDeclared.cc.

Referenced by filter().

bool HLTPhysicsDeclared::m_invert
private

Definition at line 27 of file HLTPhysicsDeclared.cc.

Referenced by filter().