#if !defined(__CINT__) #include #include #include #include "AliTPCParamSR.h" #include "AliTPCDigitsArray.h" #include "AliSimDigits.h" #include "AliTPCBuffer160.h" #endif /// \file AliTPCAltro.C int AliTPCAltro(Int_t eth=0){ /// eth is a threshold. /// Digits stored into a file have an amplitude value greater than "eth" Int_t offset=1; ///< this should be equal to the threshold /* NB the amplitude values stored in the ALTRO file are shifted by offset because the range for each word goes from 0 to 1023, now due to zero suppression values lower that the threshold never appear. */ Int_t PSecNumber=-1; ///< Previous Sector number Int_t PRowNumber=-1; ///< Previous Row number Int_t PPadNumber=-1; ///< Previous Pad number Int_t PTimeBin=-1; ///< Previous Time-Bin Int_t BunchLength=0; //AliTPCBuffer160 is used in write mode to generate AltroFormat.dat file AliTPCBuffer160 Buffer("AltroFormat.dat",1); ULong_t Count=0; Int_t nwords=0; Int_t numPackets=0; const char * inFile_new = "galice.root"; AliRunLoader *rl = AliRunLoader::Open(inFile_new,"Event","read"); Int_t nevents=rl->GetNumberOfEvents(); cout<<"Number of Events:"<>choice; }while (choice<=0 || choice>nevents); rl->GetEvent(choice-1); AliLoader *tpcloader=rl->GetLoader("TPCLoader"); tpcloader->LoadDigits(); TTree *digitsTree=tpcloader->TreeD(); AliSimDigits digrows, *dummy=&digrows; digitsTree->GetBranch("Segment")->SetAddress(&dummy); Stat_t nrows = digitsTree->GetEntries(); cout<<"Number of entries (rows):"<CdGAFile(); AliTPCParamSR* param = AliTPC::LoadTPCParam(gFile); if (!param) cout<<"No TPC parameter"<Setup(param); digarr->ConnectTree(digitsTree); //ofstream ftxt("Data.txt"); for (Int_t n=0; nLoadEntry(n); param->AdjustSectorRow(digrow->GetID(),sec,row); //cout<<"Sector:"<First(); do{ Short_t dig=digrow->CurrentDigit(); //adc Int_t time=digrow->CurrentRow(); //time Int_t pad =digrow->CurrentColumn(); // pad //cout<<"dig:"<eth){ Count++; //ftxt<<"Sec: "<Next()); }//end for Buffer.FillBuffer(PTimeBin); Buffer.FillBuffer(BunchLength+2); nwords+=2; Buffer.WriteTrailer(nwords,PPadNumber,PRowNumber,PSecNumber); numPackets++; cout<<"There are "<