FWCore
Services
src
JobReportService.cc
Go to the documentation of this file.
1
2
// -*- C++ -*-
3
//
4
// Package: Services
5
// Class : JobReport
6
//
7
//
8
// Original Author: Marc Paterno
9
//
10
11
#include "
FWCore/Services/src/JobReportService.h
"
12
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
13
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
14
15
namespace
edm
{
16
namespace
service
{
17
18
JobReportService::~JobReportService
() {}
19
20
JobReportService::JobReportService
(
ParameterSet
const
&,
ActivityRegistry
& reg) :
JobReport
() {
21
reg.
watchPostEndJob
(
this
, &
JobReportService::postEndJob
);
22
reg.
watchJobFailure
(
this
, &
JobReportService::frameworkShutdownOnFailure
);
23
24
// We don't handle PreProcessEvent, because we have to know *which
25
// input file* was the event read from. Only the InputSource that
26
// did the reading knows this.
27
}
28
29
void
JobReportService::postEndJob
() {
30
// This will be called at end-of-job (obviously).
31
// Dump information to the MessageLogger's JobSummary.
32
33
// ... not yet implemented ...
34
35
// Maybe we should have a member function called from both
36
// postEndJob() and frameworkShutdownOnFailure(), so that common
37
// elements are reported through common code.
38
39
//
40
// Any files that are still open should be flushed to the report
41
//
42
impl
()->flushFiles();
43
}
44
45
void
JobReportService::frameworkShutdownOnFailure
() {
46
// Dump information to the MessageLogger's JobSummary
47
// about the files that aren't already closed,
48
// and whatever summary information is wanted.
49
50
// Maybe we should have a member function called from both
51
// postEndJob() and frameworkShutdownOnFailure(), so that common
52
// elements are reported through common code.
53
impl
()->flushFiles();
54
}
55
56
void
JobReportService::fillDescriptions
(
ConfigurationDescriptions
& descriptions) {
57
ParameterSetDescription
desc;
58
desc.
setComment
(
"Enables job reports."
);
59
descriptions.
addDefault
(desc);
60
}
61
}
// namespace service
62
}
// namespace edm
ConfigurationDescriptions.h
edm::service::JobReportService::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
JobReportService.cc:56
service
Definition:
service.py:1
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::ActivityRegistry::watchJobFailure
void watchJobFailure(JobFailure::slot_type const &iSlot)
convenience function for attaching to signal
Definition:
ActivityRegistry.h:176
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
edm::service::JobReportService::JobReportService
JobReportService(ParameterSet const &ps, ActivityRegistry ®)
Definition:
JobReportService.cc:20
edm::service::JobReportService::frameworkShutdownOnFailure
void frameworkShutdownOnFailure()
Definition:
JobReportService.cc:45
edm::ActivityRegistry::watchPostEndJob
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
Definition:
ActivityRegistry.h:168
edm::ActivityRegistry
Definition:
ActivityRegistry.h:132
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
edm::service::JobReportService::~JobReportService
~JobReportService()
Definition:
JobReportService.cc:18
JobReportService.h
edm::ParameterSet
Definition:
ParameterSet.h:36
edm::ParameterSetDescription::setComment
void setComment(std::string const &value)
Definition:
ParameterSetDescription.cc:33
edm::JobReport::impl
edm::propagate_const< std::unique_ptr< JobReportImpl > > & impl()
Definition:
JobReport.h:427
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:99
edm::service::JobReportService::postEndJob
void postEndJob()
Definition:
JobReportService.cc:29
edm::JobReport
Definition:
JobReport.h:103
Generated for CMSSW Reference Manual by
1.8.16