本文整理汇总了C++中TH2I::DrawCopy方法的典型用法代码示例。如果您正苦于以下问题:C++ TH2I::DrawCopy方法的具体用法?C++ TH2I::DrawCopy怎么用?C++ TH2I::DrawCopy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TH2I
的用法示例。
在下文中一共展示了TH2I::DrawCopy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: plot_pad_size_in_layer
//.........这里部分代码省略.........
if (startCounter == 22) // position of pad size in x
ps3X = buffer.Atof();
if (startCounter == 23) // position of pad size in y
ps3Y = buffer.Atof();
// if (startCounter == 23) // last element
// {
// printf("moduleId : %d, %d\n", modId, layerId);
// printf("pad size sector 1: (%.2f cm, %.2f cm) pad area: %.2f cm2\n", ps1X, ps1Y, ps1X*ps1Y);
// printf("pad size sector 2: (%.2f cm, %.2f cm) pad area: %.2f cm2\n", ps2X, ps2Y, ps2X*ps2Y);
// printf("pad size sector 3: (%.2f cm, %.2f cm) pad area: %.2f cm2\n", ps3X, ps3Y, ps3X*ps3Y);
// printf("rows per sector : %.1f %.1f %.1f\n", sec1/ps1Y, sec2/ps2Y, sec3/ps3Y);
// printf("\n");
// }
//printf("module position: (%.1f, %.1f, %.1f) module size: (%.1f, %.1f) pad size: (%.2f, %.2f) pad area: %.2f\n",mpX,mpY,mpZ,2*msX,2*msY,psX,psY,psX*psY);
if (startCounter == 23) { // if last element is reached
startCounter = 0; // reset
if ( alllayers == 0 )
if ( !((layerId == 0) || (layerId == 4) || (layerId == 8)) ) // plot only 1 layer per station
continue;
row1 = sec1 / ps1Y;
row2 = sec2 / ps2Y;
row3 = sec3 / ps3Y;
it = layerView.find(mpZ);
if (it == layerView.end()){
// title.Form("pad_size_layer_at_z_%.2fm",mpZ);
title.Form("%02d_pad_size_layer%02d", layerId, layerId);
layerView[mpZ] = new TCanvas(title,title,1200,1000);
fLayerDummy->DrawCopy("");
// now print cm2 in the center
layerView[mpZ]->cd();
title.Form("cm^{2}"); // print cm2
TPaveText *text = new TPaveText(0 - 28.5,
0 - 28.5,
0 + 28.5,
0 + 28.5
);
text->SetFillStyle(1001);
text->SetLineColor(1);
text->SetFillColor(kWhite);
text->AddText(title);
text->Draw("same");
}
// print pad size in each module
layerView[mpZ]->cd();
// title.Form("%2.0fcm^{2}",psX*psY); // print pad size
// title.Form("%.0f",psX*psY); // print pad size - 1 digit
TPaveText *text = new TPaveText(mpX - msX,
mpY - msY,
mpX + msX,
mpY + msY
);
text->SetFillStyle(1001);
text->SetLineColor(1);
// text->SetFillColor(kViolet);
// vary background color
// if ((int)(psX*psY+.5) == 2)
// {