CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
edmtest::ExistingDictionaryTestAnalyzer Class Reference
Inheritance diagram for edmtest::ExistingDictionaryTestAnalyzer:
edm::global::EDAnalyzer<> edm::global::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (edm::StreamID id, edm::Event const &iEvent, edm::EventSetup const &) const override
 
 ExistingDictionaryTestAnalyzer (edm::ParameterSet const &iConfig)
 
- Public Member Functions inherited from edm::global::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
const EDAnalyzeroperator= (const EDAnalyzer &)=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::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDAnalyzerBase () 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 &descriptions)
 
- Static Public Member Functions inherited from edm::global::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

const edm::EDGetTokenT< int > intToken_
 
const bool testVecUniqInt_
 
const edm::EDGetTokenT< std::vector< std::unique_ptr< IntProduct > > > vecUniqIntProdToken_
 
const edm::EDGetTokenT< std::vector< std::unique_ptr< int > > > vecUniqIntToken_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- 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)
 
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 51 of file ExistingDictionaryTestModules.cc.

Constructor & Destructor Documentation

◆ ExistingDictionaryTestAnalyzer()

edmtest::ExistingDictionaryTestAnalyzer::ExistingDictionaryTestAnalyzer ( edm::ParameterSet const &  iConfig)
inlineexplicit

Definition at line 53 of file ExistingDictionaryTestModules.cc.

References edm::EDConsumerBase::consumes(), and edm::ParameterSet::getParameter().

54  : intToken_{consumes(iConfig.getParameter<edm::InputTag>("src"))},
55  vecUniqIntToken_{consumes(iConfig.getParameter<edm::InputTag>("src"))},
56  vecUniqIntProdToken_{consumes(iConfig.getParameter<edm::InputTag>("src"))},
57  testVecUniqInt_{iConfig.getParameter<bool>("testVecUniqInt")} {}
const edm::EDGetTokenT< std::vector< std::unique_ptr< int > > > vecUniqIntToken_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const edm::EDGetTokenT< std::vector< std::unique_ptr< IntProduct > > > vecUniqIntProdToken_

Member Function Documentation

◆ analyze()

void edmtest::ExistingDictionaryTestAnalyzer::analyze ( edm::StreamID  id,
edm::Event const &  iEvent,
edm::EventSetup const &   
) const
inlineoverridevirtual

Implements edm::global::EDAnalyzerBase.

Definition at line 66 of file ExistingDictionaryTestModules.cc.

References cms::cuda::assert(), iEvent, intToken_, testVecUniqInt_, vecUniqIntProdToken_, and vecUniqIntToken_.

66  {
67  assert(iEvent.get(intToken_) == 1);
68 
69  const auto& vecUniqInt = iEvent.get(vecUniqIntToken_);
70  assert(vecUniqInt.size() == 1);
71  for (const auto& elem : vecUniqInt) {
72  if (testVecUniqInt_) {
73  assert(elem.get() != nullptr);
74  assert(*elem == 1);
75  } else {
76  if (elem) {
77  edm::LogError("ExistingDictionaryTestAnalyzer")
78  << "I am now getting a valid pointer, please update the test";
79  }
80  }
81  }
82 
83  const auto& vecUniqIntProd = iEvent.get(vecUniqIntProdToken_);
84  assert(vecUniqIntProd.size() == 1);
85  for (const auto& elem : vecUniqIntProd) {
86  assert(elem.get() != nullptr);
87  assert(elem->value == 1);
88  }
89  }
const edm::EDGetTokenT< std::vector< std::unique_ptr< int > > > vecUniqIntToken_
Log< level::Error, false > LogError
assert(be >=bs)
int iEvent
Definition: GenABIO.cc:224
const edm::EDGetTokenT< std::vector< std::unique_ptr< IntProduct > > > vecUniqIntProdToken_

◆ fillDescriptions()

static void edmtest::ExistingDictionaryTestAnalyzer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
inlinestatic

Definition at line 59 of file ExistingDictionaryTestModules.cc.

References edm::ConfigurationDescriptions::addDefault(), and submitPVResolutionJobs::desc.

59  {
61  desc.add<edm::InputTag>("src", edm::InputTag{"prod"});
62  desc.add<bool>("testVecUniqInt", true);
63  descriptions.addDefault(desc);
64  }
void addDefault(ParameterSetDescription const &psetDescription)

Member Data Documentation

◆ intToken_

const edm::EDGetTokenT<int> edmtest::ExistingDictionaryTestAnalyzer::intToken_
private

Definition at line 92 of file ExistingDictionaryTestModules.cc.

Referenced by analyze().

◆ testVecUniqInt_

const bool edmtest::ExistingDictionaryTestAnalyzer::testVecUniqInt_
private

Definition at line 95 of file ExistingDictionaryTestModules.cc.

Referenced by analyze().

◆ vecUniqIntProdToken_

const edm::EDGetTokenT<std::vector<std::unique_ptr<IntProduct> > > edmtest::ExistingDictionaryTestAnalyzer::vecUniqIntProdToken_
private

Definition at line 94 of file ExistingDictionaryTestModules.cc.

Referenced by analyze().

◆ vecUniqIntToken_

const edm::EDGetTokenT<std::vector<std::unique_ptr<int> > > edmtest::ExistingDictionaryTestAnalyzer::vecUniqIntToken_
private

Definition at line 93 of file ExistingDictionaryTestModules.cc.

Referenced by analyze().