]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCCalibViewerGUI.cxx
reco update
[u/mrichter/AliRoot.git] / TPC / AliTPCCalibViewerGUI.cxx
index 898c75821f22e1177cbf12fd5beb2f2ed0f3c82d..837f83428c6e92d5112e5a669209369d023f9eaf 100644 (file)
@@ -214,7 +214,7 @@ AliTPCCalibViewerGUI::AliTPCCalibViewerGUI(const TGWindow *p, UInt_t w, UInt_t h
 }
 
 
-void AliTPCCalibViewerGUI::DrawGUI(const TGWindow *p, UInt_t w, UInt_t h) {
+void AliTPCCalibViewerGUI::DrawGUI(const TGWindow */*p*/, UInt_t w, UInt_t h) {
    // 
    // draw the GUI
    // 
@@ -223,7 +223,6 @@ void AliTPCCalibViewerGUI::DrawGUI(const TGWindow *p, UInt_t w, UInt_t h) {
    // ======================================================================
    
    SetCleanup(kDeepCleanup);
-   p = p; // to avoid compiler warnings
 
    // *****************************************************************************
    // ************************* content of this MainFrame *************************
@@ -1777,7 +1776,6 @@ void AliTPCCalibViewerGUI::DoFit() {
    TMatrixD covMatrix(0,0);
    TString cutStr("");
    TString formulaStr("");
-   TString *returnStr = new TString("");
 
    // specify data to plot:
    TString drawStr(GetDrawString()->Data());
@@ -1815,12 +1813,14 @@ void AliTPCCalibViewerGUI::DoFit() {
    // ********** call AliTPCCalibViewer's fit-function
   ReplacePlaceHolders(drawStr);
   ReplacePlaceHolders(cutStr);
-  returnStr = fViewer->Fit(drawStr.Data(), formulaStr.Data(), cutStr.Data(), chi2, fitParam, covMatrix);
+  TString *returnStr = fViewer->Fit(drawStr.Data(), formulaStr.Data(), cutStr.Data(), chi2, fitParam, covMatrix);
    
    std::cout << std::endl;
    std::cout << "Your fit formula reads as follows:" << std::endl;
    std::cout << returnStr->Data() << std::endl;
    std::cout << "chi2 = " << chi2 << std::endl;
+
+  delete returnStr;
 }
 
 
@@ -1858,6 +1858,7 @@ void AliTPCCalibViewerGUI::DoExportNorm() {
    }
    
    Error("DoExportNorm", "Not yet implemented.");
+/*  
    return;
    
    // specify data to plot:
@@ -1874,6 +1875,7 @@ void AliTPCCalibViewerGUI::DoExportNorm() {
    // finally export calPad to Cint:
    gROOT->ProcessLine(Form("AliTPCCalPad* %s = (AliTPCCalPad*)0x%lx;", calPadName, (ULong_t) calPad));
    Info("ExportCalPad", "Current 2D view has been exported to an AliTPCCalPad* with name '%s'", calPadName);
+  */
 }
 
 
@@ -1888,7 +1890,7 @@ void AliTPCCalibViewerGUI::GetMinMax() {
       ptr = listOfPrimitives->At(i);
       if ( ptr->InheritsFrom("TH1") ) break;
    }
-   if ( ptr != 0 && !ptr->InheritsFrom("TH1") ) return;      // if the loop did not find a TH1
+   if ( !ptr || !ptr->InheritsFrom("TH1") ) return;      // if the loop did not find a TH1
    TH1 *hist = (TH1*)ptr;
 
 //    Double_t histMax = hist->GetMaximum();
@@ -2195,7 +2197,7 @@ void AliTPCCalibViewerGUI::DoDumpToFile() {
    new TGFileDialog(gClient->GetRoot(), gClient->GetRoot(), kFDSave, &fi);
    if (fi.fFilename && strlen(fi.fFilename)) {
       fPreprocessor->DumpToFile(fi.fFilename);
-      Info("DumpToFile", Form("New CalibTree has been writen to file '%s'", fi.fFilename));
+      Info("DumpToFile","New CalibTree has been writen to file '%s'", fi.fFilename);
    }
 }