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)
 
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  :
34  proxies_{std::move(iProxies)}
35 {
36  //Deal with duplicates
37  std::set<eventsetup::EventSetupRecordKey> records;
38  for(auto const& p: proxies_) {
39  records.insert(p.recordKey_);
40  }
41  for(auto const&k: records) {
44  }
45 }
void usingRecordWithKey(const EventSetupRecordKey &)
std::vector< ESProduceEntry > proxies_
int k[5][pyjets_maxn]
def move(src, dest)
Definition: eostools.py:510
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 80 of file EventSetupTestHelper.cc.

References proxies_.

80  {
81  return proxies_[iIndex].proxy_;
82 }
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 48 of file EventSetupTestHelper.cc.

49  {
50 }
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 70 of file EventSetupTestHelper.cc.

References AlCaHLTBitMon_ParallelJobs::p, and proxies_.

71  {
72  for(auto const& p: proxies_) {
73  if(p.recordKey_ == iRecordKey) {
74  aProxyList.emplace_back(p.dataKey_,p.proxy_);
75  }
76  }
77 }
std::vector< ESProduceEntry > proxies_
void EventSetupTestHelper::resetAllProxies ( )

Definition at line 85 of file EventSetupTestHelper.cc.

References AlCaHLTBitMon_ParallelJobs::p, and proxies_.

85  {
86  for(auto const& p: proxies_) {
87  p.proxy_->invalidate();
88  }
89 }
std::vector< ESProduceEntry > proxies_
void EventSetupTestHelper::setIntervalFor ( const eventsetup::EventSetupRecordKey ,
const IOVSyncValue iSync,
ValidityInterval oIOV 
)
finalprotectedvirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 53 of file EventSetupTestHelper.cc.

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

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

Member Data Documentation

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