Correction in protection.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Aug 2007 14:00:12 +0000 (14:00 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Aug 2007 14:00:12 +0000 (14:00 +0000)
STEER/AliMCEventHandler.cxx

index 0f0c422..f303a89 100644 (file)
@@ -104,7 +104,11 @@ Bool_t AliMCEventHandler::InitIO(Option_t* /*opt*/)
 { 
     // Initialize input
     //
-    fFileE = new TFile(Form("%sgalice.root", fPathName));
+    
+    char* name;
+    name = Form("%sgalice.root", fPathName);
+    printf("Here (1) %s \n", name);
+    fFileE = new TFile(name);
     if (!fFileE) AliFatal(Form("AliMCEventHandler:galice.root not found in directory %s ! \n", fPathName));
 
     fFileE->GetObject("TE", fTreeE);
@@ -112,11 +116,13 @@ Bool_t AliMCEventHandler::InitIO(Option_t* /*opt*/)
     fNEvent = fTreeE->GetEntries();
     //
     // Tree K
+    printf("Here (2) \n");
     fFileK = new TFile(Form("%sKinematics%s.root", fPathName, fExtension));
     if (!fFileK) AliFatal(Form("AliMCEventHandler:Kinematics.root not found in directory %s ! \n", fPathName));
     fEventsPerFile = fFileK->GetNkeys() - fFileK->GetNProcessIDs();
     //
     // Tree TR
+    printf("Here (3) \n");
     fFileTR = new TFile(Form("%sTrackRefs%s.root", fPathName, fExtension));
     if (!fFileTR) AliWarning(Form("AliMCEventHandler:TrackRefs.root not found in directory %s ! \n", fPathName));
     //
@@ -159,7 +165,7 @@ Bool_t AliMCEventHandler::GetEvent(Int_t iev)
     fStack->ConnectTree(fTreeK);
     fStack->GetEvent();
     //Tree TR 
-    if (fTreeTR) {
+    if (fFileTR) {
        TDirectoryFile* dirTR = 0;
        fFileTR->GetObject(folder, dirTR);
        dirTR->GetObject("TreeTR", fTreeTR);