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 //////////////////////////////////////////////////////////////////////////////
24 // --- ROOT system ---
26 // --- Standard library ---
28 // --- AliRoot header files ---
29 #include "AliPHOSCalibrationDB.h"
30 #include "AliPHOSGetterLight.h"
32 ClassImp(AliPHOSGetterLight)
35 //____________________________________________________________________________
36 AliPHOSGetterLight::AliPHOSGetterLight():AliPHOSGetter(0)
51 //____________________________________________________________________________
52 AliPHOSGetterLight::AliPHOSGetterLight(const char* /*alirunFileName*/, const char* /*version*/, Option_t * /*openingOption*/):AliPHOSGetter(0)
55 fDigits = new TClonesArray("AliPHOSDigit",256) ;
56 fEmcRecPoints = new TObjArray(50) ;
57 fEmcRecPoints->SetOwner(kTRUE) ;
58 fCpvRecPoints= new TObjArray(0);
59 fCpvRecPoints->SetOwner(kTRUE) ;
60 fTS = new TClonesArray("AliPHOSTrackSegment",50) ;
61 fRP = new TClonesArray("AliPHOSRecParticle",50) ;
73 //____________________________________________________________________________
74 AliPHOSGetterLight::~AliPHOSGetterLight()
77 if(fDigits){ delete fDigits ; fDigits = 0 ;}
78 if(fEmcRecPoints){ delete fEmcRecPoints; fEmcRecPoints = 0 ;}
79 if(fCpvRecPoints){ delete fCpvRecPoints; fCpvRecPoints = 0 ;}
80 if(fTS){ delete fTS; fTS = 0 ;}
81 if(fRP){ delete fRP; fRP = 0 ;}
83 //____________________________________________________________________________
84 AliPHOSGetterLight * AliPHOSGetterLight::Instance(const char* alirunFileName, const char* version, Option_t * openingOption)
86 // Creates and returns the pointer of the unique instance
87 // Must be called only when the environment has changed
90 if(!fgObjGetter){ // first time the getter is called
91 fgObjGetter = (AliPHOSGetter*) new AliPHOSGetterLight(alirunFileName, version, openingOption) ;
93 return (AliPHOSGetterLight*) fgObjGetter ;
95 //____________________________________________________________________________
96 AliPHOSGetterLight * AliPHOSGetterLight::Instance(void)
98 return (AliPHOSGetterLight*) fgObjGetter ;