本文整理汇总了C++中TDirectory::Append方法的典型用法代码示例。如果您正苦于以下问题:C++ TDirectory::Append方法的具体用法?C++ TDirectory::Append怎么用?C++ TDirectory::Append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TDirectory
的用法示例。
在下文中一共展示了TDirectory::Append方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveOutput
// Save to .root file
void SaveOutput(TString name,TList &list)
{
TFile *out = new TFile(name,"RECREATE");
TDirectory *pwd = gDirectory;
for(int i=0;i<list.GetSize();i++)
{
TDecayMode *dm = list.At(i);
TDirectory *subdir = out->mkdir(dm->GetName());
subdir->cd();
subdir->Append(dm);
subdir->Append(dm->histograms);
pwd->cd();
}
if(!genDesc) cout<<"WARNING! No Generator description in files!"<<endl;
else out->Append(genDesc);
if(userHisto)
{
TDecayMode *uh = (TDecayMode*) userHisto;
cout<<"INFO: Appending user histograms"<<endl;
TDirectoryFile *histos = out->mkdir("USER_HISTOGRAMS");
TIter nexthist(uh->histograms);
TKey *key_hist=0;
TH1D *h;
while(h=(TH1D*)nexthist()) histos->Append(h);
}
out->Write();
out->Close();
delete out;
}