Write header correctly.
[u/mrichter/AliRoot.git] / FASTSIM / fastGen.C
index 9cd96406d14c0faefca8fd83b9de253afa5d946c..417422d7ff34a7857eac5381d914ec10289d78b4 100644 (file)
@@ -58,7 +58,9 @@ void fastGen(Int_t nev = 1, char* filename = "galice.root")
 //     
        stack->FinishEvent();
        header->SetStack(stack);
+       rl->TreeE()->Fill();
        rl->WriteKinematics("OVERWRITE");
+
     } // event loop
 //
 //                         Termination
@@ -67,8 +69,10 @@ void fastGen(Int_t nev = 1, char* filename = "galice.root")
 //  Stack
     stack->FinishRun();
 //  Write file
-    gener->Write();
     rl->WriteHeader("OVERWRITE");
+    gener->Write();
+    rl->Write();
+    
 }