]>
Commit | Line | Data |
---|---|---|
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 | |
27 | ClassImp(AliESDfriend) | |
28 | ||
b090e6a3 | 29 | AliESDfriend::AliESDfriend(): TObject(), fTracks("AliESDfriendTrack",15000), |
73df58ab | 30 | fESDVZEROfriend(NULL), |
31 | fESDTZEROfriend(NULL) | |
32 | ||
1d99986f | 33 | { |
34 | // | |
35 | // Default constructor | |
36 | // | |
37 | } | |
38 | ||
b7ec049a | 39 | AliESDfriend::AliESDfriend(const AliESDfriend &f) : |
40 | TObject(f), | |
41 | fTracks(f.fTracks), | |
73df58ab | 42 | fESDVZEROfriend(f.fESDVZEROfriend ? new AliESDVZEROfriend(*f.fESDVZEROfriend) : NULL), |
43 | fESDTZEROfriend(f.fESDTZEROfriend ? new AliESDTZEROfriend(*f.fESDTZEROfriend) : NULL) | |
1d99986f | 44 | { |
45 | // | |
46 | // Copy constructor | |
47 | // | |
48 | } | |
49 | ||
c43af351 | 50 | AliESDfriend& AliESDfriend::operator=(const AliESDfriend& esd) |
51 | { | |
52 | ||
53 | // Assignment operator | |
54 | if(&esd == this) return *this; | |
55 | TObject::operator=(esd); | |
56 | fTracks = esd.fTracks; | |
f66f9a4a | 57 | |
58 | delete fESDVZEROfriend; fESDVZEROfriend = NULL; | |
ff830694 | 59 | if (!esd.fESDVZEROfriend) fESDVZEROfriend = new AliESDVZEROfriend(*esd.fESDVZEROfriend); |
c43af351 | 60 | |
73df58ab | 61 | delete fESDTZEROfriend; fESDTZEROfriend = NULL; |
62 | if (!esd.fESDTZEROfriend) fESDTZEROfriend = new AliESDTZEROfriend(*esd.fESDTZEROfriend); | |
63 | ||
64 | ||
65 | ||
c43af351 | 66 | return *this; |
67 | } | |
68 | ||
69 | ||
70 | ||
1d99986f | 71 | AliESDfriend::~AliESDfriend() { |
72 | // | |
73 | // Destructor | |
74 | // | |
75 | fTracks.Delete(); | |
b090e6a3 | 76 | delete fESDVZEROfriend; |
d4344189 | 77 | delete fESDTZEROfriend; |
b090e6a3 | 78 | } |
79 | ||
73df58ab | 80 | |
81 | ||
b090e6a3 | 82 | void AliESDfriend::SetVZEROfriend(AliESDVZEROfriend * obj) |
83 | { | |
84 | // | |
85 | // Set the VZERO friend data object | |
86 | // (complete raw data) | |
87 | if (!fESDVZEROfriend) fESDVZEROfriend = new AliESDVZEROfriend(); | |
88 | if (obj) *fESDVZEROfriend = *obj; | |
1d99986f | 89 | } |
73df58ab | 90 | void AliESDfriend::SetTZEROfriend(AliESDTZEROfriend * obj) |
91 | { | |
92 | // | |
93 | // Set the TZERO friend data object | |
94 | // (complete raw data) | |
95 | if (!fESDTZEROfriend) fESDTZEROfriend = new AliESDTZEROfriend(); | |
96 | if (obj) *fESDTZEROfriend = *obj; | |
97 | } |