/search.css" rel="stylesheet" type="text/css"/> /search.js">
00001 /* 00002 * JobInfoWriterAlg 00003 * 00004 * Algorithm which saves the job configuration information at the end 00005 * of the job. 00006 * 00007 * dandwyer@caltech.edu 2010/12/16 00008 */ 00009 00010 00011 #ifndef JOBINFOWRITERALG_H 00012 #define JOBINFOWRITERALG_H 00013 00014 00015 #include "GaudiAlg/GaudiAlgorithm.h" 00016 #include "GaudiKernel/IIncidentListener.h" 00017 00018 class IDybStorageSvc; 00019 class IJobInfoSvc; 00020 class IIncidentSvc; 00021 00022 class JobInfoWriterAlg : public GaudiAlgorithm, 00023 virtual public IIncidentListener 00024 { 00025 00026 public: 00027 JobInfoWriterAlg(const std::string& name, ISvcLocator* pSvcLocator); 00028 virtual ~JobInfoWriterAlg(); 00029 00030 virtual StatusCode initialize(); 00031 virtual StatusCode execute(); 00032 virtual StatusCode finalize(); 00033 virtual StatusCode endRun(); 00034 00035 // IncidentListener 00036 virtual void handle(const Incident& incident); 00037 00038 private: 00039 // Write job info to output file 00040 StatusCode writeDataToFile(); 00041 // Write job info to database 00042 StatusCode writeDataToDatabase(); 00043 00044 // Property WriteToFile - Write job info to output file? 00045 bool m_writeToFile; 00046 00047 // Property WriteToDatabase - Write job info to database? 00048 bool m_writeToDatabase; 00049 00050 // Property JobInfoLocation - location for job info in file 00051 std::string m_jobInfoLocation; 00052 00053 // Handle for file storage service 00054 IDybStorageSvc* m_storageSvc; 00055 // Handle for job info service 00056 IJobInfoSvc* m_jobInfoSvc; 00057 00058 IIncidentSvc* m_incsvc; 00059 }; 00060 00061 #endif // JOBINFOWRITERALG_H