00001 #ifndef DBUDAQFILEMODULE_H 00002 #define DBUDAQFILEMODULE_H 00003 00004 #ifndef __CINT__ 00005 00006 // $Id: DbuDaqFileModule.h,v 1.3 2005/06/15 17:20:51 rhatcher Exp $ 00007 // 00009 #ifndef JOBCMODULE_H 00010 #include "JobControl/JobCModule.h" 00011 #endif 00012 00013 #include "Validity/VldContext.h" 00014 class JobCommand; 00015 class MomNavigator; 00016 class RawRecord; 00017 class RawDataBlock; 00018 00019 class DbuRunSummary; 00020 class DbuDaqFileSummary; 00021 class DbuDaqConfigFilesText; 00022 00023 class RawConfigFilesBlock; 00024 00025 class DbiStatement; 00026 #include "DatabaseInterface/DbiSqlContext.h" 00027 00028 class DbuDaqFileModule : public JobCModule 00029 { 00030 00031 public: 00032 DbuDaqFileModule(); 00033 ~DbuDaqFileModule(); 00034 00035 JobCResult Ana(const MomNavigator *mom); 00036 void BeginJob(); 00037 void EndJob(); 00038 00039 // our own Begin/End Run/File methods 00040 void MyOwn_BeginRun(); 00041 void MyOwn_EndRun(); 00042 void MyOwn_BeginFile(); 00043 void MyOwn_EndFile(); 00044 00045 // standard methods called by job control triggers 00046 void BeginRun(); 00047 void EndRun(); 00048 void BeginFile(); 00049 void EndFile(); 00050 00051 void Config(const Registry& r); 00052 const Registry& DefaultConfig() const; 00053 void Help(); 00054 00055 private: 00056 00057 JobCResult ProcessRawRecord(const RawRecord* rawrec); 00058 void ProcessRawBlock(const RawDataBlock* rawblk, 00059 const Int_t run, const Short_t subrun, 00060 const std::string& strmname, 00061 const int strmindx); 00062 00063 void Update_ENV_TSQL(); 00064 00065 void ExtractRunAndFile(const MomNavigator* mom); 00066 void DoBeginEndRunAndFile(); 00067 00068 void BuildExtContextAndSelect(); 00069 00070 void HandleConfigFilesBlock(const RawConfigFilesBlock* rcfb); 00071 00072 void CommitDbuRunSummary(); 00073 void CommitDbuDaqFileSummary(); 00074 void CommitDbuDaqConfigFilesText(std::string& cft_md5, int& cft_seqno); 00075 void WritePythonFile(bool dbWriteSuccess); 00076 00077 std::string fURL; 00078 Int_t fDbNo; 00079 DbiStatement* fDbiStatement; 00080 00081 Int_t fHeartbeatIntervalSec; 00082 std::string fAuxConfigFileList; 00083 00084 DbuRunSummary* fCurrentRunSummary; 00085 DbuDaqFileSummary* fCurrentDaqFileSummary; 00086 DbuDaqConfigFilesText* fCurrentConfigFilesText; 00087 00088 DbiSqlContext fExtDbiSqlContext; 00089 std::string fWhereSelect; 00090 00091 // so we can fake up Begin/End Run(int) File(const char*) 00092 // out of arg'less version 00093 Int_t fCurrentRun; 00094 Int_t fNextRun; 00095 Int_t fCurrentSubRun; 00096 Int_t fNextSubRun; 00097 Short_t fCurrentRunType; 00098 Short_t fNextRunType; 00099 Int_t fCurrentTimeFrameNum; 00100 Int_t fNextTimeFrameNum; 00101 VldContext fCurrentVldContext; 00102 VldContext fNextVldContext; 00103 std::string fCurrentFile; 00104 std::string fNextFile; 00105 00106 }; 00107 00108 #endif // __CINT__ 00109 #endif // DBUDAQFILEMODULE_H 00110
1.3.9.1