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 **************************************************************************/
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 //-------------------------------------------------------------------------
23 #include "AliESDZDCScalers.h"
25 ClassImp(AliESDZDCScalers)
27 //______________________________________________________________________________
28 AliESDZDCScalers::AliESDZDCScalers() :
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;
36 }//______________________________________________________________________________
37 AliESDZDCScalers::AliESDZDCScalers(const AliESDZDCScalers& zdc) :
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];
48 //______________________________________________________________________________
49 AliESDZDCScalers& AliESDZDCScalers::operator=(const AliESDZDCScalers&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];
63 //______________________________________________________________________________
64 void AliESDZDCScalers::Copy(TObject &obj) const {
66 // this overwrites the virtual TOBject::Copy()
67 // to allow run time copying without casting
71 AliESDZDCScalers *robj = dynamic_cast<AliESDZDCScalers*>(&obj);
72 if(!robj)return; // not an AliESDZDCScalers
78 //______________________________________________________________________________
79 void AliESDZDCScalers::Reset()
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;
89 //______________________________________________________________________________
90 void AliESDZDCScalers::Print(const Option_t *) const
92 // Print ESD scaler events for the ZDC
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]);