本文整理汇总了C++中TFile::SetName方法的典型用法代码示例。如果您正苦于以下问题:C++ TFile::SetName方法的具体用法?C++ TFile::SetName怎么用?C++ TFile::SetName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TFile
的用法示例。
在下文中一共展示了TFile::SetName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
TSelectionClass* selectionClass = new TSelectionClass(settings);
selectionClass->SetResults(currentResults);
selectionClass->MakeSelection(RunParameters[i].getEvents());
delete selectionClass;
if(RunParameters[i].doSelectionAnalysis()){
sys->cd(currentDir.c_str());
TAnalysisOfSelection *analysisSelection=new TAnalysisOfSelection(settings);
analysisSelection->doAnalysis(RunParameters[i].getEvents());
delete analysisSelection;
}
if (DO_ALIGNMENT){
sys->cd(currentDir.c_str());
TAlignment *alignment = new TAlignment(settings);
// alignment->setSettings(settings);
//alignment->PrintEvents(1511,1501);
alignment->Align(RunParameters[i].getEvents());
delete alignment;
}
if(DO_ALIGNMENTANALYSIS){
sys->cd(currentDir.c_str());
TAnalysisOfAlignment *anaAlignment;
anaAlignment=new TAnalysisOfAlignment(settings);
anaAlignment->doAnalysis(RunParameters[i].getEvents());
delete anaAlignment;
}
if (DO_TRANSPARENT_ANALYSIS) {
TTransparentAnalysis *transpAna;
transpAna = new TTransparentAnalysis(settings);
transpAna->setResults(currentResults);
transpAna->analyze(RunParameters[i].getEvents(),RunParameters.at(i).getStartEvent());
delete transpAna;
}
if (settings && settings->doTransparentAlignmnet()){
sys->cd(currentDir.c_str());
TAlignment *alignment = new TAlignment(settings,TSettings::transparentMode);
alignment->createTransparentEventVectors(RunParameters[i].getEvents());
// alignment->setSettings(settings);
//alignment->PrintEvents(1511,1501);
alignment->Align(RunParameters[i].getEvents(),0,TAlignment::diaAlignment);
delete alignment;
TTransparentAnalysis *transpAna;
transpAna = new TTransparentAnalysis(settings,TSettings::transparentMode);
transpAna->setResults(currentResults);
transpAna->analyze(RunParameters[i].getEvents(),RunParameters.at(i).getStartEvent());
delete transpAna;
}
cout<<"PRINT RESULTS"<<endl;
currentResults->Print();
cout<<"SAVE RESULTS"<<endl;
// currentResults->saveResults(settings->getResultsRootFilePath());
TFile* file = new TFile (settings->getResultsRootFilePath().c_str(),"RECREATE");
file->Print();
file->ls();
file->SetName("fileName");
file->cd();
cout<<"KEYS: "<<file->GetNkeys()<<endl;
file->GetListOfKeys()->Print();
cout<<"Write"<<endl;
currentResults->Write("test");
cout<<"CLOSE FILE"<<endl;
file->Close();
// if (currentResults){
// cout<<"DELETE RESULTS"<<endl;
// delete currentResults;
// cout<<"#"<<endl;;
// }
cout<<"saved results..."<<endl;
runWatch.Stop();
cout<<"needed Time for Run "<<RunParameters[i].getRunNumber()<<":"<<endl;
runWatch.Print();
cout<<"needed Time for Run "<<RunParameters[i].getRunNumber()<<":\n\t"<<flush;
runWatch.Print();
if (settings!=NULL){
cout<<"delete Settings..."<<endl;
delete settings;
cout<<"DONE_SETTINGS"<<endl;
}
cout<<"DONE with Analysis of Run "<< RunParameters[i].getRunNumber();
cout<<": "<<i+1<<"/"<<RunParameters.size()<<endl;
}
cout<<"DONE with Analysis of all "<<RunParameters.size()<<" Runs from RunList.ini"<<endl;
cout<<"total time for all analysis:\n\t"<<flush;
cout<<"time for all analysis:"<<endl;
comulativeWatch.Print();
cout<<"DONE_ALL"<<endl;
return 0;
}