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():
41 // default constructor
45 //_____________________________________________________________________________
46 AliMonitorDataTPC::AliMonitorDataTPC(Int_t size):
49 fPt(new Float_t[size]),
50 fEta(new Float_t[size]),
51 fPhi(new Float_t[size]),
54 // constructor with given size
58 //_____________________________________________________________________________
59 AliMonitorDataTPC::~AliMonitorDataTPC()
61 // destructor: free allocated memory
68 //_____________________________________________________________________________
69 void AliMonitorDataTPC::SetSize(Int_t size)
71 // set a new array size and allocate memory if necessary
77 fPt = new Float_t[size];
78 fEta = new Float_t[size];
79 fPhi = new Float_t[size];
84 //_____________________________________________________________________________
85 void AliMonitorDataTPC::SetNTracks(Int_t nTracks)
87 // set the number of tracks
93 //_____________________________________________________________________________
94 void AliMonitorDataTPC::SetData(Int_t i, Float_t pt, Float_t eta, Float_t phi)
96 // set the data of the i-th track
98 if ((i < 0) || (i >= fSize)) {
99 AliError(Form("index %d out of range (0-%d)", i, fSize));