00001 #ifndef Archiving_H
00002 #define Archiving_H
00003
00004 #include <string>
00005
00006 #include "SctData/ScanResult.h"
00007 #include "SctData/RawScanResult.h"
00008 #include "SctData/FitScanResult.h"
00009 #include "Sct/SctNames.h"
00010 #include <is/isinfo.h>
00011
00012 using namespace SctData;
00013 using namespace Sct;
00014
00015
00016 class Archiving {
00017
00018 protected:
00019
00020
00021
00022
00023 public:
00024
00025
00026 Archiving();
00027 virtual ~Archiving();
00028
00029 virtual void Save() = 0;
00030
00031
00032 void ListISObj();
00033 void DeleteISObj(char* objName);
00034 void SetUNIXDir();
00035
00036
00037 ISInfoIterator* SetupRawIS();
00038 ISInfoIterator* SetupFitIS();
00039
00040
00041 ISInfoIterator* SetupNoiseOccupancyTestIS();
00042 ISInfoIterator* SetupNPtGainTestIS();
00043 ISInfoIterator* SetupStrobeDelayTestIS();
00044 ISInfoIterator* SetupTrimRangeTestIS();
00045 ISInfoIterator* SetupPipelineTestIS();
00046 ISInfoIterator* SetupTimeWalkTestIS();
00047 ISInfoIterator* SetupFullBypassTestIS();
00048 ISInfoIterator* SetupNMaskTestIS();
00049
00050
00051 string GetRawISUniqueID(unsigned int runNumber, unsigned int scanNumber, const string& moduleName);
00052 string GetFitISUniqueID(unsigned int runNumber, unsigned int scanNumber, const string& moduleName);
00053
00054 IPCPartition* GetPartition();
00055 shared_ptr<Serializable> ISRetrieveObj(ISInfoIterator& );
00056 shared_ptr<Serializable> ISRetrieveObj(const string& SerISName );
00057 shared_ptr<ScanResult> ISRetrieveScanResult(const string& ScanISName );
00058 shared_ptr<ScanResult> ISRetrieveScanResult(ISInfoIterator& );
00059 shared_ptr<RawScanResult> ISRetrieveRawScanResult(const string& RawISName);
00060 shared_ptr<RawScanResult> ISRetrieveRawScanResult(ISInfoIterator& );
00061 shared_ptr<FitScanResult> ISRetrieveFitScanResult(const string& FitISName );
00062 shared_ptr<FitScanResult> ISRetrieveFitScanResult(ISInfoIterator& );
00063
00064
00065
00066 void ISSendPersScanResult(RawScanResult &);
00067 void ISSendPersScanResult(FitScanResult &);
00068
00069
00070
00071 bool IsTestInIndex(unsigned int runNumber, string moduleName, string testType);
00072 bool IsTestInIndex(string runID, string moduleID, string testType);
00073 bool IsScanInIndex(unsigned int runNumber, string moduleName, string testType, unsigned int scanNumber);
00074 bool IsScanInIndex(string runID, string moduleID, string testType, string scanID);
00075 void UpdateTestIndex();
00076 void UpdateScanIndex();
00077
00078 void AddScanToIndex(string runID, string moduleID, string testTypeID, string scanID );
00079 void AddTestToIndex(string runID, string moduleID, string testTypeID);
00080
00081
00082 string getTestSummaryFromArchive(unsigned int runNumber, string moduleName, string testType);
00083 string getTestSummaryFromArchive(string runID, string moduleID, string testType);
00084 vector<string> ListOfModulesWithinTestInIndex(string testType);
00085 vector<string> ListOfModulesWithinTestInIndex(unsigned int runNumber, string testType);
00086 string getModuleNameFromIndex(string indexLine);
00087 string getRunNumberFromIndex(string indexLine);
00088 vector<string> ListOfRunsInIndex();
00089 };
00090
00091
00092 #endif