CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
L1GTSingleObjectCond Class Reference
Inheritance diagram for L1GTSingleObjectCond:
edm::global::EDFilter<> edm::global::EDFilterBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1GTSingleObjectCond (const edm::ParameterSet &)
 
 ~L1GTSingleObjectCond () override=default
 
- Public Member Functions inherited from edm::global::EDFilter<>
 EDFilter ()=default
 
 EDFilter (const EDFilter &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDFilteroperator= (const EDFilter &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDFilterBase
 EDFilterBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDFilterBase () 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

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

Private Member Functions

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

Private Attributes

const L1GTSingleCollectionCut collection
 
const L1GTScales scales_
 
const edm::EDGetTokenT< P2GTCandidateCollectiontoken_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDFilterBase
typedef EDFilterBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
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<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
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)
 
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 ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
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< Bconsumes (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 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 ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
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 23 of file L1GTSingleObjectCond.cc.

Constructor & Destructor Documentation

◆ L1GTSingleObjectCond()

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

Definition at line 39 of file L1GTSingleObjectCond.cc.

References collection, edm::InputTag::instance(), and l1t::L1GTSingleCollectionCut::tag().

40  : scales_(config.getParameter<edm::ParameterSet>("scales")),
42  token_(consumes<P2GTCandidateCollection>(collection.tag())) {
43  produces<P2GTCandidateVectorRef>(collection.tag().instance());
44 }
const L1GTSingleCollectionCut collection
std::string const & instance() const
Definition: InputTag.h:37
const edm::InputTag & tag() const
Definition: config.py:1
const edm::EDGetTokenT< P2GTCandidateCollection > token_

◆ ~L1GTSingleObjectCond()

L1GTSingleObjectCond::~L1GTSingleObjectCond ( )
overridedefault

Member Function Documentation

◆ fillDescriptions()

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

◆ filter()

bool L1GTSingleObjectCond::filter ( edm::StreamID  ,
edm::Event event,
edm::EventSetup const &  setup 
) const
overrideprivatevirtual

Implements edm::global::EDFilterBase.

Definition at line 57 of file L1GTSingleObjectCond.cc.

References l1t::L1GTSingleCollectionCut::checkObject(), cuy::col, collection, heavyIonCSV_trainingSettings::idx, edm::InputTag::instance(), eostools::move(), l1t::L1GTSingleCollectionCut::tag(), and token_.

57  {
59 
60  bool condition_result = false;
61 
62  std::unique_ptr<P2GTCandidateVectorRef> triggerCol = std::make_unique<P2GTCandidateVectorRef>();
63 
64  for (std::size_t idx = 0; idx < col->size(); ++idx) {
65  bool pass{collection.checkObject(col->at(idx))};
66  condition_result |= pass;
67 
68  if (pass) {
69  triggerCol->push_back(P2GTCandidateRef(col, idx));
70  }
71  }
72 
73  if (condition_result) {
74  event.put(std::move(triggerCol), collection.tag().instance());
75  }
76 
77  return condition_result;
78 }
const L1GTSingleCollectionCut collection
bool checkObject(const P2GTCandidate &obj) const
std::string const & instance() const
Definition: InputTag.h:37
const edm::InputTag & tag() const
edm::Ref< P2GTCandidateCollection > P2GTCandidateRef
Definition: P2GTCandidate.h:18
const edm::EDGetTokenT< P2GTCandidateCollection > token_
col
Definition: cuy.py:1009
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ collection

const L1GTSingleCollectionCut L1GTSingleObjectCond::collection
private

Definition at line 34 of file L1GTSingleObjectCond.cc.

Referenced by filter(), and L1GTSingleObjectCond().

◆ scales_

const L1GTScales L1GTSingleObjectCond::scales_
private

Definition at line 33 of file L1GTSingleObjectCond.cc.

◆ token_

const edm::EDGetTokenT<P2GTCandidateCollection> L1GTSingleObjectCond::token_
private

Definition at line 36 of file L1GTSingleObjectCond.cc.

Referenced by filter().