]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSGetterLight.cxx
Remove dependence to RAW module in MUONraw library for online purpose (Christian)
[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//////////////////////////////////////////////////////////////////////////////
3b844b86 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.
f2bde07c 28
29// --- ROOT system ---
f2bde07c 30// --- Standard library ---
31
32// --- AliRoot header files ---
3b844b86 33//#include "AliPHOSCalibrationDB.h"
f2bde07c 34#include "AliPHOSGetterLight.h"
35
36ClassImp(AliPHOSGetterLight)
37
38
39//____________________________________________________________________________
3663622c 40AliPHOSGetterLight::AliPHOSGetterLight() :
41 AliPHOSGetter(0),
42 fDigits(0),
43 fEmcRecPoints(0),
44 fCpvRecPoints(0),
45 fTS(0),
46 fRP(0),
47 fClusterizer(0),
48 fTSM(0),
49 fPID(0)
f2bde07c 50{
51 // ctor
3b844b86 52 SetRawDigits(kTRUE) ;
53 // fRawDigits =kTRUE;
f2bde07c 54 fgObjGetter = this ;
55}
56//____________________________________________________________________________
3663622c 57AliPHOSGetterLight::AliPHOSGetterLight(const char* /*alirunFileName*/, const char* /*version*/, Option_t * /*openingOption*/) :
58 AliPHOSGetter(0),
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)),
64 fClusterizer (0),
65 fTSM(0),
66 fPID(0)
f2bde07c 67{
3b844b86 68 //Create containers of reconstructed objects for one event
f2bde07c 69 fEmcRecPoints->SetOwner(kTRUE) ;
f2bde07c 70 fCpvRecPoints->SetOwner(kTRUE) ;
f2bde07c 71
3b844b86 72 SetRawDigits(kTRUE) ;
73 // fRawDigits = kTRUE ;
f2bde07c 74 fgObjGetter = this ;
75}
76
3663622c 77//____________________________________________________________________________
78AliPHOSGetterLight::AliPHOSGetterLight(const AliPHOSGetterLight & obj) :
79 AliPHOSGetter(obj),
80 fDigits(0),
81 fEmcRecPoints(0),
82 fCpvRecPoints(0),
83 fTS(0),
84 fRP(0),
85 fClusterizer(0),
86 fTSM(0),
87 fPID(0)
88{
89 // cpy ctor requested by Coding Convention
90 Fatal("cpy ctor", "not implemented") ;
91}
92
f2bde07c 93//____________________________________________________________________________
94 AliPHOSGetterLight::~AliPHOSGetterLight()
95{
3b844b86 96 //Delete containers owned by Getter and do not touch other pointers
f2bde07c 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 ;}
102}
103//____________________________________________________________________________
104AliPHOSGetterLight * AliPHOSGetterLight::Instance(const char* alirunFileName, const char* version, Option_t * openingOption)
105{
106 // Creates and returns the pointer of the unique instance
107 // Must be called only when the environment has changed
108
f2bde07c 109 if(!fgObjGetter){ // first time the getter is called
110 fgObjGetter = (AliPHOSGetter*) new AliPHOSGetterLight(alirunFileName, version, openingOption) ;
111 }
112 return (AliPHOSGetterLight*) fgObjGetter ;
113}
114//____________________________________________________________________________
115AliPHOSGetterLight * AliPHOSGetterLight::Instance(void)
116{
117 return (AliPHOSGetterLight*) fgObjGetter ;
118}