当前位置: 首页>>代码示例>>C++>>正文


C++ TFile::SaveSelf方法代码示例

本文整理汇总了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;




}
开发者ID:alkaloge,项目名称:DesyTauAnalysesRun2_25ns,代码行数:101,代码来源:Overlap2D.C

示例2:

 /** destructor
  *
  * saves and closes the file
  */
 ~writeObject()
 {
   _file->SaveSelf();
   _file->Close();
 }
开发者ID:foucar,项目名称:CASS,代码行数:9,代码来源:histo_updater.cpp


注:本文中的TFile::SaveSelf方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。