本文整理汇总了C++中TText::SetTextSize方法的典型用法代码示例。如果您正苦于以下问题:C++ TText::SetTextSize方法的具体用法?C++ TText::SetTextSize怎么用?C++ TText::SetTextSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TText
的用法示例。
在下文中一共展示了TText::SetTextSize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: drawHistos
void drawHistos(TCanvas * C, TString filename, TString category, TTree* Tmine, TTree* Tother,TString var, int nbins, float xmin, float xmax, TString selection, TString myGroup, TString myRootFile, TString group, TString groupRootFile,TString mySel="1",TString groupSel="1"){
TH1F* Hmine = new TH1F(TString("Hmine")+var,"",nbins,xmin,xmax);
Hmine->GetYaxis()->SetTitle(category);
Hmine->GetXaxis()->SetTitle(var);
Hmine->SetLineColor(1);
Hmine->SetStats(0);
TH1F* Hother = new TH1F(TString("Hother")+var,"",nbins,xmin,xmax);
Hother->GetYaxis()->SetTitle(category);
Hother->GetXaxis()->SetTitle(var);
Hother->SetLineColor(2);
Hother->SetStats(0);
TText TXmine;
TXmine.SetTextColor(1);
TXmine.SetTextSize(.04);
TText TXother;
TXother.SetTextColor(2);
TXother.SetTextSize(.04);
Tmine->Draw(var+">>"+Hmine->GetName(),selection+"*("+mySel+")");
Tother->Draw(var+">>"+Hother->GetName(),selection+"*("+groupSel+")");
////Draw one histogram on top of the other
C->Clear();
//Hmine->Scale(1./Hmine->Integral());
//Hother->Scale(1./Hother->Integral());
//Hother->Scale(968134./688134.); //GGH e-tau
if(Hmine->GetMaximum()>Hother->GetMaximum())
Hmine->GetYaxis()->SetRangeUser(0,Hmine->GetMaximum()*1.1);
else Hmine->GetYaxis()->SetRangeUser(0,Hother->GetMaximum()*1.1);
Hmine->Draw("hist");
Hother->Draw("histsame");
// ///Draw the difference of the historgrams
// TH1F*HDiff=(TH1F*)Hmine->Clone("HDiff");
// HDiff->Add(Hother,-1);
// int max= abs(HDiff->GetMaximum())>abs( HDiff->GetMinimum()) ? abs(HDiff->GetMaximum()): abs( HDiff->GetMinimum());
// HDiff->GetYaxis()->SetRangeUser(-2*(max>0?max:1),2*(max>0?max:1));
// HDiff->Draw("hist");
// TLine line;
// line.DrawLine(HDiff->GetXaxis()->GetXmin(),0,HDiff->GetXaxis()->GetXmax(),0);
//Print the integrals of the histograms a the top
//TXmine.DrawTextNDC(.2,.965,myGroup+"_"+myRootFile+": "+(long)(Hmine->Integral(0,Hmine->GetNbinsX()+1)));
//TXother.DrawTextNDC(.2,.93,group+"_"+groupRootFile+": "+(long)(Hother->Integral(0,Hother->GetNbinsX()+1)));
TXmine.DrawTextNDC(.2,.965,myGroup+" : "+(long)(Hmine->Integral(0,Hmine->GetNbinsX()+1)));
TXother.DrawTextNDC(.2,.93,group+": "+(long)(Hother->Integral(0,Hother->GetNbinsX()+1)));
C->Print(filename);
delete Hmine;
delete Hother;
}
示例2: overlayFrame
//--------------------------------------------------------------------------------------------------
void overlayFrame(TString text, bool align)
{
// Overlay a linear frame from user coordinates (0 - 1, 0 - 1) and put the frame text
// Create new transparent pad for the text
TPad *transPad = new TPad("transPad","Transparent Pad",0,0,1,1);
transPad->SetFillStyle(4000);
transPad->Draw();
transPad->cd();
// Overlay the text in a well defined frame
TText *plotText = new TText();
plotText->SetTextColor(kBlue);
plotText->SetTextSize(0.04);
plotText->SetNDC();
// Draw text at top right
if (align) {
plotText->SetTextColor(kBlack);
plotText->SetTextAlign(33);
plotText->DrawText(0.92,0.95,text.Data());
}
// Draw text at bottom left
else
plotText->DrawText(0.01,0.01,text.Data());
return;
}
示例3: PaintOverflow
void PaintOverflow(TH1 *h)
{
// This function paint the histogram h with an extra bin for overflows
char* name = h->GetName();
char* title = h->GetTitle();
Int_t nx = h->GetNbinsX()+1;
Double_t x1 = h->GetBinLowEdge(1);
Double_t bw = h->GetBinWidth(nx);
Double_t x2 = h->GetBinLowEdge(nx)+bw;
// Book a temporary histogram having ab extra bin for overflows
TH1F *htmp = new TH1F(name, title, nx, x1, x2);
// Fill the new hitogram including the extra bin for overflows
for (Int_t i=1; i<=nx; i++) {
htmp->Fill(htmp->GetBinCenter(i), h->GetBinContent(i));
}
// Fill the underflows
htmp->Fill(x1-1, h->GetBinContent(0));
// Restore the number of entries
htmp->SetEntries(h->GetEntries());
// Draw the temporary histogram
htmp->Draw();
TText *t = new TText(x2-bw/2,h->GetBinContent(nx),"Overflow");
t->SetTextAngle(90);
t->SetTextAlign(12);
t->SetTextSize(0.03);;
t->Draw();
}
示例4: greyscale
void greyscale()
{
TCanvas *c = new TCanvas("grey", "Grey Scale", 500, 500);
c->SetBorderMode(0);
Int_t n = 200; // tunable parameter
Float_t n1 = 1./n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
TBox *b = new TBox(n1*j, n1*(n-1-i), n1*(j+1), n1*(n-i));
Float_t grey = Float_t(i*n+j)/(n*n);
b->SetFillColor(TColor::GetColor(grey, grey, grey));
b->Draw();
}
}
TPad *p = new TPad("p","p",0.3, 0.3, 0.7,0.7);
const char *guibackground = gEnv->GetValue("Gui.BackgroundColor", "");
p->SetFillColor(TColor::GetColor(guibackground));
p->Draw();
p->cd();
TText *t = new TText(0.5, 0.5, "GUI Background Color");
t->SetTextAlign(22);
t->SetTextSize(.09);
t->Draw();
c->SetEditable(kFALSE);
}
示例5: ratioPlots
void ratioPlots( TCanvas* c1, TH1* h_r, TH1* h_i,
string xTitle, string yTitle, string savePath,
double fitMin=-100000, double fitMax=100000, bool doubleColFit=0 ){
double xMaximum = h_r->GetXaxis()->GetBinUpEdge(h_r->GetXaxis()->GetLast());
double xMinimum = h_r->GetXaxis()->GetBinLowEdge(h_r->GetXaxis()->GetFirst());
double yMaximum;
double yMinimum;
h_i->Sumw2();
h_r->Sumw2();
TLine* line1 = new TLine(xMinimum,1,xMaximum,1);
line1->SetLineColor(1);
line1->SetLineWidth(2);
line1->SetLineStyle(7);
TF1* fpol1 = new TF1("fpol1", "pol1", fitMin, fitMax);
fpol1->SetLineColor(2);
fpol1->SetLineWidth(3);
fpol1->SetLineStyle(7);
TH1* hRatio = (TH1*)h_r->Clone("clone_record");
hRatio->Divide(h_i);
yMaximum = hRatio->GetMaximum();
yMinimum = hRatio->GetMinimum(0);
hRatio->GetYaxis()->SetRangeUser(yMinimum/2.5,yMaximum+yMaximum/5);
hRatio->SetXTitle(xTitle.c_str());
hRatio->SetYTitle(yTitle.c_str());
hRatio->SetLineColor(9);
hRatio->SetLineWidth(2);
hRatio->SetMarkerStyle(8);
hRatio->Draw("e");
hRatio->Fit("fpol1", "L");
line1->Draw("SAME");
if(doubleColFit){
double p0=fpol1->GetParameter(0);
double p1=fpol1->GetParameter(1);
double endPoint=double(fitMax*p1)+p0;
double p1new=(endPoint-1)/(fitMax-fitMin);
char fun[100], text[100];
sprintf(fun,"x*(%f)+1",p1new);
sprintf(text,"Tangent: %f",p1new);
TF1* fnew = new TF1("fnew", fun, fitMin, fitMax);
fnew->SetLineColor(2);
fnew->SetLineWidth(3);
fnew->Draw("SAME");
TText* Title = new TText( fitMax/12, yMinimum, text);
Title->SetTextColor(2);
Title->SetTextSize(0.035);
Title->Draw("SAME");
}
c1->SaveAs(savePath.c_str());
c1->cd();
}
示例6: table
void table(Float_t x1, Float_t x2, Float_t yrange, TText *t,
const char **symbol, Bool_t octal)
{
Int_t i;
Int_t n = 0;
for (i=0;i<1000;i++) {
if (!strcmp(symbol[i],"END")) break;
n++;
}
Float_t y1 = 2.5;
Float_t y2 = yrange - 0.5;
Float_t dx = (x2-x1)/5;
Float_t dy = (y2 - 1 -y1)/(n+1);
Float_t y = y2 - 1 - 0.7*dy;
Float_t xc0 = x1 + 0.5*dx;
Float_t xc1 = xc0 + dx;
Float_t xc2 = xc1 + dx;
Float_t xc3 = xc2 + dx;
Float_t xc4 = xc3 + dx;
TLine *line = new TLine();
line->DrawLine(x1,y1,x1,y2);
line->DrawLine(x1,y1,x2,y1);
line->DrawLine(x1,y2,x2,y2);
line->DrawLine(x2,y1,x2,y2);
line->DrawLine(x1,y2-1,x2,y2-1);
line->DrawLine(x1+ dx,y1,x1+ dx,y2);
line->DrawLine(x1+2*dx,y1,x1+2*dx,y2);
line->DrawLine(x1+3*dx,y1,x1+3*dx,y2);
line->DrawLine(x1+4*dx,y1,x1+4*dx,y2);
TText *tit = new TText(0,0,"a");
tit->SetTextSize(0.015);
tit->SetTextFont(72);
tit->SetTextAlign(22);
tit->DrawText(xc0,y2-0.6,"Input");
tit->DrawText(xc1,y2-0.6,"Roman");
tit->DrawText(xc2,y2-0.6,"Greek");
tit->DrawText(xc3,y2-0.6,"Special");
tit->DrawText(xc4,y2-0.6,"Zapf");
char text[12];
for (i=0;i<n;i++) {
if (octal) {
unsigned char value = *symbol[i];
sprintf(text,"@\\ %3o",value);
} else {
strcpy(text,symbol[i]);
}
t->DrawText(xc0,y,text);
sprintf(text,"%s",symbol[i]);
t->DrawText(xc1,y,text);
sprintf(text,"`%s",symbol[i]);
t->DrawText(xc2,y,text);
sprintf(text,"'%s",symbol[i]);
t->DrawText(xc3,y,text);
sprintf(text,"~%s",symbol[i]);
t->DrawText(xc4,y,text);
y -= dy;
}
}
示例7: TText
void drift_chisq()
{
int i;
events = (TTree*)f.Get("events");
c1.Divide(2, 2, 0.01, 0.02);
c2.Divide(2, 2, 0.01, 0.02);
i = 0;
c1.cd(++i);
makehist("t3X", 2);
c1.cd(++i);
makehist("t4X", 2);
c1.cd(++i);
makehist("t3Y", 2);
c1.cd(++i);
makehist("t4Y", 2);
i = 0;
c2.cd(++i);
makehist("t3X", 1);
c2.cd(++i);
makehist("t4X", 1);
c2.cd(++i);
makehist("t3Y", 1);
c2.cd(++i);
makehist("t4Y", 1);
TText *t;
TTree *info = (TTree*)f.FindObjectAny("info");
TString info_str = get_info_str(info);
c1.cd(0);
t = new TText(0.005, 0.005, info_str);
t->SetTextSize(0.02);
t->Draw();
c2.cd(0);
t = new TText(0.005, 0.005, info_str);
t->SetTextSize(0.02);
t->Draw();
c1.Show();
c2.Show();
}
示例8: compareHistos
void compareHistos( char *Current, char *Reference=0 ) {
TText* te = new TText();
te->SetTextSize(0.1);
TFile * curfile = new TFile( TString(Current)+".root" );
TFile * reffile = curfile;
if (Reference) reffile = new TFile(TString(Reference)+".root");
char * prefix="DQMData/MixingV/Mixing";
//1-Dimension Histogram
TDirectory * refDir=reffile->GetDirectory(prefix);
TDirectory * curDir=curfile->GetDirectory(prefix);
TList* list = refDir->GetListOfKeys();
TObject* object = list->First();
int iHisto = 0;
char title[50];
while (object) {
// find histo objects
std::cout << " object :" << object->GetName() << std::endl;
TProfile * h1 = dynamic_cast<TProfile*>( refDir->Get(object->GetName()));
TProfile * h2 = dynamic_cast<TProfile*>( curDir->Get(object->GetName()));
bool isHisto = (refDir->Get(object->GetName()))->InheritsFrom("TProfile");
std::cout << " isHisto = " << isHisto << std::endl;
if (isHisto && h1 && h2 && *h1->GetName()== *h2->GetName()) {
iHisto++;
char title[50];
// draw and compare
std::cout << " Start draw and compare" << std::endl;
TCanvas c1;
TProfile htemp2;
h2->Copy(htemp2);// to keep 2 distinct histos
h1->SetLineColor(2);
htemp2.SetLineColor(3);
h1->SetLineStyle(3);
h1->SetMarkerColor(3);
htemp2.SetLineStyle(5);
htemp2.SetMarkerColor(5);
TLegend leg(0.1, 0.15, 0.2, 0.25);
leg.AddEntry(h1, "Reference", "l");
leg.AddEntry(&htemp2, "New ", "l");
h1->Draw();
htemp2.Draw("Same");
leg.Draw();
sprintf(title,"%s%s", object->GetName(),".gif");
c1.Print(title);
}
// go to next object
object = list->After(object);
}
}
示例9: SetupTowerDisplay
void SetupTowerDisplay(TH2F *hist)
{
hist->SetStats(kFALSE);
hist->SetXTitle("ieta");
hist->SetYTitle("iphi");
hist->GetXaxis()->CenterTitle();
hist->GetYaxis()->CenterTitle();
hist->GetXaxis()->SetNdivisions(65);
hist->GetXaxis()->SetLabelColor(0);
hist->GetXaxis()->SetTickLength(.78);
hist->GetXaxis()->SetTitleOffset(0.95);
hist->GetYaxis()->SetNdivisions(72);
hist->GetYaxis()->SetLabelColor(0);
hist->GetYaxis()->SetTitleOffset(0.85);
TText *yLabel = new TText();
TLine *pLine = new TLine();
pLine->SetLineStyle(1);
pLine->SetLineColor(1);
pLine->SetLineWidth(1);
yLabel->SetTextAlign(22);
yLabel->SetTextSize(0.015);
char phi_num[3];
char eta_num[3];
TText *xLabel = new TText();
xLabel->SetTextSize(0.015);
xLabel->SetTextAlign(22);
for (Int_t i=1; i<73; ++i)
{
sprintf(phi_num,"%d",i);
if(TMath::Abs(i%2)==1) {yLabel->DrawText(-33,0.5+i,phi_num);}
else {yLabel->DrawText(-34.5,0.5+i,phi_num);}
pLine->DrawLine(-32,i,33,i);
}
for (Int_t i=-32; i<33;++i)
{
sprintf(eta_num,"%d",i);
if(TMath::Abs(i%2)==0) {xLabel->DrawText(0.5+i,-0.5,eta_num);}
else {xLabel->DrawText(0.5+i,-2,eta_num);}
pLine->DrawLine(i,1,i,72);
}
}
示例10: DrawPeriod
//______________________________________________________________________________
void DrawPeriod(int runmin, int runmax, int run1, int run2, double ymin, double ymax, const char* label)
{
if ( run1 < runmin || run1 > runmax || run2 < runmin || run2 > runmax ) return;
TBox* b = new TBox(run1,ymin,run2,ymax);
b->SetFillColor(5);
b->Draw();
TText* text = new TText((run1+run2)/2.0,ymax*0.6,label);
text->SetTextAlign(22);
text->SetTextSize(0.02);
text->Draw();
}
示例11: DoCompare
void DoCompare( char *Current, char *Reference=0 ){
TText* te = new TText();
te->SetTextSize(0.1);
gROOT->ProcessLine(".x HistoCompare.C");
HistoCompare * myPV = new HistoCompare();
TFile * curfile = new TFile( TString(Current)+".root" );
TFile * reffile = curfile;
if (Reference) reffile = new TFile(TString(Reference)+".root");
char * prefix="DQMData/MixingV/";
//1-Dimension Histogram
TDirectory * refDir=reffile->GetDirectory(prefix);
TDirectory * curDir=curfile->GetDirectory(prefix);
TList* list = refDir->GetListOfKeys();
TObject* object = list->First();
int iHisto = 0; char title[50];
while (object) {
// find histo objects
TH1F * h1 = dynamic_cast<TH1F*>( refDir->Get(object->GetName()));
TH1F * h2 = dynamic_cast<TH1F*>( curDir->Get(object->GetName()));
bool isHisto = (refDir->Get(object->GetName()))->InheritsFrom("TH1F");
if (isHisto && h1 && h2 && *h1->GetName()== *h2->GetName()) {
iHisto++;
char title[50];
// draw and compare
TCanvas c1;
TH1F htemp2;
h2->Copy(htemp2);// to keep 2 distinct histos
h1->SetLineColor(2);
htemp2.SetLineColor(3);
h1->SetLineStyle(3);
htemp2.SetLineStyle(5);
TLegend leg(0.1, 0.15, 0.2, 0.25);
leg.AddEntry(h1, "Reference", "l");
leg.AddEntry(&htemp2, "New ", "l");
h1->Draw();
htemp2.Draw("Same");
leg.Draw();
myPV->PVCompute(h1,&htemp2, te);
sprintf(title,"%s%s", object->GetName(),".eps");
c1.Print(title);
}
// go to next object
object = list->After(object);
}
}
示例12: drawSignalDiff
void drawSignalDiff(TCanvas* C,TString Group1,TFile* F1,TString Group2,TFile* F2,TString channel,TString category,TString signal){
// drawSignalDiff( C, Group1, F1, Group2 ,F2, channel, "boost_high", "ggH");
C->Clear();
TGraph G1;
TGraph G2;
float max=0.;
for(Int_t i=0;i<8;i++){
long mass=110+i*5;
TH1F* H1 = (TH1F*) F1->Get(channel+"_"+category+"/"+signal+mass);
TH1F* H2 = (TH1F*) F2->Get(channel+"_"+category+"/"+signal+mass);
G1.SetPoint(i,mass,H1->Integral());
G2.SetPoint(i,mass,H2->Integral());
if(H1->Integral()>max)max=H1->Integral();
}
G1.GetYaxis()->SetRangeUser(0.,max*1.1);
G1.SetTitle(category+" "+signal);
G1.GetYaxis()->SetTitle("signal yield");
G1.GetXaxis()->SetTitle("m_{H}");
G1.Draw("ap");
G2.SetLineColor(2);
G2.Draw("lsame");
TText TXmine;
TXmine.SetTextColor(1);
TXmine.SetTextSize(.04);
TXmine.DrawTextNDC(.25,.845,Group1);
TText TXother;
TXother.SetTextColor(2);
TXother.SetTextSize(.04);
TXother.DrawTextNDC(.25,.81,Group2);
C->Print(TString(C->GetName())+".pdf");
}
示例13: postprocess
void postprocess(TCanvas* c2, const char* name, Int_t rWrite, Int_t rPerformance) {
if (rPerformance){
TLatex *alice = new TLatex(0.65,0.47,"Performance");
alice->SetNDC();
alice->SetTextColor(myDarkRed);
alice->SetTextFont(42);
alice->SetTextSize(0.05);
alice->SetLineWidth(2);
alice->Draw();
TLatex *alice2 = new TLatex(0.62,0.41,"LHC10h - Pass2");
alice2->SetNDC();
alice2->SetTextColor(myDarkRed);
alice->SetTextFont(42);
alice2->SetTextSize(0.05);
alice2->SetLineWidth(2);
alice2->Draw();
TText *date = new TText(0.68,0.35,cStamp2);
date->SetNDC();
date->SetTextFont(42);
date->SetTextSize(0.04);
date->Draw();
//Acquire canvas proportions
Double_t AliLogo_LowX = 0.67;
Double_t AliLogo_LowY = 0.53;
Double_t AliLogo_Height = 0.22;
//ALICE logo is a png file that is 821x798 pixels->should be wider than a square
Double_t AliLogo_Width = (821./798.) * AliLogo_Height * gPad->GetWh() / gPad->GetWw();
TPad *myPadLogo = new TPad("myPadLogo", "Pad for ALICE Logo",AliLogo_LowX,AliLogo_LowY,AliLogo_LowX+AliLogo_Width,AliLogo_LowY+AliLogo_Height);
// myPadLogo->SetFillColor(2); // color to first figure out where is the pad then comment !
myPadSetUp(myPadLogo,0,0,0,0);
//myPadLogo->SetFixedAspectRatio(1);
myPadLogo->Draw();
myPadLogo->cd();
TASImage *myAliceLogo = new TASImage("alice_logo_transparent.png");
myAliceLogo->Draw();
}
if (rWrite == 1)
c2->SaveAs(Form("%s.png",name));
if (rWrite == 2)
c2->SaveAs(Form("%s.eps",name));
}
示例14: fill_with_text
void fill_with_text(TGraph *real, TGraph *down, TGraph *up, TVirtualPad *can, int scantype, std::string scanx = "") {
can->cd();
float xpos_of_text = 0.22;
TLegend* this_leg = new TLegend(xpos_of_text,0.6,0.38,0.75);
//TLegend* this_leg = new TLegend(xpos_of_text,0.55,0.45,0.75,"n_{jets} #geq 3"); // this was the style of the paper.
this_leg->SetFillColor(0);
this_leg->SetBorderSize(0);
this_leg->SetTextSize(0.035);
//this_leg->SetTextSize(0.04); // paper style.
if(scantype==PlottingSetup::SMS||scantype==PlottingSetup::GMSB) {
//this_leg->AddEntry(real,"#sigma^{prod} = #sigma^{NLO-QCD}" , "l");
//this_leg->AddEntry(up,"#sigma^{prod} = 3 #times #sigma^{NLO-QCD}" , "l");
//this_leg->AddEntry(down,"#sigma^{prod} = 1/3 #times #sigma^{NLO-QCD}" , "l");
this_leg->AddEntry(real,"#sigma^{NLO-QCD}" , "l");
this_leg->AddEntry(up,"3 #times #sigma^{NLO-QCD}" , "l");
this_leg->AddEntry(down,"1/3 #times #sigma^{NLO-QCD}" , "l");
} else {
write_warning(__FUNCTION__,"Not implemented yet for mSUGRA");
}
this_leg->Draw();
TText *title = write_text(xpos_of_text+0.005,0.52,"JZB");
title->SetTextSize(0.04);
title->SetTextAlign(13);
title->SetTextFont(62);
title->Draw();
write_SMS_text( scantype, scanx, xpos_of_text );
// //string legT5zz="pp #rightarrow #tilde{g} #tilde{g}, #tilde{g} #rightarrow 2j + #chi^{0}_{1}, #chi^{0}_{1} #rightarrow Z + #tilde{G}";
// string legT5zz="pp #rightarrow #tilde{g} #tilde{g}, #tilde{g} #rightarrow 2j + #chi^{0}_{2}, #chi^{0}_{2} #rightarrow Z #chi^{0}_{1}";
// string legT5zzl2="m(#tilde{q}) >> m(#tilde{g}), x = "+scanx;
// string legT5zzl3=" GMSB";
// TText *title = write_text(xpos_of_text,0.85,legT5zz);
// title->SetTextAlign(11);
// title->SetTextSize(0.035);
// if(scantype!=PlottingSetup::mSUGRA) title->Draw("same");
// TText *title2 = write_text(xpos_of_text,0.79,legT5zzl2);
// title2->SetTextAlign(11);
// title2->SetTextSize(0.035);
// if(scantype!=PlottingSetup::mSUGRA) title2->Draw("same");
// TText *title3 = write_text(0.40,0.79,legT5zzl3);
// title3->SetTextAlign(11);
// title3->SetTextSize(0.035);
// title3->SetTextColor(kRed);
//// if(scantype==PlottingSetup::GMSB) title3->Draw("same");
DrawPrelim();
draw_diagonal_xchange( scantype, scanx );
}
示例15: pHitSpecDet
TCanvas* pHitSpecDet(const std::string& s)
{
TCanvas* c = new TCanvas( ("HitSpecDet"+s).c_str(), ("HitSpecDet"+s).c_str(), -2);
c->SetLogx();
TH2D* h = (TH2D*)gROOT->FindObject(s.c_str());
h->GetXaxis()->SetRange(4,32);
std::stringstream str;
str<<h->GetTitle();
TText t;
t.SetTextColor(4);
t.SetTextAlign(11);
t.SetTextSize(0.035);
h->DrawCopy("box");
t.DrawTextNDC(0.17,0.2, str.str().c_str());
return c;
}