1 /**************************************************************************
2 * Copyright(c) 1998-2007, 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 **************************************************************************/
18 //-------------------------------------------------------------------------
19 // AOD class to store tower data
20 // Author: Markus Oldenburg, CERN
21 //-------------------------------------------------------------------------
23 #include "AliAODTowers.h"
25 ClassImp(AliAODTowers)
27 AliAODTowers::AliAODTowers() : TNamed(), fNTowers(0), fIndex(0), fAmplitude(0), fIsSorted(kTRUE), fType(kUndef)
29 // default constructor
32 AliAODTowers::AliAODTowers(const char* name, const char* title, AODTwrs_t ttype) : TNamed(name, title), fNTowers(0), fIndex(0), fAmplitude(0), fIsSorted(kTRUE), fType(ttype)
37 void AliAODTowers::CreateContainer(Short_t nTowers)
39 // function that creates container to store tower data
50 fIndex = new Short_t[fNTowers];
51 fAmplitude = new Double32_t[fNTowers];
54 AliAODTowers::~AliAODTowers()
61 void AliAODTowers::DeleteContainer()
63 // deletes allocated memory
81 Bool_t AliAODTowers::SetTower(Short_t pos, Short_t index, Double32_t amplitude)
83 // Sets a tower at the given position
85 if (pos>=0 && pos < fNTowers) {
87 fAmplitude[pos] = amplitude;