X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=START%2FAliSTARTdigit.cxx;h=ee007344408c1d15155755a1db487067edefe75c;hp=72fc1477484299bf1327cb9f3c8c11d17ae61014;hb=e73d68f20631f0cc0107bf8eaf3a58e83a649024;hpb=ef51244a85b4a68df6da3dbbdf3cacb21807397e diff --git a/START/AliSTARTdigit.cxx b/START/AliSTARTdigit.cxx index 72fc1477484..ee007344408 100644 --- a/START/AliSTARTdigit.cxx +++ b/START/AliSTARTdigit.cxx @@ -14,32 +14,134 @@ **************************************************************************/ /* $Log$ +Revision 1.4 2000/10/13 13:14:08 hristov +Bug fixes and code cleaning + +Revision 1.3 2000/07/13 16:41:29 fca +New START corrected for coding conventions + Revision 1.2 2000/03/24 17:40:35 alla New AliSTART */ -#include -#include -#include "AliRun.h" -#include "AliSTART.h" +#include #include "AliSTARTdigit.h" +#include ClassImp(AliSTARTdigit) -AliSTARTdigit::AliSTARTdigit(Int_t Timeav, Int_t Timediff) - //: AliDigit(tracks) -{ - // - // Create START digit - // The creator for the AliSTARTdigit class. This routine fills the - // AliSTARTdigit data members from the array digits. The array of track - // numbers are passed to the AliDigit creator. The order of the elements - // in the digits array are fEvent = digits[0], fAmplitude = digits[1], - // fTimeAverage = digits[1], fTimeDiff = digits[1], and fDet = digits[4]. - // Therefore the array digits is expected to be at least 5 elements long. - // - Timeav = fTimeAverage; - Timediff = fTimeDiff; +//------------------------------------ + AliSTARTdigit::AliSTARTdigit() : TObject() +{ + fTimeAverage=9999; + fTimeDiff=9999; + fTimeBestRight=9999; + fTimeBestLeft=9999; + + fTimeRight = new TArrayI(12); + fTimeLeft = new TArrayI(12); + fADCRight = new TArrayI(12); + fADCLeft = new TArrayI(12); +} +//----------------------------------- +void AliSTARTdigit::SetTimeRight (TArrayI &o) +{ + fTimeRight = new TArrayI(12); + + Int_t i; + for (i=0; i<12; i++) + { + Int_t buf=o.At(i); + fTimeRight->AddAt(buf,i); + } +} +//-------------------------------------------- +void AliSTARTdigit::SetTimeLeft (TArrayI &o) +{ + + fTimeLeft = new TArrayI(12); + Int_t i; + for (i=0; i<12; i++) + { + Int_t buf=o.At(i); + fTimeLeft->AddAt(buf,i); + } +} +//-------------------------------------------- +void AliSTARTdigit::GetTimeLeft (TArrayI &o) +{ + + Int_t i; + for (i=0; i<12; i++) + { + o[i]=fTimeLeft->At(i); + } +} +//-------------------------------------------- +void AliSTARTdigit::GetTimeRight (TArrayI &o) +{ + + Int_t i; + for (i=0; i<12; i++) + { + o[i]=fTimeRight->At(i); + } +} +//-------------------------------------------- +void AliSTARTdigit::GetADCLeft (TArrayI &o) +{ + + Int_t i; + for (i=0; i<12; i++) + { + o[i]=fADCLeft->At(i); + } +} +//-------------------------------------------- +void AliSTARTdigit::GetADCRight (TArrayI &o) +{ + + Int_t i; + for (i=0; i<12; i++) + { + o[i]=fADCRight->At(i); + } +} +//-------------------------------------------- +void AliSTARTdigit::SetADCLeft (TArrayI &o) +{ + + fADCLeft = new TArrayI(12); + Int_t i; + // Float_t fProcessKoef=1; // for pb 0.001 + for (i=0; i<12; i++) + { + Int_t buf=(o.At(i)); + fADCLeft->AddAt(buf,i); + } +} +//-------------------------------------------- +void AliSTARTdigit::SetADCRight (TArrayI &o) +{ + + // Float_t fProcessKoef=1; // for pb 0.001 + fADCRight = new TArrayI(12); + Int_t i; + for (i=0; i<12; i++) + { + Int_t buf=(o.At(i)); + fADCRight->AddAt(buf,i); + } +} +//------------------------------------------------------ +void AliSTARTdigit::Print() +{ + printf("AliSTARTdigit: fTimeAverage=%d, fTimeDiff=%d\n", + fTimeAverage, fTimeDiff); + cout<<" BestTimeRigh "<