本文整理汇总了C++中TPad::GetFrame方法的典型用法代码示例。如果您正苦于以下问题:C++ TPad::GetFrame方法的具体用法?C++ TPad::GetFrame怎么用?C++ TPad::GetFrame使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TPad
的用法示例。
在下文中一共展示了TPad::GetFrame方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GE11sEfficiencyScan
//.........这里部分代码省略.........
nlines++;
}
InGE11_IV.close();
nlines=0;
while (1)
{
InGE11_V >> NameOfDet >> xRange >> temp_MeanPosOfSector >> temp_Efficiency >> temp_EfficiencyError >> temp_Nevents;
if (!InGE11_V.good()) break;
V_MeanPosOfSector.push_back(temp_MeanPosOfSector+(nlines*5));
V_Efficiency.push_back(temp_Efficiency);
V_EfficiencyError.push_back(temp_EfficiencyError);
V_Nevents.push_back(temp_Nevents);
GE11_V->Fill(temp_MeanPosOfSector+(nlines*5),temp_Efficiency,temp_EfficiencyError,temp_Nevents);
nlines++;
}
InGE11_V.close();
string CanvasName = "RunNumber"+std::to_string(RunNumber);
const char * CharCanvasName = CanvasName.c_str();
TCanvas* c1 = new TCanvas(CharCanvasName,"Efficiency Scan Plot",200,10,700,500);
TPad *pad = new TPad("pad","",0,0,1,1);
//pad->SetFillColor(42);
pad->SetGrid();
pad->Draw();
pad->cd();
// draw a frame to define the range
TH1F *hr = pad->DrawFrame(0,-0.5,100,1.1);
hr->SetXTitle("Detector Position (mm)");
hr->SetYTitle("Efficiency");
//pad->GetFrame()->SetFillColor(21);
pad->GetFrame()->SetBorderSize(12);
// create first graph
TGraphErrors *gr_GIF = new TGraphErrors(V_Efficiency.size());
TGraphErrors *gr_IV = new TGraphErrors(V_Efficiency.size());
TGraphErrors *gr_V = new TGraphErrors(V_Efficiency.size());
for(unsigned int i=0;i<V_Efficiency.size();i++)
{
gr_GIF->SetPoint(i, GIF_MeanPosOfSector[i], GIF_Efficiency[i]);
gr_GIF->SetPointError(i,0, GIF_EfficiencyError[i]);
gr_IV->SetPoint(i, IV_MeanPosOfSector[i], IV_Efficiency[i]);
gr_IV->SetPointError(i,0, IV_EfficiencyError[i]);
gr_V->SetPoint(i, V_MeanPosOfSector[i], V_Efficiency[i]);
gr_V->SetPointError(i,0, V_EfficiencyError[i]);
}
gr_GIF->SetMarkerColor(kBlue);
gr_GIF->SetLineColor(kBlue);
gr_GIF->SetMarkerStyle(21);
gr_GIF->GetXaxis()->SetTitle("dist (mm)");
gr_GIF->GetYaxis()->SetTitle("Efficiency");
gr_GIF->GetYaxis()->SetRangeUser(0,1.2);
gr_GIF->SetTitle("Efficiency Scan");
gr_GIF->Draw("ACP");
gr_IV->SetMarkerColor(kGreen-6);
gr_IV->SetLineColor(kGreen);
gr_IV->SetMarkerStyle(21);
gr_IV->Draw("sameCP");
gr_V->SetMarkerColor(kBlack);
gr_V->SetLineColor(kBlack);
gr_V->SetMarkerStyle(21);
gr_V->Draw("sameCP");