CMS 3D CMS Logo

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

Public Member Functions

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

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::DataProxyTemplate< ESTestRecordJ, ESTestDataJ >
typedef ESTestRecordJ record_type
 
typedef ESTestDataJ value_type
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyTemplate< ESTestRecordJ, ESTestDataJ >
void invalidateCache () override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxy
void clearCacheIsValid ()
 
virtual void invalidateTransientCache ()
 

Detailed Description

Definition at line 284 of file ESTestProducers.cc.

Constructor & Destructor Documentation

◆ TestDataProxyTemplateJ()

edmtest::TestDataProxyTemplateJ::TestDataProxyTemplateJ ( 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::TestDataProxyTemplateJ::getAfterPrefetchImpl ( ) const
inlineoverrideprivatevirtual

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

Implements edm::eventsetup::DataProxy.

Definition at line 303 of file ESTestProducers.cc.

References testDataJ_.

303 { return &testDataJ_; }

◆ invalidateCache()

void edmtest::TestDataProxyTemplateJ::invalidateCache ( )
inlineoverrideprivatevirtual

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

Implements edm::eventsetup::DataProxy.

Definition at line 302 of file ESTestProducers.cc.

302 {}

◆ make()

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

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

Definition at line 290 of file ESTestProducers.cc.

References edm::eventsetup::EventSetupRecord::cacheIdentifier(), Exception, expectedCacheIds_, index_, AlCaHarvesting_cff::record, findQualityFiles::size, 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") << "TestDataProxyTemplateJ::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::TestDataProxyTemplateJ::expectedCacheIds_
private

Definition at line 306 of file ESTestProducers.cc.

Referenced by make().

◆ index_

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

Definition at line 307 of file ESTestProducers.cc.

Referenced by make().

◆ testDataJ_

ESTestDataJ edmtest::TestDataProxyTemplateJ::testDataJ_
private

Definition at line 305 of file ESTestProducers.cc.

Referenced by getAfterPrefetchImpl(), and make().