Skip to content

Commit 76e321a

Browse files
authored
Merge pull request #46204 from wddgit/esProductResolverRenaming
More of the DataProxy to ESProductResolver renaming
2 parents ef617d7 + 5e17b60 commit 76e321a

30 files changed

+187
-179
lines changed

FWCore/Concurrency/scripts/edmStreamStallGrapher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ def plotPerStreamAboveFirstAndPrepareStack(points, allStackTimes, ax, stream, he
603603
allStackTimes[color].extend(theTS*(nthreads-threadOffset))
604604

605605
#----------------------------------------------
606-
# The same ES module can have multiple Proxies running concurrently
606+
# The same ES module can have multiple Resolvers running concurrently
607607
# so we need to reference count the names of the active modules
608608
class RefCountSet(set):
609609
def __init__(self):

FWCore/Framework/interface/CallbackBase.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ namespace edm {
6868
class CallbackBase {
6969
public:
7070
CallbackBase(T* iProd, std::shared_ptr<TProduceFunc> iProduceFunc, unsigned int iID, const TDecorator& iDec)
71-
: proxyData_{},
71+
: resolverData_{},
7272
producer_(iProd),
7373
callingContext_(&iProd->description(), iID),
7474
produceFunction_(std::move(iProduceFunc)),
@@ -127,13 +127,13 @@ namespace edm {
127127
try {
128128
convertException::wrap([this, &serviceToken, &record, &eventSetupImpl, &produceFunctor] {
129129
ESModuleCallingContext const& context = callingContext_;
130-
auto proxies = getTokenIndices();
130+
auto resolvers = getTokenIndices();
131131
if (postMayGetResolvers_) {
132-
proxies = &((*postMayGetResolvers_).front());
132+
resolvers = &((*postMayGetResolvers_).front());
133133
}
134134
TRecord rec;
135135
ESParentContext pc{&context};
136-
rec.setImpl(record, transitionID(), proxies, eventSetupImpl, &pc);
136+
rec.setImpl(record, transitionID(), resolvers, eventSetupImpl, &pc);
137137
ServiceRegistry::Operate operate(serviceToken.lock());
138138
record->activityRegistry()->preESModuleSignal_.emit(record->key(), context);
139139
struct EndGuard {
@@ -202,12 +202,12 @@ namespace edm {
202202

203203
template <class DataT>
204204
void holdOntoPointer(DataT* iData) {
205-
proxyData_[produce::find_index<TReturn, DataT>::value] = iData;
205+
resolverData_[produce::find_index<TReturn, DataT>::value] = iData;
206206
}
207207

208208
template <class RemainingContainerT, class DataT, class ProductsT>
209209
void setData(ProductsT& iProducts) {
210-
DataT* temp = reinterpret_cast<DataT*>(proxyData_[produce::find_index<TReturn, DataT>::value]);
210+
DataT* temp = reinterpret_cast<DataT*>(resolverData_[produce::find_index<TReturn, DataT>::value]);
211211
if (nullptr != temp) {
212212
moveFromTo(iProducts, *temp);
213213
}
@@ -243,14 +243,14 @@ namespace edm {
243243

244244
void prefetchNeededDataAsync(WaitingTaskHolder task,
245245
EventSetupImpl const* iImpl,
246-
ESResolverIndex const* proxies,
246+
ESResolverIndex const* resolvers,
247247
ServiceToken const& token) const noexcept {
248248
auto recs = producer_->getTokenRecordIndices(id_);
249249
auto n = producer_->numberOfTokenIndices(id_);
250250
for (size_t i = 0; i != n; ++i) {
251251
auto rec = iImpl->findImpl(recs[i]);
252252
if (rec) {
253-
rec->prefetchAsync(task, proxies[i], iImpl, token, ESParentContext{&callingContext_});
253+
rec->prefetchAsync(task, resolvers[i], iImpl, token, ESParentContext{&callingContext_});
254254
}
255255
}
256256
}
@@ -264,7 +264,7 @@ namespace edm {
264264
return static_cast<bool>(postMayGetResolvers_);
265265
}
266266

267-
std::array<void*, produce::size<TReturn>::value> proxyData_;
267+
std::array<void*, produce::size<TReturn>::value> resolverData_;
268268
std::optional<std::vector<ESResolverIndex>> postMayGetResolvers_;
269269
propagate_const<T*> producer_;
270270
ESModuleCallingContext callingContext_;

FWCore/Framework/interface/CallbackExternalWork.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,13 @@ namespace edm {
172172
try {
173173
convertException::wrap([this, &holder, &serviceToken, &record, &eventSetupImpl] {
174174
ESModuleCallingContext const& context = Base::callingContext();
175-
auto proxies = Base::getTokenIndices();
175+
auto resolvers = Base::getTokenIndices();
176176
if (Base::postMayGetResolvers()) {
177-
proxies = &((*Base::postMayGetResolvers()).front());
177+
resolvers = &((*Base::postMayGetResolvers()).front());
178178
}
179179
TRecord rec;
180180
edm::ESParentContext pc{&context};
181-
rec.setImpl(record, Base::transitionID(), proxies, eventSetupImpl, &pc);
181+
rec.setImpl(record, Base::transitionID(), resolvers, eventSetupImpl, &pc);
182182
ServiceRegistry::Operate operate(serviceToken.lock());
183183
record->activityRegistry()->preESModuleAcquireSignal_.emit(record->key(), context);
184184
struct EndGuard {

FWCore/Framework/interface/ESProducer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
set at run-time instead of compile time can be obtained by inheriting from ESProductResolverFactoryProducer instead.)
1717
1818
If only one algorithm is being encapsulated then the user needs to
19-
1) add a method name 'produce' to the class. The 'produce' takes as its argument a const reference
19+
1) add a method named 'produce' to the class. The 'produce' takes as its argument a const reference
2020
to the record that is to hold the data item being produced. If only one data item is being produced,
2121
the 'produce' method must return either an 'std::unique_ptr' or 'std::shared_ptr' to the object being
2222
produced. (The choice depends on if the EventSetup or the ESProducer is managing the lifetime of
23-
the object). If multiple items are being Produced they the 'produce' method must return an
23+
the object). If multiple items are being Produced then the 'produce' method must return an
2424
ESProducts<> object which holds all of the items.
2525
2) add 'setWhatProduced(this);' to their classes constructor
2626

FWCore/Framework/interface/ESProductResolver.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
// -*- C++ -*-
12
#ifndef FWCore_Framework_ESProductResolver_h
23
#define FWCore_Framework_ESProductResolver_h
3-
// -*- C++ -*-
44
//
55
// Package: Framework
66
// Class : ESProductResolver
77
//
88
/**\class edm::eventsetup::ESProductResolver
99
10-
Description: Base class for data Proxies held by a EventSetupRecord
10+
Description: Base class for product resolvers held by a EventSetupRecord
1111
1212
Usage:
1313
This class defines the interface used to handle retrieving data from an

FWCore/Framework/interface/ESProductResolverFactoryProducer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1+
// -*- C++ -*-
12
#ifndef Framework_ESProductResolverFactoryProducer_h
23
#define Framework_ESProductResolverFactoryProducer_h
3-
// -*- C++ -*-
44
//
55
// Package: Framework
66
// Class : ESProductResolverFactoryProducer
77
//
8-
/**\class ESProductResolverFactoryProducer ESProductResolverFactoryProducer.h FWCore/Framework/interface/ESProductResolverFactoryProducer.h
8+
/**\class edm::ESProductResolverFactoryProducer
99
10-
Description: An EventSetup algorithmic Provider that manages Factories of Proxies
10+
Description: An EventSetup algorithmic Provider that manages Factories of Resolvers
1111
1212
Usage:
1313
This class is used when the algorithms in the EventSetup that are to be run on demand are encapsulated
1414
in edm::eventsetup::ProductResolvers's. This 'design pattern' is more flexible than having the algorithm embedded
1515
directly in the Provider (see ESProducer for such an implemenation).
1616
1717
Users inherit from this class and then call the 'registerFactory' method in their class' constructor
18-
in order to get their Proxies registered. For most users, the already available templated Factory classes
18+
in order to get their Resolvers registered. For most users, the already available templated Factory classes
1919
should suffice and therefore they should not need to create their own Factories.
2020
2121
Example: register one Factory that creates a resolver that takes no arguments

FWCore/Framework/interface/ESProductResolverProvider.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
// -*- C++ -*-
12
#ifndef FWCore_Framework_ESProductResolverProvider_h
23
#define FWCore_Framework_ESProductResolverProvider_h
3-
// -*- C++ -*-
44
//
55
// Package: Framework
66
// Class : ESProductResolverProvider
@@ -22,7 +22,7 @@
2222
CondDBESSource is the main such class) then the registerResolvers
2323
function must be overridden. For the same EventSetupRecordKey, the
2424
vector returned should contain the same DataKeys in the same order for
25-
all the different iovIndexes. DataProxies associated with the same
25+
all the different iovIndexes. ESProductResolver's associated with the same
2626
EventSetupRecordKey should have caches that use different memory, but
2727
other than that they should also be the same.
2828
@@ -33,7 +33,7 @@
3333
All other functions are intended for use by the Framework or tests
3434
and should not be called in classes derived from ESProductResolverProvider.
3535
They are primarily used when initializing the EventSetup system
36-
so the DataProxies are available for use when needed.
36+
so the ESProductResolver's are available for use when needed.
3737
*/
3838
//
3939
// Author: Chris Jones

FWCore/Framework/interface/ESProductResolverTemplate.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
// -*- C++ -*-
12
#ifndef FWCore_Framework_ESProductResolverTemplate_h
23
#define FWCore_Framework_ESProductResolverTemplate_h
3-
// -*- C++ -*-
44
//
55
// Package: Framework
66
// Class : ESProductResolverTemplate
77
//
8-
/**\class ESProductResolverTemplate ESProductResolverTemplate.h FWCore/Framework/interface/ESProductResolverTemplate.h
8+
/**\class edm::eventsetup::ESProductResolverTemplate
99
10-
Description: A ESProductResolver base class which allows one to write type-safe proxies
10+
Description: A ESProductResolver base class which allows one to write type-safe resolvers
1111
1212
Note that ESProductResolver types that inherit from this are not allowed
1313
to get data from the EventSetup (they cannot consume anything).

FWCore/Framework/interface/ESSourceConcurrentProductResolverTemplate.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
// -*- C++ -*-
12
#ifndef FWCore_Framework_ESSourceConcurrentESProductResolverTemplate_h
23
#define FWCore_Framework_ESSourceConcurrentESProductResolverTemplate_h
3-
// -*- C++ -*-
44
//
55
// Package: FWCore/Framework
66
// Class : ESSourceConcurrentESProductResolverTemplate
77
//
8-
/**\class ESSourceConcurrentESProductResolverTemplate ESSourceConcurrentESProductResolverTemplate.h "FWCore/Framework/interface/ESSourceConcurrentESProductResolverTemplate.h"
8+
/**\class edm::eventsetup::ESSourceConcurrentESProductResolverTemplate
99
10-
Description: An ESSource specific ESProductResolver which is type safe and can run concurrently with other DataProxies from the same ESSource.
10+
Description: An ESSource specific ESProductResolver which is type safe and can run concurrently with other ESProductResolvers from the same ESSource.
1111
1212
Usage:
1313
Inherit from this class and override

FWCore/Framework/interface/ESSourceProductResolverBase.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1+
// -*- C++ -*-
12
#ifndef FWCore_Framework_ESSourceProductResolverBase_h
23
#define FWCore_Framework_ESSourceProductResolverBase_h
3-
// -*- C++ -*-
44
//
55
// Package: FWCore/Framework
66
// Class : ESSourceProductResolverBase
77
//
8-
/**\class ESSourceProductResolverBase ESSourceProductResolverBase.h "FWCore/Framework/interface/ESSourceProductResolverBase.h"
8+
/**\class edm::eventsetup::ESSourceProductResolverBase
99
10-
Description: Base class for DataProxies for ESSources that can be specialized based on concurrency needs
10+
Description: Base class for ESProductResolvers for ESSources that can be specialized based on concurrency needs
1111
1212
Usage:
13-
The ESSourceProductResolverBase provides the bases for DataProxies needed for ESSources. It allows customization of synchronization needs via the use of template parameters.
13+
The ESSourceProductResolverBase provides the bases for ProductResolvers needed for ESSources.
14+
It allows customization of synchronization needs via the use of template parameters.
1415
1516
NOTE: if inheriting classes override `void invalidateCache()` they must be sure to call this classes
1617
implementation as part of the call.

0 commit comments

Comments
 (0)