#include "AliITSOnlineSPDfoAnalyzer.h"
#include "AliLog.h"
+using std::ifstream;
+
AliITSOnlineSPDfoAnalyzer::AliITSOnlineSPDfoAnalyzer(const TString fileName, Bool_t readFromGridFile) :
fFileName(0),
fNdims(0),
//
for(Int_t iqual =0; iqual<3; iqual++) fGeneralThresholds[iqual] =foan.fGeneralThresholds[iqual];
- for (UInt_t chipNr=0; chipNr<11; chipNr++) {
+ for (UInt_t chipNr=0; chipNr<10; chipNr++) {
for (UInt_t hs=0; hs<6; hs++) {
for(Int_t i=0; i<kNqualityFlags;i++) fNh[i][hs][chipNr]=NULL;
}
//
for (UInt_t hs=0; hs<6; hs++) {
- for (UInt_t chipNr=0; chipNr<11; chipNr++) {
+ for (UInt_t chipNr=0; chipNr<10; chipNr++) {
for(Int_t i=0; i<kNqualityFlags ; i++ ) if(fNh[i][hs][chipNr]!=NULL) delete fNh[i][hs][chipNr];
}
}
// assignment operator, only copies the filename and params (not the processed data)
if (this!=&foan) {
for (UInt_t hs=0; hs<6; hs++) {
- for (UInt_t chipNr=0; chipNr<11; chipNr++) {
+ for (UInt_t chipNr=0; chipNr<10; chipNr++) {
for(Int_t i=0; i<kNqualityFlags ; i++ ) if(fNh[i][hs][chipNr]!=NULL) delete fNh[i][hs][chipNr];
}
}
}
TKey *key;
- Double_t *dacvalues;
TIter iter((fFOHandler->GetFile())->GetListOfKeys());
while ((key = (TKey*)(iter.Next()))) {
TString classname = key->GetClassName();
break;
}
- dacvalues = fFOHandler->GetDACvaluesD(key->GetName(), GetFOHandler()->GetFOscanInfo()->GetNumDACindex());
+ Double_t *dacvalues = fFOHandler->GetDACvaluesD(key->GetName(), GetFOHandler()->GetFOscanInfo()->GetNumDACindex());
for(Int_t i=0; i< array->GetSize(); i++){
AliITSOnlineSPDfoChip *chip = (AliITSOnlineSPDfoChip *)array->At(i);
if(!fNh[quality][hs][chipid]) BuildTHnSparse(hs,chipid);
fNh[quality][hs][chipid]->Fill(dacvalues);
}
+
+ if(dacvalues) delete [] dacvalues;
}
}
//---------------------------------------------
TH2D *h2=0x0;
if(idim == 0) {
h1 = hn->Projection(k-1);
- if(!h1) printf("no histogram!!...\n\n\n");
+ if(!h1) {
+ printf("no histogram!!...\n\n\n");
+ } else {
h1->SetXTitle(Form("DAC %i ( %s )",k-1,dacname[k-1].Data()));
h1->SetYTitle("entries (eff within thresholds)");
h1->Draw();
+ }
}
if(idim==1) {
// is taken.
TH1D *tmp[5];
+ for(Int_t jj=0;jj<5;jj++)tmp[jj]=NULL;
if(fNdims > 5) printf("AliITSOnlineSPDfoAnalyzer::ChooseDACValues -> N. of dimensions are more than expected! Break! \n");
TArrayI dacs(fNdims+1);
for(Int_t i=0; i<size; i++) entry[i] = dacs.At(i);
Int_t checkbin = fNh[dacs.At(dacs.GetSize()-1)][hs][chip]->GetBin(entry,kFALSE); // kFALSE does not allocate another bin
if(checkbin > -1) isOk = kTRUE;
- delete entry;
+ delete [] entry;
return isOk;
}
//-----------------------------------------------------------
dacs.AddAt(qualityflag,fNdims);
- delete mean;
- delete goodbins;
- delete bins;
- delete val;
+ delete [] mean;
+ delete [] goodbins;
+ delete [] bins;
+ delete [] val;
return dacs;
}
//-------------------------------------------------------