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 **************************************************************************/
16 ///////////////////////////////////////////////////////////////////////////////
18 /// This is a class for containing all the AD DDL raw data
19 /// It is written to the ESD-friend file
21 ///////////////////////////////////////////////////////////////////////////////
23 #include "AliESDADfriend.h"
25 ClassImp(AliESDADfriend)
27 //_____________________________________________________________________________
28 AliESDADfriend::AliESDADfriend():
33 // default constructor
34 for (Int_t iScaler = 0; iScaler < kNScalers; iScaler++)
35 fScalers[iScaler] = 0;
37 for (Int_t iChannel = 0; iChannel < kNChannels; iChannel++) {
38 fBBScalers[iChannel] = 0;
39 fBGScalers[iChannel] = 0;
41 for (Int_t iEv = 0; iEv < kNEvOfInt; iEv++) {
42 fADC[iChannel][iEv] = 0.0;
43 fIsInt[iChannel][iEv] = kFALSE;
44 fIsBB[iChannel][iEv] = kFALSE;
45 fIsBG[iChannel][iEv] = kFALSE;
47 fTime[iChannel] = 0.0;
48 fWidth[iChannel] = 0.0;
52 //_____________________________________________________________________________
53 AliESDADfriend::~AliESDADfriend()
58 //_____________________________________________________________________________
59 AliESDADfriend::AliESDADfriend(const AliESDADfriend& adfriend):
61 fTrigger(adfriend.fTrigger),
62 fTriggerMask(adfriend.fTriggerMask)
65 for (Int_t iScaler = 0; iScaler < kNScalers; iScaler++)
66 fScalers[iScaler] = adfriend.fScalers[iScaler];
68 for (Int_t iChannel = 0; iChannel < kNChannels; iChannel++) {
69 fBBScalers[iChannel] = adfriend.fBBScalers[iChannel];
70 fBGScalers[iChannel] = adfriend.fBGScalers[iChannel];
72 for (Int_t iEv = 0; iEv < kNEvOfInt; iEv++) {
73 fADC[iChannel][iEv] = adfriend.fADC[iChannel][iEv];
74 fIsInt[iChannel][iEv] = adfriend.fIsInt[iChannel][iEv];
75 fIsBB[iChannel][iEv] = adfriend.fIsBB[iChannel][iEv];
76 fIsBG[iChannel][iEv] = adfriend.fIsBG[iChannel][iEv];
78 fTime[iChannel] = adfriend.fTime[iChannel];
79 fWidth[iChannel] = adfriend.fWidth[iChannel];
83 //_____________________________________________________________________________
84 AliESDADfriend& AliESDADfriend::operator = (const AliESDADfriend& adfriend)
86 // assignment operator
87 if(&adfriend == this) return *this;
88 TObject::operator=(adfriend);
90 fTrigger = adfriend.fTrigger;
91 fTriggerMask = adfriend.fTriggerMask;
93 for (Int_t iScaler = 0; iScaler < kNScalers; iScaler++)
94 fScalers[iScaler] = adfriend.fScalers[iScaler];
96 for (Int_t iChannel = 0; iChannel < kNChannels; iChannel++) {
97 fBBScalers[iChannel] = adfriend.fBBScalers[iChannel];
98 fBGScalers[iChannel] = adfriend.fBGScalers[iChannel];
100 for (Int_t iEv = 0; iEv < kNEvOfInt; iEv++) {
101 fADC[iChannel][iEv] = adfriend.fADC[iChannel][iEv];
102 fIsInt[iChannel][iEv] = adfriend.fIsInt[iChannel][iEv];
103 fIsBB[iChannel][iEv] = adfriend.fIsBB[iChannel][iEv];
104 fIsBG[iChannel][iEv] = adfriend.fIsBG[iChannel][iEv];
106 fTime[iChannel] = adfriend.fTime[iChannel];
107 fWidth[iChannel] = adfriend.fWidth[iChannel];
113 void AliESDADfriend::Reset()
115 // Reset the contents of the object
119 for (Int_t iScaler = 0; iScaler < kNScalers; iScaler++)
120 fScalers[iScaler] = 0;
122 for (Int_t iChannel = 0; iChannel < kNChannels; iChannel++) {
123 fBBScalers[iChannel] = 0;
124 fBGScalers[iChannel] = 0;
126 for (Int_t iEv = 0; iEv < kNEvOfInt; iEv++) {
127 fADC[iChannel][iEv] = 0.0;
128 fIsInt[iChannel][iEv] = kFALSE;
129 fIsBB[iChannel][iEv] = kFALSE;
130 fIsBG[iChannel][iEv] = kFALSE;
132 fTime[iChannel] = 0.0;
133 fWidth[iChannel] = 0.0;