/************************************************************************* * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ /* $Id: AliTRDarraySignal.cxx 25392 2008-04-23 19:40:29Z cblume $ */ ///////////////////////////////////////////////////////// // // // Container Class for Signals // // // // Author: // // Hermes Leon Vargas (hleon@ikf.uni-frankfurt.de) // // // ///////////////////////////////////////////////////////// #include "AliTRDarraySignal.h" //#include "AliLog.h" ClassImp(AliTRDarraySignal) //_______________________________________________________________________ AliTRDarraySignal::AliTRDarraySignal() :TObject() ,fNdet(0) ,fNrow(0) ,fNcol(0) ,fNtime(0) ,fNdim(0) ,fSignal(0) { // // AliTRDarraySignal default constructor // } //_______________________________________________________________________ AliTRDarraySignal::AliTRDarraySignal(Int_t nrow, Int_t ncol,Int_t ntime) :TObject() ,fNdet(0) ,fNrow(0) ,fNcol(0) ,fNtime(0) ,fNdim(0) ,fSignal(0) { // // AliTRDarraySignal constructor // Allocate(nrow,ncol,ntime); } //_______________________________________________________________________ AliTRDarraySignal::AliTRDarraySignal(const AliTRDarraySignal &d) :TObject() ,fNdet(d.fNdet) ,fNrow(d.fNrow) ,fNcol(d.fNcol) ,fNtime(d.fNtime) ,fNdim(d.fNdim) ,fSignal(0) { // // AliTRDarraySignal copy constructor // fSignal = new Float_t[fNdim]; for(Int_t i=0; ithreshold) { counter++; } } return counter; } //_______________________________________________________________________ void AliTRDarraySignal::Compress(Float_t minval) { // // Compress the array, setting values equal or // below minval to zero (minval>=0) // Int_t counter=0; Int_t newDim=0; Int_t j; Int_t r=0; Int_t *longArr; longArr = new Int_t[fNdim]; Int_t k=0; //Initialize the array for(Int_t i=0; iminval) { buffer[i]=fSignal[counterTwo]; } if(fSignal[counterTwo]<=minval) { buffer[i]=-(longArr[g]); counterTwo=counterTwo+longArr[g]-1; g++; } counterTwo++; } } //Copy the buffer if(fSignal) { delete [] fSignal; fSignal=0; } fSignal = new Float_t[newDim]; fNdim = newDim; for(Int_t i=0; i0) { bufferE[i]=fSignal[contaexp]; } if(fSignal[contaexp]<0) { for(Int_t j=0; j