ROOT logo
#ifndef HGEOMINTERFACE_H
#define HGEOMINTERFACE_H

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

class HGeomIo;
class HGeomSet;
class HGeomMedia;
class HGeomShapes;
class HGeomBuilder;
class HSpecGeomPar;
class HDetGeomPar;

enum EHGeoDetPart {
  kHGeomCave   =  0,
  kHGeomRich   =  1,
  kHGeomTarget =  2,
  kHGeomSect   =  3,
  kHGeomMdc    =  4,
  kHGeomCoils  =  5,
  kHGeomTof    =  6,
  kHGeomShower =  7,
  kHGeomFrames =  8,
  kHGeomStart  =  9,
  kHGeomFWall  = 10,
  kHGeomRpc    = 11,
  kHGeomEmc    = 12,
  kHGeomUser   = 13 };


class HGeomInterface : public TObject { 
  HGeomIo*      fileInput;   // ASCII file I/O
  HGeomIo*      oraInput;    // Oracle input
  HGeomIo*      output;      // Oracle output
  Bool_t        addDateTime; // Add date and time to the geo file names
  Int_t         nSets;       // number of geometry sets (detector parts) 
  Int_t         nActualSets; // number of set in actual geometry
  Int_t         nFiles;      // number of geometry and hit files  
  TObjArray*    sets;        // array of geometry  sets
  HGeomMedia*   media;       // list of media
  HGeomShapes*  shapes;      // list of shapes
  TList*        masterNodes; // list of mother nodes used by several sets
  TString       setupFile;   // file with detector setups (subsets)
  HGeomBuilder* geoBuilder;  // actually used geometry builder
  TString       paramFile;   // parameter file to create addition geometry (e.g. mdc wires)
public:
  HGeomInterface();
  ~HGeomInterface();
  void setOracleInput(HGeomIo* p) {oraInput=p;}
  void setOutput(HGeomIo* p, Bool_t fl=kTRUE) {output=p; addDateTime=fl;}
  void setGeomBuilder(HGeomBuilder* p) {geoBuilder=p;}
  HGeomIo* getFileInput() { return fileInput; }
  HGeomIo* getOraInput() { return oraInput; }
  HGeomIo* getOutput() { return output; }
  HGeomShapes* getShapes() { return shapes; }
  HGeomMedia* getMedia() { return media; }
  void addInputFile(const Char_t*);
  Bool_t addAlignment(HSpecGeomPar*);
  Bool_t addAlignment(HDetGeomPar*);
  void   adjustSecGeom(void);
  HGeomSet* findSet(const Char_t*);
  Bool_t readSet(HGeomSet*);
  Bool_t writeSet(HGeomSet*);
  Bool_t writeSet(HGeomSet*,const Char_t*);
  Bool_t writeSet(const Char_t* name,const Char_t* author,const Char_t* descr);
  Bool_t writeMedia(const Char_t* author,const Char_t* descr);
  Bool_t createSet(HGeomSet*);
  void deleteSet(HGeomSet* pSet);
  Bool_t readMedia();
  Bool_t writeMedia();
  Bool_t writeMedia(const Char_t*);
  Bool_t readAll();
  Bool_t writeAll();
  Bool_t createAll(Bool_t withCleanup=kFALSE);
  Bool_t createGeometry(Bool_t withCleanup=kFALSE);
  Bool_t readGeomConfig(const Char_t*);
  void addSetupFile(const Char_t* f) {setupFile=f;}
  Bool_t readSetupFile();
  void addParamFile(const Char_t* f) {paramFile=f;}
  void print();
private:
  HGeomIo* connectInput(const Char_t*);
  Bool_t   connectOutput(const Char_t*,TString pType="geo");
  void     shiftNode(Int_t set,const Char_t* name, Double_t zShift);
  void     shiftNode6sect(Int_t set,const Char_t* name, Double_t zShift);
  ClassDef(HGeomInterface,0) // Class to manage geometry for simulations
};

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