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 */
8 //_________________________________________________________________________
9 // A singleton that retrieves objets from an array stored in a Tree on a disk file
10 // 1. AliPHOSDigit from TreeD
12 //*-- Author: Yves Schutz (SUBATECH)
15 // --- ROOT system ---
19 #include "TParticle.h"
21 // --- Standard library ---
25 // --- AliRoot header files ---
29 #include "AliPHOSDigit.h"
30 #include "AliPHOSEmcRecPoint.h"
31 #include "AliPHOSPpsdRecPoint.h"
32 #include "AliPHOSTrackSegment.h"
33 #include "AliPHOSRecParticle.h"
35 class AliPHOSIndexToObject : public TObject {
39 AliPHOSIndexToObject(){
40 // ctor: this is a singleton, the ctor should never be called but cint needs it as publiv
43 AliPHOSIndexToObject(const AliPHOSIndexToObject & obj) {
44 // cpy ctor requested by Coding Convention
49 virtual ~AliPHOSIndexToObject(){
53 static AliPHOSIndexToObject * GetInstance(AliPHOS * det) ;
54 static AliPHOSIndexToObject * GetInstance() ;
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) ;
62 AliPHOSIndexToObject & operator = (const AliPHOSIndexToObject & rvalue) {
63 // assignement operator requested by coding convention
71 AliPHOSIndexToObject(AliPHOS * det) ;
73 AliPHOS * fDetector ; // the detector
74 TTree * fReconstruct ; // the reconstruction tree
76 static AliPHOSIndexToObject * fgObjGetter ; // pointer to the unique instance of the singleton
78 ClassDef(AliPHOSIndexToObject,1) // Algorithm class that provides methods to retrieve objects from a list knowing the index
82 #endif // AliPHOSINDEXTOOBJECT_H