本文整理汇总了C++中TDirectoryFile::Add方法的典型用法代码示例。如果您正苦于以下问题:C++ TDirectoryFile::Add方法的具体用法?C++ TDirectoryFile::Add怎么用?C++ TDirectoryFile::Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TDirectoryFile
的用法示例。
在下文中一共展示了TDirectoryFile::Add方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Terminate
void mySelector::Terminate()
{
// The Terminate() function is the last function to be called during
// a query. It always runs on the client, it can be used to present
// the results graphically or save the results to file.
TString option = GetOption();
TString output = "gr_";
output += option;
output += ".root";
TFile *hfile = new TFile(output,"RECREATE","FONLL CCbar cross section");
hfile->cd();
const Int_t npoint = eventnumber;
Float_t x[npoint];
Float_t y[npoint];
Float_t ylow[npoint];
Float_t yup[npoint];
for(int i=0;i<npoint;i++)
{
x[i] = Pt[i];
y[i] = Central[i];
ylow[i] = Down[i];
yup[i] = Up[i];
}
//TGraph *grFONLLD0 = new TGraph(npoint,Pt,Central);
TDirectoryFile *ratioErr = new TDirectoryFile(option,"ratio error of scale pp500 to pp200 ");
ratioErr->SetName(option);
ratioErr->Add(hRatio);
TGraph *grFONLLRatio = new TGraph(npoint,x,y);
grFONLLRatio->SetName("grFONLLRatio");
TGraph *grFONLLRatio_u = new TGraph(npoint,x,yup);
grFONLLRatio_u->SetName("grFONLLRatio_u");
TGraph *grFONLLRatio_d = new TGraph(npoint,x,ylow);
grFONLLRatio_d->SetName("grFONLLRatio_d");
grFONLLRatio->Print();
///grFONLLRatio->Write();
ratioErr->Add(grFONLLRatio);
grFONLLRatio_u->Print();
//grFONLLRatio_u->Write();
ratioErr->Add(grFONLLRatio_u);
grFONLLRatio_d->Print();
//grFONLLRatio_d->Write();
ratioErr->Add(grFONLLRatio_d);
ratioErr->Write();
hfile->Print();
hfile->Close();
tNow.Set();
cout<<"----------End of job----------"<<endl;
tNow.Print();
}