This commit was generated by cvs2svn to compensate for changes in r209,
[u/mrichter/AliRoot.git] / GEODB / AliGeometry.h
1 // -*- C++ -*-
2 // 
3 // 1999/01/05
4 // ---------------------------------------------------------------------------
5 //
6 // AliGeometry Class
7 //
8 // This file is part of the ALICE Geometry Database .
9 //
10 // Author:  Joana E. Santo
11 //
12 // ---------------------------------------------------------------------------
13 // The Geometry class holds the detector,s geometry. Essentially it has a pointer
14 // to the Top Level AliGNode and an array of pointers to rules that specify the
15 // complete desgn below that node.
16
17 #ifndef ALIGEOMETRY_H
18 #define ALIGEOMETRY_H
19
20 #include <TFile.h>
21 #include <TNamed.h>
22 #include <TObjString.h>
23 #include <TList.h>
24 #include "AliGNode.h"
25
26 const Int_t kMAXLEVELS  = 20;
27 const Int_t kMatrixSize = 16;
28 const Int_t kVectorSize =  4;
29
30 class AliGeometry: public TNamed {
31
32     protected:
33         Float_t  fBomb;     //Bomb factor for exploded geometry
34         Int_t    fGeomLevel;
35         Int_t    fMaxDepth;
36         TList*   fRules;
37         TString  fTopNode;
38         TList*   fTransformation;
39
40     public:
41         AliGeometry( Text_t* name, Text_t* title, AliGNode* topNode, int maxDepth=0 ); // Constructor
42         AliGeometry( AliGeometry* Geom=NULL ); // Copy or Default Constructor
43         virtual ~AliGeometry(); // Destructor
44         AliGeometry* operator=( const AliGeometry* Geom );
45
46                 TList*       GetfTransf() const {return fTransformation;}
47                 Float_t      GetBomb() const {return fBomb;}
48                 TString      GetTop() const {return fTopNode;}
49                 TList*       GetRules() const {return fRules;}
50                 AliGNode*    FileToMemTree( TFile* file );
51                 //AliGNode*   FileToMemTree( Text_t* root_file, Text_t* geom_file );
52                 void         Local2Master( Float_t *local, Float_t *master);
53         virtual Int_t        PopLevel(){return fGeomLevel>0?fGeomLevel--:0;}
54         virtual Int_t        PushLevel(){return fGeomLevel++;}
55                 TVector*     PopMatrix();
56                 void         PushMatrix(TVector* matrix);
57                 AliGNode*    RecurToMem( const char* node_name, TFile* file, AliGNode* father, char* subtransf );
58                 void         RulesList( TList *fRules, AliGNode* node, int position );
59         virtual void         SetBomb(Float_t bomb=1.4) {fBomb = bomb;}
60                 void         UpdateMatrix(AliGTransform* trans);
61
62
63     ClassDef(AliGeometry,1) //Generic Geometry class
64 };
65
66 R__EXTERN AliGeometry *gAliGeometry;
67 R__EXTERN TVector* gMatrix;
68
69 #endif