00001
00002
00003 #ifndef FABPLNINSTALL_H
00004 #define FABPLNINSTALL_H
00005
00007
00008
00009
00010
00011
00012
00013
00014
00015
00017
00018 #include "DatabaseInterface/DbiTableRow.h"
00019 #include "LeakChecker/Lea.h"
00020
00021 #include "Validity/VldContext.h"
00022 #include "Plex/PlexScintMdlId.h"
00023
00024 #include <string>
00025 #include <vector>
00026
00027 class DbiValidityRec;
00028
00029 class FabPlnInstall;
00030 std::ostream& operator<<(std::ostream& os, const FabPlnInstall& pi);
00031
00032 class FabPlnInstall : public DbiTableRow
00033 {
00034
00035 public:
00036
00037
00038
00039 FabPlnInstall() : fPlaneId(), fInstallDate(2038,01,01,01,01,01)
00040 { LEA_CTOR;
00041 #ifdef EXPLICITINIT
00042 fScintMdlMfgId.reserve(8);
00043 fSteelSlabMfgId.reserve(8);
00044 for (int i=0; i<8; i++) {
00045 fScintMdlMfgId[i]="no-scint-id";
00046 fSteelSlabMfgId[i]="no-slab-id";
00047 }
00048 #else
00049 fScintMdlMfgId.resize(8,"no-scint-id");
00050 fSteelSlabMfgId.resize(8,"no-slab-id");
00051 #endif
00052 };
00053
00054 virtual ~FabPlnInstall(){ LEA_DTOR; };
00055
00056
00057
00058 const PlexPlaneId& GetPlaneId() const { return fPlaneId; }
00059 const VldTimeStamp& GetInstallDate() const { return fInstallDate; }
00060
00061 std::string GetScintMdlMfgId(UShort_t indx) const;
00062 std::string GetSteelSlabMfgId(UShort_t indx) const;
00063
00064 virtual DbiTableRow* CreateTableRow() const { return new FabPlnInstall; }
00065
00066
00067
00068 virtual void Fill(DbiResultSet& rs,
00069 const DbiValidityRec* vrec);
00070 virtual void Store(DbiOutRowStream& ors,
00071 const DbiValidityRec* vrec) const;
00072
00073 virtual void Print(Option_t *option = "") const;
00074 virtual std::ostream& FormatToOStream(std::ostream& os,
00075 Option_t *option="") const;
00076
00077 virtual Int_t GetAggregateNo() const;
00078 virtual UInt_t GetIndex(UInt_t defIndex) const;
00079
00080 static const char* GetTableDescr();
00081 static void SetDefensiveUnpkg(Bool_t defensive)
00082 { fgDefensiveUnpkg = defensive; }
00083 static Bool_t GetDefensiveUnpkg() { return fgDefensiveUnpkg; }
00084
00085 private:
00086
00087
00088
00089 FabPlnInstall(const FabPlnInstall& from)
00090 : DbiTableRow(from) { LEA_CTOR; *this = from; }
00091
00092
00093
00094 PlexPlaneId fPlaneId;
00095 VldTimeStamp fInstallDate;
00096 std::vector<std::string> fScintMdlMfgId;
00097 std::vector<std::string> fSteelSlabMfgId;
00098
00099
00100
00101 static Bool_t fgDefensiveUnpkg;
00102
00103 ClassDef(FabPlnInstall,0)
00104
00105 };
00106
00107 #endif // FABPLNINSTALL_H