Changeset 1865


Ignore:
Timestamp:
03/24/03 14:59:07 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/macros/rootlogon.C

    r1524 r1865  
    4242}
    4343
    44 void load()
     44void load(TString &dir)
    4545{
    4646    if (isloaded())
     
    4949    cout << "Loading 'mars.so'... " << flush;
    5050
    51     if (gSystem->Load("mars.so")!=0)
     51    if (gSystem->Load(dir.IsNull() ? "mars.so" : dir+"lib/mars.so")!=0)
    5252        cout << "error." << endl;
    5353    else
     
    6060    cout << endl;
    6161}
    62 
     62/*
    6363void make()
    6464{
     
    7373    load();
    7474}
    75 
     75*/
    7676void rootlogon()
    7777{
    7878    cout << endl;
    7979
    80     load();
     80    TString dir = gSystem->Getenv("MARSSYS");
    8181
    82     gInterpreter->AddIncludePath("macros");
    83     gInterpreter->AddIncludePath("manalysis");
    84     gInterpreter->AddIncludePath("mbase");
    85     gInterpreter->AddIncludePath("mdata");
    86     gInterpreter->AddIncludePath("mfileio");
    87     gInterpreter->AddIncludePath("mfilter");
    88     gInterpreter->AddIncludePath("mgeom");
    89     gInterpreter->AddIncludePath("mgui");
    90     gInterpreter->AddIncludePath("mhist");
    91     gInterpreter->AddIncludePath("mmain");
    92     gInterpreter->AddIncludePath("mmc");
    93     gInterpreter->AddIncludePath("mmontecarlo");
    94     gInterpreter->AddIncludePath("mraw");
    95     gInterpreter->AddIncludePath("mtools");
     82    if (!dir.IsNull())
     83    {
     84        cout << "Mars found in " << dir << " (MARSSYS)" << endl << endl;
     85
     86        if (!dir.EndsWith("/"))
     87            dir += "/";
     88    }
     89
     90    load(dir);
     91
     92    gInterpreter->AddIncludePath(dir+"macros");
     93    gInterpreter->AddIncludePath(dir+"manalysis");
     94    gInterpreter->AddIncludePath(dir+"mbase");
     95    gInterpreter->AddIncludePath(dir+"mdata");
     96    gInterpreter->AddIncludePath(dir+"mfileio");
     97    gInterpreter->AddIncludePath(dir+"mfilter");
     98    gInterpreter->AddIncludePath(dir+"mgeom");
     99    gInterpreter->AddIncludePath(dir+"mgui");
     100    gInterpreter->AddIncludePath(dir+"mhist");
     101    gInterpreter->AddIncludePath(dir+"mmain");
     102    gInterpreter->AddIncludePath(dir+"mmc");
     103    gInterpreter->AddIncludePath(dir+"mmontecarlo");
     104    gInterpreter->AddIncludePath(dir+"mraw");
     105    gInterpreter->AddIncludePath(dir+"mtools");
    96106
    97107    if (TString("linux")==gSystem->GetBuildArch())
Note: See TracChangeset for help on using the changeset viewer.