ROOT logo
#ifndef HGEOMORA2IO_H
#define HGEOMORA2IO_H

#include "hgeomio.h"
#include "hgeomtransform.h"
#include "TString.h"
#include "TObjArray.h"
#include "TList.h"

class HGeomOra2Conn;
class HGeomMedia;
class HGeomMedium;
class HGeomSet;
class HGeomNode;
class HGeomHit;
class HGeomInterface;

class HGeomOra2Io : public HGeomIo {
private:
  HGeomOra2Conn* pConn; // pointer to the connection class
  TList* detVersions;   // list of detector versions
  Double_t maxSince;    // lower limit for actual time range of versions
  Double_t minUntil;    // upper limit for actual time range of versions
  class HOra2Obj : public TObject {  // Container utility class
    public:
      TObject* pObj;
      Int_t    oraId;
      HOra2Obj(TObject* p=0,Int_t i=-1) {
        pObj=p;
        oraId=i;
      }
      ~HOra2Obj() {}
  };
  class HOra2DetVers : public TNamed { // Container class for detector version 
    public:
      Int_t detectorId;       // Id of detector
      Int_t geomVersion;      // geometry version
      HOra2DetVers(const Char_t* pName=0) {
        SetName(pName);
        detectorId=-1;
        geomVersion=-1;
      }
      ~HOra2DetVers() {}
  };
  class HOra2TransObj : public TNamed {  // Container class for transformation
    public:
      TObject*       pObj;
      Int_t          oraId;
      TString        refObj;
      HGeomTransform refTransform;
      HOra2TransObj(TObject* p=0,Int_t i=-1) {
        if (p) {
          SetName(p->GetName());
          pObj=p;
        }
        oraId=i;
      }
      ~HOra2TransObj() {}
  };
  class HGeomOra2CopyNode : public TNamed {
    public:
      HGeomNode* pNode;
      HGeomOra2CopyNode(const Char_t* name,HGeomNode* node) {
        SetName(name);
        pNode=node;
      }
      ~HGeomOra2CopyNode() {}
  };
public:
  HGeomOra2Io();
  ~HGeomOra2Io();
  Bool_t open();
  Bool_t open(const Char_t*,const Text_t* status="in");
  void close();
  void print();
  Bool_t isOpen();
  Bool_t isWritable();
  Bool_t setSimulRefRun(const Char_t*);
  Bool_t setRunId(Int_t);
  Bool_t setHistoryDate(const Char_t*);
  const Char_t* getSimulRefRun();
  Int_t getCurrentRunId();
  const Char_t* getHistoryDate();
  Bool_t read(HGeomMedia*);
  Bool_t read(HGeomSet*,HGeomMedia*);
  Bool_t read(HGeomHit*);
  Bool_t write(HGeomMedia*);
  Bool_t write(HGeomSet*);
  Bool_t write(HGeomHit*);
  Bool_t readGeomConfig(HGeomInterface*);
  Int_t checkRunidExistence(Int_t);
private:
  Int_t readGeomSetup();
  Bool_t readMaterialComposition(HGeomMedia*,TObjArray*,Int_t);
  Bool_t readOpticalProperties(HGeomMedia*,TObjArray*,Int_t);
  Bool_t readTarget(HGeomSet*,HGeomMedia*,Int_t,Int_t);
  Bool_t readStart(HGeomSet*,HGeomMedia*,Int_t,Int_t);
  Bool_t readVolumes(HGeomSet*,HGeomMedia*,TObjArray*,Int_t);
  Bool_t readPoints(TObjArray*,Int_t); 
  Bool_t readTransform(TList*);
  Int_t createVersion(const Char_t*,TString&,TString&);
  Int_t createHitVersion(const Char_t* part,const Char_t* hitSet);
  Bool_t insertMaterialData(Int_t,HGeomMedium*);
  Bool_t insertOpticalData(Int_t,HGeomMedium*);
  Bool_t insertVolumePoints(Int_t,HGeomNode*);
  const Char_t* calcRefTransform(HGeomNode*,HGeomTransform&);
  ClassDef(HGeomOra2Io,0) // Class for geometry I/O from Oracle
};

#endif  /* !HGEOMORA2IO_H */
 hgeomora2io.h:1
 hgeomora2io.h:2
 hgeomora2io.h:3
 hgeomora2io.h:4
 hgeomora2io.h:5
 hgeomora2io.h:6
 hgeomora2io.h:7
 hgeomora2io.h:8
 hgeomora2io.h:9
 hgeomora2io.h:10
 hgeomora2io.h:11
 hgeomora2io.h:12
 hgeomora2io.h:13
 hgeomora2io.h:14
 hgeomora2io.h:15
 hgeomora2io.h:16
 hgeomora2io.h:17
 hgeomora2io.h:18
 hgeomora2io.h:19
 hgeomora2io.h:20
 hgeomora2io.h:21
 hgeomora2io.h:22
 hgeomora2io.h:23
 hgeomora2io.h:24
 hgeomora2io.h:25
 hgeomora2io.h:26
 hgeomora2io.h:27
 hgeomora2io.h:28
 hgeomora2io.h:29
 hgeomora2io.h:30
 hgeomora2io.h:31
 hgeomora2io.h:32
 hgeomora2io.h:33
 hgeomora2io.h:34
 hgeomora2io.h:35
 hgeomora2io.h:36
 hgeomora2io.h:37
 hgeomora2io.h:38
 hgeomora2io.h:39
 hgeomora2io.h:40
 hgeomora2io.h:41
 hgeomora2io.h:42
 hgeomora2io.h:43
 hgeomora2io.h:44
 hgeomora2io.h:45
 hgeomora2io.h:46
 hgeomora2io.h:47
 hgeomora2io.h:48
 hgeomora2io.h:49
 hgeomora2io.h:50
 hgeomora2io.h:51
 hgeomora2io.h:52
 hgeomora2io.h:53
 hgeomora2io.h:54
 hgeomora2io.h:55
 hgeomora2io.h:56
 hgeomora2io.h:57
 hgeomora2io.h:58
 hgeomora2io.h:59
 hgeomora2io.h:60
 hgeomora2io.h:61
 hgeomora2io.h:62
 hgeomora2io.h:63
 hgeomora2io.h:64
 hgeomora2io.h:65
 hgeomora2io.h:66
 hgeomora2io.h:67
 hgeomora2io.h:68
 hgeomora2io.h:69
 hgeomora2io.h:70
 hgeomora2io.h:71
 hgeomora2io.h:72
 hgeomora2io.h:73
 hgeomora2io.h:74
 hgeomora2io.h:75
 hgeomora2io.h:76
 hgeomora2io.h:77
 hgeomora2io.h:78
 hgeomora2io.h:79
 hgeomora2io.h:80
 hgeomora2io.h:81
 hgeomora2io.h:82
 hgeomora2io.h:83
 hgeomora2io.h:84
 hgeomora2io.h:85
 hgeomora2io.h:86
 hgeomora2io.h:87
 hgeomora2io.h:88
 hgeomora2io.h:89
 hgeomora2io.h:90
 hgeomora2io.h:91
 hgeomora2io.h:92
 hgeomora2io.h:93
 hgeomora2io.h:94
 hgeomora2io.h:95
 hgeomora2io.h:96
 hgeomora2io.h:97
 hgeomora2io.h:98
 hgeomora2io.h:99
 hgeomora2io.h:100
 hgeomora2io.h:101
 hgeomora2io.h:102
 hgeomora2io.h:103
 hgeomora2io.h:104
 hgeomora2io.h:105
 hgeomora2io.h:106
 hgeomora2io.h:107
 hgeomora2io.h:108
 hgeomora2io.h:109
 hgeomora2io.h:110