00001 /* 00002 * RunDataWriterAlg 00003 * 00004 * Algorithm which saves the run data information at the end of simulation runs. 00005 * 00006 * dandwyer@caltech.edu 2009/04/27 00007 */ 00008 00009 00010 #ifndef RUNDATAWRITERALG_H 00011 #define RUNDATAWRITERALG_H 00012 00013 00014 #include "GaudiAlg/GaudiAlgorithm.h" 00015 00016 class IDybStorageSvc; 00017 class IRunDataSvc; 00018 00019 class RunDataWriterAlg : public GaudiAlgorithm 00020 { 00021 00022 public: 00023 RunDataWriterAlg(const std::string& name, ISvcLocator* pSvcLocator); 00024 virtual ~RunDataWriterAlg(); 00025 00026 virtual StatusCode initialize(); 00027 virtual StatusCode execute(); 00028 virtual StatusCode finalize(); 00029 virtual StatusCode endRun(); 00030 00031 private: 00032 // Write run data to output file 00033 StatusCode writeDataToFile(); 00034 // Write run data to database 00035 StatusCode writeDataToDatabase(); 00036 00037 // Property WriteToFile - Write run data to output file? 00038 bool m_writeToFile; 00039 00040 // Property WriteToDatabase - Write run data to database? 00041 bool m_writeToDatabase; 00042 00043 // Property RunDataLocation - location for Run Data in file 00044 std::string m_runDataLocation; 00045 00046 // Handle for file storage service 00047 IDybStorageSvc* m_storageSvc; 00048 // Handle for run data service 00049 IRunDataSvc* m_runDataSvc; 00050 }; 00051 00052 #endif // RUNDATAWRITERALG_H