CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
edmtest::TestESProductResolverTemplateJ Class Reference
Inheritance diagram for edmtest::TestESProductResolverTemplateJ:
edm::eventsetup::ESProductResolverTemplate< ESTestRecordJ, ESTestDataJ > edm::eventsetup::ESProductResolver

Public Member Functions

 TestESProductResolverTemplateJ (std::vector< unsigned int > const *expectedCacheIds)
 
- Public Member Functions inherited from edm::eventsetup::ESProductResolverTemplate< ESTestRecordJ, ESTestDataJ >
 ESProductResolverTemplate ()
 
void prefetchAsyncImpl (WaitingTaskHolder iTask, const EventSetupRecordImpl &iRecord, const DataKey &iKey, EventSetupImpl const *iEventSetupImpl, edm::ServiceToken const &iToken, edm::ESParentContext const &iParent) noexcept override
 
- Public Member Functions inherited from edm::eventsetup::ESProductResolver
bool cacheIsValid () const
 
 ESProductResolver ()
 
 ESProductResolver (ESProductResolver const &)=delete
 
void const * getAfterPrefetch (const EventSetupRecordImpl &iRecord, const DataKey &iKey, bool iTransiently) const
 
virtual void initializeForNewIOV ()
 
void invalidate ()
 
ESProductResolver const & operator= (ESProductResolver const &)=delete
 
void prefetchAsync (WaitingTaskHolder, EventSetupRecordImpl const &, DataKey const &, EventSetupImpl const *, ServiceToken const &, ESParentContext const &) const noexcept
 
ComponentDescription const * providerDescription () const
 returns the description of the ESProductResolverProvider which owns this Resolver More...
 
void resetIfTransient ()
 
void setProviderDescription (ComponentDescription const *iDesc)
 
virtual ~ESProductResolver ()
 

Private Member Functions

void const * getAfterPrefetchImpl () const override
 
void invalidateCache () override
 
const ESTestDataJmake (const ESTestRecordJ &record, const edm::eventsetup::DataKey &key) override
 

Private Attributes

std::vector< unsigned > const * expectedCacheIds_
 
unsigned int index_ = 0
 
ESTestDataJ testDataJ_
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::ESProductResolverTemplate< ESTestRecordJ, ESTestDataJ >
typedef ESTestRecordJ record_type
 
typedef ESTestDataJ value_type
 
- Protected Member Functions inherited from edm::eventsetup::ESProductResolverTemplate< ESTestRecordJ, ESTestDataJ >
void invalidateCache () override
 
- Protected Member Functions inherited from edm::eventsetup::ESProductResolver
void clearCacheIsValid ()
 
virtual void invalidateTransientCache ()
 

Detailed Description

Definition at line 284 of file ESTestProducers.cc.

Constructor & Destructor Documentation

◆ TestESProductResolverTemplateJ()

edmtest::TestESProductResolverTemplateJ::TestESProductResolverTemplateJ ( std::vector< unsigned int > const *  expectedCacheIds)
inline

Definition at line 286 of file ESTestProducers.cc.

287  : testDataJ_(1), expectedCacheIds_(expectedCacheIds) {}
std::vector< unsigned > const * expectedCacheIds_

Member Function Documentation

◆ getAfterPrefetchImpl()

void const* edmtest::TestESProductResolverTemplateJ::getAfterPrefetchImpl ( ) const
inlineoverrideprivatevirtual

used to retrieve the data from the implementation. The data is then cached locally.

Implements edm::eventsetup::ESProductResolver.

Definition at line 303 of file ESTestProducers.cc.

References testDataJ_.

◆ invalidateCache()

void edmtest::TestESProductResolverTemplateJ::invalidateCache ( )
inlineoverrideprivatevirtual

indicates that the Resolver should invalidate any cached information as that information has 'expired' (i.e. we have moved to a new IOV)

Implements edm::eventsetup::ESProductResolver.

Definition at line 302 of file ESTestProducers.cc.

302 {}

◆ make()

const ESTestDataJ* edmtest::TestESProductResolverTemplateJ::make ( const ESTestRecordJ record,
const edm::eventsetup::DataKey key 
)
inlineoverrideprivatevirtual

Implements edm::eventsetup::ESProductResolverTemplate< ESTestRecordJ, ESTestDataJ >.

Definition at line 290 of file ESTestProducers.cc.

References edm::eventsetup::EventSetupRecord::cacheIdentifier(), Exception, expectedCacheIds_, index_, AlCaHarvesting_cff::record, and testDataJ_.

290  {
291  ESTestRecordK recordK = record.getRecord<ESTestRecordK>();
292  // Note that this test only reliably works when running with a
293  // single IOV at a time and a single stream. This test module
294  // should not be configured with expected values in other cases.
295  if (index_ < expectedCacheIds_->size() && recordK.cacheIdentifier() != expectedCacheIds_->at(index_)) {
296  throw cms::Exception("TestError") << "TestESProductResolverTemplateJ::make, unexpected cacheIdentifier";
297  }
298  ++index_;
299  return &testDataJ_;
300  }
size
Write out results.
unsigned long long cacheIdentifier() const
std::vector< unsigned > const * expectedCacheIds_

Member Data Documentation

◆ expectedCacheIds_

std::vector<unsigned> const* edmtest::TestESProductResolverTemplateJ::expectedCacheIds_
private

Definition at line 306 of file ESTestProducers.cc.

Referenced by make().

◆ index_

unsigned int edmtest::TestESProductResolverTemplateJ::index_ = 0
private

Definition at line 307 of file ESTestProducers.cc.

Referenced by make().

◆ testDataJ_

ESTestDataJ edmtest::TestESProductResolverTemplateJ::testDataJ_
private

Definition at line 305 of file ESTestProducers.cc.

Referenced by getAfterPrefetchImpl(), and make().