/search.css" rel="stylesheet" type="text/css"/> /search.js">
00001 #ifndef JOBINFOSVC_JOBINFOSVC_H 00002 #define JOBINFOSVC_JOBINFOSVC_H 1 00003 00004 #include "DataSvc/IJobInfoSvc.h" 00005 00006 #include "GaudiKernel/Service.h" 00007 00008 #include <string> 00009 #include <vector> 00010 #include <map> 00011 00012 class JobInfoSvc : 00013 public Service, 00014 virtual public IJobInfoSvc { 00015 00016 public: 00018 JobInfoSvc(const std::string& name, 00019 ISvcLocator* svc); 00020 00021 virtual StatusCode initialize(); 00022 virtual StatusCode finalize(); 00023 00025 00026 virtual const DayaBay::JobInfo* currentJobInfo(); 00028 virtual const DayaBay::JobInfo* jobInfo(const DayaBay::JobId& jobId); 00030 virtual StatusCode setJobInfo(const DayaBay::JobInfo& jobInfo); 00032 virtual const std::vector<DayaBay::JobInfo*>& cachedJobInfo(); 00033 00035 virtual StatusCode queryInterface(const InterfaceID& id, 00036 void** interface ); 00037 00038 private: 00039 StatusCode readDataFromDatabase(const DayaBay::JobId& jobId); 00040 StatusCode readDataFromFile(); 00041 00042 // Property: Load job info from the current input file? 00043 bool m_readFromFile; 00044 00045 // Property: Load job info from the Database? 00046 bool m_readFromDatabase; 00047 00048 // Property: Path for job info if reading from file? 00049 std::string m_jobInfoLocation; 00050 00051 // Internal cached list of job info objects 00052 std::vector<DayaBay::JobInfo*> m_jobInfoList; 00053 00054 // Internal handle to current job info 00055 DayaBay::JobInfo* m_currentJobInfo; 00056 00057 // Keep tack of whether job info has been loaded from file 00058 bool m_fileIsInitialized; 00059 00060 // Property JobId: Specify the current job ID 00061 // (Used by nuwa.py to initialize job information) 00062 std::string m_jobIdString; 00063 00064 // Current Job Id 00065 DayaBay::JobId m_jobId; 00066 00067 // Property JobConfig: Specify list of current job configuration parameters 00068 // (Used by nuwa.py to initialize job information) 00069 std::map<std::string, std::string> m_jobConfig; 00070 00071 }; 00072 00073 #endif /* JOBINFOSVC_JOBINFOSVC_H */