00001
00002
00003 #ifndef FABSTEELPLATE_H
00004 #define FABSTEELPLATE_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 <string>
00023 #include <vector>
00024
00025 class DbiValidityRec;
00026
00027 class FabSteelPlate;
00028 std::ostream& operator<<(std::ostream& os, const FabSteelPlate& pi);
00029
00030 class FabSteelPlate : public DbiTableRow
00031 {
00032
00033 public:
00034
00035
00036
00037 FabSteelPlate()
00038 : fSteelSlabMfgId("Serial Number not initialized")
00039 , fSteelSlabPartId ("Part Number not initialized")
00040 , fSteelSlabHeatId("Heat Number not initialized")
00041 , fSteelSlabNomWt(0), fSteelSlabScaleWt(0)
00042 , fDetector(Detector::kUnknown)
00043 { LEA_CTOR; };
00044
00045 virtual ~FabSteelPlate(){ LEA_DTOR; };
00046
00047
00048
00049 const std::string& GetSteelSlabMfgId() const { return fSteelSlabMfgId; }
00050 const std::string& GetSteelSlabPartId() const { return fSteelSlabPartId; }
00051 const std::string& GetSteelSlabHeatId() const { return fSteelSlabHeatId; }
00052 int GetSteelSlabNomWt() const { return fSteelSlabNomWt; }
00053 int GetSteelSlabScaleWt() const { return fSteelSlabScaleWt; }
00054 Double_t GetNominalMasskg() const;
00055 Double_t GetScaleMasskg() const;
00056 Detector::Detector_t GetDetector() const { return fDetector; }
00057
00058 virtual DbiTableRow* CreateTableRow() const { return new FabSteelPlate; }
00059
00060
00061
00062 virtual void Fill(DbiResultSet& rs, const DbiValidityRec* vrec);
00063 virtual void Store(DbiOutRowStream& ors, const DbiValidityRec* vrec) const;
00064 virtual void Print(Option_t *option = "") const;
00065 virtual std::ostream& FormatToOStream(std::ostream& os,
00066 Option_t *option="") const;
00067
00068 virtual Int_t GetAggregateNo() const { return fAggregateNo; }
00069
00070
00071 static const char* GetTableDescr();
00072 static void SetDefensiveUnpkg(Bool_t defensive)
00073 { fgDefensiveUnpkg = defensive; }
00074 static Bool_t GetDefensiveUnpkg() { return fgDefensiveUnpkg; }
00075
00076 private:
00077
00078
00079
00080 FabSteelPlate(const FabSteelPlate& from)
00081 : DbiTableRow(from) { LEA_CTOR; *this = from; }
00082
00083
00084
00085 std::string fSteelSlabMfgId;
00086 std::string fSteelSlabPartId;
00087 std::string fSteelSlabHeatId;
00088 int fSteelSlabNomWt;
00089 int fSteelSlabScaleWt;
00090 Detector::Detector_t fDetector;
00091 int fAggregateNo;
00092
00093
00094
00095 static Bool_t fgDefensiveUnpkg;
00096
00097 ClassDef(FabSteelPlate,0)
00098
00099 };
00100
00101 #endif // FABSTEELPLATE_H