]> git.uio.no Git - u/mrichter/AliRoot.git/blame - VZERO/AliVZEROSDigit.cxx
Do not allocate fixed size arrays via new
[u/mrichter/AliRoot.git] / VZERO / AliVZEROSDigit.cxx
CommitLineData
1a3d5c7e 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#include "AliVZEROSDigit.h"
17
18ClassImp(AliVZEROSDigit)
19
20//__________________________________________________________________________
21AliVZEROSDigit::AliVZEROSDigit()
22 :AliDigit(),
23 fPMNumber(0),
24 fNBins(0),
25 fCharges(NULL)
26{
27 // Standard default
28 // constructor
29}
30
31//__________________________________________________________________________
32AliVZEROSDigit::AliVZEROSDigit(Int_t pmnumber,
33 Int_t nbins,
34 Float_t *charges,
35 Int_t *labels)
36:AliDigit(),
37fPMNumber(pmnumber),
38fNBins(nbins),
39fCharges(NULL)
40{
41 // Constructor
42 // Used in the digitizer
43 if (charges) {
44 for(Int_t i = 0; i < fNBins; ++i)
45 fCharges[i] = charges[i];
46 }
47 else {
48 for(Int_t i = 0; i < fNBins; ++i)
49 fCharges[i] = 0;
50 }
51
52 if (labels)
53 for(Int_t iTrack = 0; iTrack < 3; ++iTrack) fTracks[iTrack] = labels[iTrack];
54}
55
56//__________________________________________________________________________
57void AliVZEROSDigit::Print(const Option_t*) const
58{
59 // Dumps digit object
60 Dump();
61}