本文整理汇总了C++中TList::RemoveAt方法的典型用法代码示例。如果您正苦于以下问题:C++ TList::RemoveAt方法的具体用法?C++ TList::RemoveAt怎么用?C++ TList::RemoveAt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TList
的用法示例。
在下文中一共展示了TList::RemoveAt方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: long_Ay_nu_05
//.........这里部分代码省略.........
gr->Fit(theFit);
theFit->Draw("same");
TMultiGraph* mgrThry = new TMultiGraph("Theory","G_{E}^{n}");
TLegend *legThry = new TLegend(.54,.3,.875,.6,"","brNDC");
wgr = mgrThry;
wlg = legThry;
// the theory
wlg->SetBorderSize(0); // turn off border
wlg->SetFillStyle(0);
f = theoryfiles1;
gr=0;
while ( f && f->filename ) {
gr=OneGraph(f);
if (gr) {
TGraphAsymmErrors *egr = dynamic_cast<TGraphAsymmErrors*>(gr);
if (egr && egr->GetN()>1 && egr->GetEYhigh() && egr->GetEYhigh()[1]>0) {
gr = toerror_band(egr);
gr->SetFillStyle(3000+f->style);
}
if (f->lnpt) {
wgr->Add(gr,f->lnpt);
wlg->AddEntry(gr,f->label,f->lnpt);
}
else if (gr->GetMarkerStyle()>=20) {
wgr->Add(gr,"p");
wlg->AddEntry(gr,f->label,"p");
}
else {
wgr->Add(gr,"l");
wlg->AddEntry(gr,f->label,"l");
}
}
f++;
}
// genf->Draw("same");
mgrThry->Draw("c");
// galster->Draw("same");
// bbba05->Draw("same");
// legThry->AddEntry(genf,"F_{2}/F_{1} #propto ln^{2}(Q^{2}/#Lambda^{2})/Q^{2}","l");
// legThry->AddEntry(galster,"Galster fit","l");
// legThry->AddEntry(bbba05,"BBBA05","l");
// legThry->Draw();
// legDta->Draw();
// draw a line at 1
cn->Modified();
cn->Update();
cn->SaveAs(Form("%s.eps",psfile));
cn->SaveAs(Form("%s.root",psfile));
gSystem->Exec(Form("./replace_symbols.pl %s.eps",psfile));
return; // LEAVING HERE
// now an overlay, hopefully matching dimensions
// remove everything but the graph
cn->Update();
TList *clist = cn->GetListOfPrimitives();
TFrame* frame = cn->GetFrame();
for (int i=0; i<clist->GetSize(); ) {
if (clist->At(i) != frame) {
clist->RemoveAt(i);
} else i++;
}
// draw markers in the corners
TMarker *mkr = new TMarker(frame->GetX1(),frame->GetY1(),2);
mkr->Draw();
mkr = new TMarker(frame->GetX2(),frame->GetY1(),2);
mkr->Draw();
mkr = new TMarker(frame->GetX1(),frame->GetY2(),2);
mkr->Draw();
mkr = new TMarker(frame->GetX2(),frame->GetY2(),2);
mkr->Draw();
frame->SetLineColor(10);
cn->Update();
datafile_t miller = { "figure_input/Miller/lattice.GEn.rtf","Miller",
"[0]","[1]","[1]-[3]","[2]-[1]",0,0,1,3,"F" };
gr = OneGraph(&miller);
TGraphAsymmErrors* egr = dynamic_cast<TGraphAsymmErrors*>(gr);
if (egr && egr->GetEYhigh() && egr->GetEYhigh()[egr->GetN()/2]>0) {
gr = toerror_band(egr);
gr->SetLineStyle(1);
gr->SetFillColor(gr->GetLineColor());
gr->SetFillStyle(3000+miller.style);
}
gr->Draw("F");
cn->Update();
cn->SaveAs("gen_Miller_Overlay.eps");
cn->SaveAs("gen_Miller_Overlay.root");
}
示例2: kees_gen
//.........这里部分代码省略.........
legDta->AddEntry(gr,f->label,"l");
}
}
f++;
}
mgrDta->Draw("p");
// legDta->Draw(); don't draw the data legend
TMultiGraph* mgrThry = new TMultiGraph("Theory","G_{E}^{n}");
TLegend *legThry = new TLegend(.54,.6,.875,.9,"","brNDC");
wgr = mgrThry;
wlg = legThry;
// the theory
wlg->SetBorderSize(0); // turn off border
wlg->SetFillStyle(0);
f = theoryfiles1;
gr=0;
while ( f && f->filename ) {
gr=OneGraph(f);
if (gr) {
TGraphAsymmErrors *egr = dynamic_cast<TGraphAsymmErrors*>(gr);
if (egr && egr->GetN()>1 && egr->GetEYhigh() && egr->GetEYhigh()[1]>0) {
gr = toerror_band(egr);
gr->SetFillStyle(3000+f->style);
}
if (f->lnpt) {
wgr->Add(gr,f->lnpt);
wlg->AddEntry(gr,f->label,f->lnpt);
}
else if (gr->GetMarkerStyle()>=20) {
wgr->Add(gr,"p");
wlg->AddEntry(gr,f->label,"p");
}
else {
wgr->Add(gr,"l");
wlg->AddEntry(gr,f->label,"l");
}
}
f++;
}
genf->Draw("same");
mgrThry->Draw("c");
legThry->AddEntry(genf,"F_{2}/F_{1} #propto ln^{2}(Q^{2}/#Lambda^{2})/Q^{2}","l");
legThry->Draw();
// draw a line at 1
cn->Modified();
cn->Update();
cn->SaveAs(Form("%s.eps",psfile));
cn->SaveAs(Form("%s.root",psfile));
gSystem->Exec(Form("./replace_symbols.pl %s.eps",psfile));
// now an overlay, hopefully matching dimensions
// remove everything but the graph
cn->Update();
TList *clist = cn->GetListOfPrimitives();
TFrame* frame = cn->GetFrame();
for (int i=0; i<clist->GetSize(); ) {
if (clist->At(i) != frame) {
clist->RemoveAt(i);
} else i++;
}
// draw markers in the corners
TMarker *mkr = new TMarker(frame->GetX1(),frame->GetY1(),2);
mkr->Draw();
mkr = new TMarker(frame->GetX2(),frame->GetY1(),2);
mkr->Draw();
mkr = new TMarker(frame->GetX1(),frame->GetY2(),2);
mkr->Draw();
mkr = new TMarker(frame->GetX2(),frame->GetY2(),2);
mkr->Draw();
frame->SetLineColor(10);
cn->Update();
datafile_t miller = { "figure_input/Miller/lattice.GEn.rtf","Miller",
"[0]","[1]","[1]-[3]","[2]-[1]",0,0,1,3,"F" };
gr = OneGraph(&miller);
TGraphAsymmErrors* egr = dynamic_cast<TGraphAsymmErrors*>(gr);
if (egr && egr->GetEYhigh() && egr->GetEYhigh()[egr->GetN()/2]>0) {
gr = toerror_band(egr);
gr->SetLineStyle(1);
gr->SetFillColor(gr->GetLineColor());
gr->SetFillStyle(3000+miller.style);
}
gr->Draw("F");
cn->Update();
cn->SaveAs("gen_Miller_Overlay.eps");
cn->SaveAs("gen_Miller_Overlay.root");
}
示例3: q4gmn_jan2009
//.........这里部分代码省略.........
wgr->Add(gr,"p");
wlg->AddEntry(gr,f->label,"p");
}
else {
wgr->Add(gr,"l");
wlg->AddEntry(gr,f->label,"l");
}
}
f++;
}
mgrThry->Draw("c");
legThry->Draw();
// draw a line at 1
cn->Modified();
cn->Update();
TFrame* frame = gPad->GetFrame();
TLine *line1 = new TLine(frame->GetX1(),1.,frame->GetX2(),1.);
line1->SetLineStyle(1);
line1->Draw();
cn->Update();
cn->SaveAs(Form("%s.eps",psfile));
cn->SaveAs(Form("%s.root",psfile));
gSystem->Exec(Form("./replace_symbols.pl %s.eps",psfile));
return;
// remove everything but the graph
cn->Update();
TList *clist = cn->GetListOfPrimitives();
frame = cn->GetFrame();
for (int i=0; i<clist->GetSize(); ) {
if (clist->At(i) != frame) {
clist->RemoveAt(i);
} else i++;
}
// draw markers in the corners
TMarker *mkr = new TMarker(frame->GetX1(),frame->GetY1(),2);
mkr->Draw();
mkr = new TMarker(frame->GetX2(),frame->GetY1(),2);
mkr->Draw();
mkr = new TMarker(frame->GetX1(),frame->GetY2(),2);
mkr->Draw();
mkr = new TMarker(frame->GetX2(),frame->GetY2(),2);
mkr->Draw();
frame->SetLineColor(10);
cn->Update();
{
datafile_t miller = { "figure_input/Miller/lattice.GMn.rtf","Miller",
"[0]","[1]/(-1.91)*(1+[0]/.71)*(1+[0]/.71)",
"([3]-[1])/(-1.91)*(1+[0]/.71)*(1+[0]/.71)",
"([1]-[2])/(-1.91)*(1+[0]/.71)*(1+[0]/.71)",
0,0,1,3,"F" };
gr = OneGraph(&miller);
TGraphAsymmErrors* egr = dynamic_cast<TGraphAsymmErrors*>(gr);
if (egr && egr->GetEYhigh() && egr->GetEYhigh()[egr->GetN()/2]>0) {
gr = toerror_band(egr);
gr->SetLineStyle(1);
gr->SetFillColor(gr->GetLineColor());
gr->SetFillStyle(3000+miller.style);
}
gr->Draw("F");
cn->Update();
cn->SaveAs("gmngd_Miller_Overlay.eps");
cn->SaveAs("gmngd_Miller_Overlay.root");
clist->Remove(gr);
}
{
datafile_t miller_spl = { "figure_input/Miller/lattice.GMn.spl3","Miller",
"[0]","[1]/(-1.91)*(1+[0]/.71)*(1+[0]/.71)",
"([3]-[1])/(-1.91)*(1+[0]/.71)*(1+[0]/.71)",
"([1]-[2])/(-1.91)*(1+[0]/.71)*(1+[0]/.71)",
0,0,1,3,"F" };
gr = OneGraph(&miller_spl);
TGraphAsymmErrors* egr = dynamic_cast<TGraphAsymmErrors*>(gr);
if (egr && egr->GetEYhigh() && egr->GetEYhigh()[egr->GetN()/2]>0) {
gr = toerror_band(egr);
gr->SetLineStyle(1);
gr->SetFillColor(gr->GetLineColor());
gr->SetFillStyle(3000+miller_spl.style);
}
gr->Draw("F");
cn->Update();
cn->SaveAs("gmngd_Miller_Overlay_spl.eps");
cn->SaveAs("gmngd_Miller_Overlay_spl.root");
clist->Remove(gr);
}
}
示例4: q4gep_jan2009
//.........这里部分代码省略.........
}
mgrThry->Draw("c");
#ifdef PQCD
ff->Draw("same");
legThry->AddEntry(ff,"F2/F1 #propto ln^{2}(Q^{2}/#Lambda^{2})/Q^{2}","l");
#endif// PQCD
legThry->Draw();
cn->Modified();
cn->Update();
TFrame* frame = gPad->GetFrame();
// draw a line at 1
TLine *line1 = new TLine(frame->GetX1(),1.,frame->GetX2(),1.);
line1->SetLineStyle(1);
line1->Draw();
return;
cn->Update();
cn->SaveAs(Form("%s.eps",psfile));
cn->SaveAs(Form("%s.root",psfile));
gSystem->Exec(Form("./replace_symbols.pl %s.eps",psfile));
// now an overlay, hopefully matching dimensions
// remove everything except the frame
cn->Update();
TList *clist = cn->GetListOfPrimitives();
frame = cn->GetFrame();
for (int i=0; i<clist->GetSize(); ) {
if (clist->At(i) != frame) {
clist->RemoveAt(i);
} else i++;
}
// draw markers in the corners
TMarker *mkr = new TMarker(frame->GetX1(),frame->GetY1(),2);
mkr->Draw();
mkr = new TMarker(frame->GetX2(),frame->GetY1(),2);
mkr->Draw();
mkr = new TMarker(frame->GetX1(),frame->GetY2(),2);
mkr->Draw();
mkr = new TMarker(frame->GetX2(),frame->GetY2(),2);
mkr->Draw();
frame->SetLineColor(10);
{
datafile_t goeckeler = { "figure_input/Goeckeler/goeckeler.dat","Goeckeler",
"[0]","[1]","[1]-[2]","[3]-[1]",0,0,1,4,"F" };
gr = OneGraph(&goeckeler);
TGraphAsymmErrors *egr = dynamic_cast<TGraphAsymmErrors*>(gr);
if (egr && egr->GetEYhigh() && egr->GetEYhigh()[egr->GetN()/2]>0) {
gr = toerror_band(egr);
gr->SetLineStyle(1);
gr->SetFillColor(gr->GetLineColor());
gr->SetFillStyle(3000+goeckeler.style);
}
gr->Draw("F");
cn->Update();
cn->SaveAs("mup_gep_gmp_goeckeler_Overlay.eps");
cn->SaveAs("mup_gep_gmp_goeckeler_Overlay.root");
示例5: geugd_riordan
//.........这里部分代码省略.........
#endif
// gen0->Draw("same");
#ifdef NEW_ROBERTS
roberts_curve->Draw("same");
#endif
// ourfit->Draw("same");
// bbba05->Draw("same");
//lomon->Draw("same");
// bandi->Draw("same");
#ifdef PQCD
legThry->AddEntry(genf,"F_{2}/F_{1} #propto ln^{2}(Q^{2}/#Lambda^{2})/Q^{2}","l");
#endif
#ifdef GALSTER
legThry->AddEntry(galster,"Galster fit (1971)","l");
#endif
// legThry->AddEntry(gen0,"G_{E}^{n} = 0","l");
#ifdef NEW_ROBERTS
legThry->AddEntry(roberts_curve,"q(qq) Faddeev - I. Cloet, ANL","l");
#endif
// legThry->AddEntry(bbba05,"BBBA05","l");
// legThry->AddEntry(lomon, "Lomon", "l");
// legThry->AddEntry(ourfit, "Our Fit", "l");
legThry->Draw();
legDta->Draw();
mgrDta->Draw("p");
legDta->Draw();
TEllipse *cir1 = new TEllipse(1.31, 0.0, 0.17, 0.0065);
TEllipse *cir2 = new TEllipse(2.4, 0.0, 0.17, 0.0065);
cir1->SetFillStyle(0);
cir2->SetFillStyle(0);
#ifdef PLOTKIN1
cir1->Draw("same");
// cir2->Draw("same");
// TPaveLabel *exacc = new TPaveLabel( 0.3779, 0.2691, 0.5963, 0.3114, "Expected Accuracy", "NDC");
TPaveLabel *exacc = new TPaveLabel( 0.2716, 0.2733, 0.4899, 0.3136, "Expected Accuracy", "NDC");
exacc->SetFillStyle(0);
exacc->SetBorderSize(0);
exacc->Draw("same");
#endif
// draw a line at 1
cn->Modified();
cn->Update();
cn->SaveAs(Form("%s.pdf",psfile));
cn->SaveAs(Form("%s.eps",psfile));
// cn->SaveAs(Form("%s.root",psfile));
// gSystem->Exec(Form("./replace_symbols.pl %s.eps",psfile));
// cn->SaveAs("bogdan_gen.eps");
return; // LEAVING HERE
// now an overlay, hopefully matching dimensions
// remove everything but the graph
cn->Update();
TList *clist = cn->GetListOfPrimitives();
TFrame* frame = cn->GetFrame();
for (int i=0; i<clist->GetSize(); ) {
if (clist->At(i) != frame) {
clist->RemoveAt(i);
} else i++;
}
// draw markers in the corners
TMarker *mkr = new TMarker(frame->GetX1(),frame->GetY1(),2);
mkr->Draw();
mkr = new TMarker(frame->GetX2(),frame->GetY1(),2);
mkr->Draw();
mkr = new TMarker(frame->GetX1(),frame->GetY2(),2);
mkr->Draw();
mkr = new TMarker(frame->GetX2(),frame->GetY2(),2);
mkr->Draw();
frame->SetLineColor(10);
cn->Update();
datafile_t miller = { "figure_input/Miller/lattice.GEn.rtf","Miller",
"[0]","[1]","[1]-[3]","[2]-[1]",0,0,1,3,"F" };
gr = OneGraph(&miller);
TGraphAsymmErrors* egr = dynamic_cast<TGraphAsymmErrors*>(gr);
if (egr && egr->GetEYhigh() && egr->GetEYhigh()[egr->GetN()/2]>0) {
gr = toerror_band(egr);
gr->SetLineStyle(1);
gr->SetFillColor(gr->GetLineColor());
gr->SetFillStyle(3000+miller.style);
}
gr->Draw("F");
cn->Update();
cn->SaveAs("gen_Miller_Overlay.pdf");
cn->SaveAs("gen_Miller_Overlay.root");
}