}
-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
//
// ======================================================================
SetCleanup(kDeepCleanup);
- p = p; // to avoid compiler warnings
// *****************************************************************************
// ************************* content of this MainFrame *************************
fContAddDrawOpt->AddFrame(fComboAddDrawOpt, new TGLayoutHints(kLHintsNormal | kLHintsExpandX, 0, 0, 0, 0));
fComboAddDrawOpt->Connect("ReturnPressed()", "AliTPCCalibViewerGUI", this, "HandleButtonsGeneral(=14)");
fComboAddDrawOpt->Connect("Selected(Int_t)", "AliTPCCalibViewerGUI", this, "DoNewSelection()");
+ fComboAddDrawOpt->GetTextEntry()->SetText("",kFALSE);
// automatic redraw check button
fChkAuto = new TGCheckButton(fContDrawOpt, "Auto redraw");
fContCustom->AddFrame(fComboCustom, new TGLayoutHints(kLHintsNormal | kLHintsExpandX, 0, 0, 0, 0));
fComboCustom->Connect("ReturnPressed()", "AliTPCCalibViewerGUI", this, "HandleButtonsGeneral(=42)");
fComboCustom->Connect("Selected(Int_t)", "AliTPCCalibViewerGUI", this, "DoNewSelection()");
-
+ fComboCustom->GetTextEntry()->SetText("",kFALSE);
// additional cuts container
fContAddCuts = new TGCompositeFrame(fContTopBottom, 200, 200, kHorizontalFrame | kFitWidth | kFitHeight);
fContAddCuts->AddFrame(fComboAddCuts, new TGLayoutHints(kLHintsNormal | kLHintsExpandX, 0, 0, 0, 0));
fComboAddCuts->Connect("ReturnPressed()", "AliTPCCalibViewerGUI", this, "HandleButtonsCuts(=31)");
fComboAddCuts->Connect("Selected(Int_t)", "AliTPCCalibViewerGUI", this, "DoNewSelection()");
+ fComboAddCuts->GetTextEntry()->SetText("",kFALSE);
// ==========================================================================
// ************************* content of fContCenter *************************
fComboAddSaveOpt->EnableTextInput(kTRUE);
fComboAddSaveOpt->Connect("ReturnPressed()", "AliTPCCalibViewerGUI", this, "SavePicture()");
// fComboAddSaveOpt->Connect("Selected(Int_t)", "AliTPCCalibViewerGUI", this, "SavePicture()");
+ fComboAddSaveOpt->GetTextEntry()->SetText("",kFALSE);
// calPad export container
fContExport = new TGGroupFrame(fTabRight1, "Export AliTPCCalPad", kVerticalFrame | kFitWidth | kFitHeight);
fComboExportName->EnableTextInput(kTRUE);
fComboExportName->Connect("ReturnPressed()", "AliTPCCalibViewerGUI", this, "DoExport()");
fComboExportName->Connect("Selected(Int_t)", "AliTPCCalibViewerGUI", this, "DoExport()");
+ fComboExportName->GetTextEntry()->SetText("",kFALSE);
// export button
fBtnExport = new TGTextButton(fContExport, "&Export to CINT");
fContAddFit->AddFrame(fComboCustomFit, new TGLayoutHints(kLHintsNormal | kLHintsExpandX, 0, 0, 0, 0));
fComboCustomFit->Connect("ReturnPressed()", "AliTPCCalibViewerGUI", this, "DoFit()");
fComboCustomFit->Connect("Selected(Int_t)", "AliTPCCalibViewerGUI", this, "DoFit()");
+ fComboCustomFit->GetTextEntry()->SetText("",kFALSE);
// fit button
fBtnFit = new TGTextButton(fContAddFit, "&Fit");
TMatrixD covMatrix(0,0);
TString cutStr("");
TString formulaStr("");
- TString *returnStr = new TString("");
// specify data to plot:
TString drawStr(GetDrawString()->Data());
// ********** 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;
}
// create calPad according to drawCommand and cuts
AliTPCCalPad *calPad = fViewer->GetCalPad(desiredData.Data(), (char*)cutsStr.Data(), (char*)calPadName);
// finally export calPad to Cint:
- gROOT->ProcessLine(Form("AliTPCCalPad* %s = (AliTPCCalPad*)0x%lx;", calPadName, calPad));
+ gROOT->ProcessLine(Form("AliTPCCalPad* %s = (AliTPCCalPad*)0x%lx;", calPadName, (ULong_t)calPad));
fPreprocessor->AddComponent(calPad);
Info("ExportCalPad", "Current 2D view has been exported to an AliTPCCalPad* with name '%s'", calPadName);
}
}
Error("DoExportNorm", "Not yet implemented.");
+/*
return;
// specify data to plot:
// create calPad according to drawCommand and cuts
AliTPCCalPad *calPad = fViewer->GetCalPad(desiredData.Data(), (char*)cutsStr.Data(), (char*)fComboExportName->GetTextEntry()->GetText());
// finally export calPad to Cint:
- gROOT->ProcessLine(Form("AliTPCCalPad* %s = (AliTPCCalPad*)0x%lx;", calPadName, calPad));
+ 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);
+ */
}
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();
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);
}
}