]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliESDCaloTrigger.cxx
Change from Int_t/SHort_t to smaller data types, the change from Float_t/Double_t...
[u/mrichter/AliRoot.git] / STEER / AliESDCaloTrigger.cxx
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 //                      Implementation of   Class AliESDCaloTrigger
18 //   This is a class that summarizes the Trigger Data of EMCal and Phos
19 //   for the ESD   
20 //   Origin: Christian Klein-Boesing, CERN, Christian.Klein-Boesing@cern.ch 
21 //-------------------------------------------------------------------------
22
23
24 #include "AliESDCaloTrigger.h"
25
26 ClassImp(AliESDCaloTrigger)
27
28 AliESDCaloTrigger::AliESDCaloTrigger() : 
29   TNamed(),
30   fTriggerAmplitudes(0x0),
31   fTriggerPosition(0x0)
32 {
33 }
34
35 AliESDCaloTrigger::AliESDCaloTrigger(const AliESDCaloTrigger &ctrig) : 
36   TNamed(ctrig),
37   fTriggerAmplitudes(ctrig.fTriggerAmplitudes),
38   fTriggerPosition(ctrig.fTriggerPosition)
39 {
40 }
41
42 AliESDCaloTrigger::~AliESDCaloTrigger()
43 {
44   delete fTriggerAmplitudes; fTriggerAmplitudes = 0;
45   delete fTriggerPosition; fTriggerPosition = 0;
46 }
47
48 AliESDCaloTrigger& AliESDCaloTrigger::operator=(const AliESDCaloTrigger& ctrig)
49 {
50   // assigment operator
51   if(this!=&ctrig) {
52     TNamed::operator=(ctrig);
53     // CKB dont't want to create leak if fTriggerAmp points to 
54     // something already 
55     delete fTriggerAmplitudes;
56     fTriggerAmplitudes = new TArrayF(*ctrig.fTriggerAmplitudes);
57     delete fTriggerPosition;    
58     fTriggerPosition = new TArrayF(*ctrig.fTriggerPosition);
59   } 
60   return *this;
61 }
62
63 void AliESDCaloTrigger::Reset()
64 {
65   // simple reset
66   if( fTriggerAmplitudes){  
67     fTriggerAmplitudes->Reset();
68   }
69   if( fTriggerPosition){
70     fTriggerPosition->Reset();
71   }
72 }
73
74