CMS 3D CMS Logo

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

Public Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &c) override
 
 OtherThingRefComparer (edm::ParameterSet const &pset)
 
- Public Member Functions inherited from edm::stream::EDAnalyzer<>
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
 EDAnalyzerBase (const EDAnalyzerBase &)=delete
 
ModuleDescription const & moduleDescription () const
 
const EDAnalyzerBaseoperator= (const EDAnalyzerBase &)=delete
 
 ~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::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

edm::EDGetTokenT< OtherThingCollection > token1_
 
edm::EDGetTokenT< OtherThingCollection > token2_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase 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 16 of file OtherThingRefComparer.cc.

Constructor & Destructor Documentation

◆ OtherThingRefComparer()

edmtest::OtherThingRefComparer::OtherThingRefComparer ( edm::ParameterSet const &  pset)
explicit

Definition at line 29 of file OtherThingRefComparer.cc.

30  : token1_(consumes<OtherThingCollection>(pset.getUntrackedParameter<edm::InputTag>("first"))),
31  token2_(consumes<OtherThingCollection>(pset.getUntrackedParameter<edm::InputTag>("second"))) {}
edm::EDGetTokenT< OtherThingCollection > token1_
edm::EDGetTokenT< OtherThingCollection > token2_

Member Function Documentation

◆ analyze()

void edmtest::OtherThingRefComparer::analyze ( edm::Event const &  e,
edm::EventSetup const &  c 
)
overridevirtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 33 of file OtherThingRefComparer.cc.

References cms::cuda::assert(), MillePedeFileConverter_cfg::e, Exception, CastorDigiReco::o1, token1_, and token2_.

33  {
34  auto const& t1_ = e.get(token1_);
35  auto const& t2_ = e.get(token2_);
36 
37  assert(t1_.size() == t2_.size());
38 
39  {
40  auto iter2 = t2_.begin();
41  for (auto const& o1 : t1_) {
42  if (o1.ref != iter2->ref) {
43  throw cms::Exception("RefCompareFailure")
44  << "edm::Refs are not equal" << o1.ref.id() << " " << iter2->ref.id();
45  }
46  ++iter2;
47  }
48  }
49 
50  {
51  auto iter2 = t2_.begin();
52  for (auto const& o1 : t1_) {
53  if (o1.ptr != iter2->ptr) {
54  throw cms::Exception("RefCompareFailure")
55  << "edm::Ptrs are not equal" << o1.ptr.id() << " " << iter2->ptr.id();
56  }
57  ++iter2;
58  }
59  }
60  }
edm::EDGetTokenT< OtherThingCollection > token1_
assert(be >=bs)
edm::EDGetTokenT< OtherThingCollection > token2_

◆ fillDescriptions()

void edmtest::OtherThingRefComparer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 62 of file OtherThingRefComparer.cc.

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

62  {
64  desc.addUntracked<edm::InputTag>("first", edm::InputTag("OtherThing", "testUserTag"))
65  ->setComment("Where to get the first OtherThingCollection");
66  desc.addUntracked<edm::InputTag>("second", edm::InputTag("OtherThing", "testUserTag"))
67  ->setComment("Where to get the second OtherThingCollection");
68  descriptions.add("otherThingRefComparer", desc);
69  }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

◆ token1_

edm::EDGetTokenT<OtherThingCollection> edmtest::OtherThingRefComparer::token1_
private

Definition at line 25 of file OtherThingRefComparer.cc.

Referenced by analyze().

◆ token2_

edm::EDGetTokenT<OtherThingCollection> edmtest::OtherThingRefComparer::token2_
private

Definition at line 26 of file OtherThingRefComparer.cc.

Referenced by analyze().