]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDdigitsParam.cxx
Try to fix some more coverity defects
[u/mrichter/AliRoot.git] / TRD / AliTRDdigitsParam.cxx
CommitLineData
966f6939 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/* $Id: AliTRDdigitsParam.cxx 34070 2009-08-04 15:34:53Z cblume $ */
17
18///////////////////////////////////////////////////////////////////////////////
19// //
20// Class containing parameters for digits //
21// //
22///////////////////////////////////////////////////////////////////////////////
23
24#include "AliLog.h"
25
26#include "AliTRDdigitsParam.h"
966f6939 27
28ClassImp(AliTRDdigitsParam)
29
30//_____________________________________________________________________________
31AliTRDdigitsParam::AliTRDdigitsParam()
32 :TObject()
966f6939 33{
34 //
35 // Default constructor
36 //
37
bb1f50e8 38 for (Int_t i = 0; i < 540; i++) {
a0446ff1 39 fNTimeBins[i] = 0;
bb1f50e8 40 fPretriggerPhase[i] = 0;
a0446ff1 41 fADCbaseline[i] = 0;
bb1f50e8 42 }
43
966f6939 44}
45
46//_____________________________________________________________________________
47AliTRDdigitsParam::~AliTRDdigitsParam()
48{
49 //
50 // Destructor
51 //
52
53}
54
55//_____________________________________________________________________________
56AliTRDdigitsParam::AliTRDdigitsParam(const AliTRDdigitsParam &p)
57 :TObject(p)
966f6939 58{
59 //
60 // Copy constructor
61 //
62
bb1f50e8 63 for (Int_t i = 0; i < 540; i++) {
a0446ff1 64 fNTimeBins[i] = p.fNTimeBins[i];
bb1f50e8 65 fPretriggerPhase[i] = p.fPretriggerPhase[i];
a0446ff1 66 fADCbaseline[i] = p.fADCbaseline[i];
bb1f50e8 67 }
68
966f6939 69}
70
71//_____________________________________________________________________________
72AliTRDdigitsParam &AliTRDdigitsParam::operator=(const AliTRDdigitsParam &p)
73{
74 //
75 // Assignment operator
76 //
77
78 if (this != &p) {
79 ((AliTRDdigitsParam &) p).Copy(*this);
80 }
81
82 return *this;
83
84}
85
86//_____________________________________________________________________________
87void AliTRDdigitsParam::Copy(TObject &p) const
88{
89 //
90 // Copy function
91 //
92
93 AliTRDdigitsParam *target = dynamic_cast<AliTRDdigitsParam*> (&p);
94 if (!target) {
95 return;
96 }
97
bb1f50e8 98 for (Int_t i = 0; i < 540; i++) {
a0446ff1 99 target->fNTimeBins[i] = fNTimeBins[i];
bb1f50e8 100 target->fPretriggerPhase[i] = fPretriggerPhase[i];
a0446ff1 101 target->fADCbaseline[i] = fADCbaseline[i];
bb1f50e8 102 }
103
966f6939 104}