本文整理汇总了C++中TDirectory::GetTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ TDirectory::GetTitle方法的具体用法?C++ TDirectory::GetTitle怎么用?C++ TDirectory::GetTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TDirectory
的用法示例。
在下文中一共展示了TDirectory::GetTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: make
void make(TDirectory & out, TObject * o) {
TDirectory * dir;
TH1F * th1f;
TH1D * th1d;
TH2F * th2f;
TH2D * th2d;
out.cd();
if((dir = dynamic_cast<TDirectory*>(o)) != 0) {
TDirectory * outDir = out.mkdir(dir->GetName(), dir->GetTitle());
TIter next(dir->GetListOfKeys());
TKey *key;
while( (key = dynamic_cast<TKey*>(next())) ) {
string className(key->GetClassName());
string name(key->GetName());
TObject * obj = dir->Get(name.c_str());
if(obj == 0) {
cerr <<"error: key " << name << " not found in directory " << dir->GetName() << endl;
exit(-1);
}
make(*outDir, obj);
}
} else if((th1f = dynamic_cast<TH1F*>(o)) != 0) {
TH1F *h = (TH1F*) th1f->Clone();
h->Reset();
h->Sumw2();
h->SetDirectory(&out);
} else if((th1d = dynamic_cast<TH1D*>(o)) != 0) {
TH1D *h = (TH1D*) th1d->Clone();
h->Reset();
h->Sumw2();
h->SetDirectory(&out);
} else if((th2f = dynamic_cast<TH2F*>(o)) != 0) {
TH2F *h = (TH2F*) th2f->Clone();
h->Reset();
h->Sumw2();
h->SetDirectory(&out);
} else if((th2d = dynamic_cast<TH2D*>(o)) != 0) {
TH2D *h = (TH2D*) th2d->Clone();
h->Reset();
h->Sumw2();
h->SetDirectory(&out);
}
}