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() :
56 //____________________________________________________________________________
57 AliPHOSGetterLight::AliPHOSGetterLight(const char* /*alirunFileName*/, const char* /*version*/, Option_t * /*openingOption*/) :
59 fDigits(new TClonesArray("AliPHOSDigit",256)),
60 fEmcRecPoints(new TObjArray(50)),
61 fCpvRecPoints(new TObjArray(0)),
62 fTS(new TClonesArray("AliPHOSTrackSegment",50)),
63 fRP(new TClonesArray("AliPHOSRecParticle",50)),
68 //Create containers of reconstructed objects for one event
69 fEmcRecPoints->SetOwner(kTRUE) ;
70 fCpvRecPoints->SetOwner(kTRUE) ;
73 // fRawDigits = kTRUE ;
77 //____________________________________________________________________________
78 AliPHOSGetterLight::AliPHOSGetterLight(const AliPHOSGetterLight & obj) :
89 // cpy ctor requested by Coding Convention
90 Fatal("cpy ctor", "not implemented") ;
93 //____________________________________________________________________________
94 AliPHOSGetterLight::~AliPHOSGetterLight()
96 //Delete containers owned by Getter and do not touch other pointers
97 if(fDigits){ delete fDigits ; fDigits = 0 ;}
98 if(fEmcRecPoints){ delete fEmcRecPoints; fEmcRecPoints = 0 ;}
99 if(fCpvRecPoints){ delete fCpvRecPoints; fCpvRecPoints = 0 ;}
100 if(fTS){ delete fTS; fTS = 0 ;}
101 if(fRP){ delete fRP; fRP = 0 ;}
103 //____________________________________________________________________________
104 AliPHOSGetterLight * AliPHOSGetterLight::Instance(const char* alirunFileName, const char* version, Option_t * openingOption)
106 // Creates and returns the pointer of the unique instance
107 // Must be called only when the environment has changed
109 if(!fgObjGetter){ // first time the getter is called
110 fgObjGetter = (AliPHOSGetter*) new AliPHOSGetterLight(alirunFileName, version, openingOption) ;
112 return (AliPHOSGetterLight*) fgObjGetter ;
114 //____________________________________________________________________________
115 AliPHOSGetterLight * AliPHOSGetterLight::Instance(void)
117 return (AliPHOSGetterLight*) fgObjGetter ;