From: nilsen Date: Fri, 26 Mar 2004 18:56:00 +0000 (+0000) Subject: Bug fix for SDD Test Beam simulation X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=5590a2e373cc3808bdf6717b7b4596ff413b6e60;p=u%2Fmrichter%2FAliRoot.git Bug fix for SDD Test Beam simulation --- diff --git a/ITS/AliITSspdTestBeam.cxx b/ITS/AliITSspdTestBeam.cxx index 9d37947ef64..7990d21a801 100644 --- a/ITS/AliITSspdTestBeam.cxx +++ b/ITS/AliITSspdTestBeam.cxx @@ -16,14 +16,10 @@ /* $Id$ */ - #include #include #include #include -#include -#include -#include #include "AliITSspdTestBeam.h" @@ -39,6 +35,8 @@ AliITSspdTestBeam::AliITSspdTestBeam(){ // Return: // A default constructed AliITSspdTestBeam class + fRH = 0; + fRT = 0; fNBrst = 0; fBrstSize = 0; fBrst = 0; @@ -50,7 +48,6 @@ AliITSspdTestBeam::AliITSspdTestBeam(){ fNEvents = 0; fBuffSize = 0; fBuff = 0; - fVersion = 0; fITS = 0; fNfiles = 0; fMaxFiles = 0; @@ -70,6 +67,8 @@ AliITSspdTestBeam::AliITSspdTestBeam(const Char_t *filename,const Char_t *opt, // Return: // A default constructed AliITSspdTestBeam class + fRH = 0; + fRT = 0; fNBrst = 0; fBrstSize = 0; fBrst = 0; @@ -81,7 +80,6 @@ AliITSspdTestBeam::AliITSspdTestBeam(const Char_t *filename,const Char_t *opt, fNEvents = 0; fBuffSize = 0; fBuff = 0; - fVersion = 0; fITS = 0; fNfiles = 0; fMaxFiles = 0; @@ -104,169 +102,43 @@ AliITSspdTestBeam::~AliITSspdTestBeam(){ // none. // Return: // nothing. + Int_t i,np; - DeletefBrst(); - DeletefNData(); - DeletefData(); - DeletefHData(); - DeletefTData(); - DeletefFiles(); - DeletefBrstSize(); - DeletefBuff(); - DeletefITS(); - DeletefNeventsStart(); - DeletefNeventsEnd(); -} -//---------------------------------------------------------------------- -void AliITSspdTestBeam::DeletefBrst(){ - // Properly deletes fBrst object. - // Inputs: - // none. - // Outputs: - // none. - // Return: - // none. - Int_t i; - - if(fBrst){ - for(i=0;iSizeOf()]); // Check termination - size -= sizeof(UInt_t); - tr = (UInt_t*) &(fBuff[size]); + tr = (UInt_t*) &(fBuff[fBuffSize-(fRT->SizeOf())-sizeof(UInt_t)]); if(!(*tr==fTermination)){ - cout << "Error Termination word not found at " << size << " tr=0x" << - hex << *tr << dec << endl; + cout << "Error Termination word not found at "<fNEvents) fNEvents = fRT.GetNumberOfEvents(); - fNBrst = fNEvents/fRH.GetBurstSize(); + if(fNData)for(i=0;iGetNumberOfEvents(); + fNBrst = fNEvents/fRH->GetBurstSize(); fBrst = new AliITSspdTestBeamBurst*[fNBrst]; fBrstSize = new Int_t*[np]; fNData = new Int_t*[np]; @@ -412,39 +289,34 @@ Int_t AliITSspdTestBeam::Decode(){ fTData[i][j] = 0; } // end for j } // end for i - size = fRH.SizeOf(); + if(fBrst){delete[] fBrst; fBrst = 0;} + size = fRH->SizeOf(); u.bt = &fBuff[size]; // - for(iburst=0;(*(u.wd) != fTermination)&&(u.wdSizeOf(); // increment wd byte wise for(ip=0;ipMode()){ case AliITSTestBeamData::kData : fNData[ip][ivnt[ip]]++; // set pointer to first data member - if(fData[ip][ivnt[ip]] == 0 ){ - fData[ip][ivnt[ip]] = d; - } // end if + if(fData[ip][ivnt[ip]] == 0 ) fData[ip][ivnt[ip]] = d; break; case AliITSTestBeamData::kHead : - fHData[ip][ivnt[ip]] = d; - fTData[ip][ivnt[ip]] = 0; fNData[ip][ivnt[ip]] = 0; fData[ip][ivnt[ip]] = 0; + fHData[ip][ivnt[ip]++] = d; break; case AliITSTestBeamData::kTail : case AliITSTestBeamData::kAbort : - fTData[ip][ivnt[ip]++] = d; + fTData[ip][ivnt[ip]] = d; break; default: cout << "Unknown Data Type: wd="<GetRunLoader()->SetEventNumber(evnt); - fLoader->SetEvent(); - if(!(fLoader->TreeD())){ - fLoader->MakeTree("D"); - } // end if - - fITS->MakeBranch("D"); - //fITS->SetTreeAddress(); - fITS->SetTreeAddressD(fLoader->TreeD()); - - for(p=0;pChip(i); - module = DecodeModule(p,chip); - row = fData[p][evnt]->Row(i); - colm = DecodeColumn(p,chip,fData[p][evnt]->Colm(i)); - digit[0] = row; digit[1] = colm, digit[2] = 1; - fITS->AddRealDigit(0,digit); - if(module!=oldmodule) { // New Module - oldmodule= module; - fLoader->TreeD()->Fill(); - fITS->ResetDigits(); - } // end if - } // end for p - fITS->ClearModules(); - fLoader->TreeD()->GetEntries(); - fLoader->TreeD()->AutoSave(); - fLoader->TreeD()->Reset(); -} -//---------------------------------------------------------------------- -void AliITSspdTestBeam::PrintHeadder(ostream *os){ - // Prints the Run Headder. - // Inputs: - // ostream *os Output stream where the data should go to - // Outputs: - // none. - // Return: - // none. - fRH.Print(os); -} -//---------------------------------------------------------------------- -void AliITSspdTestBeam::PrintTrailer(ostream *os){ - // Prints the Run Trailer. - // Inputs: - // ostream *os Output stream where the data should go to - // Outputs: - // none. - // Return: - // none. - fRT.Print(os); -} -//---------------------------------------------------------------------- -void AliITSspdTestBeam::PrintBurstInfo(Int_t i,ostream *os){ - // Prints the specified burts information - // Inputs: - // Int_t i Specifies which burst to print. - // ostream *os Output stream where the data should go to - // Outputs: - // none. - // Return: - // none. - fBrst[i]->Print(os); -} -//---------------------------------------------------------------------- -void AliITSspdTestBeam::PrintEventData(Int_t evnt,ostream *os){ - // Prints the data for a specified event number. - // Inputs: - // Int_t evnt events number - // ostream *os Output stream where the data should go to - // Outputs: - // none. - // Return: - // none. - Int_t p,i; - - for(p=0;pPrint(os,i); - *os << endl; - } // end for p -} -//---------------------------------------------------------------------- -void AliITSspdTestBeam::PrintEventHead(Int_t evnt,ostream *os){ - // Prints the data Headder for a specified event number. - // Inputs: - // Int_t evnt events number - // ostream *os Output stream where the data should go to - // Outputs: - // none. - // Return: - // none. - Int_t p; - - for(p=0;pfHead.fDate; - *os<<" " << fUnion->fHead.fTime << endl; - *os<<"Buffer Size [0], [1], [2]: " << GetBuffSize(0) << ","; - *os<fTail.fDate; - *os << " " << fUnion->fTail.fTime << endl; - *os <<"Termination Flag: " << GetTermMode() << endl; + *os << "Number of Events: "<< fUnion.fTail.fEvents << " Written: " + << fUnion.fTail.fDate; + *os << " " << fUnion.fTail.fTime << endl; + *os <<"Termination Flag: " << fUnion.fTail.fTermMode << endl; return; } //---------------------------------------------------------------------- @@ -772,8 +447,8 @@ void AliITSspdTestBeamBurst::Print(ostream *os){ #endif #endif */ - *os << "Burst Number: "<< GetEventNumber()<< " Transfers: " - << GetTransfers() << endl; + *os << "Burst Number: "<< fUnion.fBrst.fNumber << " Transfers: " + << fUnion.fBrst.fTransfers << endl; return; } //---------------------------------------------------------------------- @@ -791,7 +466,7 @@ ostream &operator<<(ostream &os,AliITSspdTestBeamBurst &p){ return os; } //====================================================================== -void AliITSspdTestBeamData::Print(ostream *os,Int_t i){ +void AliITSspdTestBeamData::Print(ostream *os){ // print out the the Test Beam Data information // Inputs: // ostream *os Pointer to the output stream. @@ -814,24 +489,22 @@ void AliITSspdTestBeamData::Print(ostream *os,Int_t i){ #endif #endif */ - //*os << "Word=" << hex << (fUnion+i)->fBuf[0] << hex << (fUnion+i)->fBuf[1] - // << hex << (fUnion+i)->fBuf[2] << hex << (fUnion+i)->fBuf[3] - *os << "Word=" << hex << (fUnion+i)->fIBuff - << dec; - switch (this->Mode(i)){ + *os << "Word=" << hex << fUnion.fBuf[0] << hex << fUnion.fBuf[1] + << hex << fUnion.fBuf[2] << hex << fUnion.fBuf[3] << dec; + switch (this->Mode()){ case AliITSTestBeamData::kData : - *os << " kData chip=" << setw(3) << Chip(i); - *os << " Row=" << setw(3) << Row(i); - *os << " Column=" << setw(3) << Colm(i); + *os << " kData chip=" << setw(3) << fUnion.fDataD.fChip; + *os << " Row=" << setw(3) << fUnion.fDataD.fRow; + *os << " Column=" << setw(3) << fUnion.fDataD.fColm; break; case AliITSTestBeamData::kHead : - *os << " kHead Event Sync =" << EventCounter(); + *os << " kHead Event Sync =" << fUnion.fDataH.fEventSync; break; case AliITSTestBeamData::kTail : - *os << " kTail Transmitted word count =" << TransWordCount(); + *os << " kTail Transmitted word count =" << fUnion.fDataT.fTrans; break; case AliITSTestBeamData::kAbort : - *os << " kAbort Transmitted word count =" << TransWordCount(); + *os << " kAbort Transmitted word count =" << fUnion.fDataA.fTrans; break; default: *os << " Unknown Data Type"; @@ -851,6 +524,6 @@ ostream &operator<<(ostream &os,AliITSspdTestBeamData &p){ // Return: // ostream &os pointing now to the end of the present stream. - p.Print(&os,0); + p.Print(&os); return os; } diff --git a/ITS/AliITSspdTestBeam.h b/ITS/AliITSspdTestBeam.h index 72e3bf0c944..975931823cd 100644 --- a/ITS/AliITSspdTestBeam.h +++ b/ITS/AliITSspdTestBeam.h @@ -1,4 +1,56 @@ #include +#ifndef ALIITSSPDTESTBEAM_H +#define ALIITSSPDTESTBEAM_H + +/* Copyright (c) 1998-2001, ALICE Experiment at CERN, All rights reserved * + * See cxx source for full Copyright notice */ + +#include + +//class ifstream; +class AliITS; +class AliITSspdTestBeamHeader; +class AliITSspdTestBeamTail; +class AliITSspdTestBeamBurst; +class AliITSspdTestBeamData; + +class AliITSspdTestBeam : public TTask{ + public: + AliITSspdTestBeam(); + AliITSspdTestBeam(const Char_t *filename,const Char_t *opt="2002", + AliITS *its=0); + virtual ~AliITSspdTestBeam(); + // + virtual Int_t OpenInputFile(const Char_t *filename,Int_t start=0, + Int_t end=-1); + virtual Int_t Read(Int_t i=0); + virtual Int_t Decode(); + virtual Int_t GetNumberOfPilots(){return 3;} + private: + void SetTerminationWord(){fTermination=0xffffd9f0;} + // + AliITSspdTestBeamHeader *fRH; //! Run Header + AliITSspdTestBeamTail *fRT; //! Run Trailer + Int_t fNBrst; //! Number of burts (size of array). + Int_t **fBrstSize; //! Size of each burst for each pilot + AliITSspdTestBeamBurst **fBrst; //! Array of bursts. + Int_t **fNData; //! array of the number of data points + AliITSspdTestBeamData ***fData; //! Data + AliITSspdTestBeamData ***fHData; //! pointer to headers + AliITSspdTestBeamData ***fTData; //! pointer to Tail and Aborts + UInt_t fTermination; //! Termination word + Int_t fNEvents; // Number of events in file + Int_t fBuffSize; // Read Buffere Size + UChar_t *fBuff; // Read buffer + AliITS *fITS; // Pointer to the ITS. + Int_t fNfiles; // Number of input files to read from + Int_t fMaxFiles; // The size of the pointer array fFiles. + ifstream **fFiles; //! Array of Pointer to the input streams + Int_t *fNeventsStart; // Starting event number for each file + Int_t *fNeventsEnd; // Ending number of events for each file. + ClassDef(AliITSspdTestBeam,1) // Task to read SPD test beam data +}; +#endif //====================================================================== #ifndef ALIITSTESTBEAMDATA_H #define ALIITSTESTBEAMDATA_H @@ -16,11 +68,6 @@ class AliITSTestBeamData{ AliITSTestBeamData(){}; virtual ~AliITSTestBeamData(){}; virtual Int_t SizeOf(){return 0;} - virtual Double_t Swap(Double_t a){union{Double_t b;UChar_t c[8];}d;d.b=a; - Swapit(8,d.c);return d.b;}; - virtual UInt_t Swap(UInt_t a){union{UInt_t b;UChar_t c[4];}d;d.b=a; - Swapit(4,d.c);return d.b;}; - static void Swapit(Int_t i,UChar_t *a); enum {kData,kHead,kTail,kAbort,kFail}; private: }; @@ -37,25 +84,12 @@ class AliITSTestBeamData{ class AliITSspdTestBeamHeader : public AliITSTestBeamData{ public: - AliITSspdTestBeamHeader(){fUnion=0;}; - AliITSspdTestBeamHeader(UChar_t *f){SetBuffer(f);} - virtual ~AliITSspdTestBeamHeader(){fUnion=0;}; + AliITSspdTestBeamHeader(){}; + virtual ~AliITSspdTestBeamHeader(){}; virtual void Print(ostream *os); - virtual Int_t GetNumberOfEvents(){return Swap(fUnion->fHead.fNEvents);}; - virtual Int_t GetBuffSize(Int_t i=0){ - return Swap(fUnion->fHead.fBuffSize[i]);}; - virtual Int_t GetTestPulse(){return Swap(fUnion->fHead.fTestPulse);}; - virtual Int_t GetTrigger(Int_t i=0){ - return Swap(fUnion->fHead.fTrigger[i]);}; - virtual Int_t GetTriggerMode(){return Swap(fUnion->fHead.fTriggerMode);}; - virtual Int_t GetBurstSize(){return Swap(fUnion->fHead.fBurstSize);}; - virtual Double_t GetVersion(){return Swap(fUnion->fHead.fVersion);} - virtual Int_t SizeOf(){return sizeof(union headder);}; - virtual void SetBuffer(UChar_t *f){ - fUnion=(AliITSspdTestBeamHeader::headder*)f;} - virtual UChar_t *GetBuffer(){return fUnion->fBuf;} - virtual Char_t *GetDate(){return fUnion->fHead.fDate;} - virtual Char_t *GetTime(){return fUnion->fHead.fTime;} + virtual Int_t GetNumberOfEvents(){return fUnion.fHead.fNEvents;}; + virtual Int_t GetBurstSize(Int_t i=0){return fUnion.fHead.fBuffSize[i];}; + virtual Int_t SizeOf(){return sizeof(AliITSspdTestBeamHeader);}; private: union headder{ struct { @@ -76,7 +110,7 @@ class AliITSspdTestBeamHeader : public AliITSTestBeamData{ UChar_t fA12Matrix[3][8192]; // } fHead; UChar_t fBuf[24904]; - } *fUnion; + } fUnion; }; ostream &operator<<(ostream &os,AliITSspdTestBeamHeader &source); #endif @@ -90,14 +124,10 @@ ostream &operator<<(ostream &os,AliITSspdTestBeamHeader &source); class AliITSspdTestBeamTail : public AliITSTestBeamData{ public: - AliITSspdTestBeamTail(){fUnion=0;}; - AliITSspdTestBeamTail(UChar_t *f){SetBuffer(f);} - virtual ~AliITSspdTestBeamTail(){fUnion=0;}; - virtual Int_t GetNumberOfEvents(){return Swap(fUnion->fTail.fEvents);}; - virtual Int_t GetTermMode(){return Swap(fUnion->fTail.fTermMode);}; - virtual Int_t SizeOf(){return sizeof(union tail);} + AliITSspdTestBeamTail(){}; + virtual ~AliITSspdTestBeamTail(){}; + virtual Int_t SizeOf(){return sizeof(AliITSspdTestBeamTail);} virtual void Print(ostream *os); - virtual void SetBuffer(UChar_t *f){fUnion=(AliITSspdTestBeamTail::tail*)f;} private: union tail{ struct { @@ -109,7 +139,7 @@ class AliITSspdTestBeamTail : public AliITSTestBeamData{ Char_t fTime[12];// Time Field } fTail; UChar_t fBuf[32]; - } *fUnion; + } fUnion; }; ostream &operator<<(ostream &os,AliITSspdTestBeamTail &source); #endif @@ -123,15 +153,10 @@ ostream &operator<<(ostream &os,AliITSspdTestBeamTail &source); class AliITSspdTestBeamBurst : public AliITSTestBeamData{ public: - AliITSspdTestBeamBurst(){fUnion=0;}; - AliITSspdTestBeamBurst(UChar_t *f){SetBuffer(f);} - virtual ~AliITSspdTestBeamBurst(){fUnion=0;}; - virtual Int_t GetEventNumber(){return Swap(fUnion->fBrst.fNumber);}; - virtual Int_t GetTransfers(){return Swap(fUnion->fBrst.fTransfers);}; - virtual Int_t SizeOf(){return sizeof(union tail);} + AliITSspdTestBeamBurst(){}; + virtual ~AliITSspdTestBeamBurst(){}; + virtual Int_t SizeOf(){return sizeof(AliITSspdTestBeamBurst);} virtual void Print(ostream *os); - virtual void SetBuffer(UChar_t *f){ - fUnion=(AliITSspdTestBeamBurst::tail*)f;} private: union tail{ struct { @@ -140,7 +165,7 @@ class AliITSspdTestBeamBurst : public AliITSTestBeamData{ UInt_t fTransfers;// Number of Transfers } fBrst; ULong64_t fBuf; // a strictly 64 bit long unsinged int - } *fUnion; + } fUnion; }; ostream &operator<<(ostream &os,AliITSspdTestBeamBurst &source); #endif @@ -155,144 +180,60 @@ ostream &operator<<(ostream &os,AliITSspdTestBeamBurst &source); class AliITSspdTestBeamData : public AliITSTestBeamData { public: // - AliITSspdTestBeamData(){fUnion=0;}; - AliITSspdTestBeamData(UChar_t *f){SetBuffer(f);} - virtual Int_t SizeOf(){return sizeof(union data);} + AliITSspdTestBeamData(){}; + //AliITSspdTestBeamData(UInt_t *i){SetAddress(i);} + virtual Int_t SizeOf(){return sizeof(AliITSspdTestBeamData);} virtual ~AliITSspdTestBeamData(){}; // - virtual Bool_t IsHeader(Int_t i=0){return ((fUnion+i)->fDataH.fFlag==2|| - (fUnion+i)->fDataH.fFlag==3);} - virtual Bool_t IsData(Int_t i=0){return ((fUnion+i)->fDataD.fFlag>3)&& - ((fUnion+i)->fDataD.fFlag<8);} - virtual Bool_t IsTrailer(Int_t i=0){return ((fUnion+i)->fDataT.fFlag==0);} - virtual Bool_t IsAbort(Int_t i=0){return ((fUnion+i)->fDataA.fFlag==1);} - virtual Int_t Mode(Int_t i=0){if(IsData(i)) return kData; - else if(IsHeader(i)) return kHead; - else if(IsTrailer(i)) return kTail; - else if(IsAbort(i)) return kAbort; + virtual Bool_t IsHeader(){return (fUnion.fDataH.fFlag==2|| + fUnion.fDataH.fFlag==3);} + virtual Bool_t IsData(){return (fUnion.fDataD.fFlag>3)&& + (fUnion.fDataD.fFlag<8);} + virtual Bool_t IsTrailer(){return (fUnion.fDataT.fFlag==0);} + virtual Bool_t IsAbort(){return (fUnion.fDataA.fFlag==1);} + virtual Int_t Mode(){if(IsData()) return kData; + else if(IsHeader()) return kHead; + else if(IsTrailer()) return kTail; + else if(IsAbort()) return kAbort; else return kFail;} virtual Int_t TransWordCount(){if(IsTrailer()||IsAbort()) - return fUnion->fDataT.fTrans; + return fUnion.fDataT.fTrans; else return -1;} virtual Int_t EventCounter(){ - if(IsHeader()) return fUnion->fDataH.fEventSync;else return -1;} - virtual Int_t Chip(Int_t i=0){if(IsData()) - return (fUnion+i)->fDataD.fChip; else return -1;} - virtual Int_t Row(Int_t i=0) {if(IsData()) - return (fUnion+i)->fDataD.fRow; else return -1;} - virtual Int_t Colm(Int_t i=0){if(IsData()) - return (fUnion+i)->fDataD.fColm;else return -1;} - virtual void Data(Int_t &ch,Int_t &rw,Int_t &cl,Int_t i=0){ - ch=Chip(i);rw=Row(i);cl=Colm(i);} - virtual void Print(ostream *os,Int_t i=0); - virtual void SetBuffer(UChar_t *f){fUnion=(AliITSspdTestBeamData::data*)f;} + if(IsHeader()) return fUnion.fDataH.fEventSync;else return -1;} + virtual Int_t Chip(){if(IsData()) return fUnion.fDataD.fChip;else return -1;} + virtual Int_t Row() {if(IsData()) return fUnion.fDataD.fRow; else return -1;} + virtual Int_t Colm(){if(IsData()) return fUnion.fDataD.fColm;else return -1;} + virtual void Data(Int_t &ch,Int_t &rw,Int_t &cl){ch=Chip();rw=Row(); + cl=Colm();} + virtual void Print(ostream *os); private: union data{ - struct { // Definingthe fDataH bit field - unsigned fDate:11; // Not Used + struct { + unsigned fDate:12; // Not Used unsigned fEventSync:6;// Event syncronization counter unsigned fFlag:3; // =2or3 Header unsigned fPadding:12; // Not used } fDataH; - struct { // Definingthe fDataD bit field + struct { unsigned fColm:5; // Pixel (Hit) Column Address unsigned fRow:8; // Pixel Row Adress unsigned fChip:4; // Pixel Chip Address unsigned fFlag:3; // =4or5or6or7 Data unsigned fPadding:12; // Not used } fDataD; - struct { // Definingthe fDataT bit field + struct { unsigned fTrans:17; // Transmitted word count unsigned fFlag:3; // =0 Trialer unsigned fPadding:12; // Not used } fDataT; - struct { // Definingthe fDataA bit field + struct { unsigned fTrans:17; // Transmitted word count unsigned fFlag:3; // =1 Abort unsigned fPadding:12; // Not used } fDataA; UChar_t fBuf[4]; - UInt_t fIBuff; - } *fUnion; + } fUnion; }; ostream &operator<<(ostream &os,AliITSspdTestBeamData &source); #endif -//====================================================================== -#ifndef ALIITSSPDTESTBEAM_H -#define ALIITSSPDTESTBEAM_H - -/* Copyright (c) 1998-2001, ALICE Experiment at CERN, All rights reserved * - * See cxx source for full Copyright notice */ - -#include - -//class ostream; -class AliITS; -class AliITSspdTestBeamHeader; -class AliITSspdTestBeamTail; -class AliITSspdTestBeamBurst; -class AliITSspdTestBeamData; -class AliLoader; - -class AliITSspdTestBeam : public TTask{ - public: - AliITSspdTestBeam(); - AliITSspdTestBeam(const Char_t *filename,const Char_t *opt="2002", - AliITS *its=0); - virtual ~AliITSspdTestBeam(); - // - virtual Int_t OpenInputFile(const Char_t *filename,Int_t start=0, - Int_t end=-1); - virtual Int_t Read(Int_t i=0); - virtual Int_t Decode(); - virtual Int_t DecodeModule(Int_t pilot,Int_t Chip); - virtual Int_t DecodeColumn(Int_t pilot,Int_t Chip,Int_t Colm); - virtual void Digitize(Int_t evnt); - virtual void SetLoader(AliLoader *loader) {fLoader = loader;} - virtual void SetITS(AliITS *its) {fITS = its;} - virtual Int_t GetNumberOfPilots(){return 3;} - virtual Int_t GetNumberOfEvents(){return fNEvents;} - virtual void PrintHeadder(ostream *os = &cout); - virtual void PrintTrailer(ostream *os = &cout); - virtual void PrintBurstInfo(Int_t i,ostream *os=&cout); - virtual void PrintEventData(Int_t i,ostream *os=&cout); - virtual void PrintEventHead(Int_t i,ostream *os=&cout); - virtual void PrintEventTail(Int_t i,ostream *os=&cout); - private: - void SetTerminationWord(){fTermination=0xf0d8ffff;} - void DeletefBrst(); - void DeletefNData(); - void DeletefData(); - void DeletefHData(); - void DeletefTData(); - void DeletefFiles(); - void DeletefBrstSize(); - void DeletefBuff(){delete[] fBuff;}; - void DeletefITS(){fITS=0;} - void DeletefNeventsStart(){delete[] fNeventsStart;} - void DeletefNeventsEnd(){delete[] fNeventsEnd;} - // - AliITSspdTestBeamHeader fRH; //! Run Header - AliITSspdTestBeamTail fRT; //! Run Trailer - Int_t fNBrst; //! Number of burts (size of array). - Int_t **fBrstSize; //! Size of each burst for each pilot - AliITSspdTestBeamBurst **fBrst; //! Array of bursts. - Int_t **fNData; //! array of the number of data points - AliITSspdTestBeamData ***fData; //! Data - AliITSspdTestBeamData ***fHData; //! pointer to headers - AliITSspdTestBeamData ***fTData; //! pointer to Tail and Aborts - UInt_t fTermination; //! Termination word - Int_t fNEvents; // Number of events in file - Int_t fBuffSize; // Read Buffere Size - UChar_t *fBuff; // Read buffer - Int_t fVersion; // Test Beam Version number - AliITS *fITS; // Pointer to the ITS. - AliLoader *fLoader; //! Pointer to AliITSLoader. - Int_t fNfiles; // Number of input files to read from - Int_t fMaxFiles; // The size of the pointer array fFiles. - ifstream **fFiles; //! Array of Pointer to the input streams - Int_t *fNeventsStart; // Starting event number for each file - Int_t *fNeventsEnd; // Ending number of events for each file. - ClassDef(AliITSspdTestBeam,1) // Task to read SPD test beam data -}; -#endif