CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
edmtest::TestESSourceTestProxy Class Reference
Inheritance diagram for edmtest::TestESSourceTestProxy:
edm::eventsetup::ESSourceDataProxyNonConcurrentBase edm::eventsetup::ESSourceDataProxyBase edm::eventsetup::DataProxy

Public Member Functions

 TestESSourceTestProxy (TestESSource *testESSource)
 
- Public Member Functions inherited from edm::eventsetup::ESSourceDataProxyNonConcurrentBase
 ESSourceDataProxyNonConcurrentBase (edm::SerialTaskQueue *iQueue, std::mutex *iMutex)
 
std::mutex * mutex () const
 
edm::SerialTaskQueuequeue () const
 
- Public Member Functions inherited from edm::eventsetup::ESSourceDataProxyBase
 ESSourceDataProxyBase ()
 
- 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
 
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 initializeForNewIOV () override
 
void prefetch (edm::eventsetup::DataKey const &, edm::EventSetupRecordDetails) override
 

Private Attributes

IOVTestInfo iovTestInfo_
 
TestESSourcetestESSource_
 

Additional Inherited Members

- Protected Member Functions inherited from edm::eventsetup::ESSourceDataProxyBase
void invalidateCache () override
 
void invalidateTransientCache () override
 
template<typename ASYNC , typename GUARD >
void prefetchAsyncImplTemplate (ASYNC iAsync, GUARD iGuardFactory, edm::WaitingTaskHolder iTask, edm::eventsetup::EventSetupRecordImpl const &iRecord, edm::eventsetup::DataKey const &iKey, edm::ESParentContext const &iContext)
 
- Protected Member Functions inherited from edm::eventsetup::DataProxy
void clearCacheIsValid ()
 

Detailed Description

Definition at line 43 of file TestESSource.cc.

Constructor & Destructor Documentation

◆ TestESSourceTestProxy()

edmtest::TestESSourceTestProxy::TestESSourceTestProxy ( TestESSource testESSource)

Member Function Documentation

◆ getAfterPrefetchImpl()

void const * edmtest::TestESSourceTestProxy::getAfterPrefetchImpl ( ) const
overrideprivatevirtual

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

Implements edm::eventsetup::DataProxy.

Definition at line 112 of file TestESSource.cc.

References iovTestInfo_.

112 { return &iovTestInfo_; }

◆ initializeForNewIOV()

void edmtest::TestESSourceTestProxy::initializeForNewIOV ( )
overrideprivatevirtual

Reimplemented from edm::eventsetup::DataProxy.

Definition at line 114 of file TestESSource.cc.

References edmtest::TestESSource::count2_, and testESSource_.

114  {
115  edm::LogAbsolute("TestESSourceTestProxy::initializeForNewIOV") << "TestESSourceTestProxy::initializeForNewIOV";
117  }
Log< level::System, true > LogAbsolute
std::atomic< unsigned int > count2_
Definition: TestESSource.cc:68

◆ prefetch()

void edmtest::TestESSourceTestProxy::prefetch ( edm::eventsetup::DataKey const &  iKey,
edm::EventSetupRecordDetails  iRecord 
)
overrideprivatevirtual

Implements edm::eventsetup::ESSourceDataProxyBase.

Definition at line 90 of file TestESSource.cc.

References edmtest::TestESSource::busyWait(), edm::EventSetupRecordDetails::cacheIdentifier(), edmtest::IOVTestInfo::cacheIdentifier_, edmtest::TestESSource::count_, Exception, edm::ValidityInterval::first(), edmtest::IOVTestInfo::iovEndLumi_, edm::EventSetupRecordDetails::iovIndex(), edmtest::IOVTestInfo::iovIndex_, edmtest::IOVTestInfo::iovStartLumi_, iovTestInfo_, edm::ValidityInterval::last(), edm::IOVSyncValue::luminosityBlockNumber(), testESSource_, and edm::EventSetupRecordDetails::validityInterval().

90  {
92  if (testESSource_->count_.load() > 1) {
93  throw cms::Exception("TestFailure") << "TestESSourceTestProxy::getImpl,"
94  << " functions in mutex should not run concurrently";
95  }
96  testESSource_->busyWait("getImpl");
97 
99  edm::LogAbsolute("TestESSourceTestProxy")
100  << "TestESSoureTestProxy::getImpl startIOV = " << iov.first().luminosityBlockNumber()
101  << " endIOV = " << iov.last().luminosityBlockNumber() << " IOV index = " << iRecord.iovIndex()
102  << " cache identifier = " << iRecord.cacheIdentifier();
103 
106  iovTestInfo_.iovIndex_ = iRecord.iovIndex();
108 
110  }
const IOVSyncValue & last() const
LuminosityBlockNumber_t luminosityBlockNumber() const
Definition: IOVSyncValue.h:41
const IOVSyncValue & first() const
unsigned int iovEndLumi_
Definition: IOVTestInfo.h:24
unsigned int iovIndex_
Definition: IOVTestInfo.h:25
unsigned long long cacheIdentifier() const
ValidityInterval validityInterval() const
std::atomic< unsigned int > count_
Definition: TestESSource.cc:66
unsigned int iovStartLumi_
Definition: IOVTestInfo.h:22
void busyWait(char const *msg) const
unsigned long long cacheIdentifier_
Definition: IOVTestInfo.h:26
Log< level::System, true > LogAbsolute

Member Data Documentation

◆ iovTestInfo_

IOVTestInfo edmtest::TestESSourceTestProxy::iovTestInfo_
private

Definition at line 52 of file TestESSource.cc.

Referenced by getAfterPrefetchImpl(), and prefetch().

◆ testESSource_

TestESSource* edmtest::TestESSourceTestProxy::testESSource_
private

Definition at line 53 of file TestESSource.cc.

Referenced by initializeForNewIOV(), and prefetch().