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 //-------------------------------------------------------------------------
17 // Implementation of Class AliESDCaloTrigger
18 // This is a class that summarizes the Trigger Data of EMCal and Phos
20 // Origin: Christian Klein-Boesing, CERN, Christian.Klein-Boesing@cern.ch
21 //-------------------------------------------------------------------------
24 #include "AliESDCaloTrigger.h"
26 ClassImp(AliESDCaloTrigger)
28 AliESDCaloTrigger::AliESDCaloTrigger() :
30 fTriggerAmplitudes(0x0),
35 AliESDCaloTrigger::AliESDCaloTrigger(const AliESDCaloTrigger &ctrig) :
37 fTriggerAmplitudes(ctrig.fTriggerAmplitudes),
38 fTriggerPosition(ctrig.fTriggerPosition)
42 AliESDCaloTrigger::~AliESDCaloTrigger()
44 delete fTriggerAmplitudes; fTriggerAmplitudes = 0;
45 delete fTriggerPosition; fTriggerPosition = 0;
48 AliESDCaloTrigger& AliESDCaloTrigger::operator=(const AliESDCaloTrigger& ctrig)
52 TNamed::operator=(ctrig);
53 if(ctrig.fTriggerAmplitudes){
54 // asign or copy construct
55 if(fTriggerAmplitudes)*fTriggerAmplitudes = *ctrig.fTriggerAmplitudes;
56 else fTriggerAmplitudes = new TArrayF(*ctrig.fTriggerAmplitudes);
59 delete fTriggerAmplitudes;
60 fTriggerAmplitudes = 0;
63 if(ctrig.fTriggerPosition){
64 // asign or copy construct
65 if(fTriggerPosition)*fTriggerPosition = *ctrig.fTriggerPosition;
66 else fTriggerPosition = new TArrayF(*ctrig.fTriggerPosition);
69 delete fTriggerPosition;
76 void AliESDCaloTrigger::Copy(TObject &obj) const {
78 // this overwrites the virtual TOBject::Copy()
79 // to allow run time copying without casting
83 AliESDCaloTrigger *robj = dynamic_cast<AliESDCaloTrigger*>(&obj);
84 if(!robj)return; // not an AliESDCaloTrigger
90 void AliESDCaloTrigger::Reset()
93 if( fTriggerAmplitudes){
94 fTriggerAmplitudes->Reset();
96 if( fTriggerPosition){
97 fTriggerPosition->Reset();