]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliESDZDCScalers.cxx
Removed writing of jets_local.root
[u/mrichter/AliRoot.git] / STEER / AliESDZDCScalers.cxx
CommitLineData
ca20f14c 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
17//-------------------------------------------------------------------------
18// This class is used to store data in events where scalers are read
19// in SOFTWARE_TRIGGER events, no ADC datum filled in such events
20// Author: Chiara Oppedisano Chiara.Oppedisano@to.infn.it
21//-------------------------------------------------------------------------
22
23#include "AliESDZDCScalers.h"
24
25ClassImp(AliESDZDCScalers)
26
27//______________________________________________________________________________
28AliESDZDCScalers::AliESDZDCScalers() :
29 TObject()
30{
31 // constructor
32 for(Int_t i=0; i<2; i++) fScalerDown[i]=0;
33 for(Int_t i=0; i<8; i++) fScalerUp[i]=0;
34 for(Int_t i=0; i<32; i++) fVMEScaler[i]=0;
35
36}//______________________________________________________________________________
37AliESDZDCScalers::AliESDZDCScalers(const AliESDZDCScalers& zdc) :
38 TObject(zdc)
39{
40 // copy constructor
41 for(Int_t i=0; i<32; i++){
42 if(i<2) fScalerDown[i] = zdc.fScalerDown[i];
43 if(i<8) fScalerUp[i] = zdc.fScalerUp[i];
44 fVMEScaler[i] = zdc.fVMEScaler[i];
45 }
46}
47
48//______________________________________________________________________________
49AliESDZDCScalers& AliESDZDCScalers::operator=(const AliESDZDCScalers&zdc)
50{
51 // assigment operator
52 if(this!=&zdc) {
53 TObject::operator=(zdc);
54 for(Int_t i=0; i<32; i++){
55 if(i<2) fScalerDown[i] = zdc.fScalerDown[i];
56 if(i<8) fScalerUp[i] = zdc.fScalerUp[i];
57 fVMEScaler[i] = zdc.fVMEScaler[i];
58 }
59 }
60 return *this;
61}
62
63//______________________________________________________________________________
64void AliESDZDCScalers::Copy(TObject &obj) const {
65
66 // this overwrites the virtual TOBject::Copy()
67 // to allow run time copying without casting
68 // in AliESDEvent
69
70 if(this==&obj)return;
71 AliESDZDCScalers *robj = dynamic_cast<AliESDZDCScalers*>(&obj);
72 if(!robj)return; // not an AliESDZDCScalers
73 *robj = *this;
74
75}
76
77
78//______________________________________________________________________________
79void AliESDZDCScalers::Reset()
80{
81 // reset all data members
82 for(Int_t i=0; i<32; i++){
83 if(i<2) fScalerDown[i] = 0;
84 if(i<8) fScalerUp[i] = 0;
85 fVMEScaler[i] = 0;
86 }
87}
88
89//______________________________________________________________________________
90void AliESDZDCScalers::Print(const Option_t *) const
91{
92 // Print ESD scaler events for the ZDC
93 printf("\n");
94 for(Int_t i=0; i<2; i++) printf("\tfScalerDown[%d] = %d \n",i,fScalerDown[i]);
95 for(Int_t i=0; i<8; i++) printf("\tfScalerUp[%d] = %d \n",i,fScalerUp[i]);
96 for(Int_t i=0; i<32; i++) printf("\tfVMEScaler[%d] = %d \n",i,fVMEScaler[i]);
97 printf("\n");
98}