CMS 3D CMS Logo

List of all members | Public Member Functions | Static 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 () override
 
- 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)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
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, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- 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
 
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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Private Member Functions

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

Private Attributes

edm::InputTag m_gtDigis
 
edm::EDGetTokenT< L1GlobalTriggerReadoutRecordm_gtDigisToken
 
bool m_invert
 

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
 
- 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 24 of file HLTPhysicsDeclared.cc.

Constructor & Destructor Documentation

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

Definition at line 47 of file HLTPhysicsDeclared.cc.

References m_gtDigis, m_gtDigisToken, and ~HLTPhysicsDeclared().

47  :
48  m_invert( config.getParameter<bool>("invert") ),
49  m_gtDigis( config.getParameter<edm::InputTag>("L1GtReadoutRecordTag") )
50 {
51  m_gtDigisToken = consumes<L1GlobalTriggerReadoutRecord>(m_gtDigis);
52 }
T getParameter(std::string const &) const
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_gtDigisToken
HLTPhysicsDeclared::~HLTPhysicsDeclared ( )
overridedefault

Referenced by HLTPhysicsDeclared().

Member Function Documentation

void HLTPhysicsDeclared::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 57 of file HLTPhysicsDeclared.cc.

References edm::ConfigurationDescriptions::add(), and edm::ParameterSetDescription::add().

57  {
59  desc.add<edm::InputTag>("L1GtReadoutRecordTag",edm::InputTag("hltGtDigis"));
60  desc.add<bool>("invert",false);
61  descriptions.add("hltPhysicsDeclared",desc);
62 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool HLTPhysicsDeclared::filter ( edm::Event event,
const edm::EventSetup setup 
)
overrideprivate

Definition at line 64 of file HLTPhysicsDeclared.cc.

References accept(), DEFINE_FWK_MODULE, edm::Event::getByToken(), L1GlobalTriggerReadoutRecord::gtFdlWord(), edm::EventBase::isRealData(), m_gtDigisToken, m_invert, L1GtFdlWord::physicsDeclared(), and edm::HandleBase::whyFailed().

65 {
66  bool accept = false;
67 
68  if (event.isRealData()) {
69  // for real data, access the "physics enabled" bit in the L1 GT data
71  if (not event.getByToken(m_gtDigisToken, h_gtDigis)) {
72  edm::LogWarning(h_gtDigis.whyFailed()->category()) << h_gtDigis.whyFailed()->what();
73  // not enough informations to make a decision - reject the event
74  return false;
75  } else {
76  L1GtFdlWord fdlWord = h_gtDigis->gtFdlWord();
77  if (fdlWord.physicsDeclared() == 1)
78  accept = true;
79  }
80  } else {
81  // for MC, assume the "physics enabled" bit to be always set
82  accept = true;
83  }
84 
85  // if requested, invert the filter decision
86  if (m_invert)
87  accept = not accept;
88 
89  return accept;
90 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
bool isRealData() const
Definition: EventBase.h:64
const L1GtFdlWord gtFdlWord(int bxInEventValue) const
get / set FDL word (record) in the GT readout record
const cms_uint16_t physicsDeclared() const
get/set "physics declared" bit
Definition: L1GtFdlWord.h:227
std::shared_ptr< cms::Exception > whyFailed() const
Definition: HandleBase.h:106
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_gtDigisToken

Member Data Documentation

edm::InputTag HLTPhysicsDeclared::m_gtDigis
private

Definition at line 34 of file HLTPhysicsDeclared.cc.

Referenced by HLTPhysicsDeclared().

edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> HLTPhysicsDeclared::m_gtDigisToken
private

Definition at line 35 of file HLTPhysicsDeclared.cc.

Referenced by filter(), and HLTPhysicsDeclared().

bool HLTPhysicsDeclared::m_invert
private

Definition at line 33 of file HLTPhysicsDeclared.cc.

Referenced by filter().