,fVolid(0)
,fColMax(0)
,fTimeTotal(0)
+ ,fTimeBinsDCS(-999)
+ ,fRun(-1)
,fCalGainFactorROC(NULL)
,fCalGainFactorDetValue(0)
,fCalNoiseROC(NULL)
,fVolid(0)
,fColMax(0)
,fTimeTotal(0)
+ ,fTimeBinsDCS(-999)
+ ,fRun(-1)
,fCalGainFactorROC(NULL)
,fCalGainFactorDetValue(0)
,fCalNoiseROC(NULL)
,fVolid(0)
,fColMax(0)
,fTimeTotal(0)
+ ,fTimeBinsDCS(-999)
+ ,fRun(-1)
,fCalGainFactorROC(NULL)
,fCalGainFactorDetValue(0)
,fCalNoiseROC(NULL)
((AliTRDclusterizer &) c).fVolid = 0;
((AliTRDclusterizer &) c).fColMax = 0;
((AliTRDclusterizer &) c).fTimeTotal = 0;
+ ((AliTRDclusterizer &) c).fTimeBinsDCS = -999;
+ ((AliTRDclusterizer &) c).fRun = -1;
((AliTRDclusterizer &) c).fCalGainFactorROC = NULL;
((AliTRDclusterizer &) c).fCalGainFactorDetValue = 0;
((AliTRDclusterizer &) c).fCalNoiseROC = NULL;
//
// Creates clusters from raw data
//
-
return Raw2ClustersChamber(rawReader);
}
//
// Creates clusters from raw data
//
+ // if first call or run number was changed, update cached value ot timebinsDCS
+ AliTRDcalibDB* const calibration = AliTRDcalibDB::Instance();
+ if (!calibration) {
+ AliFatal("No AliTRDcalibDB instance available\n");
+ return kFALSE;
+ }
+
+ if (fTimeBinsDCS==-999 || fRun!=(int)calibration->GetRun()) {
+ fRun = calibration->GetRun();
+ fTimeBinsDCS = calibration->GetNumberOfTimeBinsDCS();
+ AliInfoF("Set number of DCS time bins to %d for run %d",fTimeBinsDCS,fRun);
+ }
// Create the digits manager
if (!fDigitsManager){
if(nrows != fIndexes->GetNrow()) AliDebug(1, Form("N rows missmatch in Digits for Det[%3d] :: Geom[%3d] RAW[%3d]", fDet, nrows, fIndexes->GetNrow()));
// Check consistency between OCDB and raw data
- Int_t nTimeOCDB = calibration->GetNumberOfTimeBinsDCS();
if(fReconstructor->IsHLT()){
- if((nTimeOCDB > -1) && (fTimeTotal != nTimeOCDB)){
+ if((fTimeBinsDCS > -1) && (fTimeTotal != fTimeBinsDCS)){
AliWarning(Form("Number of timebins does not match OCDB value (RAW[%d] OCDB[%d]), using raw value"
- ,fTimeTotal,nTimeOCDB));
+ ,fTimeTotal,fTimeBinsDCS));
}
}else{
- if(nTimeOCDB == -1){
+ if(fTimeBinsDCS == -1){
AliDebug(1, "Undefined number of timebins in OCDB, using value from raw data.");
if(!(fTimeTotal>0)){
AliError(Form("Number of timebins in raw data is negative, skipping chamber[%3d]!", fDet));
return kFALSE;
}
- }else if(nTimeOCDB == -2){
+ }else if(fTimeBinsDCS == -2){
AliError("Mixed number of timebins in OCDB, no reconstruction of TRD data!");
return kFALSE;
- }else if(fTimeTotal != nTimeOCDB){
+ }else if(fTimeTotal != fTimeBinsDCS){
AliError(Form("Number of timebins in raw data does not match OCDB value (RAW[%d] OCDB[%d]), skipping chamber[%3d]!"
- ,fTimeTotal,nTimeOCDB, fDet));
+ ,fTimeTotal,fTimeBinsDCS, fDet));
return kFALSE;
}
}
static UChar_t GetStatus(Short_t &signal);
Int_t GetAddedClusters() const {return fNoOfClusters;}
Int_t GetNTimeBins() const {return fTimeTotal;}
+ Int_t GetNTimeBinsDCS() const {return fTimeBinsDCS;}
Bool_t IsClustersOwner() const {return TestBit(kClOwner);}
virtual void SetClustersOwner(Bool_t own=kTRUE) {SetBit(kClOwner, own); if(!own) {fRecPoints = 0x0; fNoOfClusters=0;} }
UShort_t fVolid; // Volume ID
Int_t fColMax; // Number of Colums in one detector
Int_t fTimeTotal; // Number of time bins
+ Int_t fTimeBinsDCS; // number or time bins from DCS (OCDB)
+ Int_t fRun; // last run processed (to update cached OCDB params if run changes)
AliTRDCalROC *fCalGainFactorROC; // Calibration object with pad wise values for the gain factors
Float_t fCalGainFactorDetValue; // Calibration value for chamber wise noise
AliTRDCalROC *fCalNoiseROC; // Calibration object with pad wise values for the noise
Int_t fBaseline; // Baseline of the ADC values
AliTRDrawStream *fRawStream; // Raw data streamer
UInt_t fTrgFlags[AliTRDgeometry::kNsector]; // trigger flags
-
private:
inline void CalcAdditionalInfo(const MaxStruct &Max, Short_t *const signals, Int_t &nPadCount);
- ClassDef(AliTRDclusterizer,6) // TRD clusterfinder
+ ClassDef(AliTRDclusterizer,7) // TRD clusterfinder
};