本文整理汇总了C++中TMatrixD::Read方法的典型用法代码示例。如果您正苦于以下问题:C++ TMatrixD::Read方法的具体用法?C++ TMatrixD::Read怎么用?C++ TMatrixD::Read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TMatrixD
的用法示例。
在下文中一共展示了TMatrixD::Read方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getXsecExtended
//.........这里部分代码省略.........
if (debugMode==1) outFile.Append("debug_");
outFile.Append( DYTools::analysisTag + TString("_tmp.root") );
TVectorD rapidityGrid(massGrid.GetNoElements()-1);
rapidityGrid=1;
if (debugMode!=-1) {
TFile thFile(outFile,"recreate");
massGrid.Write("massBinEdges");
if (fineGrid) rapidityGrid.Write("rapidityBinCount");
nEvents.Write("nGenEvents");
nEventsErr.Write("nGenEventsErr");
nEventsDET.Write("nGenEventsDET");
nEventsDETErr.Write("nGenEventsDETErr");
nEventsDETrecoPostIdx.Write("nGenEventsDETrecoPostIdx");
nEventsDETrecoPostIdxErr.Write("nGenEventsDETRecoPostIdxErr");
nEventsNorm.Write("nGenEventsNorm");
nEventsNormErr.Write("nGenEventsNormErr");
nEventsDETNorm.Write("nGenEventsDETNorm");
nEventsDETNormErr.Write("nGenEventsDETNormErr");
nEventsDETrecoPostIdxNorm.Write("nGenEventsDETrecoPostIdxNorm");
nEventsDETrecoPostIdxNormErr.Write("nGenEventsDETrecoPostIdxNormErr");
TVectorD zPeakInfo(6);
zPeakInfo(0)=nZpeak; zPeakInfo(1)=sqrt(w2Zpeak);
zPeakInfo(2)=nZpeakDET; zPeakInfo(3)=sqrt(w2ZpeakDET);
zPeakInfo(4)=nZpeakDETrecoPostIdx; zPeakInfo(5)=sqrt(w2ZpeakDETrecoPostIdx);
zPeakInfo.Write("zPeakCountAndErr");
thFile.Close();
std::cout << "file <" << outFile << "> created\n";
}
else {
TFile thFile(outFile);
nEvents.Read("nGenEvents");
nEventsErr.Read("nGenEventsErr");
nEventsDET.Read("nGenEventsDET");
nEventsDETErr.Read("nGenEventsDETErr");
nEventsDETrecoPostIdx.Read("nGenEventsDETrecoPostIdx");
nEventsDETrecoPostIdxErr.Read("nGenEventsDETRecoPostIdxErr");
nEventsNorm.Read("nGenEventsNorm");
nEventsNormErr.Read("nGenEventsNormErr");
nEventsDETNorm.Read("nGenEventsDETNorm");
nEventsDETNormErr.Read("nGenEventsDETNormErr");
nEventsDETrecoPostIdxNorm.Read("nGenEventsDETrecoPostIdxNorm");
nEventsDETrecoPostIdxNormErr.Read("nGenEventsDETrecoPostIdxNormErr");
TVectorD zPeakInfo(6);
zPeakInfo.Read("zPeakCountAndErr");
thFile.Close();
nZpeak=zPeakInfo[0]; w2Zpeak=SQR(zPeakInfo[1]);
nZpeakDET=zPeakInfo[2]; w2ZpeakDET=SQR(zPeakInfo[3]);
nZpeakDETrecoPostIdx=zPeakInfo[4]; w2ZpeakDETrecoPostIdx=SQR(zPeakInfo[5]);
std::cout << "file <" << outFile << "> loaded\n";
}
//--------------------------------------------------------------------------------------------------------------
// Make plots
//==============================================================================================================
CPlot::sOutDir="plots" + DYTools::analysisTag;
TString fileNamePlots=outFile;
fileNamePlots.ReplaceAll("_tmp.root","_plots_tmp.root");
TFile *filePlots=new TFile(fileNamePlots,"recreate");
if (!filePlots) {
std::cout << "failed to create file <" << fileNamePlots << ">\n";
throw 2;