ioArray->AddLast(c);
}
fClusterTree->Fill();
+ ioArray->Clear();
} else {
-
- Int_t detOld = -1;
+ Int_t detOld = -1, nw(0);
for (Int_t i = 0; i < nRecPoints; i++) {
AliTRDcluster *c = (AliTRDcluster *) RecPoints()->UncheckedAt(i);
if(c->GetDetector() != detOld){
+ nw += ioArray->GetEntriesFast();
fClusterTree->Fill();
ioArray->Clear();
detOld = c->GetDetector();
}
ioArray->AddLast(c);
}
+ if(ioArray->GetEntriesFast()){
+ nw += ioArray->GetEntriesFast();
+ fClusterTree->Fill();
+ ioArray->Clear();
+ }
+ AliDebug(2, Form("Clusters FOUND[%d] WRITTEN[%d] STATUS[%s]", nRecPoints, nw, nw==nRecPoints?"OK":"FAILED"));
}
delete ioArray;
return kTRUE;
-
}
//_____________________________________________________________________________
fDigitsManager->RemoveDictionaries(i);
fDigitsManager->ClearIndexes(i);
}
+ fReconstructor->SetDigitsParam(fDigitsManager->GetDigitsParam());
if(fReconstructor->IsWritingClusters()) WriteClusters(-1);
else
fRawStream->SetReader(rawReader);
- if(fReconstructor->IsHLT())
+ if(fReconstructor->IsHLT()){
fRawStream->SetSharedPadReadout(kFALSE);
+ fRawStream->SetNoErrorWarning();
+ }
- AliInfo(Form("Stream version: %s", fRawStream->IsA()->GetName()));
+ AliDebug(1,Form("Stream version: %s", fRawStream->IsA()->GetName()));
Int_t det = 0;
while ((det = fRawStream->NextChamber(fDigitsManager,fTrackletContainer)) >= 0){
if (!fReconstructor->IsWritingTracklets()) continue;
if (*(fTrackletContainer[0]) > 0 || *(fTrackletContainer[1]) > 0) WriteTracklets(det);
}
+ fReconstructor->SetDigitsParam(fDigitsManager->GetDigitsParam());
if (fTrackletContainer){
delete [] fTrackletContainer[0];
if(!TestBit(knewDM)){
delete fDigitsManager;
fDigitsManager = NULL;
+ delete fRawStream;
+ fRawStream = NULL;
}
AliInfo(Form("Number of found clusters : %d", fNoOfClusters));
return kFALSE;
}
+ AliDebug(2, Form("Det[%d] @ Sec[%d] Stk[%d] Ly[%d]", fDet, isector, istack, fLayer));
+
// TRD space point transformation
fTransform->SetDetector(det);
//Int_t nRowMax = fDigits->GetNrow();
fTimeTotal = fDigits->GetNtime();
+ // Check consistency between OCDB and raw data
+ Int_t nTimeOCDB = calibration->GetNumberOfTimeBinsDCS();
+ if ((nTimeOCDB > -1) &&
+ (fTimeTotal != nTimeOCDB)) {
+ AliError(Form("Number of timebins does not match OCDB value (RAW[%d] OCDB[%d])"
+ ,fTimeTotal,calibration->GetNumberOfTimeBinsDCS()));
+ }
+
// Detector wise calibration object for the gain factors
const AliTRDCalDet *calGainFactorDet = calibration->GetGainFactorDet();
// Calibration object with pad wise values for the gain factors
Double_t *inADC = new Double_t[fTimeTotal]; // ADC data before tail cancellation
Double_t *outADC = new Double_t[fTimeTotal]; // ADC data after tail cancellation
- fIndexes->ResetCounters();
TTreeSRedirector *fDebugStream = fReconstructor->GetDebugStream(AliTRDrecoParam::kClusterizer);
+ Bool_t debugStreaming = fReconstructor->GetRecoParam()->GetStreamLevel(AliTRDrecoParam::kClusterizer) > 7 && fReconstructor->IsDebugStreaming();
while(fIndexes->NextRCIndex(iRow, iCol))
{
Bool_t corrupted = kFALSE;
if (fCalPadStatusROC->GetStatus(iCol, iRow)) corrupted = kTRUE;
+ // Save data into the temporary processing array and substract the baseline,
+ // since DeConvExp does not expect a baseline
for (iTime = 0; iTime < fTimeTotal; iTime++)
- inADC[iTime] = fDigits->GetData(iRow,iCol,iTime);
+ inADC[iTime] = fDigits->GetData(iRow,iCol,iTime)-fBaseline;
- for (iTime = 0; iTime < fTimeTotal; iTime++)
- if(fReconstructor->GetRecoParam()->GetStreamLevel(AliTRDrecoParam::kClusterizer) > 7 && fReconstructor->IsDebugStreaming()){
+ if(debugStreaming){
+ for (iTime = 0; iTime < fTimeTotal; iTime++)
(*fDebugStream) << "TailCancellation"
<< "col=" << iCol
<< "row=" << iRow
<< "outADC=" << outADC[iTime]
<< "corrupted=" << corrupted
<< "\n";
- }
+ }
if (!corrupted)
{
}
else memcpy(&outADC[0],&inADC[0],fTimeTotal*sizeof(inADC[0]));
+ // Save tailcancalled data and add the baseline
for(iTime = 0; iTime < fTimeTotal; iTime++)
- fDigits->SetData(iRow,iCol,iTime,TMath::Nint(outADC[iTime]));
+ fDigits->SetData(iRow,iCol,iTime,(Short_t)(outADC[iTime] + fBaseline + 0.5));
} // while irow icol