]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSGetterLight.cxx
Print removed
[u/mrichter/AliRoot.git] / PHOS / AliPHOSGetterLight.cxx
CommitLineData
f2bde07c 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16/* $Id$ */
17
18//_________________________________________________________________________
19//
20//
21//*-- Author : D.Peressounko (RRC KI)
22//////////////////////////////////////////////////////////////////////////////
23
24// --- ROOT system ---
25#include "TFile.h"
26// --- Standard library ---
27
28// --- AliRoot header files ---
29#include "AliPHOSCalibrationDB.h"
30#include "AliPHOSGetterLight.h"
31
32ClassImp(AliPHOSGetterLight)
33
34
35//____________________________________________________________________________
36 AliPHOSGetterLight::AliPHOSGetterLight():AliPHOSGetter(0)
37{
38 // ctor
39 fDigits = 0 ;
40 fEmcRecPoints = 0 ;
41 fCpvRecPoints = 0 ;
42 fTS = 0;
43 fRP = 0;
44 fcdb = 0 ;
45 fClusterizer = 0 ;
46 fTSM = 0 ;
47 fPID = 0 ;
48 fRawDigits =kTRUE;
49 fgObjGetter = this ;
50}
51//____________________________________________________________________________
52AliPHOSGetterLight::AliPHOSGetterLight(const char* /*alirunFileName*/, const char* /*version*/, Option_t * /*openingOption*/):AliPHOSGetter(0)
53{
54 // ctor
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) ;
62
63 fcdb = 0 ;
64
65 fClusterizer = 0;
66 fTSM = 0 ;
67 fPID = 0 ;
68
69 fRawDigits = kTRUE ;
70 fgObjGetter = this ;
71}
72
73//____________________________________________________________________________
74 AliPHOSGetterLight::~AliPHOSGetterLight()
75{
76 // ctor
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 ;}
82}
83//____________________________________________________________________________
84AliPHOSGetterLight * AliPHOSGetterLight::Instance(const char* alirunFileName, const char* version, Option_t * openingOption)
85{
86 // Creates and returns the pointer of the unique instance
87 // Must be called only when the environment has changed
88
89
90 if(!fgObjGetter){ // first time the getter is called
91 fgObjGetter = (AliPHOSGetter*) new AliPHOSGetterLight(alirunFileName, version, openingOption) ;
92 }
93 return (AliPHOSGetterLight*) fgObjGetter ;
94}
95//____________________________________________________________________________
96AliPHOSGetterLight * AliPHOSGetterLight::Instance(void)
97{
98 return (AliPHOSGetterLight*) fgObjGetter ;
99}