EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairGeoSet.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairGeoSet.h
1 #ifndef FAIRGEOSET_H
2 #define FAIRGEOSET_H
3 
4 
5 #include "FairGeoTransform.h"
6 
7 #include "TNamed.h"
8 //#include "TArrayI.h"
9 #include "TList.h"
10 
11 #include <fstream>
12 //#include <iomanip>
13 
14 class FairGeoNode;
15 class FairGeoShapes;
16 class FairGeoMedia;
17 class FairGeoBuilder;
18 class TArrayI;
19 //class TList;
20 
25 class FairGeoSet : public TNamed
26 {
27 
28  protected:
29  Int_t hadesGeo;
30 
31  class FairGeoCopyNode : public TNamed
32  {
33  public:
35  FairGeoCopyNode(const char* name,FairGeoNode* node)
36  : TNamed(name,""), pNode(node) {}
37  // SetName(name);
38  //
39  // }
41  private:
44 
45  };
46  TList* volumes;
47  TList* masterNodes;
48  Int_t maxSectors;
50  Int_t maxModules;
51  TArrayI* modules;
53  TString geoFile;
54  TString author;
55  TString description;
57  FairGeoSet();
58  void readInout(std::fstream&);
59  void readTransform(std::fstream&,FairGeoTransform&);
60  Bool_t readVolumeParams(std::fstream&,FairGeoMedia*,FairGeoNode*,TList* l=0);
61  Bool_t readKeepIn(std::fstream&,FairGeoMedia*,TString&);
62  Bool_t readModule(std::fstream&,FairGeoMedia*,TString&,TString&,Bool_t a=kFALSE);
63  public :
64  virtual ~FairGeoSet();
66  void setMasterNodes(TList* m) {masterNodes=m;}
67  void setGeomFile(const char* filename) {geoFile=filename;}
68  const char* getGeomFile() { return geoFile.Data(); }
69  Int_t getMaxSectors(void) {return maxSectors;}
70  Int_t getMaxModules(void) {return maxModules;}
71  Int_t getMaxKeepinVolumes(void) {return maxKeepinVolumes;}
72  void setModules(Int_t,Int_t*);
73  Int_t* getModules(void);
74  Int_t getModule(Int_t,Int_t);
75  FairGeoNode* getVolume(const char* name) {return (FairGeoNode*)volumes->FindObject(name);}
76  FairGeoNode* getMasterNode(const char* name) {return (FairGeoNode*)masterNodes->FindObject(name);}
77  TList* getListOfVolumes() {return volumes;}
79  void setAuthor(TString& s) {author=s;}
80  void setDescription(TString& s) {description=s;}
81  TString& getAuthor() {return author;}
82  TString& getDescription() {return description;}
83  virtual const char* getKeepinName(Int_t,Int_t) {return 0;}
84  virtual const char* getModuleName(Int_t) {return 0;}
85  virtual const char* getEleName(Int_t) {return 0;}
86  virtual Int_t getSecNumInMod(const TString&) {return -1;}
87  virtual Int_t getModNumInMod(const TString&) {return 0;}
88  virtual Bool_t read(std::fstream&,FairGeoMedia*);
89  virtual void addRefNodes() {}
90  virtual void write(std::fstream&);
91  virtual void print();
92  virtual Bool_t create(FairGeoBuilder*);
93  void compare(FairGeoSet&);
94  ClassDef(FairGeoSet,0) //
95  private:
96  FairGeoSet(const FairGeoSet&);
97  FairGeoSet& operator=(const FairGeoSet&);
98 };
99 
100 
101 #endif /* !FAIRGEOSET_H */