]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/ESD/AliESDfriend.cxx
remove the setting of the maximum number of super modules from the class, recover...
[u/mrichter/AliRoot.git] / STEER / ESD / AliESDfriend.cxx
CommitLineData
1d99986f 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//-------------------------------------------------------------------------
17// Implementation of the AliESDfriend class
18// This class contains some additional to the ESD information like
19// the clusters associated to tracks.
20// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
21//-------------------------------------------------------------------------
22
23#include "AliESDfriend.h"
73df58ab 24#include "AliESDVZEROfriend.h"
25#include "AliESDTZEROfriend.h"
1d99986f 26
27ClassImp(AliESDfriend)
28
d8a155ff 29AliESDfriend::AliESDfriend(): TObject(), fTracks("AliESDfriendTrack",1),
73df58ab 30 fESDVZEROfriend(NULL),
5576d489 31 fESDTZEROfriend(NULL),
32 fNclustersTPC(),
33 fNclustersTPCused()
1d99986f 34{
35 //
36 // Default constructor
37 //
5576d489 38 for (Int_t i=0;i<72;i++)
39 {
40 fNclustersTPC[i]=0;
41 fNclustersTPCused[i]=0;
42 }
1d99986f 43}
44
b7ec049a 45AliESDfriend::AliESDfriend(const AliESDfriend &f) :
46 TObject(f),
47 fTracks(f.fTracks),
73df58ab 48 fESDVZEROfriend(f.fESDVZEROfriend ? new AliESDVZEROfriend(*f.fESDVZEROfriend) : NULL),
5576d489 49 fESDTZEROfriend(f.fESDTZEROfriend ? new AliESDTZEROfriend(*f.fESDTZEROfriend) : NULL),
50 fNclustersTPC(),
51 fNclustersTPCused()
1d99986f 52{
53 //
54 // Copy constructor
55 //
5576d489 56 memcpy(fNclustersTPC,f.fNclustersTPC,sizeof(fNclustersTPC));
57 memcpy(fNclustersTPCused,f.fNclustersTPCused,sizeof(fNclustersTPCused));
58
1d99986f 59}
60
c43af351 61AliESDfriend& AliESDfriend::operator=(const AliESDfriend& esd)
62{
63
64 // Assignment operator
65 if(&esd == this) return *this;
66 TObject::operator=(esd);
67 fTracks = esd.fTracks;
f66f9a4a 68
253bd418 69 delete fESDVZEROfriend;
70 fESDVZEROfriend = new AliESDVZEROfriend(*esd.fESDVZEROfriend);
c43af351 71
253bd418 72 delete fESDTZEROfriend;
73 fESDTZEROfriend = new AliESDTZEROfriend(*esd.fESDTZEROfriend);
73df58ab 74
5576d489 75 memcpy(fNclustersTPC,esd.fNclustersTPC,sizeof(fNclustersTPC));
76 memcpy(fNclustersTPCused,esd.fNclustersTPCused,sizeof(fNclustersTPCused));
73df58ab 77
78
c43af351 79 return *this;
80}
81
82
83
1d99986f 84AliESDfriend::~AliESDfriend() {
85 //
86 // Destructor
87 //
ddfbc51a 88 fTracks.Delete();
89 delete fESDVZEROfriend;
90 delete fESDTZEROfriend;
b090e6a3 91}
92
73df58ab 93
94
b090e6a3 95void AliESDfriend::SetVZEROfriend(AliESDVZEROfriend * obj)
96{
97 //
98 // Set the VZERO friend data object
99 // (complete raw data)
100 if (!fESDVZEROfriend) fESDVZEROfriend = new AliESDVZEROfriend();
101 if (obj) *fESDVZEROfriend = *obj;
1d99986f 102}
73df58ab 103void AliESDfriend::SetTZEROfriend(AliESDTZEROfriend * obj)
104{
105 //
106 // Set the TZERO friend data object
107 // (complete raw data)
108 if (!fESDTZEROfriend) fESDTZEROfriend = new AliESDTZEROfriend();
109 if (obj) *fESDTZEROfriend = *obj;
110}