Skip to content

Commit 8a2eff9

Browse files
authored
Merge pull request #49257 from Dr15Jones/moreTracerSignals
Added new signals to Tracer
2 parents 5f6ffc0 + 37a5e66 commit 8a2eff9

File tree

6 files changed

+113
-4
lines changed

6 files changed

+113
-4
lines changed

FWCore/Framework/src/Schedule.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -902,10 +902,12 @@ namespace edm {
902902
eventsetup::ESRecordsToProductResolverIndices const& iESIndices,
903903
ProcessBlockHelperBase const& processBlockHelperBase,
904904
std::string const& iProcessName) {
905-
preModulesInitializationFinalizedSignal_();
906-
auto post = [this](void*) { postModulesInitializationFinalizedSignal_(); };
907-
std::unique_ptr<void, decltype(post)> const postGuard(this, post);
908-
finishModulesInitialization(*moduleRegistry_, iRegistry, iESIndices, processBlockHelperBase, iProcessName);
905+
{
906+
preModulesInitializationFinalizedSignal_();
907+
auto post = [this](void*) { postModulesInitializationFinalizedSignal_(); };
908+
std::unique_ptr<void, decltype(post)> const postGuard(this, post);
909+
finishModulesInitialization(*moduleRegistry_, iRegistry, iESIndices, processBlockHelperBase, iProcessName);
910+
}
909911
globalSchedule_->beginJob(*moduleRegistry_);
910912
}
911913

FWCore/Framework/test/unit_test_outputs/test_deepCall_unscheduled.log

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
++ finished: construction of Services
2+
++ starting: construction of EventSetup modules
3+
++ finished: construction of EventSetup modules
14
++ starting: constructing source: EmptySource
25
++ finished: constructing source: EmptySource
36
++++ starting: constructing module with label 'TriggerResults' id = 1
@@ -16,7 +19,17 @@ Module type=IntProducer, Module label=one, Parameter Set ID=dd3aecb8f6531b74585c
1619
++++ finished: constructing module with label 'result2' id = 6
1720
++++ starting: constructing module with label 'result4' id = 7
1821
++++ finished: constructing module with label 'result4' id = 7
22+
++ starting: finalize Schedule
23+
++ finished: finalize Schedule
24+
++ starting: creation of Run, LuminosityBlock, and Event Principals
25+
++ finished: creation of Run, LuminosityBlock, and Event Principals
1926
++ preallocate: 1 concurrent runs, 1 concurrent luminosity sections, 1 streams
27+
++ starting: schedule consistency check
28+
++ finished: schedule consistency check
29+
++ starting: finalize EventSetup configuration
30+
++ finished: finalize EventSetup configuration
31+
++ starting: finalize EDModules' initialization
32+
++ finished: finalize EDModules' initialization
2033
++ starting: begin job
2134
++++ starting: begin job for module with label 'TriggerResults' id = 1
2235
++++ finished: begin job for module with label 'TriggerResults' id = 1

FWCore/Framework/test/unit_test_outputs/test_onPath_unscheduled.log

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
++ finished: construction of Services
2+
++ starting: construction of EventSetup modules
3+
++ finished: construction of EventSetup modules
14
++ starting: constructing source: EmptySource
25
++ finished: constructing source: EmptySource
36
++++ starting: constructing module with label 'TriggerResults' id = 1
@@ -12,7 +15,17 @@
1215
++++ finished: constructing module with label 'two' id = 5
1316
++++ starting: constructing module with label 'getTwo' id = 6
1417
++++ finished: constructing module with label 'getTwo' id = 6
18+
++ starting: finalize Schedule
19+
++ finished: finalize Schedule
20+
++ starting: creation of Run, LuminosityBlock, and Event Principals
21+
++ finished: creation of Run, LuminosityBlock, and Event Principals
1522
++ preallocate: 1 concurrent runs, 1 concurrent luminosity sections, 1 streams
23+
++ starting: schedule consistency check
24+
++ finished: schedule consistency check
25+
++ starting: finalize EventSetup configuration
26+
++ finished: finalize EventSetup configuration
27+
++ starting: finalize EDModules' initialization
28+
++ finished: finalize EDModules' initialization
1629
++ starting: begin job
1730
++++ starting: begin job for module with label 'TriggerResults' id = 1
1831
++++ finished: begin job for module with label 'TriggerResults' id = 1

FWCore/Services/plugins/Tracer.cc

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,63 @@ Tracer::Tracer(ParameterSet const& iPS, ActivityRegistry& iRegistry)
294294
for (std::string& label : iPS.getUntrackedParameter<std::vector<std::string>>("dumpContextForLabels"))
295295
dumpContextForLabels_.insert(std::move(label));
296296

297+
iRegistry.watchPostServicesConstruction([this]() {
298+
LogAbsolute out("Tracer");
299+
out << TimeStamper(printTimestamps_) << indention_ << " finished: construction of Services";
300+
});
301+
iRegistry.watchPreEventSetupModulesConstruction([this]() {
302+
LogAbsolute out("Tracer");
303+
out << TimeStamper(printTimestamps_) << indention_ << " starting: construction of EventSetup modules";
304+
});
305+
iRegistry.watchPostEventSetupModulesConstruction([this]() {
306+
LogAbsolute out("Tracer");
307+
out << TimeStamper(printTimestamps_) << indention_ << " finished: construction of EventSetup modules";
308+
});
309+
iRegistry.watchPreFinishSchedule([this]() {
310+
LogAbsolute out("Tracer");
311+
out << TimeStamper(printTimestamps_) << indention_ << " starting: finalize Schedule";
312+
});
313+
iRegistry.watchPostFinishSchedule([this]() {
314+
LogAbsolute out("Tracer");
315+
out << TimeStamper(printTimestamps_) << indention_ << " finished: finalize Schedule";
316+
});
317+
iRegistry.watchPrePrincipalsCreation([this]() {
318+
LogAbsolute out("Tracer");
319+
out << TimeStamper(printTimestamps_) << indention_
320+
<< " starting: creation of Run, LuminosityBlock, and Event Principals";
321+
});
322+
iRegistry.watchPostPrincipalsCreation([this]() {
323+
LogAbsolute out("Tracer");
324+
out << TimeStamper(printTimestamps_) << indention_
325+
<< " finished: creation of Run, LuminosityBlock, and Event Principals";
326+
});
327+
iRegistry.watchPreScheduleConsistencyCheck([this]() {
328+
LogAbsolute out("Tracer");
329+
out << TimeStamper(printTimestamps_) << indention_ << " starting: schedule consistency check";
330+
});
331+
iRegistry.watchPostScheduleConsistencyCheck([this]() {
332+
LogAbsolute out("Tracer");
333+
out << TimeStamper(printTimestamps_) << indention_ << " finished: schedule consistency check";
334+
});
335+
297336
iRegistry.watchPreallocate(this, &Tracer::preallocate);
337+
iRegistry.watchPreEventSetupConfigurationFinalized([this]() {
338+
LogAbsolute out("Tracer");
339+
out << TimeStamper(printTimestamps_) << indention_ << " starting: finalize EventSetup configuration";
340+
});
341+
iRegistry.watchPostEventSetupConfigurationFinalized([this]() {
342+
LogAbsolute out("Tracer");
343+
out << TimeStamper(printTimestamps_) << indention_ << " finished: finalize EventSetup configuration";
344+
});
298345

346+
iRegistry.watchPreModulesInitializationFinalized([this]() {
347+
LogAbsolute out("Tracer");
348+
out << TimeStamper(printTimestamps_) << indention_ << " starting: finalize EDModules' initialization";
349+
});
350+
iRegistry.watchPostModulesInitializationFinalized([this]() {
351+
LogAbsolute out("Tracer");
352+
out << TimeStamper(printTimestamps_) << indention_ << " finished: finalize EDModules' initialization";
353+
});
299354
iRegistry.watchPreBeginJob(this, &Tracer::preBeginJob);
300355
iRegistry.watchPostBeginJob(this, &Tracer::postBeginJob);
301356
iRegistry.watchPreEndJob(this, &Tracer::preEndJob);

IOPool/Tests/test/unit_test_outputs/testGetBy1.log

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
++ finished: construction of Services
2+
++ starting: construction of EventSetup modules
3+
++ finished: construction of EventSetup modules
14
++ starting: constructing source: IntSource
25
Module type=IntSource, Module label=source, Parameter Set ID=6f0b3d3a362a6270c801489bb066414a
36
++ finished: constructing source: IntSource
@@ -32,7 +35,17 @@ Module type=IntProducer, Module label=intProducerA, Parameter Set ID=56ea7c8bbb0
3235
++++ finished: constructing module with label 'intProducerU' id = 12
3336
++++ starting: constructing module with label 'intVectorProducer' id = 13
3437
++++ finished: constructing module with label 'intVectorProducer' id = 13
38+
++ starting: finalize Schedule
39+
++ finished: finalize Schedule
40+
++ starting: creation of Run, LuminosityBlock, and Event Principals
41+
++ finished: creation of Run, LuminosityBlock, and Event Principals
3542
++ preallocate: 1 concurrent runs, 1 concurrent luminosity sections, 1 streams
43+
++ starting: schedule consistency check
44+
++ finished: schedule consistency check
45+
++ starting: finalize EventSetup configuration
46+
++ finished: finalize EventSetup configuration
47+
++ starting: finalize EDModules' initialization
48+
++ finished: finalize EDModules' initialization
3649
++ starting: begin job
3750
++++ starting: begin job for module with label 'TriggerResults' id = 1
3851
++++ finished: begin job for module with label 'TriggerResults' id = 1

IOPool/Tests/test/unit_test_outputs/testGetBy2.log

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
++ finished: construction of Services
2+
++ starting: construction of EventSetup modules
3+
++ finished: construction of EventSetup modules
14
++ starting: constructing source: PoolSource
25
Module type=PoolSource, Module label=source, Parameter Set ID=e26370152bd22c8709bd3472a376861b
36
++++ starting: open input file: lfn = file:testGetBy1.root
@@ -18,7 +21,17 @@ Module type=IntProducer, Module label=intProducer, Parameter Set ID=b4b90439a301
1821
++++ finished: constructing module with label 'intProducerU' id = 5
1922
++++ starting: constructing module with label 'intVectorProducer' id = 6
2023
++++ finished: constructing module with label 'intVectorProducer' id = 6
24+
++ starting: finalize Schedule
25+
++ finished: finalize Schedule
26+
++ starting: creation of Run, LuminosityBlock, and Event Principals
27+
++ finished: creation of Run, LuminosityBlock, and Event Principals
2128
++ preallocate: 1 concurrent runs, 1 concurrent luminosity sections, 1 streams
29+
++ starting: schedule consistency check
30+
++ finished: schedule consistency check
31+
++ starting: finalize EventSetup configuration
32+
++ finished: finalize EventSetup configuration
33+
++ starting: finalize EDModules' initialization
34+
++ finished: finalize EDModules' initialization
2235
++ starting: begin job
2336
++++ starting: begin job for module with label 'TriggerResults' id = 1
2437
++++ finished: begin job for module with label 'TriggerResults' id = 1

0 commit comments

Comments
 (0)