本文整理汇总了C++中TFile::SaveSelf方法的典型用法代码示例。如果您正苦于以下问题:C++ TFile::SaveSelf方法的具体用法?C++ TFile::SaveSelf怎么用?C++ TFile::SaveSelf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TFile
的用法示例。
在下文中一共展示了TFile::SaveSelf方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: nextkey
//.........这里部分代码省略.........
histbkg =Unroll(hstop,s1,1.);
s1 = "1D_sT_"+variable;
histbkg->SetName(s1);
histbkg->Write();
s1 = "dib_"+variable;
hdib->SetName(s1);
hdib->Write();
histbkg =Unroll(hdib,s1,1.);
s1 = "1D_dib_"+variable;
histbkg->SetName(s1);
histbkg->Write();
s1 = "ttx_"+variable;
httx->SetName(s1);
httx->Write();
histbkg =Unroll(httx,s1,1.);
s1 = "1D_ttx_"+variable;
histbkg->SetName(s1);
histbkg->Write();
s1 = "qcd_"+variable;
hqcd->SetName(s1);
hqcd->Write();
histbkg =Unroll(hqcd,s1,1.);
s1 = "1D_qcd_"+variable;
histbkg->SetName(s1);
histbkg->Write();
//rest of bkg hold all but ttjets and wjets background
s1 = "rest_bkg_"+variable;
//hrest->Add(hdyj,1);
//hrest->Add(httj,1);
//hrest->Add(hwj,1);
hrest->Add(hstop,1);
hrest->Add(hdib,1);
hrest->Add(hqcd,1);
hrest->Add(httx,1);
hrest->SetName(s1);
hrest->Write();
histbkg =Unroll(hrest,s1,1.);
s1 = "1D_rest_bkg_"+variable;
histbkg->SetName(s1);
histbkg->Write();
hh[1]->SetMinimum(0.1);
hh[1]->SetLineColor(kBlack);
hh[1]->SetFillColor(kBlack);
hh[1]->SetMarkerColor(kBlack);
s1 = "data_obs_"+variable;
hh[1]->SetName(s1);
if(b_scale) hh[1]->Scale(scale);
hh[1]->Write();
histbkg =Unroll(hh[1],s1,1.);
//histbkg =Unroll(allbkg,s1,1.);
s1 = "1D_data_obs_";
s1 = "data_obs";
histbkg->SetName(s1);
histbkg->Write();
for (unsigned int ij=0;ij<signal_names.size();++ij){
//cout<<" again "<<signal_names[ij]<<endl;
//cout<<" again "<<hh[ij+2]->GetName()<<" "<<ij<<" "<<signal_names[ij].c_str()<<endl;
TString ss1 = signal_names[ij].c_str();
s1 = "1D_"+ss1 +"_"+variable;
if(b_scale) hh[ij+2]->Scale(scale);
histbkg = Unroll(hh[ij+2],s1,1.);
smFile->cd();
histbkg->SetName(s1);
histbkg->SetMarkerColor(kBlue);
histbkg->SetLineColor(kBlue);
histbkg->Write();
}
smFile->SaveSelf (kTRUE);
smFile->Close();
delete smFile;
}//loop over different predictions
}///find variable
}
//delete c1;
// save modifications to target file
//target->SaveSelf (kTRUE);
TH1::AddDirectory (status);
cout << " " << "========================================================" << endl;
cout<< " Ended SuperImpose of files.... " <<endl;
}
示例2:
/** destructor
*
* saves and closes the file
*/
~writeObject()
{
_file->SaveSelf();
_file->Close();
}