1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////////////////
20 // Data structure for the TPC monitor tree branch //
22 ///////////////////////////////////////////////////////////////////////////////
26 #include "AliMonitorDataTPC.h"
29 ClassImp(AliMonitorDataTPC)
32 //_____________________________________________________________________________
33 AliMonitorDataTPC::AliMonitorDataTPC()
35 // default constructor
37 fPt = fEta = fPhi = NULL;
41 //_____________________________________________________________________________
42 AliMonitorDataTPC::AliMonitorDataTPC(const AliMonitorDataTPC& data) :
45 AliFatal("copy constructor not implemented");
48 //_____________________________________________________________________________
49 AliMonitorDataTPC& AliMonitorDataTPC::operator = (const AliMonitorDataTPC&
52 AliFatal("assignment operator not implemented");
56 //_____________________________________________________________________________
57 AliMonitorDataTPC::AliMonitorDataTPC(Int_t size)
59 // constructor with given size
61 fPt = new Float_t[size];
62 fEta = new Float_t[size];
63 fPhi = new Float_t[size];
67 //_____________________________________________________________________________
68 AliMonitorDataTPC::~AliMonitorDataTPC()
70 // destructor: free allocated memory
77 //_____________________________________________________________________________
78 void AliMonitorDataTPC::SetSize(Int_t size)
80 // set a new array size and allocate memory if necessary
86 fPt = new Float_t[size];
87 fEta = new Float_t[size];
88 fPhi = new Float_t[size];
93 //_____________________________________________________________________________
94 void AliMonitorDataTPC::SetNTracks(Int_t nTracks)
96 // set the number of tracks
102 //_____________________________________________________________________________
103 void AliMonitorDataTPC::SetData(Int_t i, Float_t pt, Float_t eta, Float_t phi)
105 // set the data of the i-th track
107 if ((i < 0) || (i >= fSize)) {
108 AliError(Form("index %d out of range (0-%d)", i, fSize));