Index: fact/tools/marsmacros/mc2csv/MonteCarlo.C
===================================================================
--- fact/tools/marsmacros/mc2csv/MonteCarlo.C	(revision 14727)
+++ fact/tools/marsmacros/mc2csv/MonteCarlo.C	(revision 14728)
@@ -19,6 +19,6 @@
     mFileName   = filename;
 
-    OpenRootFile();
-    if ( !mRootFileOpend ) return;
+    // open root file return if it cannot be opend
+    if ( !OpenRootFile() ) return;
 
     LoadEventTree(  "Events");
@@ -39,6 +39,6 @@
     mFileName   = filename;
 
-    OpenRootFile();
-    if ( !mRootFileOpend ) return;
+    // open root file return if it cannot be opend
+    if ( !OpenRootFile() ) return;
 
     LoadEventTree(  evtsTreeName);
@@ -60,6 +60,6 @@
     mFileName   = filename;
 
-    OpenRootFile();
-    if ( !mRootFileOpend ) return;
+    // open root file return if it cannot be opend
+    if ( !OpenRootFile() ) return;
 
     LoadEventTree(  evtsTreeName);
@@ -156,5 +156,5 @@
 //
 
-void
+int
 MonteCarlo::OpenRootFile()
 {
@@ -167,9 +167,9 @@
         cout << "ERROR - Could not find file " << mFileName << endl;
         mRootFileOpend =false;
-        return ;
+        return 0;
     }
     mRootFileOpend = true;
 
-    return;
+    return 1;
 }
 
