]> git.uio.no Git - u/mrichter/AliRoot.git/blame - VZERO/AliVZEROSDigit.cxx
Code commit for Ramona, fix of warnings, add of AddTask macros and exchange of comments
[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
72da5ce8 43 fCharges = new Float_t[fNBins];
1a3d5c7e 44 if (charges) {
45 for(Int_t i = 0; i < fNBins; ++i)
46 fCharges[i] = charges[i];
47 }
48 else {
49 for(Int_t i = 0; i < fNBins; ++i)
50 fCharges[i] = 0;
51 }
52
53 if (labels)
54 for(Int_t iTrack = 0; iTrack < 3; ++iTrack) fTracks[iTrack] = labels[iTrack];
55}
56
72da5ce8 57//__________________________________________________________________________
58AliVZEROSDigit::~AliVZEROSDigit()
59{
60 // Destructor
61 // Delete the charges array if it was allocated
62 if (fCharges) {
63 delete [] fCharges;
64 fCharges = NULL;
65 }
66}
67
1a3d5c7e 68//__________________________________________________________________________
69void AliVZEROSDigit::Print(const Option_t*) const
70{
71 // Dumps digit object
72 Dump();
73}