#include "TStyle.h"
#include "TGraph.h"
+#include "AliLog.h"
#include "AliRawReader.h"
#include "AliTRDrawStreamOld.h"
,fThresh(0)
,fCount(0)
,fRefEv(0)
+ ,fRefFileName(0x0)
,fOccupancy(0)
,fDetRob(0)
,fTBEvent(0)
for (Int_t i = 0; i < 1000; i++) {
fEvNoDist[i] = 0;
}
- strncpy(fRefFileName,"",256);
+ for (Int_t i = 0; i < kDET*kROB*kMCM; i++) {
+ fFullSignal[i] = 0x0;
+ fFullCounter[i] = 0;
+ }
+ //strncpy(fRefFileName,"",256);
}
,fThresh(0)
,fCount(0)
,fRefEv(0)
+ ,fRefFileName(0x0)
,fOccupancy(0)
,fDetRob(0)
,fTBEvent(0)
for (Int_t i = 0; i < 1000; i++) {
fEvNoDist[i] = 0;
}
- strncpy(fRefFileName,"",256);
+ for (Int_t i = 0; i < kDET*kROB*kMCM; i++) {
+ fFullSignal[i] = 0x0;
+ fFullCounter[i] = 0;
+ }
+ //strncpy(fRefFileName,"",256);
}
void AliTRDqaBlackEvents::SetRefFile(const char *filename) {
- strncpy(fRefFileName,filename,256);
+ //strncpy(fRefFileName,filename,256);
+ fRefFileName = filename;
}
fRefHistPed = 0;
fRefHistNoise = 0;
- TFile *file = 0;
- if (fRefFileName) TFile::Open(fRefFileName);
+ TFile *file = 0x0;
+ if (fRefFileName) file = TFile::Open(fRefFileName);
if (!file) return;
fRefHistPed = (TH2D*)file->Get(Form("ped_%d",det));
//printf("reading SM %d\n", sm);
AliInfo(Form("reading SM %d", sm));
- if (sm < 0 || sm > 18) return;
+ if (sm < 0 || sm > 17) return;
// lopp over stacks, links ...
//fSignal[det]->Fill(sig[k]);
//fData[det]->Fill(row, col, sig[k]); // slow
- if (sig[k] < kCH) {
+ if ((sig[k] >=0) && (sig[k] < kCH)) {
fSignalDirect[det][sig[k]]++;
fDataDirect[det][row][col][sig[k]]++; // direct data
}
// Process something
//
- char fn[256];
- strncpy(fn,filename,256);
+ //char fn[256];
+ //strncpy(fn,filename,256);
//AliInfo(Form("FILENAME = %s (%s)\n", filename, fn));
Double_t refnoise = 0;
if (fRefHistPed) refped = fRefHistPed->GetBinContent(bin);
- if (fRefHistNoise) refnoise = fRefHistPed->GetBinContent(bin);
+ if (fRefHistPed) refnoise = fRefHistPed->GetBinContent(bin);
+ // Original code, should it not be fRefHistNoise->GetBinContent(bin)
+ // instead of fRefHistPed->GetBinContent(bin) (CBL) ???
+ //if (fRefHistNoise) refnoise = fRefHistPed->GetBinContent(bin);
fChPedRes[det]->SetBinContent(bin, ped-refped);
fChNoiseRes[det]->SetBinContent(bin, noise-refnoise);
if (!map[i]) continue;
- sprintf(entriesDistName, "entriesDist_%d", i);
+ snprintf(entriesDistName,100,"entriesDist_%d",i);
fNPointDist[i] = new TH1D(entriesDistName, ";number of events", max+2, -0.5, max+1.5);
for(Int_t j=0; j<fNPoint[i]->GetXaxis()->GetNbins(); j++) {
// save histograms
//AliInfo(Form("FILENAME 2 = %s (%d)\n", fn, fn));
- TFile *file = new TFile(fn, "recreate");
+ TFile *file = new TFile(filename, "recreate");
for(Int_t det = 0; det < kDET; det++) {
if (!map[det]) continue;
fChPed[det]->Write();
///////////////////////////////////////////////////////////////////////////////////////////////////
-Int_t AliTRDqaBlackEvents::CheckMCM(Int_t index) const {
+Int_t AliTRDqaBlackEvents::CheckMCM(Int_t /*index*/) const {
//
// Checks a single MCM
//
return 1;
- static Int_t data[21][3] = {
- {1, 0, 1},
- {242, 0, 0},
- {242, 0, 1},
- {242, 0, 2},
- {242, 0, 4},
- {242, 0, 5},
- {242, 0, 6},
- {242, 0, 8},
- {242, 0, 12},
- {251, 7, 7},
- {254, 3, 11},
- {259, 3, 14},
- {260, 1, 9},
- {260, 3, 15},
- {273, 1, 7},
- {273, 1, 15},
- {276, 5, 11},
- {280, 6, 2},
- {299, 6, 4},
- {511, 2, 9},
- {517, 7, 15}
- };
+ // static Int_t data[21][3] = {
+ // {1, 0, 1},
+ // {242, 0, 0},
+ // {242, 0, 1},
+ // {242, 0, 2},
+ // {242, 0, 4},
+ // {242, 0, 5},
+ // {242, 0, 6},
+ // {242, 0, 8},
+ // {242, 0, 12},
+ // {251, 7, 7},
+ // {254, 3, 11},
+ // {259, 3, 14},
+ // {260, 1, 9},
+ // {260, 3, 15},
+ // {273, 1, 7},
+ // {273, 1, 15},
+ // {276, 5, 11},
+ // {280, 6, 2},
+ // {299, 6, 4},
+ // {511, 2, 9},
+ // {517, 7, 15}
+ // };
- for(Int_t i=0; i<21; i++) {
- Int_t wIndex = data[i][0] * kROB*kMCM + data[i][1] * kMCM + data[i][2];
- if (index == wIndex) return 0;
- }
+ // for(Int_t i=0; i<21; i++) {
+ // Int_t wIndex = data[i][0] * kROB*kMCM + data[i][1] * kMCM + data[i][2];
+ // if (index == wIndex) return 0;
+ // }
return 1;
}