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 ///////////////////////////////////////////////////////////////////////////////
25 #include "AliMonitorDataTPC.h"
28 ClassImp(AliMonitorDataTPC)
31 //_____________________________________________________________________________
32 AliMonitorDataTPC::AliMonitorDataTPC()
34 // default constructor
36 fPt = fEta = fPhi = NULL;
40 //_____________________________________________________________________________
41 AliMonitorDataTPC::AliMonitorDataTPC(const AliMonitorDataTPC& data) :
44 Fatal("AliMonitorDataTPC", "copy constructor not implemented");
47 //_____________________________________________________________________________
48 AliMonitorDataTPC& AliMonitorDataTPC::operator = (const AliMonitorDataTPC&
51 Fatal("operator =", "assignment operator not implemented");
55 //_____________________________________________________________________________
56 AliMonitorDataTPC::AliMonitorDataTPC(Int_t size)
58 // constructor with given size
60 fPt = new Float_t[size];
61 fEta = new Float_t[size];
62 fPhi = new Float_t[size];
66 //_____________________________________________________________________________
67 AliMonitorDataTPC::~AliMonitorDataTPC()
69 // destructor: free allocated memory
76 //_____________________________________________________________________________
77 void AliMonitorDataTPC::SetSize(Int_t size)
79 // set a new array size and allocate memory if necessary
85 fPt = new Float_t[size];
86 fEta = new Float_t[size];
87 fPhi = new Float_t[size];
92 //_____________________________________________________________________________
93 void AliMonitorDataTPC::SetNTracks(Int_t nTracks)
95 // set the number of tracks
101 //_____________________________________________________________________________
102 void AliMonitorDataTPC::SetData(Int_t i, Float_t pt, Float_t eta, Float_t phi)
104 // set the data of the i-th track
106 if ((i < 0) || (i >= fSize)) {
107 Error("SetData", "index %d out of range (0-%d)", i, fSize);