1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 //_________________________________________________________________________
21 //*-- Author : D.Peressounko (RRC KI)
22 //////////////////////////////////////////////////////////////////////////////
23 //Class designed to perform fast on-flight reconstruction of raw data
24 //without writing it to file and without creation of all aliroot folder
25 //structure. This class keeps lists of (raw) digits, RecPoints TrackSegments and
26 //RecParticles for one (current) event. In addition, for convinience, it returns
27 //pointers to PHOS geometry, Clusterizser, TSMaker and PID maker.
29 // --- ROOT system ---
30 // --- Standard library ---
32 // --- AliRoot header files ---
33 //#include "AliPHOSCalibrationDB.h"
34 #include "AliPHOSGetterLight.h"
36 ClassImp(AliPHOSGetterLight)
39 //____________________________________________________________________________
40 AliPHOSGetterLight::AliPHOSGetterLight():AliPHOSGetter(0)
56 //____________________________________________________________________________
57 AliPHOSGetterLight::AliPHOSGetterLight(const char* /*alirunFileName*/, const char* /*version*/, Option_t * /*openingOption*/):AliPHOSGetter(0)
59 //Create containers of reconstructed objects for one event
60 fDigits = new TClonesArray("AliPHOSDigit",256) ;
61 fEmcRecPoints = new TObjArray(50) ;
62 fEmcRecPoints->SetOwner(kTRUE) ;
63 fCpvRecPoints= new TObjArray(0);
64 fCpvRecPoints->SetOwner(kTRUE) ;
65 fTS = new TClonesArray("AliPHOSTrackSegment",50) ;
66 fRP = new TClonesArray("AliPHOSRecParticle",50) ;
68 //Objects which are not owned by Getter
76 // fRawDigits = kTRUE ;
80 //____________________________________________________________________________
81 AliPHOSGetterLight::~AliPHOSGetterLight()
83 //Delete containers owned by Getter and do not touch other pointers
84 if(fDigits){ delete fDigits ; fDigits = 0 ;}
85 if(fEmcRecPoints){ delete fEmcRecPoints; fEmcRecPoints = 0 ;}
86 if(fCpvRecPoints){ delete fCpvRecPoints; fCpvRecPoints = 0 ;}
87 if(fTS){ delete fTS; fTS = 0 ;}
88 if(fRP){ delete fRP; fRP = 0 ;}
90 //____________________________________________________________________________
91 AliPHOSGetterLight * AliPHOSGetterLight::Instance(const char* alirunFileName, const char* version, Option_t * openingOption)
93 // Creates and returns the pointer of the unique instance
94 // Must be called only when the environment has changed
96 if(!fgObjGetter){ // first time the getter is called
97 fgObjGetter = (AliPHOSGetter*) new AliPHOSGetterLight(alirunFileName, version, openingOption) ;
99 return (AliPHOSGetterLight*) fgObjGetter ;
101 //____________________________________________________________________________
102 AliPHOSGetterLight * AliPHOSGetterLight::Instance(void)
104 return (AliPHOSGetterLight*) fgObjGetter ;