]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliESDfriend.cxx
Bug fix in the copy constr of the esd friend. Noticed while running threaded online...
[u/mrichter/AliRoot.git] / STEER / 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"
1d99986f 24
25ClassImp(AliESDfriend)
26
b090e6a3 27AliESDfriend::AliESDfriend(): TObject(), fTracks("AliESDfriendTrack",15000),
28 fESDVZEROfriend(NULL)
1d99986f 29{
30 //
31 // Default constructor
32 //
33}
34
b7ec049a 35AliESDfriend::AliESDfriend(const AliESDfriend &f) :
36 TObject(f),
37 fTracks(f.fTracks),
38 fESDVZEROfriend(new AliESDVZEROfriend(*f.fESDVZEROfriend))
1d99986f 39{
40 //
41 // Copy constructor
42 //
43}
44
c43af351 45AliESDfriend& AliESDfriend::operator=(const AliESDfriend& esd)
46{
47
48 // Assignment operator
49 if(&esd == this) return *this;
50 TObject::operator=(esd);
51 fTracks = esd.fTracks;
52 fESDVZEROfriend = esd.fESDVZEROfriend;
53
54 return *this;
55}
56
57
58
1d99986f 59AliESDfriend::~AliESDfriend() {
60 //
61 // Destructor
62 //
63 fTracks.Delete();
b090e6a3 64 delete fESDVZEROfriend;
65}
66
67void AliESDfriend::SetVZEROfriend(AliESDVZEROfriend * obj)
68{
69 //
70 // Set the VZERO friend data object
71 // (complete raw data)
72 if (!fESDVZEROfriend) fESDVZEROfriend = new AliESDVZEROfriend();
73 if (obj) *fESDVZEROfriend = *obj;
1d99986f 74}