Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

FabPlnInstall.h

Go to the documentation of this file.
00001 // $Id: FabPlnInstall.h,v 1.6 2005/08/26 19:22:03 rhatcher Exp $
00002 
00003 #ifndef FABPLNINSTALL_H
00004 #define FABPLNINSTALL_H
00005 
00007 // FabPlnInstall
00008 //
00009 // Package: Fabrication
00010 //
00011 // Concept: DBI table to record when planes were installed/commissioned
00012 //          in the detector and what components went into them.
00013 //
00014 //
00015 // R. Hatcher 2002-11-06
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 // Constructors and destructors.
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 // State testing member functions
00057 
00058    const PlexPlaneId&   GetPlaneId() const { return fPlaneId; }
00059    const VldTimeStamp&  GetInstallDate() const { return fInstallDate; }
00060    // NOTE! zero based indexing here!
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 // I/O  member functions
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 // Constructors and destructors.
00088 
00089    FabPlnInstall(const FabPlnInstall& from)
00090      : DbiTableRow(from) { LEA_CTOR; *this = from; }
00091 
00092 // Data members
00093 
00094    PlexPlaneId              fPlaneId;
00095    VldTimeStamp             fInstallDate;
00096    std::vector<std::string> fScintMdlMfgId;
00097    std::vector<std::string> fSteelSlabMfgId;
00098 
00099 // class-wide static
00100 
00101    static Bool_t fgDefensiveUnpkg;
00102 
00103 ClassDef(FabPlnInstall,0)
00104 
00105 };
00106 
00107 #endif  // FABPLNINSTALL_H

Generated on Mon Feb 15 11:06:39 2010 for loon by  doxygen 1.3.9.1