Skip to content

Commit 0733ea5

Browse files
committed
Various code improvements
- Remove unused variables - corrected includes and forward declarations - pass only what is needed as function variables - made function names consistent - switched from typedef to using
1 parent bef892d commit 0733ea5

16 files changed

+27
-81
lines changed

FWCore/Framework/interface/GlobalSchedule.h

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#include "DataFormats/Provenance/interface/ModuleDescription.h"
55
#include "FWCore/Common/interface/FWCoreCommonFwd.h"
6-
#include "FWCore/Framework/interface/EventPrincipal.h"
76
#include "FWCore/Framework/interface/ExceptionActions.h"
87
#include "FWCore/Framework/interface/ExceptionHelpers.h"
98
#include "FWCore/Framework/interface/Frameworkfwd.h"
@@ -13,7 +12,6 @@
1312
#include "FWCore/Framework/interface/RunPrincipal.h"
1413
#include "FWCore/Framework/interface/WorkerManager.h"
1514
#include "FWCore/Framework/interface/maker/Worker.h"
16-
#include "FWCore/Framework/interface/SignallingProductRegistryFiller.h"
1715
#include "FWCore/MessageLogger/interface/ExceptionMessages.h"
1816
#include "FWCore/ServiceRegistry/interface/GlobalContext.h"
1917
#include "FWCore/ServiceRegistry/interface/ServiceRegistry.h"
@@ -46,24 +44,25 @@ namespace edm {
4644
class PathStatusInserter;
4745
class EndPathStatusInserter;
4846

47+
namespace maker {
48+
class ModuleHolder;
49+
}
50+
4951
class GlobalSchedule {
5052
public:
51-
typedef std::vector<std::string> vstring;
52-
typedef std::vector<Worker*> AllWorkers;
53-
typedef std::shared_ptr<Worker> WorkerPtr;
54-
typedef std::vector<Worker*> Workers;
53+
using vstring = std::vector<std::string>;
54+
using AllWorkers = std::vector<Worker*>;
55+
using WorkerPtr = std::shared_ptr<Worker>;
56+
using Wokers = std::vector<Worker*>;
5557

5658
GlobalSchedule(std::shared_ptr<TriggerResultInserter> inserter,
5759
std::vector<edm::propagate_const<std::shared_ptr<PathStatusInserter>>>& pathStatusInserters,
5860
std::vector<edm::propagate_const<std::shared_ptr<EndPathStatusInserter>>>& endPathStatusInserters,
5961
std::shared_ptr<ModuleRegistry> modReg,
6062
std::vector<edm::ModuleDescription const*> const& modulesToUse,
61-
ParameterSet& proc_pset,
62-
SignallingProductRegistryFiller& pregistry,
6363
PreallocationConfiguration const& prealloc,
6464
ExceptionToActionTable const& actions,
6565
std::shared_ptr<ActivityRegistry> areg,
66-
std::shared_ptr<ProcessConfiguration const> processConfiguration,
6766
ProcessContext const* processContext);
6867
GlobalSchedule(GlobalSchedule const&) = delete;
6968

FWCore/Framework/interface/ModuleRegistry.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ namespace edm {
3636
struct MakeModuleParams;
3737
class ModuleDescription;
3838
class PreallocationConfiguration;
39+
class SignallingProductRegistryFiller;
3940

4041
class ModuleRegistry {
4142
public:

FWCore/Framework/interface/Schedule.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ namespace edm {
306306
std::shared_ptr<ModuleRegistry const> moduleRegistrySharedPtr() const {
307307
return get_underlying_safe(moduleRegistry_);
308308
}
309-
std::shared_ptr<ModuleRegistry>& moduleRegistry() { return get_underlying_safe(moduleRegistry_); }
309+
std::shared_ptr<ModuleRegistry>& moduleRegistrySharedPtr() { return get_underlying_safe(moduleRegistry_); }
310310

311311
edm::propagate_const<std::shared_ptr<ModuleRegistry>> moduleRegistry_;
312312
edm::propagate_const<std::shared_ptr<TriggerResultInserter>> resultsInserter_;

FWCore/Framework/interface/StreamSchedule.h

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@
4848
The order of the paths from the input configuration is
4949
preserved in the main paths list.
5050
51-
------------------------
52-
53-
The StreamSchedule uses the TriggerNamesService to get the names of the
54-
trigger paths and end paths. When a TriggerResults object is created
55-
the results are stored in the same order as the trigger names from
56-
TriggerNamesService.
5751
5852
*/
5953

@@ -114,24 +108,22 @@ namespace edm {
114108
class TriggerResultInserter;
115109
class PathStatusInserter;
116110
class EndPathStatusInserter;
117-
class PreallocationConfiguration;
118-
class ConditionalTaskHelper;
119111

120-
namespace service {
121-
class TriggerNamesService;
112+
namespace maker {
113+
class ModuleHolder;
122114
}
123115

124116
class StreamSchedule {
125117
public:
126-
typedef std::vector<std::string> vstring;
127-
typedef std::vector<Path> TrigPaths;
128-
typedef std::shared_ptr<HLTGlobalStatus> TrigResPtr;
129-
typedef std::shared_ptr<HLTGlobalStatus const> TrigResConstPtr;
130-
typedef std::vector<Worker*> AllWorkers;
118+
using vstring = std::vector<std::string>;
119+
using TrigPaths = std::vector<Path>;
120+
using TrigResPtr = std::shared_ptr<HLTGlobalStatus>;
121+
using TrigResConstPtr = std::shared_ptr<HLTGlobalStatus const>;
122+
using AllWorkers = std::vector<Worker*>;
131123

132-
typedef std::vector<Worker*> Workers;
124+
using Workers = std::vector<Worker*>;
133125

134-
typedef std::vector<WorkerInPath> PathWorkers;
126+
using PathWorkers = std::vector<WorkerInPath>;
135127

136128
struct PathInfo {
137129
PathInfo(std::string name, std::vector<edm::ModuleInPath> modules, std::shared_ptr<PathStatusInserter> inserter)
@@ -155,11 +147,8 @@ namespace edm {
155147
std::vector<ModuleDescription const*> const& unscheduledModules,
156148
std::shared_ptr<TriggerResultInserter> inserter,
157149
std::shared_ptr<ModuleRegistry>,
158-
ParameterSet& proc_pset,
159-
PreallocationConfiguration const& prealloc,
160150
ExceptionToActionTable const& actions,
161151
std::shared_ptr<ActivityRegistry> areg,
162-
std::shared_ptr<ProcessConfiguration const> processConfiguration,
163152
StreamID streamID,
164153
ProcessContext const* processContext);
165154

FWCore/Framework/interface/WorkerManager.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@
1818
#include <vector>
1919

2020
namespace edm {
21-
class ExceptionCollector;
2221
class ExceptionToActionTable;
2322
class ModuleRegistry;
24-
class ModuleTypeResolverMaker;
25-
class PreallocationConfiguration;
2623
class Worker;
2724
namespace eventsetup {
2825
class ESRecordsToProductResolverIndices;

FWCore/Framework/interface/WorkerRegistry.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,7 @@ namespace edm {
2121
class Worker;
2222
class ActivityRegistry;
2323
class ModuleRegistry;
24-
class ModuleTypeResolverMaker;
25-
class ParameterSet;
2624
class ExceptionToActionTable;
27-
namespace maker {
28-
class ModuleHolder;
29-
}
30-
3125
/**
3226
\class WorkerRegistry WorkerRegistry.h "edm/WorkerRegistry.h"
3327

FWCore/Framework/interface/maker/ModuleHolder.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ namespace edm {
4141
class ProductResolverIndexAndSkipBit;
4242
class ProductRegistry;
4343
class ThinnedAssociationsHelper;
44-
44+
class ModuleConsumesInfo;
45+
class ModuleConsumesMinimalESInfo;
4546
namespace maker {
4647
class ModuleHolder {
4748
public:

FWCore/Framework/interface/maker/Worker.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ the worker is reset().
3131
#include "FWCore/Framework/interface/ModuleContextSentry.h"
3232
#include "FWCore/Framework/interface/OccurrenceTraits.h"
3333
#include "FWCore/Framework/interface/ProductResolverIndexAndSkipBit.h"
34-
#include "FWCore/Framework/interface/ModuleConsumesMinimalESInfo.h"
3534
#include "FWCore/Concurrency/interface/WaitingTask.h"
3635
#include "FWCore/Concurrency/interface/WaitingTaskHolder.h"
3736
#include "FWCore/Concurrency/interface/WaitingTaskList.h"
@@ -41,8 +40,6 @@ the worker is reset().
4140
#include "FWCore/ServiceRegistry/interface/InternalContext.h"
4241
#include "FWCore/ServiceRegistry/interface/ModuleCallingContext.h"
4342
#include "FWCore/ServiceRegistry/interface/ParentContext.h"
44-
#include "FWCore/ServiceRegistry/interface/PathContext.h"
45-
#include "FWCore/ServiceRegistry/interface/PlaceInPathContext.h"
4643
#include "FWCore/ServiceRegistry/interface/ServiceRegistry.h"
4744
#include "FWCore/ServiceRegistry/interface/ServiceRegistryfwd.h"
4845
#include "FWCore/Concurrency/interface/SerialTaskQueueChain.h"
@@ -75,10 +72,7 @@ namespace edm {
7572
class EventPrincipal;
7673
class EventSetupImpl;
7774
class EarlyDeleteHelper;
78-
class ProductResolverIndexHelper;
7975
class ProductResolverIndexAndSkipBit;
80-
class ProductRegistry;
81-
class ThinnedAssociationsHelper;
8276

8377
namespace workerhelper {
8478
template <typename O>

FWCore/Framework/src/GlobalSchedule.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
#include "FWCore/Framework/interface/ModuleRegistry.h"
88
#include "FWCore/Framework/interface/ModuleRegistryUtilities.h"
99

10-
#include "DataFormats/Provenance/interface/ProcessConfiguration.h"
11-
#include "DataFormats/Provenance/interface/ProductRegistry.h"
1210
#include "FWCore/ParameterSet/interface/ParameterSet.h"
1311
#include "FWCore/ParameterSet/interface/Registry.h"
1412
#include "FWCore/Utilities/interface/Algorithms.h"
@@ -34,12 +32,9 @@ namespace edm {
3432
std::vector<edm::propagate_const<std::shared_ptr<EndPathStatusInserter>>>& endPathStatusInserters,
3533
std::shared_ptr<ModuleRegistry> modReg,
3634
std::vector<edm::ModuleDescription const*> const& iModulesToUse,
37-
ParameterSet& proc_pset,
38-
SignallingProductRegistryFiller& pregistry,
3935
PreallocationConfiguration const& prealloc,
4036
ExceptionToActionTable const& actions,
4137
std::shared_ptr<ActivityRegistry> areg,
42-
std::shared_ptr<ProcessConfiguration const> processConfiguration,
4338
ProcessContext const* processContext)
4439
: actReg_(areg),
4540
processContext_(processContext),

FWCore/Framework/src/PathsAndConsumesOfModules.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "FWCore/Framework/interface/ModuleRegistry.h"
99
#include "FWCore/Framework/interface/ESModuleProducesInfo.h"
1010
#include "FWCore/Framework/interface/ESModuleConsumesMinimalInfo.h"
11+
#include "FWCore/Framework/interface/ModuleConsumesMinimalESInfo.h"
1112
#include "FWCore/Framework/interface/EventSetupRecordKey.h"
1213
#include "FWCore/ServiceRegistry/interface/ESModuleConsumesInfo.h"
1314
#include "FWCore/ServiceRegistry/interface/ModuleConsumesESInfo.h"

0 commit comments

Comments
 (0)