Changeset 14728


Ignore:
Timestamp:
12/05/12 10:11:08 (12 years ago)
Author:
Jens Buss
Message:
changed OpenRootFile from void to int
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/marsmacros/mc2csv/MonteCarlo.C

    r14727 r14728  
    1919    mFileName   = filename;
    2020
    21     OpenRootFile();
    22     if ( !mRootFileOpend ) return;
     21    // open root file return if it cannot be opend
     22    if ( !OpenRootFile() ) return;
    2323
    2424    LoadEventTree(  "Events");
     
    3939    mFileName   = filename;
    4040
    41     OpenRootFile();
    42     if ( !mRootFileOpend ) return;
     41    // open root file return if it cannot be opend
     42    if ( !OpenRootFile() ) return;
    4343
    4444    LoadEventTree(  evtsTreeName);
     
    6060    mFileName   = filename;
    6161
    62     OpenRootFile();
    63     if ( !mRootFileOpend ) return;
     62    // open root file return if it cannot be opend
     63    if ( !OpenRootFile() ) return;
    6464
    6565    LoadEventTree(  evtsTreeName);
     
    156156//
    157157
    158 void
     158int
    159159MonteCarlo::OpenRootFile()
    160160{
     
    167167        cout << "ERROR - Could not find file " << mFileName << endl;
    168168        mRootFileOpend =false;
    169         return ;
     169        return 0;
    170170    }
    171171    mRootFileOpend = true;
    172172
    173     return;
     173    return 1;
    174174}
    175175
Note: See TracChangeset for help on using the changeset viewer.