当前位置: 首页>>代码示例>>C++>>正文


C++ TControlBar类代码示例

本文整理汇总了C++中TControlBar的典型用法代码示例。如果您正苦于以下问题:C++ TControlBar类的具体用法?C++ TControlBar怎么用?C++ TControlBar使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了TControlBar类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CalibEI

//___________________________________________________________________________________
void CalibEI(const TString &i)
{
  //
  
  TControlBar* bar = new TControlBar("vertical", "Intrinsic MWPC-"+i+" calibration");
  bar->AddButton("dPhiEI", "CalibEI("+i+",1)", "dPhi shift E wrt I");
  bar->AddButton("dPhiEI(Z)", "CalibEI("+i+",2)", "dPhi shift E wrt I as a func of Z");
  bar->AddButton("dPhiEI(Phi)", "CalibEI("+i+",3)", "dPhi shift E wrt I as a func of Phi");
  bar->AddButton("dPhiEI(Phi,Z)", "CalibEI("+i+",23)", "dPhi shift E wrt I as a func of Phi and Z");
  bar->AddButton("dPhiEI(CGW)", "CalibEI("+i+",4)", "dPhi shift E wrt I as a func of CGW");
  bar->AddButton("dPhiEI(CGI)", "CalibEI("+i+",5)", "dPhi shift E wrt I as a func of CGI");
  bar->AddButton("dPhiEI(CGE)", "CalibEI("+i+",6)", "dPhi shift E wrt I as a func of CGE");
  bar->SetButtonWidth(150);
  bar->Show();
}
开发者ID:A2-Collaboration,项目名称:acqu,代码行数:16,代码来源:GeomCalibCentralApparatus.C

示例2: MakePHOSEmcCalib

void MakePHOSEmcCalib()
{
  TControlBar *menu = new TControlBar("vertical","PHOS CDB");
  menu->AddButton("Help to run PHOS CDB","Help()",
		  "Explains how to use PHOS CDB menus");
  menu->AddButton("Create ideal calibration","SetCC(0)",
		  "Set equal CC");
  menu->AddButton("Create full decalibration","SetCC(1)",
		  "Set random decalibration CC");
  menu->AddButton("Create residual decalibration","SetCC(2)",
		  "Set residual decalibration calibration coefficients");

  menu->AddButton("Read ideal calibration","GetCC(0)",
		  "Read equal calibration coefficients");
  menu->AddButton("Read full decalibration","GetCC(1)",
		  "Read random decalibration calibration coefficients");
  menu->AddButton("Read residual calibration","GetCC(2)",
		  "Read residial calibration coefficients");
  menu->AddButton("Exit","gApplication->Terminate(0)","Quit aliroot session");
  menu->Show();
}
开发者ID:alisw,项目名称:AliRoot,代码行数:21,代码来源:MakePHOSEmcCalib.C

示例3: AliT0CalibViewer

void AliT0CalibViewer()
{
  TControlBar *menu = new TControlBar("vertical","T0 CalibViewer");
  menu->AddButton("Open file","OpenFile()",
		  "Open file");
  menu->AddButton("Draw CFD","DrawCFD()",
		  "Draw all CFD");
  menu->AddButton("Draw LED","DrawLED()",
		  "Draw all LED");
  menu->AddButton("Draw LED-CFD","DrawLEDminCFD()",
		  "Draw LED-CFD");
  menu->AddButton("Draw QTC","DrawQTC()",
                  "Draw all QTC");
  menu->AddButton("Draw CFDvsQTC","DrawCFDvsQTC()",
		  "Draw CFD vs QTC");
  menu->AddButton("Draw CFDvsLED","DrawCFDvsLED()",
		  "Draw CFD vs LED-CFD");
  menu->AddButton("Draw Walk","DrawWalk()",
		  "Draw CFD vs LED-CFD");
  menu->Show();
}
开发者ID:alisw,项目名称:AliRoot,代码行数:21,代码来源:AliT0CalibViewer.C

示例4: gldemos

// Menu for running GL demos.
// Author: Timur Pocheptsov
void gldemos()
{
   TControlBar *bar = new TControlBar("vertical", "GL painter demo",20,20);
   bar->AddButton("Help on demos", "help()", "Description");
   bar->AddButton("glsurfaces", ".x $ROOTSYS/tutorials/gl/glsurfaces.C", "Surface painter example");
   bar->AddButton("glrose", ".x $ROOTSYS/tutorials/gl/glrose.C", "Surface in polar system");
   bar->AddButton("gltf3", ".x $ROOTSYS/tutorials/gl/gltf3.C", "TF3 painter");
   bar->AddButton("glbox", ".x $ROOTSYS/tutorials/gl/glbox.C", "BOX painter");
   bar->AddButton("glparametric", ".x $ROOTSYS/tutorials/gl/glparametric.C", "Parametric surface");
   bar->Show();
}
开发者ID:digideskio,项目名称:root,代码行数:13,代码来源:gldemos.C

示例5: BrowseHistograms

void BrowseHistograms(const char* histname) {

    fHistName=histname;

  TSystemDirectory dir(".",".");
  TList *files = dir.GetListOfFiles();
  if (!files) {
    cerr << "Error: No files found in " << fFileDir << endl;
    return;
  }
  files->Sort();


  histograms = new TList();
  saved = new TList();

  c = new TCanvas("canvas","Browse Histograms");

  TSystemFile *file;
  TIter next(files);
  Int_t n=0;
  TString fname;
  while ((file=(TSystemFile*)next())) {
    fname = file->GetName();
    if (!file->IsDirectory() && fname.EndsWith(".root")) {

      histograms->Add(new TObjString(fname));
      n++;
      //if(n>10)
      //	break;
    }
  }

  DrawCurrHistogram();

  TControlBar *bar = new TControlBar("vertical", "Control", 10, 10);
  bar->AddButton("Next","ProcessClick(1);", "Show next run");
  bar->AddButton("Next And Save","NextAndSave();", "Show previous run");
  bar->AddButton("Next And Forget","NextAndForget();", "Show previous run");
  bar->AddButton("Prev","ProcessClick(-1);", "Show previous run");
  bar->AddButton("Print saved","PrintSaved();", "Show previous run");
  bar->SetButtonWidth(90);
  bar->Show();
}
开发者ID:A2-Collaboration-dev,项目名称:ant,代码行数:44,代码来源:BrowseHistograms.C

示例6: PlotFoams

void PlotFoams( TString fin = "weights/TMVAClassification_PDEFoam.weights_foams.root",
                bool useTMVAStyle=kTRUE )
{
   cout << "read file: " << fin << endl;
   TFile *file = TFile::Open(fin);

   // set style and remove existing canvas'
   TMVAGlob::Initialize( useTMVAStyle );

   // create control bar
   TControlBar* cbar = new TControlBar( "vertical", "Choose cell value for plot:", 50, 50 );
   if ((gDirectory->Get("SignalFoam") && gDirectory->Get("BgFoam")) ||
       gDirectory->Get("MultiTargetRegressionFoam")) {
      TString macro = Form( "Plot(\"%s\", TMVA::kValueDensity, \"Event density\", %s)",
			    fin.Data(), (useTMVAStyle ? "kTRUE" : "kFALSE") );
      cbar->AddButton( "Event density", macro, "Plot event density", "button" );
   } else if (gDirectory->Get("DiscrFoam") || gDirectory->Get("MultiClassFoam0")){
      TString macro = Form( "Plot(\"%s\", TMVA::kValue, \"Discriminator\", %s)",
			    fin.Data(), (useTMVAStyle ? "kTRUE" : "kFALSE") );
      cbar->AddButton( "Discriminator", macro, "Plot discriminator", "button" );
   } else if (gDirectory->Get("MonoTargetRegressionFoam")){
      TString macro = Form( "Plot(\"%s\", TMVA::kValue, \"Target\", %s)",
			    fin.Data(), (useTMVAStyle ? "kTRUE" : "kFALSE") );
      cbar->AddButton( "Target", macro, "Plot target", "button" );
   } else {
      cout << "Error: no foams found in file: " << fin << endl;
      return;
   }

   TString macro_rms = Form( "Plot(\"%s\", TMVA::kRms, \"Variance\", %s)",
			     fin.Data(), (useTMVAStyle ? "kTRUE" : "kFALSE") );
   cbar->AddButton( "Variance", macro_rms, "Plot variance", "button" );
   TString macro_rms_ov_mean = Form( "Plot(\"%s\", TMVA::kRmsOvMean, \"Variance/Mean\", %s)",
				     fin.Data(), (useTMVAStyle ? "kTRUE" : "kFALSE") );
   cbar->AddButton( "Variance/Mean", macro_rms_ov_mean, "Plot variance over mean", "button" );
   TString macro_cell_tree = Form( "PlotCellTree(\"%s\", \"Cell tree\", %s)",
				   fin.Data(), (useTMVAStyle ? "kTRUE" : "kFALSE") );
   cbar->AddButton( "Cell tree", macro_cell_tree, "Plot cell tree", "button" );

   cbar->Show();
   file->Close();
}
开发者ID:TopBrussels,项目名称:TopTreeAnalysisBase,代码行数:42,代码来源:PlotFoams.C

示例7: TMVAGui

// main GUI
void TMVAGui( const char* fName = "TMVA.root" ) 
{   
   // Use this script in order to run the various individual macros
   // that plot the output of TMVA (e.g. running TMVAnalysis.C),
   // stored in the file "TMVA.root"
   // for further documentation, look in the individual macros

   TString curMacroPath(gROOT->GetMacroPath());
   gROOT->SetMacroPath(curMacroPath+":$ROOTSYS/tmva/test/:");

   cout << "--- Launch TMVA GUI to view input file: " << fName << endl;

   // init
   TMVAGui_inactiveButtons.clear();

   // check if file exist
   TFile* file = TFile::Open( fName );
   if (!file) {
      cout << "==> Abort TMVAGui, please verify filename" << endl;
      return;
   }
   // find all references   
   cout << "--- Reading keys ..." << endl;
   TMVAGui_keyContent = (TList*)file->GetListOfKeys()->Clone();

   // close file
   file->Close();

   TString defaultRequiredClassifier = "";

   //   gROOT->Reset();
   //   gStyle->SetScreenFactor(2); // if you have a large screen, select 1,2 or 1.4

   // create the control bar
   TControlBar* cbar = new TControlBar( "vertical", "TMVA Plotting Macros", 0, 0 );

   const TString buttonType( "button" );

   // configure buttons   
   Int_t ic = 0;
   ActionButton( cbar, 
                 Form( "(%ia) Input Variables (training sample)", ++ic),
                 Form( ".x variables.C(\"%s\",0)", fName ),
                 "Plots all input variables (macro variables.C)",
                 buttonType );
   
   ActionButton( cbar,  
                 Form( "(%ib) Decorrelated Input Variables", ic ),
                 Form( ".x variables.C(\"%s\",1)", fName ),
                 "Plots all decorrelated input variables (macro variables.C(1))",
                 buttonType, "DecorrTransform" );

   ActionButton( cbar,  
                 Form( "(%ic) PCA-transformed Input Variables", ic ),
                 Form( ".x variables.C(\"%s\",2)", fName ),    
                 "Plots all PCA-transformed input variables (macro variables.C(2))",
                 buttonType, "PCATransform" );

   ActionButton( cbar,  
                 Form( "(%id) GaussDecorr-transformed Input Variables", ic ),
                 Form( ".x variables.C(\"%s\",3)", fName ),    
                 "Plots all GaussDecorrelated-transformed input variables (macro variables.C(3))",
                 buttonType, "GaussDecorr" );

   ActionButton( cbar,  
                 Form( "(%ia) Input Variable Correlations (scatter profiles)", ++ic ),
                 Form( ".x CorrGui.C\(\"%s\",0)", fName ), 
                 "Plots signal and background correlation profiles between input variables (macro CorrGui.C)",
                 buttonType );

   ActionButton( cbar,  
                 Form( "(%ib) Decorrelated Input Variable Correlations (scatter profiles)", ic ),
                 Form( ".x CorrGui.C\(\"%s\",1)", fName ), 
                 "Plots signal and background correlation profiles between decorrelated input variables (macro CorrGui.C(1))",
                 buttonType, "DecorrTransform" );

   ActionButton( cbar,  
                 Form( "(%ic) PCA-transformed Input Variable Correlations (scatter profiles)", ic ),
                 Form( ".x CorrGui.C\(\"%s\",2)", fName ), 
                 "Plots signal and background correlation profiles between PCA-transformed input variables (macro CorrGui.C(2))",
                 buttonType, "PCATransform" );

   ActionButton( cbar,  
                 Form( "(%id) GaussDecorr-transformed Input Variable Correlations (scatter profiles)", ic ),
                 Form( ".x CorrGui.C\(\"%s\",3)", fName ), 
                 "Plots signal and background correlation profiles between Gaussianised and Decorrelated input variables (macro CorrGui.C(3))",
                 buttonType, "GaussDecorr" );

   ActionButton( cbar,  
                 Form( "(%i) Input Variable Linear Correlation Coefficients", ++ic ),
                 Form( ".x correlations.C(\"%s\")", fName ),
                 "Plots signal and background correlation summaries for all input variables (macro correlations.C)", 
                 buttonType );

   ActionButton( cbar,  
                 Form( "(%ia) Classifier Output Distributions (test sample)", ++ic ),
                 Form( ".x mvas.C(\"%s\",0)", fName ),
                 "Plots the output of each classifier for the test data (macro mvas.C(...,0))",
                 buttonType, defaultRequiredClassifier );
//.........这里部分代码省略.........
开发者ID:amassiro,项目名称:usercode,代码行数:101,代码来源:TMVAGui.C

示例8: DrawPictures

void DrawPictures()
{
   TControlBar *menu = new TControlBar("vertical","Pictures menu");
   menu->AddButton("TPC shaded",   ".x DrawTPC.C","Draw a shaded view of TPC");
   menu->AddButton("ITS shaded",   ".x DrawITS.C","Draw a shaded view of ITS");
   menu->AddButton("CASTOR shaded",".x DrawCASTOR.C","Draw a shaded view of CASTOR");
   menu->AddButton("ABSO shaded",  ".x DrawABSO.C","Draw a shaded view of ABSO");
   menu->AddButton("DIPO shaded",  ".x DrawDIPO.C","Draw a shaded view of DIPO");
   menu->AddButton("FMD shaded",   ".x DrawFMD.C","Draw a shaded view of FMD");
   menu->AddButton("FRAME shaded", ".x DrawFRAME.C","Draw a shaded view of FRAME");
   menu->AddButton("HALL shaded",  ".x DrawHALL.C","Draw a shaded view of HALL");
   menu->AddButton("MAG shaded",   ".x DrawMAG.C","Draw a shaded view of MAG");
   menu->AddButton("MUON shaded",  ".x DrawMUON.C","Draw a shaded view of MUON");
   menu->AddButton("PHOS shaded",  ".x DrawPHOS.C","Draw a shaded view of PHOS");
   menu->AddButton("PIPE shaded",  ".x DrawPIPE.C","Draw a shaded view of PIPE");
   menu->AddButton("PMD shaded",   ".x DrawPMD.C","Draw a shaded view of PMD");
   menu->AddButton("HMPID shaded",  ".x DrawHMPID.C","Draw a shaded view of HMPID");
   menu->AddButton("SHIL shaded",  ".x DrawSHIL.C","Draw a shaded view of SHIL");
   menu->AddButton("T0 shaded", ".x DrawT0.C","Draw a shaded view of T0");
   menu->AddButton("TOF shaded",   ".x DrawTOF.C","Draw a shaded view of TOF");
   menu->AddButton("TRD shaded",   ".x DrawTRD.C","Draw a shaded view of TRD");
   menu->AddButton("ZDC shaded",   ".x DrawZDC.C","Draw a shaded view of ZDC");
   menu->AddButton("VZERO shaded", ".x DrawVZERO.C","Draw a shaded view of VZERO"); 
   menu->Show();
}
开发者ID:alisw,项目名称:AliRoot,代码行数:25,代码来源:DrawPictures.C

示例9: CalibMwpcNaI

//___________________________________________________________________________________
void CalibMwpcNaI(const TString &i)
{
  //
  
  TControlBar* bar = new TControlBar("vertical", "MWPC-"+i+" wrt NaI");
  bar->AddButton("dPhi", "CalibMwpcNaI("+i+",1,0,0,0,0)", "dPhi Mwpc-NaI");
  bar->AddButton("dX", "CalibMwpcNaI("+i+",2,0,0,0,0)", "X shift");
  bar->AddButton("dY", "CalibMwpcNaI("+i+",3,0,0,0,0)", "Y shift");
  bar->AddButton("dZ", "CalibMwpcNaI("+i+",4,0,0,0,0)", "Z shift");
  bar->AddButton("dPhi tracks", "CalibMwpcNaI("+i+",5,0,0,0,0)", "dPhi between tracks");
  bar->AddButton("dTheta tracks", "CalibMwpcNaI("+i+",6,0,0,0,0)", "dTheta between tracks");
  bar->AddButton("dPsi tracks", "CalibMwpcNaI("+i+",7,0,0,0,0)", "dPsi between tracks");
  bar->AddButton("dZinter vs Zinter", "CalibMwpcNaI("+i+",8,0,0,0,0)", "");
  bar->AddButton("dXinter vs Zinter", "CalibMwpcNaI("+i+",9,0,0,0,0)", "");
  bar->AddButton("dYinter vs Zinter", "CalibMwpcNaI("+i+",10,0,0,0,0)", "");
  bar->AddButton("dZinter vs PhiInter", "CalibMwpcNaI("+i+",11,0,0,0,0)", "");
  bar->AddButton("dXinter vs PhiInter", "CalibMwpcNaI("+i+",12,0,0,0,0)", "");
  bar->AddButton("dYinter vs PhiInter", "CalibMwpcNaI("+i+",13,0,0,0,0)", "");
  bar->AddButton("dPhiInter vs PhiInter", "CalibMwpcNaI("+i+",14,0,0,0,0)", "");
  bar->AddButton("dPhiInter vs Zinter", "CalibMwpcNaI("+i+",15,0,0,0,0)", "");
  bar->SetButtonWidth(150);
  bar->Show();
}
开发者ID:A2-Collaboration,项目名称:acqu,代码行数:24,代码来源:GeomCalibCentralApparatus.C

示例10: CalibMwpc

//___________________________________________________________________________________
void CalibMwpc()
{
  //
  
  TControlBar* bar = new TControlBar("vertical", "MWPC-1 wrt MWPC-0 calibration");
  bar->AddButton("dPhi",		"CalibMwpc(1, 0, 0, 0, 0)", "dPhi MWPC1 - MWPC0");
  bar->AddButton("dX",			"CalibMwpc(2, 0, 0, 0, 0)", "dX MWPC1 - MWPC0");
  bar->AddButton("dY",			"CalibMwpc(3, 0, 0, 0, 0)", "dY MWPC1 - MWPC0");
  bar->AddButton("dZ",			"CalibMwpc(4, 0, 0, 0, 0)", "dZ MWPC1 - MWPC0");
  bar->AddButton("dPhi tracks",		"CalibMwpc(5, 0, 0, 0, 0)", "dPhi tracks 1-2");
  bar->AddButton("dTheta tracks",	"CalibMwpc(6, 0, 0, 0, 0)", "dTheta tracks 1-2");
  bar->AddButton("dTheta2 tracks2",	"CalibMwpc(66, 0, 0, 0, 0)", "dTheta tracks 1-2");
  bar->AddButton("dPsi tracks",		"CalibMwpc(7, 0, 0, 0, 0)", "dPsi tracks 1-2");
  bar->AddButton("dZinter vs Zinter",	"CalibMwpc(8, 0, 0, 0, 0)", "dZ vs Zinter");
  bar->AddButton("dXinter vs Zinter",	"CalibMwpc(9, 0, 0, 0, 0)", "dX vs Zinter");
  bar->AddButton("dYinter vs Zinter",	"CalibMwpc(10, 0, 0, 0, 0)", "dY vs Zinter");
  bar->AddButton("dZinter vs PhiInter",	"CalibMwpc(11, 0, 0, 0, 0)", "dZinter vs PhiInter");
  bar->AddButton("dXinter vs PhiInter",	"CalibMwpc(12, 0, 0, 0, 0)", "dXinter vs PhiInter");
  bar->AddButton("dYinter vs PhiInter",	"CalibMwpc(13, 0, 0, 0, 0)", "dYinter vs PhiInter");
  bar->AddButton("dPhi vs PhiInter",	"CalibMwpc(14, 0, 0, 0, 0)", "dPhi vs PhiInter");
  bar->AddButton("dPhi vs ZInter",	"CalibMwpc(15, 0, 0, 0, 0)", "dPhi vs ZInter");
  bar->SetButtonWidth(150);
  bar->Show();
}
开发者ID:A2-Collaboration,项目名称:acqu,代码行数:25,代码来源:GeomCalibCentralApparatus.C

示例11: TMVAGui

// main GUI
void TMVAGui( const char* fName = "TMVA.root" ) ///usage:
{   


//TMVA::gConfig().GetVariablePlotting().fNbins1D = 50.0;
//TMVA::gConfig().GetVariablePlotting().fNbinsXOfROCCurve=50;

   // Use this script in order to run the various individual macros
   // that plot the output of TMVA (e.g. running TMVAClassification.C),
   // stored in the file "TMVA.root"

   TString curMacroPath(gROOT->GetMacroPath());
   // uncomment next line for macros submitted to next root version
   gROOT->SetMacroPath(curMacroPath+":$ROOTSYS/tmva/test/:");
   
   // for the sourceforge version, including $ROOTSYS/tmva/test in the
   // macro path is a mistake, especially if "./" was not part of path
   // add ../macros to the path (comment out next line for the ROOT version of TMVA)
   // gROOT->SetMacroPath(curMacroPath+":../macros:");
   
   cout << "--- Launch TMVA GUI to view input file: " << fName << endl;

   // init
   TMVAGui_inactiveButtons.clear();

   // check if file exist
   TFile* file = TFile::Open( fName );
   if (!file) {
      cout << "==> Abort TMVAGui, please verify filename" << endl;
      return;
   }
   // find all references   
   cout << "--- Reading keys ..." << endl;
   TMVAGui_keyContent = (TList*)file->GetListOfKeys()->Clone();

   // close file
   file->Close();

   TString defaultRequiredClassifier = "";

   //   gROOT->Reset();
   //   gStyle->SetScreenFactor(2); // if you have a large screen, select 1,2 or 1.4

   // create the control bar
   TControlBar* cbar = new TControlBar( "vertical", "TMVA Plotting Macros for Classification", 0, 0 );

   const TString buttonType( "button" );

   // configure buttons   
   Int_t ic = 1;

   // find all input variables types
   TList* keylist = GetKeyList( "InputVariables" );
   TListIter it( keylist );
   TObjString* str = 0;
   char ch = 'a';
   while ((str = (TObjString*)it())) {
      TString tmp   = str->GetString();
      TString title = Form( "Input variables '%s'-transformed (training sample)", 
                            tmp.ReplaceAll("InputVariables_","").Data() );
      if (tmp.Contains( "Id" )) title = "Input variables (training sample)";
      ActionButton( cbar, 
                    Form( "(%i%c) %s", ic, ch++, title.Data() ),
                    Form( ".x variables.C(\"%s\",\"%s\",\"%s\")", fName, str->GetString().Data(), title.Data() ),
                    Form( "Plots all '%s'-transformed input variables (macro variables.C(...))", str->GetString().Data() ),
                    buttonType, str->GetString() );
   }      
   ic++;

   // correlation scatter plots 
   it.Reset(); ch = 'a';
   while ((str = (TObjString*)it())) {
      TString tmp   = str->GetString();
      TString title = Form( "Input variable correlations '%s'-transformed (scatter profiles)", 
                            tmp.ReplaceAll("InputVariables_","").Data() );
      if (tmp.Contains( "Id" )) title = "Input variable correlations (scatter profiles)";
      ActionButton( cbar, 
                    Form( "(%i%c) %s", ic, ch++, title.Data() ),
                    Form( ".x CorrGui.C(\"%s\",\"%s\",\"%s\")", fName, str->GetString().Data(), title.Data() ),
                    Form( "Plots all correlation profiles between '%s'-transformed input variables (macro CorrGui.C(...))", 
                          str->GetString().Data() ),
                    buttonType, str->GetString() );
   }      
   
   // coefficients
   ActionButton( cbar,  
                 Form( "(%i) Input Variable Linear Correlation Coefficients", ++ic ),
                 Form( ".x correlations.C(\"%s\")", fName ),
                 "Plots signal and background correlation summaries for all input variables (macro correlations.C)", 
                 buttonType );

   ActionButton( cbar,  
                 Form( "(%ia) Classifier Output Distributions (test sample)", ++ic ),
                 Form( ".x mvas.C(\"%s\",0)", fName ),
                 "Plots the output of each classifier for the test data (macro mvas.C(...,0))",
                 buttonType, defaultRequiredClassifier );

   ActionButton( cbar,  
                 Form( "   (%ib) Classifier Output Distributions (test and training samples superimposed)   ", ic ),
//.........这里部分代码省略.........
开发者ID:igormarfin,项目名称:MSSMHbb,代码行数:101,代码来源:TMVAGui.C

示例12: TControlBar

void mtlrchApp::SetupSpeedBar (TDecoratedMDIFrame *frame)
{ 
    //
    // Create default toolbar New and associate toolbar buttons with commands.
    //   
    TControlBar* cb = new TControlBar(frame);
    cb->Insert(*new TButtonGadget(CM_MDIFILENEW, CM_MDIFILENEW));
    cb->Insert(*new TButtonGadget(CM_MDIFILEOPEN, CM_MDIFILEOPEN));
    cb->Insert(*new TButtonGadget(CM_FILESAVE, CM_FILESAVE));
    cb->Insert(*new TSeparatorGadget(6));
    cb->Insert(*new TButtonGadget(CM_EDITCUT, CM_EDITCUT));
    cb->Insert(*new TButtonGadget(CM_EDITCOPY, CM_EDITCOPY));
    cb->Insert(*new TButtonGadget(CM_EDITPASTE, CM_EDITPASTE));
    cb->Insert(*new TSeparatorGadget(6));
    cb->Insert(*new TButtonGadget(CM_EDITUNDO, CM_EDITUNDO));
    cb->Insert(*new TSeparatorGadget(6));
    cb->Insert(*new TButtonGadget(CM_EDITFIND, CM_EDITFIND));
    cb->Insert(*new TButtonGadget(CM_EDITFINDNEXT, CM_EDITFINDNEXT));
    cb->Insert(*new TSeparatorGadget(6));
    cb->Insert(*new TButtonGadget(CM_FILEPRINT, CM_FILEPRINT));
    cb->Insert(*new TButtonGadget(CM_FILEPRINTPREVIEW, CM_FILEPRINTPREVIEW));

    // Add fly-over help hints.
    cb->SetHintMode(TGadgetWindow::EnterHints);

    frame->Insert(*cb, TDecoratedFrame::Top);
}
开发者ID:ahoffman747,项目名称:tak-lab,代码行数:27,代码来源:MTLRCHAP.CPP

示例13: GetControlBar

//__________________________________________________________________
void GetControlBar() {

   gROOT->Reset();
/*
   //Add the tutorials directory to the macro path
   //This is necessary in case this macro is executed from another user directory
   TString dir = gSystem->UnixPathName(gInterpreter->GetCurrentMacroName());
   dir.ReplaceAll("PeakSearch_207Bi_interactive.C","");
   dir.ReplaceAll("/./","");
   const char *current = gROOT->GetMacroPath();
   gROOT->SetMacroPath(Form("%s:%s",current,dir.Data()));
*/
   TControlBar *bar = new TControlBar("vertical", "Controls",20,10);
   //bar->SetNumberOfColumns(3);
   //bar->SetNumberOfRows(7);
   
   bar->AddButton("Root Browser",   	"new TBrowser;",         "Start the ROOT Browser");
   bar->AddButton("Open folder",   	"OpenDataFile();",         "Open data folder, provide name on screen");
   bar->AddButton("OpenPeaksFile",     	"OpenPeaksFile()",   "Open the output file of the peaks details");
   bar->AddButton("Next histogram", 		"GetNextHistogram(+1)"," Load the next histogram");
   bar->AddButton("Prev histogram", 		"GetNextHistogram(-1)"," Load the previous histogram");
   bar->AddButton("Rebin histogram ", 		"RebinHistogram()"," Rebin the current histogram");
   bar->AddButton("Store binning ", 		"WriteRebin()"," Write the adequate bining of the histogram ");
   bar->AddButton("Close",   "Close()",          "Close the files and exit");
  
 TControlBar *bar2 = new TControlBar("vertical", "Bi207 (keV)",100,100);
   //bar2->SetNumberOfColumns(3);
   //bar->SetNumberOfRows(7);
    
   bar2->AddButton("XRay  72.8",   "AssignEnergy(72.805)",          "AssignEnergy this energy : 21.4%");
   bar2->AddButton("XRay  75.0",   "AssignEnergy(74.969)",          "AssignEnergy this energy : 35.7%");
   bar2->AddButton("XRay  84.4",   "AssignEnergy(84.450)",          "AssignEnergy this energy : 4.31%");
   bar2->AddButton("XRay  84.9",   "AssignEnergy(84.938)",          "AssignEnergy this energy : 8.27%");
   bar2->AddButton("XRay  87.3",   "AssignEnergy(87.300)",          "AssignEnergy this energy : 3.02%");

   //bar->AddSeparator() ;

//TControlBar *bar3 = new TControlBar("vertical", "Bi207 ICE (keV)",50,50);
   //bar2->SetNumberOfColumns(3);
   //bar->SetNumberOfRows(7);
    
   bar2->AddButton("K   481.7",   "AssignEnergy(481.6935)",          "AssignEnergy this energy : 1.515%");
   bar2->AddButton("L   553.8",   "AssignEnergy(553.8372)",          "AssignEnergy this energy : 0.438%");
   bar2->AddButton("M   565.8",   "AssignEnergy(565.8473)",          "AssignEnergy this energy : 0.147%");
   bar2->AddButton("K   975.6",   "AssignEnergy(975.651)",          "AssignEnergy this energy : 7.03%");
   bar2->AddButton("L  1047.9",   "AssignEnergy(1047.795)",          "AssignEnergy this energy : 1.84%");
   bar2->AddButton("M  1059.8",   "AssignEnergy(1059.805)",          "AssignEnergy this energy : 0.54%");
   
   bar->SetButtonWidth(200);
   bar->Show();
   
   bar2->SetButtonWidth(200);
   bar2->SetTextColor("blue");
   //bar2->SetFont("-adobe-helvetica-bold-r-*-*-16-*-*-*-*-*-iso8859-1");
   bar2->Show();
   
   /*
   bar3->SetButtonWidth(100);
   bar3->SetTextColor("red");
   bar3->SetFont("-adobe-helvetica-bold-r-*-*-16-*-*-*-*-*-iso8859-1");
   bar3->Show();
   */
   
   gROOT->SaveContext();
}
开发者ID:jsmallcombe,项目名称:james_library,代码行数:66,代码来源:PS2.C

示例14: mirrors

void mirrors() {
  
  setStyle();

  init_parameters();
  write_parameters();

  simulateResponse();

  TControlBar* bar =
      new TControlBar("vertical", "LTCC Segments  by Maurizio Ungaro");
  bar->AddButton("", "");
  bar->AddButton("Show Photon Yield", "draw_W()");
  bar->AddButton("", "");
  bar->AddButton("Show refractive index of C4F10", "draw_c4f10n()");
  bar->AddButton("Show quantum efficiencies", "draw_qes()");
  bar->AddButton("Show reflectivities", "draw_reflectivities()");
  bar->AddButton("Show wc reflectivities", "draw_wcreflectivities()");
  bar->AddButton("Show Window Gains", "draw_window_gain()");
  bar->AddButton("", "");
  bar->AddButton("Integrate Yield", "integrate_yield()");
  bar->AddButton("Plot Yields", "plot_yields()");
  bar->AddButton("Plot Ratios", "normalized_yields_mirrors()");
  bar->AddButton("", "");
  bar->AddButton("Change particle", "change_particle()");
  bar->AddButton("Change mirror", "change_mirror()");
  bar->AddButton("Change gas", "change_gas()");
  bar->AddButton("Change pmt", "change_pmt()");
  bar->AddButton("Change WC", "change_WC()");
  bar->AddButton("", "");
  bar->AddButton("Simulate Response", "simulateResponse()");
  bar->AddButton("", "");
  bar->AddButton("Write Parameters", "write_parameters()");
  bar->AddButton("", "");
  bar->Show();

  // that's all!
}
开发者ID:battaglieri,项目名称:detectors,代码行数:38,代码来源:mirrors.C

示例15: GetDefaultWH

void TMyApp::InitMainWindow()
{
    int ResIdNum = ID_DLGMSG1000;   // Hi Res Dialog
    int h,w;
    GetDefaultWH(w,h);
    if(h <= 480)
    {
        ResIdNum = ID_DLGMSG640x480;
    }
    ///
    DlgMsg *Dw = new DlgMsg((TWindow*)0, ResIdNum);
    MainFramePtr = new TDecoratedFrame(0, ".", Dw );
    const int small = 6;
    const big = 20;
    TControlBar *Cbar = new TControlBar(MainFramePtr);
    Cbar->Insert(*new TSeparatorGadget(big) ); // left margin on tool bar
    Cbar->Insert(*new TButtonGadget(CM_BM_RESCAN,ID_RESCAN,TButtonGadget::Command) );
    Cbar->Insert(*new TSeparatorGadget(big) );
    Cbar->Insert(*new TButtonGadget(CM_BM_SETUP,ID_SETUP,TButtonGadget::Command) );
    Cbar->Insert(*new TSeparatorGadget(small) );
    Cbar->Insert(*new TButtonGadget(CM_BM_PROJECTWIN,CM_OPENPROJECTWIN,TButtonGadget::Command) );
    Cbar->Insert(*new TSeparatorGadget(small) );
    Cbar->Insert(*new TButtonGadget(CM_BM_PRJPATH,ID_PATH,TButtonGadget::Command) );
    Cbar->Insert(*new TSeparatorGadget(big) );
    Cbar->Insert(*new TButtonGadget(CM_BM_NEWCLASS,ID_ADD_CLASS,TButtonGadget::Command) );
    Cbar->Insert(*new TSeparatorGadget(big) );
    Cbar->Insert(*new TButtonGadget(CM_BM_VARIABLE,ID_VARIABLE,TButtonGadget::Command) );
    Cbar->Insert(*new TSeparatorGadget(big) );
    Cbar->Insert(*new TButtonGadget(CM_BM_ADDFUNCTION,ID_ADD_EVENT,TButtonGadget::Command) );
    Cbar->Insert(*new TSeparatorGadget(small) );
    Cbar->Insert(*new TButtonGadget(CM_BM_DELFUNCTION,ID_DEL_MEMBER,TButtonGadget::Command) );
    Cbar->Insert(*new TSeparatorGadget(big) );
    Cbar->Insert(*new TButtonGadget(CM_BM_TOOLS,ID_TOOLS,TButtonGadget::Command) );
    Cbar->Insert(*new TSeparatorGadget(small) );
    Cbar->Insert(*new TButtonGadget(CM_BM_ABOUT,CM_ABOUT,TButtonGadget::Command) );
    MainFramePtr->Insert(*Cbar, TDecoratedFrame::Top);

    Sbar = new TStatusBar(MainFramePtr,TGadget::Embossed, TStatusBar::CapsLock | TStatusBar::NumLock | TStatusBar::Overtype);
    MainFramePtr->Insert(*Sbar, TDecoratedFrame::Bottom);

    SetMainWindow( MainFramePtr );

    MainWindow->AssignMenu(ID_MAINMENU);
    MainWindow->SetIcon(this,ICON2);
    MainWindow->Attr.Style &= ~WS_MAXIMIZEBOX;

    RecallWindowSizePos();
    RecallProjectPath(NULL,TRUE);
}
开发者ID:OS2World,项目名称:DEV-CPLUSPLUS-UTIL-Professor_Owl,代码行数:49,代码来源:main.cpp


注:本文中的TControlBar类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。