1 | /* ======================================================================== *\
|
---|
2 | !
|
---|
3 | ! *
|
---|
4 | ! * This file is part of MARS, the MAGIC Analysis and Reconstruction
|
---|
5 | ! * Software. It is distributed to you in the hope that it can be a useful
|
---|
6 | ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
|
---|
7 | ! * It is distributed WITHOUT ANY WARRANTY.
|
---|
8 | ! *
|
---|
9 | ! * Permission to use, copy, modify and distribute this software and its
|
---|
10 | ! * documentation for any purpose is hereby granted without fee,
|
---|
11 | ! * provided that the above copyright notice appear in all copies and
|
---|
12 | ! * that both that copyright notice and this permission notice appear
|
---|
13 | ! * in supporting documentation. It is provided "as is" without express
|
---|
14 | ! * or implied warranty.
|
---|
15 | ! *
|
---|
16 | !
|
---|
17 | !
|
---|
18 | ! Author(s): Thomas Bretz 10/2006 <mailto:tbretz@astro.uni-wuerzburg.de>
|
---|
19 | !
|
---|
20 | ! Copyright: MAGIC Software Development, 2000-2006
|
---|
21 | !
|
---|
22 | !
|
---|
23 | \* ======================================================================== */
|
---|
24 |
|
---|
25 | /////////////////////////////////////////////////////////////////////////////
|
---|
26 | //
|
---|
27 | // MARS
|
---|
28 | //
|
---|
29 | /////////////////////////////////////////////////////////////////////////////
|
---|
30 | #include "MAGIC.h"
|
---|
31 |
|
---|
32 | #include <iostream>
|
---|
33 |
|
---|
34 | using namespace std;
|
---|
35 |
|
---|
36 | bool MARS::CheckRootVer()
|
---|
37 | {
|
---|
38 | if (!strcmp(gROOT->GetVersion(), ROOT_RELEASE))
|
---|
39 | return true;
|
---|
40 |
|
---|
41 | cout << "FATAL ERROR - ROOT version mismatch." << endl;
|
---|
42 | cout << " Your mars has been compiled using root v" << ROOT_RELEASE << endl;
|
---|
43 | cout << " The libraries you are using are from root v" << gROOT->GetVersion() << endl;
|
---|
44 | cout << " Your environment contains:" << endl;
|
---|
45 | cout << " ROOTSYS = " << getenv("ROOTSYS") << endl;
|
---|
46 | cout << " PATH = " << getenv("PATH") << endl;
|
---|
47 | cout << " LD_LIBRARY_PATH = " << getenv("LD_LIBRARY_PATH") << endl << endl;
|
---|
48 | cout << " If this is the right root-version please do" << endl;
|
---|
49 | cout << " make mrproper && make" << endl;
|
---|
50 | cout << " for a complete recompilation." << endl << endl;
|
---|
51 | cout << " If this is the wrong root-version make sure that the file ~/.bashrc contains:" << endl;
|
---|
52 | cout << " export ROOTSYS=/PathTo/Your/RootVersion" << endl;
|
---|
53 | cout << " export PATH=$ROOTSYS/bin:$PATH" << endl;
|
---|
54 | cout << " export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH" << endl;
|
---|
55 | cout << " and start a new shell. Check it by typing \"export\"" << endl;
|
---|
56 | cout << endl;
|
---|
57 |
|
---|
58 | return false;
|
---|
59 | }
|
---|