示例#1
0
void GuiConfig::SetBindedControlString(int allCtrl, Window* txtBut)
{
	int aDevice1, aButton1, aAxe1;
	int aDevice2, aButton2, aAxe2;

	GConfig->GetControl(aCtrlList[allCtrl].mName, 0, aDevice1, aButton1, aAxe1);
	GConfig->GetControl(aCtrlList[allCtrl].mName, 1, aDevice2, aButton2, aAxe2);

	if (aDevice2 || aButton2 || aAxe2)
	{
		if (aDevice1 || aButton1 || aAxe1)
		{
			txtBut->setText((FormatInput(aDevice1, aButton1, aAxe1) + " / " +
				FormatInput(aDevice2, aButton2, aAxe2)).c_str() );
		}
		else
		{
			txtBut->setText(FormatInput(aDevice2, aButton2, aAxe2).c_str() );
		}
	}
	else
	{
		if (aDevice1 || aButton1 || aAxe1)
		{
			txtBut->setText(FormatInput(aDevice1, aButton1, aAxe1).c_str() );
		}
		else
		{
			txtBut->setText(GLoc->GetString("UNDEFINED").c_str() );
		}
	}
}
示例#2
0
文件: Post.C 项目: ktf/AliPhysics
/** 
 * 
 * 
 * @param sim    Simulation data file 
 * @param real   Real data file 
 * @param output (optional) Output name 
 * @param proc   (optional) processing options 
 * @param viz    (optional) visualisation options 
 * @param n      (optional) max number of centrality bins 
 *
 * Processing options: 
 *
 * - 0x0001   Do scaling by unity
 * - 0x0002   Do scaling by full average
 * - 0x0004   Do scaling by eta differential
 * - 0x0008   Do scaling by fully differential
 * - 0x0010   Correct for decay of strange to secondary 
 * - 0x0020   Correct for fake tracklets
 * - 0x0040   Correct for non-flat centrality in each bin
 * - 0x1000   MC closure test
 *
 * Visualization options: 
 *
 * - 0x0001   Draw general information
 * - 0x0002   Draw parameters
 * - 0x0004   Draw weights
 * - 0x0008   Draw dNch/deta
 * - 0x0010   Draw alphas
 * - 0x0020   Draw delta information
 * - 0x0040   Draw backgrounds
 * - 0x0100   Whether to make a PDF
 * - 0x0200   Whether to pause after each plot
 * - 0x0400   Draw in landscape
 * - 0x0800   Alternative markers
 * 
 * @ingroup pwglf_forward_tracklets
 * @relates AliTrackletdNdeta2
 */
void Post(const char* sim,
	  const char* real,
	  const char* output=0,
	  UInt_t      proc=0x2,
	  UInt_t      viz=0x32f,
	  UInt_t      n=10,
	  UInt_t      sNN=5023)
{
  if (TString(sim) .Contains("help",TString::kIgnoreCase) ||
      TString(real).Contains("help",TString::kIgnoreCase)) {
    Usage(std::cout);
    return;
  }
  // Set the path to the code 
  TString fwd = "$ALICE_PHYSICS/PWGLF/FORWARD/analysis2/dndeta/tracklets3";
  if (gSystem->Getenv("ANA_SRC")) fwd = "$ANA_SRC/dndeta/tracklets3";

  // Compile the needed code 
  gSystem->AddIncludePath(Form("-I%s",fwd.Data()));
  gROOT->LoadMacro(Form("%s/AliTrackletAODUtils.C++g",fwd.Data()));
  gROOT->LoadMacro(Form("%s/AliTrackletdNdeta2.C++g",fwd.Data()));

  // Set inputs and output
  TString realShrt, simShrt;  
  TString realFile = FormatInput(real, realShrt);
  TString simFile  = FormatInput(sim,  simShrt);
  TString outFile(output && output[0] != '\0' ? output :
		  Form("%s_%s",realShrt.Data(),simShrt.Data()));
  if (proc & 0x1) outFile.Append("_unit");
  if (proc & 0x2) outFile.Append("_const");
  if (proc & 0x4) outFile.Append("_eta");
  if (proc & 0x8) outFile.Append("_etaipz");
  gSystem->mkdir(outFile,true);
  Printf("===========================================\n"
	 " Real data file:        %s\n"
	 " Simulation data file:  %s\n"
	 " Output directory:      %s\n"
	 "===========================================",
	 realFile.Data(), simFile.Data(), outFile.Data());

  // Create the object to do the post processing, and run it
  AliTrackletdNdeta2* p = new AliTrackletdNdeta2;  
  p->Run(proc,viz,n,realFile,simFile,outFile);

  // Extract a GSE
  Printf("Extracting GraphSysErr object(s)");
  gROOT->LoadMacro(Form("%s/ExtractGSE2.C",fwd.Data()));
  ExtractGSE2(outFile,sNN);

  Printf("All output stored in %s", outFile.Data());
}