]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSGetterLight.cxx
new format for raw data
[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//____________________________________________________________________________
40 AliPHOSGetterLight::AliPHOSGetterLight():AliPHOSGetter(0)
41{
42 // ctor
43 fDigits = 0 ;
44 fEmcRecPoints = 0 ;
45 fCpvRecPoints = 0 ;
46 fTS = 0;
47 fRP = 0;
3b844b86 48 // fcdb = 0 ;
f2bde07c 49 fClusterizer = 0 ;
50 fTSM = 0 ;
51 fPID = 0 ;
3b844b86 52 SetRawDigits(kTRUE) ;
53 // fRawDigits =kTRUE;
f2bde07c 54 fgObjGetter = this ;
55}
56//____________________________________________________________________________
57AliPHOSGetterLight::AliPHOSGetterLight(const char* /*alirunFileName*/, const char* /*version*/, Option_t * /*openingOption*/):AliPHOSGetter(0)
58{
3b844b86 59 //Create containers of reconstructed objects for one event
f2bde07c 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) ;
67
3b844b86 68 //Objects which are not owned by Getter
69 // fcdb = 0 ;
f2bde07c 70
71 fClusterizer = 0;
72 fTSM = 0 ;
73 fPID = 0 ;
74
3b844b86 75 SetRawDigits(kTRUE) ;
76 // fRawDigits = kTRUE ;
f2bde07c 77 fgObjGetter = this ;
78}
79
80//____________________________________________________________________________
81 AliPHOSGetterLight::~AliPHOSGetterLight()
82{
3b844b86 83 //Delete containers owned by Getter and do not touch other pointers
f2bde07c 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 ;}
89}
90//____________________________________________________________________________
91AliPHOSGetterLight * AliPHOSGetterLight::Instance(const char* alirunFileName, const char* version, Option_t * openingOption)
92{
93 // Creates and returns the pointer of the unique instance
94 // Must be called only when the environment has changed
95
f2bde07c 96 if(!fgObjGetter){ // first time the getter is called
97 fgObjGetter = (AliPHOSGetter*) new AliPHOSGetterLight(alirunFileName, version, openingOption) ;
98 }
99 return (AliPHOSGetterLight*) fgObjGetter ;
100}
101//____________________________________________________________________________
102AliPHOSGetterLight * AliPHOSGetterLight::Instance(void)
103{
104 return (AliPHOSGetterLight*) fgObjGetter ;
105}