]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSIndexToObject.h
Removing cout from AliPHOSv0hits::AddHit(Int_t, Int_t, Float_t *)
[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(){ assert(0==1) ; } // should be never called
40   virtual ~AliPHOSIndexToObject(){} ; // dtor
41
42   static AliPHOSIndexToObject * GetInstance(AliPHOS * det) ; 
43   static AliPHOSIndexToObject * GetInstance() ; 
44   
45   AliPHOSDigit *        GimeDigit(Int_t index) ; 
46   TParticle *           GimePrimaryParticle(Int_t index) ;
47   AliPHOSRecParticle *  GimeRecParticle(Int_t index) ; 
48   AliRecPoint *         GimeRecPoint(Int_t index, TString s) ; 
49   AliPHOSTrackSegment * GimeTrackSegment(Int_t index) ;
50   
51  private:
52   
53   AliPHOSIndexToObject(AliPHOS * det) ; 
54
55   AliPHOS * fDetector ;                    // the detector 
56   TTree * fReconstruct ;                   // the reconstruction tree  
57
58   static AliPHOSIndexToObject * fObjGetter ; // pointer to the unique instance of the singleton 
59
60   ClassDef(AliPHOSIndexToObject,1)  // Algorithm class that provides methods to retrieve objects from a list knowing the index 
61
62 };
63
64 #endif // AliPHOSINDEXTOOBJECT_H