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 noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
bool wantsStreamLuminosityBlocks () const noexcept final
 
bool wantsStreamRuns () const noexcept 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 edm::EDGetTokenT< P2GTCandidateCollectionprimVertToken_
 
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 40 of file L1GTSingleObjectCond.cc.

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

41  : scales_(config.getParameter<edm::ParameterSet>("scales")),
43  token_(consumes<P2GTCandidateCollection>(collection.tag())),
44  primVertToken_(consumes<P2GTCandidateCollection>(config.getParameter<edm::InputTag>("primVertTag"))) {
45  produces<P2GTCandidateVectorRef>(collection.tag().instance());
46 }
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_
const edm::EDGetTokenT< P2GTCandidateCollection > primVertToken_

◆ ~L1GTSingleObjectCond()

L1GTSingleObjectCond::~L1GTSingleObjectCond ( )
overridedefault

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 48 of file L1GTSingleObjectCond.cc.

References edm::ConfigurationDescriptions::addWithDefaultLabel(), submitPVResolutionJobs::desc, and reco::modules::fillPSetDescription().

48  {
51 
52  desc.add<edm::InputTag>("primVertTag");
53 
56  desc.add<edm::ParameterSetDescription>("scales", scalesDesc);
57 
58  descriptions.addWithDefaultLabel(desc);
59 }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
void fillPSetDescription(edm::ParameterSetDescription &desc)

◆ filter()

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

Implements edm::global::EDFilterBase.

Definition at line 61 of file L1GTSingleObjectCond.cc.

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

61  {
63  edm::Handle<P2GTCandidateCollection> primVertCol = event.getHandle(primVertToken_);
64 
65  bool condition_result = false;
66 
67  std::unique_ptr<P2GTCandidateVectorRef> triggerCol = std::make_unique<P2GTCandidateVectorRef>();
68 
69  for (std::size_t idx = 0; idx < col->size(); ++idx) {
70  bool pass{collection.checkObject(col->at(idx))};
71  pass &= collection.checkPrimaryVertices(col->at(idx), *primVertCol);
72 
73  condition_result |= pass;
74 
75  if (pass) {
76  triggerCol->push_back(P2GTCandidateRef(col, idx));
77  }
78  }
79 
80  condition_result &= collection.checkCollection(*col);
81 
82  if (condition_result) {
83  event.put(std::move(triggerCol), collection.tag().instance());
84  }
85 
86  return condition_result;
87 }
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
bool checkPrimaryVertices(const P2GTCandidate &obj, const P2GTCandidateCollection &primVertCol) const
const edm::EDGetTokenT< P2GTCandidateCollection > token_
bool checkCollection(const P2GTCandidateCollection &col) const
col
Definition: cuy.py:1009
def move(src, dest)
Definition: eostools.py:511
const edm::EDGetTokenT< P2GTCandidateCollection > primVertToken_

Member Data Documentation

◆ collection

const L1GTSingleCollectionCut L1GTSingleObjectCond::collection
private

Definition at line 34 of file L1GTSingleObjectCond.cc.

Referenced by filter(), and L1GTSingleObjectCond().

◆ primVertToken_

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

Definition at line 37 of file L1GTSingleObjectCond.cc.

Referenced by filter().

◆ 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().