本文整理汇总了C++中TPad::GetHNDC方法的典型用法代码示例。如果您正苦于以下问题:C++ TPad::GetHNDC方法的具体用法?C++ TPad::GetHNDC怎么用?C++ TPad::GetHNDC使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TPad
的用法示例。
在下文中一共展示了TPad::GetHNDC方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Error
/**
* Draw the Poisson estimate of the occupancy in a given ring.
*
* @param p List
* @param d Detector
* @param r Ring
*
* @return The occupancy (in percent)
*
* @deprecated Use QATrender instead
* @ingroup pwglf_forward_scripts_qa
*/
Double_t
DrawRingOccupancy(TList* p, UShort_t d, Char_t r)
{
if (!p) return 0;
TList* ring = static_cast<TList*>(p->FindObject(Form("FMD%d%c",d,r)));
if (!ring) {
Error("DrawOccupancy", "List FMD%d%c not found in %s",d,r,p->GetName());
return 0;
}
TH1* corr = static_cast<TH1*>(ring->FindObject("occupancy"));
if (!corr) {
Error("DrawRingOccupancy", "Histogram occupancy not found in FMD%d%c",
d, r);
return 0;
}
corr->Rebin(4);
TPad* pad = static_cast<TPad*>(gPad);
pad->SetGridy();
pad->SetGridx();
pad->SetLogy();
pad->SetFillColor(0);
pad->SetRightMargin(0.01);
#if 0
if (d == 3) {
pad->SetPad(pad->GetXlowNDC(), pad->GetYlowNDC(), .99,
pad->GetYlowNDC()+pad->GetHNDC());
pad->SetRightMargin(0.15);
}
#endif
corr->Draw("hist");
TLatex* ltx = new TLatex(.95, .95, Form("FMD%d%c", d, r));
ltx->SetNDC();
ltx->SetTextAlign(33);
ltx->SetTextSize(.08);
ltx->Draw();
return corr->GetMean();
}