diff --git a/NPAnalysis/MakePhysicalTree/RunToTreat.txt b/NPAnalysis/MakePhysicalTree/RunToTreat.txt index 698f27aa2f5d83de671b3370b1ef6ccf2a561d21..c4a2947a858c004599167c1f8ee390dcd2696f9d 100644 --- a/NPAnalysis/MakePhysicalTree/RunToTreat.txt +++ b/NPAnalysis/MakePhysicalTree/RunToTreat.txt @@ -1,4 +1,5 @@ TTreeName - SimulatedTree + S1107Data RootFileName - ../../Outputs/Simulation/myResult.root + /Volumes/S1107/RootData/data2251*.root + diff --git a/NPLib/IORoot/RootInput.cxx b/NPLib/IORoot/RootInput.cxx index 13c05a178679dad9735604a50ef5fdea8a778814..de8cc2dbcdcc84aba30b58185aeab91dc3c5b9ff 100644 --- a/NPLib/IORoot/RootInput.cxx +++ b/NPLib/IORoot/RootInput.cxx @@ -111,6 +111,8 @@ RootInput::RootInput(string configFileName) } } } + + cout << "ROOTInput has loaded " << pRootChain->GetEntries() << " entries in the inout chain " << endl ; } if (!CheckRootFileName || !CheckTreeName) diff --git a/NPLib/IORoot/RootOutput.cxx b/NPLib/IORoot/RootOutput.cxx index 37a15abb25cef5a509a046bd13fc2a85559f6bd8..2d1bea3d2c980732eed351a3722980ad65f57501 100644 --- a/NPLib/IORoot/RootOutput.cxx +++ b/NPLib/IORoot/RootOutput.cxx @@ -62,17 +62,17 @@ RootOutput::RootOutput(TString fileNameBase, TString treeNameBase) TString fileName = GlobalPath + "/Outputs/"; if (fileNameBase.Contains("root")) fileName += fileNameBase; else fileName += fileNameBase + ".root"; - pRootFile = new TFile(fileName, "RECREATE"); - + pRootFile = new TFile(fileName, "RECREATE"); } else{ // the file path must be the current directory // Does not create the Output file at instantiation pRootFile = 0 ; - pRootTree = new TTree(treeNameBase, "Data created / analyzed with the NPTool package"); - pRootList = new TList(); } + + pRootTree = new TTree(treeNameBase, "Data created / analyzed with the NPTool package"); + pRootList = new TList(); // Init TAsciiFile objects InitAsciiFiles(); @@ -130,9 +130,7 @@ RootOutput::~RootOutput() cout << "Got histograms and Tree !" << endl; cout << " - Number of entries in the Tree: " << pRootTree->GetEntries() << endl; cout << " - Number of bites written to file: " << pRootTree->Write() << endl; - - gDirectory->Cd(pRootFile->GetName()); - + // write TAsciiFile if used // EventGenerator if (!pEventGenerator->IsEmpty()) pEventGenerator->Write(); diff --git a/NPLib/Sharc/TSharcPhysics.cxx b/NPLib/Sharc/TSharcPhysics.cxx index 63b4ac0fddb6d64c5342995e9e735872bad1f5c9..a57aa3d8c714a46213e64cee8ee26c5a242f2cd5 100644 --- a/NPLib/Sharc/TSharcPhysics.cxx +++ b/NPLib/Sharc/TSharcPhysics.cxx @@ -644,6 +644,7 @@ void TSharcPhysics::InitializeRootInputRaw() inputChain->SetBranchStatus( "Sharc" , true ) ; inputChain->SetBranchStatus( "fSharc_*" , true ) ; inputChain->SetBranchAddress( "Sharc" , &m_EventData ) ; + } ///////////////////////////////////////////////////////////////////////////