// //
////////////////////////////////////////////////////////////////////////////
+
//Root includes
#include <TObjArray.h>
#include <TH2F.h>
#include <TString.h>
#include <TMath.h>
#include <TRandom.h>
+
+//#include <TRandom.h>
#include <TDirectory.h>
#include <TFile.h>
return *this;
}
-
//_____________________________________________________________________
AliTRDCalibPadStatus::~AliTRDCalibPadStatus() /*FOLD00*/
{
//
// destructor
//
+ fCalRocArrayMean.Delete();
+ fCalRocArrayRMS.Delete();
+ fCalRocArrayMeand.Delete();
+ fCalRocArrayRMSd.Delete();
+ fHistoArray.Delete();
if (fGeo) {
delete fGeo;
}
}
-
+//_____________________________________________________________________
+void AliTRDCalibPadStatus::Destroy()
+{
+ //
+ // Destroy
+ //
+ fCalRocArrayMean.Delete();
+ fCalRocArrayRMS.Delete();
+ fCalRocArrayMeand.Delete();
+ fCalRocArrayRMSd.Delete();
+ fHistoArray.Delete();
+}
//_____________________________________________________________________
Int_t AliTRDCalibPadStatus::UpdateHisto(const Int_t icdet, /*FOLD00*/
const Int_t icRow,
// 0 time bin problem or zero suppression
// 1 no input
// 2 input
- //
+ // Raw version number:
+ // [3,31] non zero suppressed
+ // 2,4 and [32,63] zero suppressed
+ //
Int_t withInput = 1;
rawStream->SetSharedPadReadout(kTRUE);
if(!nocheck) {
+
+ // Check the raw version and if all have the same number of timebins.
+
while (rawStream->Next()) {
+
Int_t rawversion = rawStream->GetRawVersion(); // current raw version
- //if(!rawStream->IsDataZeroSuppressed()) {
- if(rawversion > 2) {
+ //printf("Raw version is %d\n",rawversion);
+
+ // Could eventually change, have to check with time
+ if((rawversion < 3) || (rawversion > 31)) {
AliInfo(Form("this is not no-zero-suppressed data, the version is %d",rawversion));
return 0;
}
Int_t iRow = rawStream->GetRow(); // current row
Int_t iRowMax = rawStream->GetMaxRow(); // current rowmax
Int_t iCol = rawStream->GetCol(); // current col
-
-
Int_t iADC = 21-rawStream->GetADC(); // current ADC
+
+ // It goes in the opposite direction
Int_t col = 0;
if(iADC == 1) col = 1;
else {
if(col > 1) mcm -= 1;
if(col ==1) mcm += 1;
+ // printf to check
//Bool_t shared = rawStream->IsCurrentPadShared();
//printf("ADC %d, iCol %d, col %d, mcm %d, shared %d\n",iADC,iCol,col,mcm,(Int_t)shared);
+ // Take the signal
Int_t *signal = rawStream->GetSignals(); // current ADC signal
Int_t nbtimebin = rawStream->GetNumberOfTimeBins(); // number of time bins read from data
return 0;
}
fNumberOfTimeBins = nbtimebin;
-
+ fDetector = idetector;
+
for(Int_t k = 0; k < fNumberOfTimeBins; k++){
if(signal[k]>0) UpdateHisto(idetector,iRow,iCol,signal[k],iRowMax,col,mcm);
}
}
}
else {
+
while (rawStream->Next()) {
+
Int_t idetector = rawStream->GetDet(); // current detector
Int_t iRow = rawStream->GetRow(); // current row
Int_t iRowMax = rawStream->GetMaxRow(); // current rowmax
Int_t iCol = rawStream->GetCol(); // current col
-
-
Int_t iADC = 21-rawStream->GetADC(); // current ADC
+
+ // It goes in the opposite direction
Int_t col = 0;
if(iADC == 1) col = 1;
else {
if(col > 1) mcm -= 1;
if(col ==1) mcm += 1;
+ // Take the signal
Int_t *signal = rawStream->GetSignals(); // current ADC signal
Int_t nbtimebin = rawStream->GetNumberOfTimeBins(); // number of time bins read from data
return withInput;
}
-
//_____________________________________________________________________
Int_t AliTRDCalibPadStatus::ProcessEvent(AliRawReader *rawReader, Bool_t nocheck)
{
//_________________________________________________________________________
Int_t AliTRDCalibPadStatus::ProcessEvent(
#ifdef ALI_DATE
- eventHeaderStruct *event,
+ const eventHeaderStruct *event,
Bool_t nocheck
#else
- eventHeaderStruct* /*event*/,
+ const eventHeaderStruct* /*event*/,
Bool_t /*nocheck*/
#endif
//_____________________________________________________________________
TH2F* AliTRDCalibPadStatus::GetHisto(Int_t det, TObjArray *arr, /*FOLD00*/
Int_t nbinsY, Float_t ymin, Float_t ymax,
- Char_t *type, Bool_t force)
+ const Char_t *type, Bool_t force)
{
//
// return pointer to histogram
}
-