ROOT logo
#ifndef HGEOMSET_H
#define HGEOMSET_H

#include "hgeomtransform.h"
#include "TNamed.h"
#include "TArrayI.h"
#include "TList.h"
#include <fstream>
#include <iomanip>
using namespace std;

class HGeomNode;
class HGeomShapes;
class HGeomMedia;
class HGeomBuilder;
class HGeomHit;

class  HGeomSet : public TNamed {
protected:
  class HGeomCopyNode : public TNamed {
    public:
      HGeomNode* pNode;
      HGeomCopyNode(const Char_t* name,HGeomNode* node) {
        SetName(name);
        pNode=node;
      }
      ~HGeomCopyNode() {}
  };
  TList* volumes;         // list of volumes
  TList* masterNodes;     // pointer to list of mother volumes from other detector parts
  Int_t maxSectors;       // maximum number of sectors (-1 for detectors outside any sector)
  Int_t maxKeepinVolumes; // maximum number of keepin volumes per sector
  Int_t maxModules;       // maximum number of modules per sector
  TArrayI* modules;       // Module's array.
  HGeomShapes* pShapes;   // pointer to the class HGeomShapes
  TString geoFile;        // name of geometry input file or Oracle
  HGeomHit* pHit;         // pointer to object for hit definition
  TString author;         // author of the media version
  TString description;    // description of the version

  HGeomSet();
  void readInout(fstream&);
  void readTransform(fstream&,HGeomTransform&);
  Bool_t readVolumeParams(fstream&,HGeomMedia*,HGeomNode*,TList* l=0);
  Bool_t readKeepIn(fstream&,HGeomMedia*,TString&);
  Bool_t readModule(fstream&,HGeomMedia*,TString&,TString&,Bool_t a=kFALSE);
public :
  virtual ~HGeomSet();
  void setShapes(HGeomShapes* s) {pShapes=s;}
  void setMasterNodes(TList* m) {masterNodes=m;}
  void setGeomFile(const Char_t* filename) {geoFile=filename;}
  void setHitFile(const Char_t*);
  const Char_t* getGeomFile() { return geoFile.Data(); }
  HGeomHit* getHit() {return pHit;}
  Int_t getMaxSectors(void) {return maxSectors;}
  Int_t getMaxModules(void) {return maxModules;}
  Int_t getMaxKeepinVolumes(void) {return maxKeepinVolumes;}
  void setModules(Int_t,Int_t*);
  Int_t* getModules(void);
  Int_t getModule(Int_t,Int_t);
  HGeomNode* getVolume(const Char_t* name) {return (HGeomNode*)volumes->FindObject(name);}
  HGeomNode* getMasterNode(const Char_t* name) {return (HGeomNode*)masterNodes->FindObject(name);}
  TList* getListOfVolumes() {return volumes;}
  HGeomShapes* getShapes() {return pShapes;}
  void setAuthor(TString& s) {author=s;}
  void setDescription(TString& s) {description=s;}
  TString& getAuthor() {return author;}
  TString& getDescription() {return description;}
  virtual const Char_t* getKeepinName(Int_t,Int_t) {return 0;}  
  virtual const Char_t* getModuleName(Int_t) {return 0;}  
  virtual const Char_t* getEleName(Int_t) {return 0;}  
  virtual Int_t getSecNumInMod(const TString&) {return -1;}
  virtual Int_t getModNumInMod(const TString&) {return 0;}
  virtual Bool_t read(fstream&,HGeomMedia*);
  virtual void addRefNodes() {}
  virtual void write(fstream&);
  virtual void print();
  virtual Bool_t create(HGeomBuilder*, const TString&, HGeomMedia*);
  virtual Bool_t createAdditionalGeometry(HGeomBuilder*, const TString&, HGeomMedia*) {return kTRUE;}
  void compare(HGeomSet&);
  ClassDef(HGeomSet,0) // Base class for geometry of detector parts
};

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