CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
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)
 
 ~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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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
< L1GlobalTriggerReadoutRecord
m_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
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
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...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 24 of file HLTPhysicsDeclared.cc.

Constructor & Destructor Documentation

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

Definition at line 46 of file HLTPhysicsDeclared.cc.

References m_gtDigis, and m_gtDigisToken.

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

Member Function Documentation

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

Definition at line 54 of file HLTPhysicsDeclared.cc.

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

54  {
56  desc.add<edm::InputTag>("L1GtReadoutRecordTag", edm::InputTag("hltGtDigis"));
57  desc.add<bool>("invert", false);
58  descriptions.add("hltPhysicsDeclared", desc);
59 }
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 
)
overrideprivatevirtual

Implements edm::EDFilter.

Definition at line 61 of file HLTPhysicsDeclared.cc.

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

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 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
bool isRealData() const
Definition: EventBase.h:62
const cms_uint16_t physicsDeclared() const
get/set &quot;physics declared&quot; bit
Definition: L1GtFdlWord.h:169
std::shared_ptr< cms::Exception > whyFailed() const
Definition: HandleBase.h:91
Log< level::Warning, false > LogWarning
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().