CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
edm::test::EventSetupTestHelper Class Reference

#include <EventSetupTestHelper.h>

Inheritance diagram for edm::test::EventSetupTestHelper:
edm::eventsetup::DataProxyProvider edm::EventSetupRecordIntervalFinder

Public Member Functions

 EventSetupTestHelper (std::vector< ESProduceEntry >)
 
std::shared_ptr< eventsetup::DataProxygetProxy (unsigned int index)
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) final
 called when a new interval of validity occurs for iRecordType More...
 
void resetAllProxies ()
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
virtual void updateLookup (ESRecordsToProxyIndices const &)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Protected Member Functions

void registerProxies (const eventsetup::EventSetupRecordKey &iRecordKey, KeyedProxies &aProxyList) final
 
void setIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &, ValidityInterval &) final
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Private Member Functions

 EventSetupTestHelper (const EventSetupTestHelper &)=delete
 
const EventSetupTestHelperoperator= (const EventSetupTestHelper &)=delete
 

Private Attributes

std::vector< ESProduceEntryproxies_
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 34 of file EventSetupTestHelper.h.

Constructor & Destructor Documentation

EventSetupTestHelper::EventSetupTestHelper ( std::vector< ESProduceEntry iProxies)

Definition at line 33 of file EventSetupTestHelper.cc.

References edm::EventSetupRecordIntervalFinder::findingRecordWithKey(), gen::k, eostools::move(), AlCaHLTBitMon_ParallelJobs::p, proxies_, and edm::eventsetup::DataProxyProvider::usingRecordWithKey().

33  : proxies_{std::move(iProxies)} {
34  //Deal with duplicates
35  std::set<eventsetup::EventSetupRecordKey> records;
36  for (auto const& p : proxies_) {
37  records.insert(p.recordKey_);
38  }
39  for (auto const& k : records) {
42  }
43  }
void usingRecordWithKey(const EventSetupRecordKey &)
std::vector< ESProduceEntry > proxies_
int k[5][pyjets_maxn]
def move(src, dest)
Definition: eostools.py:511
void findingRecordWithKey(const eventsetup::EventSetupRecordKey &)
edm::test::EventSetupTestHelper::EventSetupTestHelper ( const EventSetupTestHelper )
privatedelete

Member Function Documentation

std::shared_ptr< eventsetup::DataProxy > EventSetupTestHelper::getProxy ( unsigned int  index)

Definition at line 72 of file EventSetupTestHelper.cc.

References proxies_.

72  {
73  return proxies_[iIndex].proxy_;
74  }
std::vector< ESProduceEntry > proxies_
void EventSetupTestHelper::newInterval ( const eventsetup::EventSetupRecordKey iRecordType,
const ValidityInterval iInterval 
)
finalvirtual

called when a new interval of validity occurs for iRecordType

Implements edm::eventsetup::DataProxyProvider.

Definition at line 45 of file EventSetupTestHelper.cc.

46  {}
const EventSetupTestHelper& edm::test::EventSetupTestHelper::operator= ( const EventSetupTestHelper )
privatedelete
void EventSetupTestHelper::registerProxies ( const eventsetup::EventSetupRecordKey iRecordKey,
KeyedProxies aProxyList 
)
finalprotectedvirtual

Implements edm::eventsetup::DataProxyProvider.

Definition at line 63 of file EventSetupTestHelper.cc.

References AlCaHLTBitMon_ParallelJobs::p, and proxies_.

64  {
65  for (auto const& p : proxies_) {
66  if (p.recordKey_ == iRecordKey) {
67  aProxyList.emplace_back(p.dataKey_, p.proxy_);
68  }
69  }
70  }
std::vector< ESProduceEntry > proxies_
void EventSetupTestHelper::resetAllProxies ( )

Definition at line 76 of file EventSetupTestHelper.cc.

References AlCaHLTBitMon_ParallelJobs::p, and proxies_.

76  {
77  for (auto const& p : proxies_) {
78  p.proxy_->invalidate();
79  }
80  }
std::vector< ESProduceEntry > proxies_
void EventSetupTestHelper::setIntervalFor ( const eventsetup::EventSetupRecordKey ,
const IOVSyncValue iSync,
ValidityInterval oIOV 
)
finalprotectedvirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 48 of file EventSetupTestHelper.cc.

References edm::EventID::event(), edm::IOVSyncValue::eventID(), edm::EventID::luminosityBlock(), edm::IOVSyncValue::luminosityBlockNumber(), and edm::EventID::run().

50  {
51  if (iSync.luminosityBlockNumber() == 0) {
52  //make valid through first run
53  oIOV = ValidityInterval(iSync, IOVSyncValue(EventID(iSync.eventID().run(), 1, 1)));
54  } else if (iSync.eventID().event() == 0) {
55  oIOV =
56  ValidityInterval(iSync, IOVSyncValue(EventID(iSync.eventID().run(), iSync.eventID().luminosityBlock(), 1)));
57  } else {
58  //Make valid for only this point
59  oIOV = ValidityInterval(iSync, iSync);
60  }
61  }
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19

Member Data Documentation

std::vector<ESProduceEntry> edm::test::EventSetupTestHelper::proxies_
private