]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliAODJetEventBackground.cxx
Coverity fixes (Ivana)
[u/mrichter/AliRoot.git] / STEER / AliAODJetEventBackground.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-2007, 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 //     AOD class for  jet backgrounds
18 //     Author: Christian Klein-Boesing IKP Muenster
19 //-------------------------------------------------------------------------
20
21
22 #include "AliAODJetEventBackground.h"
23
24 using namespace std;
25
26 ClassImp(AliAODJetEventBackground)
27
28 TString AliAODJetEventBackground::fgkStdBranchName("jeteventbackground");
29
30
31
32 //______________________________________________________________________________
33 AliAODJetEventBackground::AliAODJetEventBackground() :
34     TNamed()
35 {
36     // Constructor
37   for(int i = 0;i < kMaxBackground;++i){
38     fBackground[i] = 0;
39     fSigma[i] = 0;
40     fMeanArea[i] = 0; 
41
42   } 
43 }
44
45 //______________________________________________________________________________
46 AliAODJetEventBackground::~AliAODJetEventBackground() 
47 {
48   //
49   // destructor
50   //
51 }
52
53 //______________________________________________________________________________
54 AliAODJetEventBackground::AliAODJetEventBackground(const AliAODJetEventBackground& back) :
55     TNamed(back)
56 {
57   //
58   // Copy constructor
59   //
60   for(int i = 0;i < kMaxBackground;++i){
61     fBackground[i] = back.fBackground[i];
62     fSigma[i] = back.fSigma[i];
63     fMeanArea[i] = back.fMeanArea[i]; 
64   } 
65   
66 }
67
68 //______________________________________________________________________________
69 AliAODJetEventBackground& AliAODJetEventBackground::operator=(const AliAODJetEventBackground& back)
70 {
71   //
72    // Assignment operator
73   //
74
75   if(this!=&back) {
76     TNamed::operator=(back);
77     for(int i = 0;i < kMaxBackground;++i){
78       fBackground[i] = back.fBackground[i];
79       fSigma[i] = back.fSigma[i];
80       fMeanArea[i] = back.fMeanArea[i]; 
81     } 
82   }
83
84   return *this;
85 }
86
87 void AliAODJetEventBackground::Print(Option_t* /*option*/) const 
88 {
89   //
90   // Print information of all data members
91   //
92
93   printf("Jet EventBackground :\n");
94   for(int i = 0;i < kMaxBackground;++i){
95     printf("%d: %3.E GeV Sigma %3.E Mean Area %3.E  \n",i,fBackground[i],fSigma[i],fMeanArea[i]);
96   } 
97 }
98
99 void AliAODJetEventBackground::Reset()  
100 {
101   //
102   // reset information of all data members
103   //
104   for(int i = 0;i < kMaxBackground;++i){
105     fBackground[i] = 0;
106     fSigma[i] = 0;
107     fMeanArea[i] = 0; 
108   } 
109 }