]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSIndexToObject.h
Reconstruction part now handle all geometry options
[u/mrichter/AliRoot.git] / PHOS / AliPHOSIndexToObject.h
1 #ifndef ALIPHOSINDEXTOOBJECT_H
2 #define ALIPHOSINDEXTOOBJECT_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 //_________________________________________________________________________
9 //  A singleton that retrieves objets from an array stored in a Tree on a disk file
10 //    1. AliPHOSDigit from TreeD     
11 //                  
12 //*-- Author: Yves Schutz (SUBATECH)
13
14
15 // --- ROOT system ---
16
17 #include "TFile.h"
18 #include "TString.h"
19 #include "TParticle.h"
20
21 // --- Standard library ---
22
23 #include "assert.h"
24
25 // --- AliRoot header files ---
26
27 #include "AliPHOS.h" 
28 #include "AliRun.h" 
29 #include "AliPHOSDigit.h" 
30 #include "AliPHOSEmcRecPoint.h"
31 #include "AliPHOSPpsdRecPoint.h"
32 #include "AliPHOSTrackSegment.h"
33 #include "AliPHOSRecParticle.h"
34
35 class AliPHOSIndexToObject : public TObject {
36
37 public:
38
39   AliPHOSIndexToObject(){ 
40     // ctor: this is a singleton, the ctor should never be called but cint needs it as publiv
41     assert(0==1) ; 
42   } 
43   AliPHOSIndexToObject(const AliPHOSIndexToObject & obj) {
44     // cpy ctor requested by Coding Convention 
45     // but not yet needed
46     assert(0==1) ; 
47   } 
48  
49   virtual ~AliPHOSIndexToObject(){
50     // dtor
51   }
52
53   static AliPHOSIndexToObject * GetInstance(AliPHOS * det) ; 
54   static AliPHOSIndexToObject * GetInstance() ; 
55   
56   AliPHOSDigit *        GimeDigit(Int_t index) ; 
57   TParticle *           GimePrimaryParticle(Int_t index) ;
58   AliPHOSRecParticle *  GimeRecParticle(Int_t index) ; 
59   AliRecPoint *         GimeRecPoint(Int_t index, TString s) ; 
60   AliPHOSTrackSegment * GimeTrackSegment(Int_t index) ;
61   
62   AliPHOSIndexToObject & operator = (const AliPHOSIndexToObject & rvalue) {
63     // assignement operator requested by coding convention
64     // but not needed
65     assert(0==1) ;
66     return *this ; 
67   }
68
69  private:
70   
71   AliPHOSIndexToObject(AliPHOS * det) ; 
72
73   AliPHOS * fDetector ;                    // the detector 
74   TTree * fReconstruct ;                   // the reconstruction tree  
75
76   static AliPHOSIndexToObject * fgObjGetter ; // pointer to the unique instance of the singleton 
77
78   ClassDef(AliPHOSIndexToObject,1)  // Algorithm class that provides methods to retrieve objects from a list knowing the index 
79
80 };
81
82 #endif // AliPHOSINDEXTOOBJECT_H