00001 00002 // -*- C++ -*- 00003 // 00004 // Package: Services 00005 // Class : JobReport 00006 // 00007 // 00008 // Original Author: Marc Paterno 00009 // $Id: JobReportService.cc,v 1.1 2006/05/02 02:45:48 wmtan Exp $ 00010 // 00011 00012 00013 #include "FWCore/Services/src/JobReportService.h" 00014 00015 namespace edm { 00016 00017 namespace service { 00018 JobReportService::~JobReportService() {} 00019 00020 JobReportService::JobReportService(ParameterSet const& /*ps*/, 00021 ActivityRegistry& reg) : 00022 JobReport() { 00023 00024 reg.watchPostEndJob(this, &JobReportService::postEndJob); 00025 reg.watchJobFailure(this, &JobReportService::frameworkShutdownOnFailure); 00026 00027 // We don't handle PreProcessEvent, because we have to know *which 00028 // input file* was the event read from. Only the InputSource that 00029 // did the reading knows this. 00030 } 00031 00032 void 00033 JobReportService::postEndJob() { 00034 // This will be called at end-of-job (obviously). 00035 // Dump information to the MessageLogger's JobSummary. 00036 00037 // ... not yet implemented ... 00038 00039 // Maybe we should have a member function called from both 00040 // postEndJob() and frameworkShutdownOnFailure(), so that common 00041 // elements are reported through common code. 00042 00043 // 00044 // Any files that are still open should be flushed to the report 00045 // 00046 impl()->flushFiles(); 00047 00048 } 00049 00050 void 00051 JobReportService::frameworkShutdownOnFailure() { 00052 // Dump information to the MessageLogger's JobSummary 00053 // about the files that aren't already closed, 00054 // and whatever summary information is wanted. 00055 00056 // Maybe we should have a member function called from both 00057 // postEndJob() and frameworkShutdownOnFailure(), so that common 00058 // elements are reported through common code. 00059 impl()->flushFiles(); 00060 } 00061 } // namespace service 00062 } //namspace edm