Skip to content

Commit 7ae4f6e

Browse files
committed
Remove remnants of SubProcess from Service System
1 parent f556d3f commit 7ae4f6e

File tree

31 files changed

+22
-180
lines changed

31 files changed

+22
-180
lines changed

CommonTools/UtilAlgos/interface/TFileService.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,4 @@ class TFileService {
9191
void postModuleGlobal(edm::GlobalContext const &, edm::ModuleCallingContext const &);
9292
};
9393

94-
namespace edm {
95-
namespace service {
96-
// This function is needed so that there will be only one instance
97-
// of this service per process when "subprocesses" are being used.
98-
inline bool isProcessWideService(TFileService const *) { return true; }
99-
} // namespace service
100-
} // namespace edm
10194
#endif

FWCore/Framework/interface/ScheduleItems.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ namespace edm {
3838
ServiceToken initServices(std::vector<ParameterSet>& servicePSets,
3939
ParameterSet& processPSet,
4040
ServiceToken const& iToken,
41-
serviceregistry::ServiceLegacy iLegacy,
42-
bool associate);
41+
serviceregistry::ServiceLegacy iLegacy);
4342

4443
ServiceToken addTNS(ParameterSet const& parameterSet, ServiceToken const& token);
4544

FWCore/Framework/src/EventProcessor.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ namespace edm {
428428

429429
//initialize the services
430430
auto& serviceSets = processDesc->getServicesPSets();
431-
ServiceToken token = items.initServices(serviceSets, *parameterSet, iToken, iLegacy, true);
431+
ServiceToken token = items.initServices(serviceSets, *parameterSet, iToken, iLegacy);
432432
serviceToken_ = items.addTNS(*parameterSet, token);
433433

434434
//make the services available

FWCore/Framework/src/ScheduleItems.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@ namespace edm {
3636
ServiceToken ScheduleItems::initServices(std::vector<ParameterSet>& pServiceSets,
3737
ParameterSet& parameterSet,
3838
ServiceToken const& iToken,
39-
serviceregistry::ServiceLegacy iLegacy,
40-
bool associate) {
39+
serviceregistry::ServiceLegacy iLegacy) {
4140
//create the services
42-
ServiceToken token(ServiceRegistry::createSet(pServiceSets, iToken, iLegacy, associate));
41+
ServiceToken token(ServiceRegistry::createSet(pServiceSets, iToken, iLegacy));
4342

4443
//see if any of the Services have to have their PSets stored
4544
for (auto const& item : pServiceSets) {

FWCore/MessageService/plugins/MessageLogger.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,6 @@ namespace edm {
192192

193193
}; // MessageLogger
194194

195-
inline bool isProcessWideService(MessageLogger const*) { return true; }
196-
197195
} // namespace service
198196

199197
} // namespace edm

FWCore/ServiceRegistry/interface/ActivityRegistry.h

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,7 @@ to this file that go beyond the obvious cut and paste type of edits.
4545
reason to do otherwise, the recommended choice is following the pattern of
4646
Pre transitions forward and Post transitions in reverse. If you make another
4747
choice, please document your reasoning with comments in the code.
48-
3. The signal needs to be added to either connectGlobals or connectLocals
49-
in the ActivityRegistry.cc file, depending on whether a signal is seen
50-
by children or parents when there are SubProcesses. For example, source
51-
signals are only generated in the top level process and should be seen
52-
by all child SubProcesses so they are in connectGlobals. Most signals
53-
however belong in connectLocals. It does not really matter in jobs
54-
without at least one SubProcess.
48+
3. Each signal needs to be added to the connect function.
5549
4. Each signal also needs to be added in copySlotsFrom in
5650
ActivityRegistry.cc. Whether it uses copySlotsToFrom or
5751
copySlotsToFromReverse depends on the same ordering issue as the connect
@@ -1135,23 +1129,12 @@ namespace edm {
11351129
///forwards our signals to slots connected to iOther
11361130
void connect(ActivityRegistry& iOther);
11371131

1138-
///forwards our subprocess independent signals to slots connected to iOther
1139-
///forwards iOther's subprocess dependent signals to slots connected to this
1140-
void connectToSubProcess(ActivityRegistry& iOther);
1141-
11421132
///copy the slots from iOther and connect them directly to our own
11431133
/// this allows us to 'forward' signals more efficiently,
11441134
/// BUT if iOther gains new slots after this call, we will not see them
11451135
/// This is also careful to keep the order of the slots proper
11461136
/// for services.
11471137
void copySlotsFrom(ActivityRegistry& iOther);
1148-
1149-
private:
1150-
// forwards subprocess independent signals to slots connected to iOther
1151-
void connectGlobals(ActivityRegistry& iOther);
1152-
1153-
// forwards subprocess dependent signals to slots connected to iOther
1154-
void connectLocals(ActivityRegistry& iOther);
11551138
};
11561139
} // namespace edm
11571140
#undef AR_WATCH_USING_METHOD

FWCore/ServiceRegistry/interface/ProcessContext.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,11 @@ namespace edm {
3131
std::string const& processName() const { return processConfiguration_->processName(); }
3232
ParameterSetID const& parameterSetID() const { return processConfiguration_->parameterSetID(); }
3333
ProcessConfiguration const* processConfiguration() const { return processConfiguration_; }
34-
bool isSubProcess() const { return parentProcessContext_ != nullptr; }
35-
ProcessContext const& parentProcessContext() const;
3634

3735
void setProcessConfiguration(ProcessConfiguration const* processConfiguration);
38-
void setParentProcessContext(ProcessContext const* parentProcessContext);
3936

4037
private:
4138
ProcessConfiguration const* processConfiguration_;
42-
43-
// If this is a SubProcess this points to the parent process,
44-
// otherwise it is null.
45-
ProcessContext const* parentProcessContext_;
4639
};
4740

4841
std::ostream& operator<<(std::ostream&, ProcessContext const&);

FWCore/ServiceRegistry/interface/ServiceLegacy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
namespace edm {
2828
namespace serviceregistry {
29-
enum ServiceLegacy { kOverlapIsError, kTokenOverrides, kConfigurationOverrides };
29+
enum ServiceLegacy { kOverlapIsError, kTokenOverrides };
3030
}
3131
} // namespace edm
3232

FWCore/ServiceRegistry/interface/ServiceMaker.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
// -*- C++ -*-
12
#ifndef FWCore_ServiceRegistry_ServiceMaker_h
23
#define FWCore_ServiceRegistry_ServiceMaker_h
3-
// -*- C++ -*-
44
//
55
// Package: ServiceRegistry
66
// Class : ServiceMaker
77
//
8-
/**\class ServiceMaker ServiceMaker.h FWCore/ServiceRegistry/interface/ServiceMaker.h
8+
/**\class edm::serviceregistry::ServiceMaker
99
1010
Description: Used to make an instance of a Service
1111
@@ -86,10 +86,6 @@ namespace edm {
8686
bool saveConfiguration() const override {
8787
return ServiceMakerBase::testSaveConfiguration(static_cast<typename TMaker::concrete_t const*>(nullptr));
8888
}
89-
90-
bool processWideService() const override {
91-
return service::isProcessWideService(static_cast<typename TMaker::concrete_t const*>(nullptr));
92-
}
9389
};
9490
} // namespace serviceregistry
9591
} // namespace edm

FWCore/ServiceRegistry/interface/ServiceMakerBase.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
// -*- C++ -*-
12
#ifndef FWCore_ServiceRegistry_ServiceMakerBase_h
23
#define FWCore_ServiceRegistry_ServiceMakerBase_h
3-
// -*- C++ -*-
44
//
55
// Package: ServiceRegistry
66
// Class : ServiceMakerBase
77
//
8-
/**\class ServiceMakerBase ServiceMakerBase.h FWCore/ServiceRegistry/interface/ServiceMakerBase.h
8+
/**\class edm::serviceregistry::ServiceMakerBase
99
1010
Description: Base class for Service Makers
1111
@@ -25,10 +25,6 @@ namespace edm {
2525
class ParameterSet;
2626
class ActivityRegistry;
2727

28-
namespace service {
29-
inline bool isProcessWideService(void const* /*service*/) { return false; }
30-
} // namespace service
31-
3228
namespace serviceregistry {
3329
class SaveConfiguration;
3430
class ServiceWrapperBase;
@@ -46,8 +42,6 @@ namespace edm {
4642

4743
virtual bool make(ParameterSet const&, ActivityRegistry&, ServicesManager&) const = 0;
4844

49-
virtual bool processWideService() const = 0;
50-
5145
virtual bool saveConfiguration() const = 0;
5246

5347
// ---------- static member functions --------------------

0 commit comments

Comments
 (0)