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 ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDFilter () override
 
- 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 ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
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, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
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 &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 

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
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 24 of file HLTPhysicsDeclared.cc.

Constructor & Destructor Documentation

◆ HLTPhysicsDeclared()

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

Definition at line 46 of file HLTPhysicsDeclared.cc.

47  : m_invert(config.getParameter<bool>("invert")),
48  m_gtDigis(config.getParameter<edm::InputTag>("L1GtReadoutRecordTag")) {
49  m_gtDigisToken = consumes<L1GlobalTriggerReadoutRecord>(m_gtDigis);
50 }

References m_gtDigis, and m_gtDigisToken.

◆ ~HLTPhysicsDeclared()

HLTPhysicsDeclared::~HLTPhysicsDeclared ( )
overridedefault

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 54 of file HLTPhysicsDeclared.cc.

54  {
56  desc.add<edm::InputTag>("L1GtReadoutRecordTag", edm::InputTag("hltGtDigis"));
57  desc.add<bool>("invert", false);
58  descriptions.add("hltPhysicsDeclared", desc);
59 }

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and HLT_FULL_cff::InputTag.

◆ filter()

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

Implements edm::EDFilter.

Definition at line 61 of file HLTPhysicsDeclared.cc.

61  {
62  bool accept = false;
63 
64  if (event.isRealData()) {
65  // for real data, access the "physics enabled" bit in the L1 GT data
67  if (not event.getByToken(m_gtDigisToken, h_gtDigis)) {
68  edm::LogWarning(h_gtDigis.whyFailed()->category()) << h_gtDigis.whyFailed()->what();
69  // not enough informations to make a decision - reject the event
70  return false;
71  } else {
72  L1GtFdlWord fdlWord = h_gtDigis->gtFdlWord();
73  if (fdlWord.physicsDeclared() == 1)
74  accept = true;
75  }
76  } else {
77  // for MC, assume the "physics enabled" bit to be always set
78  accept = true;
79  }
80 
81  // if requested, invert the filter decision
82  if (m_invert)
83  accept = not accept;
84 
85  return accept;
86 }

References accept(), L1GlobalTriggerReadoutRecord::gtFdlWord(), m_gtDigisToken, m_invert, L1GtFdlWord::physicsDeclared(), and edm::HandleBase::whyFailed().

Member Data Documentation

◆ m_gtDigis

edm::InputTag HLTPhysicsDeclared::m_gtDigis
private

Definition at line 34 of file HLTPhysicsDeclared.cc.

Referenced by HLTPhysicsDeclared().

◆ m_gtDigisToken

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

Definition at line 35 of file HLTPhysicsDeclared.cc.

Referenced by filter(), and HLTPhysicsDeclared().

◆ m_invert

bool HLTPhysicsDeclared::m_invert
private

Definition at line 33 of file HLTPhysicsDeclared.cc.

Referenced by filter().

L1GtFdlWord::physicsDeclared
const cms_uint16_t physicsDeclared() const
get/set "physics declared" bit
Definition: L1GtFdlWord.h:169
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::Handle
Definition: AssociativeIterator.h:50
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
config
Definition: config.py:1
accept
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
edm::HandleBase::whyFailed
std::shared_ptr< cms::Exception > whyFailed() const
Definition: HandleBase.h:91
HLTPhysicsDeclared::m_invert
bool m_invert
Definition: HLTPhysicsDeclared.cc:33
L1GtFdlWord
Definition: L1GtFdlWord.h:29
HLTPhysicsDeclared::m_gtDigis
edm::InputTag m_gtDigis
Definition: HLTPhysicsDeclared.cc:34
HLTPhysicsDeclared::m_gtDigisToken
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_gtDigisToken
Definition: HLTPhysicsDeclared.cc:35
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
event
Definition: event.py:1
L1GlobalTriggerReadoutRecord::gtFdlWord
const L1GtFdlWord gtFdlWord(int bxInEventValue) const
get / set FDL word (record) in the GT readout record
Definition: L1GlobalTriggerReadoutRecord.cc:372
edm::InputTag
Definition: InputTag.h:15