From c233790086782be2ca0adccf893bed8fcfd3aa8a Mon Sep 17 00:00:00 2001 From: alla Date: Tue, 20 May 2008 12:40:39 +0000 Subject: [PATCH] some warnings fixed according Federico's request --- T0/AliT0.cxx | 2 +- T0/AliT0CalibTimeEq.cxx | 63 ++++++++++++++++------------------------- T0/AliT0CalibWalk.cxx | 19 +------------ T0/AliT0Digitizer.cxx | 2 +- T0/AliT0Parameters.cxx | 2 ++ T0/AliT0QAChecker.cxx | 9 +++--- T0/AliT0RecPoint.cxx | 19 +++++++------ T0/AliT0Trigger.cxx | 2 +- 8 files changed, 46 insertions(+), 72 deletions(-) diff --git a/T0/AliT0.cxx b/T0/AliT0.cxx index bc7d6ade198..fdb413bb90f 100644 --- a/T0/AliT0.cxx +++ b/T0/AliT0.cxx @@ -383,7 +383,7 @@ void AliT0::Raw2Digits(AliRawReader *rawReader,TTree* digitsTree) } - AliT0digit* fDigits = new AliT0digit(); + fDigits = new AliT0digit(); digitsTree->Branch("T0","AliT0digit",&fDigits,405,1); diff --git a/T0/AliT0CalibTimeEq.cxx b/T0/AliT0CalibTimeEq.cxx index e37a82a6ac3..295ce7c1528 100644 --- a/T0/AliT0CalibTimeEq.cxx +++ b/T0/AliT0CalibTimeEq.cxx @@ -101,28 +101,30 @@ void AliT0CalibTimeEq::Print(Option_t*) const void AliT0CalibTimeEq::ComputeOnlineParams(const char* filePhys) { // compute online equalized time -// Int_t npeaks = 20; -// Double_t sigma = 4.; - - TFile *gFile = TFile::Open(filePhys); -// Bool_t down=false; -// Int_t index[20]; - Char_t buf1[15]; -// Char_t temp[10]; -// Float_t p[24][3]={0.,0.,0.}; + // Int_t npeaks = 20; + // Double_t sigma = 4.; + // Bool_t down=false; + // Int_t index[20]; + + gFile = TFile::Open(filePhys); + gFile->ls(); + Char_t buf1[30]; for (Int_t i=0; i<24; i++) { - sprintf(buf1,"CFD1-CFD%d",i+1); + // if(i<12) sprintf(buf1,"CFD1minCFD%d",i+1); + // if(i>11) sprintf(buf1,"CFD13minCFD%d",i+1); + if(i<12) sprintf(buf1,"T0_C_%i_CFD",i+1); + if(i>11) sprintf(buf1,"T0_A_%i_CFD",i+1-12); + printf(" i = %d buf1 = %s\n", i, buf1); TH1F *cfd = (TH1F*) gFile->Get(buf1); + // printf(" i = %d buf1 = %s\n", i, buf1); Double_t mean=cfd->GetMean(); - SetTimeEq(i,mean); - delete cfd; - } - /* + printf(" ipmt %i mean = %f \n", i,mean) ; + /* TSpectrum *s = new TSpectrum(2*npeaks,1.); - printf(" buf1 = %s cfd = %x\n", buf1, cfd); + // printf(" buf1 = %s cfd = %x\n", buf1, cfd); Int_t nfound = s->Search(cfd,sigma,"goff",0.2); printf(" nfound = %d\n", nfound); if(nfound!=0) @@ -132,33 +134,17 @@ void AliT0CalibTimeEq::ComputeOnlineParams(const char* filePhys) Float_t xp = xpeak[index[0]]; Float_t hmax = xp+3*sigma; Float_t hmin = xp-3*sigma; - cfd->GetXaxis()->SetRange((Int_t)hmin-20,(Int_t)hmax+20); + cfd->GetXaxis()->SetRangeUser(hmin-10,hmax+10); TF1 *g1 = new TF1("g1", "gaus", hmin, hmax); cfd->Fit("g1","IRQN"); - for(Int_t j =0; j<3; j++) - { - p[i][j] = g1->GetParameter(j); - // SetCFDvalue(i, j, p[i][j]); - } - SetTimeEq(i,(p[i][2])); - cout<<" mean "<GetParameter(1)) ; + + } */ - /* - SetCFDvalue(i, 3, hmin); - SetCFDvalue(i, 4, hmax); - - if (i<12) - { - SetTimeEq(i,(p[i][2]-p[0][2])); - } - else - { - SetTimeEq(i,(p[i][2]-p[12][2])); - } - - } + SetTimeEq(i,Int_t(mean)); } - */ + // delete cfd; + gFile->Close(); delete gFile; printf("\n\n"); @@ -166,6 +152,7 @@ void AliT0CalibTimeEq::ComputeOnlineParams(const char* filePhys) { printf("fTimeEq[%d]=%f\n",j,fTimeEq[j]); } + } diff --git a/T0/AliT0CalibWalk.cxx b/T0/AliT0CalibWalk.cxx index 22935bb91cf..8bf9a98467b 100644 --- a/T0/AliT0CalibWalk.cxx +++ b/T0/AliT0CalibWalk.cxx @@ -195,9 +195,7 @@ void AliT0CalibWalk::MakeWalkCorrGraph(const char *laserFile) { //make walk corerction for preprocessor - Double_t *grY ; //= new grY[2500] ; - Double_t *grX ; - TFile *gFile = TFile::Open(laserFile); + gFile = TFile::Open(laserFile); // gFile->ls(); Float_t x1[10], y1[10]; Float_t x2[10], y2[10]; @@ -222,15 +220,11 @@ void AliT0CalibWalk::MakeWalkCorrGraph(const char *laserFile) x2[im] = hCFDvsLED[i][im]->GetMean(1); y2[im] = hCFDvsLED[i][im]->GetMean(2); xx[im]=im+1; - //cout<<" qtc "<< x1[im]<<" "<< y1[im]<GetN(); - if(np>0) { - grY = gr4->GetY(); - grX = gr4->GetX(); - for (Int_t ig=0; igEval(grX[ig])<GetInputFolderName(inputFile)); AliLoader * pInStartLoader = inRL->GetLoader("T0Loader"); if (!inRL->GetAliRun()) inRL->LoadgAlice(); - AliT0 *fT0 = (AliT0*)inRL ->GetAliRun()->GetDetector("T0"); + fT0 = (AliT0*)inRL ->GetAliRun()->GetDetector("T0"); //read Hits pInStartLoader->LoadHits("READ");//probably it is necessary to load them before diff --git a/T0/AliT0Parameters.cxx b/T0/AliT0Parameters.cxx index 05262c97c0e..bda64a7d3e3 100644 --- a/T0/AliT0Parameters.cxx +++ b/T0/AliT0Parameters.cxx @@ -73,6 +73,8 @@ AliT0Parameters::AliT0Parameters() fAmpLEDRec(0), fPMTeff(), fWalk(0), + fQTC(0), + fAmpLED(0), fTimeDelayCFD(0), // fTimeV0(0), fTimeDelayTVD(0), diff --git a/T0/AliT0QAChecker.cxx b/T0/AliT0QAChecker.cxx index 7aa20cbb24e..54594932508 100644 --- a/T0/AliT0QAChecker.cxx +++ b/T0/AliT0QAChecker.cxx @@ -66,9 +66,10 @@ const Double_t AliT0QAChecker::Check(AliQA::ALITASK_t index,TObjArray * list) Double_t nent[100]; memset(nent,0,100*sizeof(Double_t)); Double_t w[100]; - memset(w,1.,100*sizeof(Double_t)); + memset(w,1,100*sizeof(Double_t)); TH1 *fhRecLEDAmp[24]; TH1 * fhRecQTC[24]; - TH1 *fhOnlineMean; TH1 * fhRecMean; + TH1 *fhOnlineMean = 0x0; + TH1 * fhRecMean = 0x0; TString dataType = AliQA::GetAliTaskName(index); if (list->GetEntries() == 0){ @@ -88,8 +89,8 @@ const Double_t AliT0QAChecker::Check(AliQA::ALITASK_t index,TObjArray * list) if(index==2){ if(count>23 && count<48)fhRecLEDAmp[count-24] = hdata; if(count>47 && count<72)fhRecQTC[count-48] = hdata; - if(count == 72) fhOnlineMean = hdata; - if(count == 73) fhRecMean = hdata; + if(count == 72) fhOnlineMean = hdata; + if(count == 73) fhRecMean = hdata; } count++ ; Double_t rv = 0.; diff --git a/T0/AliT0RecPoint.cxx b/T0/AliT0RecPoint.cxx index f1d2076c0a5..f7b4bd6575b 100644 --- a/T0/AliT0RecPoint.cxx +++ b/T0/AliT0RecPoint.cxx @@ -35,16 +35,17 @@ ClassImp(AliT0RecPoint) //------------------------------------ AliT0RecPoint::AliT0RecPoint() : TObject(), - fTimeAverage(0), - fVertexPosition(0), + fTimeAverage(99999), + fTimeOnlineMean(99999), + fVertexPosition(999999), fTimeBestA(0),fTimeBestC(0), fMultC(0),fMultA(0) { //ctor - fTimeAverage=99999; + // fTimeAverage=99999; fTimeBestA=99999; fTimeBestC=99999; - fVertexPosition=99999; + // fVertexPosition=99999; fMultA=0; fMultC=0; for (Int_t i=0; i<24; i++) { fTime[i]=0; fADC[i]=0; fADCLED[i]=0;} @@ -52,11 +53,11 @@ ClassImp(AliT0RecPoint) //_____________________________________________________________________________ AliT0RecPoint::AliT0RecPoint(const AliT0RecPoint &r):TObject(), - - fTimeAverage(0), - fVertexPosition(0), - fTimeBestA(0),fTimeBestC(0), - fMultC(0),fMultA(0) + fTimeAverage(999999), + fTimeOnlineMean(999999), + fVertexPosition(999999), + fTimeBestA(0),fTimeBestC(0), + fMultC(0),fMultA(0) { // // AliT0RecPoint copy constructor diff --git a/T0/AliT0Trigger.cxx b/T0/AliT0Trigger.cxx index c87b504f813..49e808f21bf 100644 --- a/T0/AliT0Trigger.cxx +++ b/T0/AliT0Trigger.cxx @@ -77,7 +77,7 @@ void AliT0Trigger::Trigger() AliError("no digits tree"); return; } - AliT0digit *fDigits = new AliT0digit(); + fDigits = new AliT0digit(); TBranch *brDigits = treeD->GetBranch("T0"); if (brDigits) { -- 2.43.0