source: trunk/MagicSoft/Mars/mbase/MAGIC.cc@ 9384

Last change on this file since 9384 was 9195, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 2.4 KB
Line 
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 <stdlib.h> // getenv (Ubuntu 8.10)
33
34#include <iostream>
35
36//NamespaceImp(MARS);
37
38using namespace std;
39
40bool MARS::CheckRootVer()
41{
42 if (!strcmp(gROOT->GetVersion(), ROOT_RELEASE))
43 return true;
44
45 cout << "FATAL ERROR - ROOT version mismatch." << endl;
46 cout << " Your mars has been compiled using root v" << ROOT_RELEASE << endl;
47 cout << " The libraries you are using are from root v" << gROOT->GetVersion() << endl;
48 cout << " Your environment contains:" << endl;
49 cout << " ROOTSYS = " << getenv("ROOTSYS") << endl;
50 cout << " PATH = " << getenv("PATH") << endl;
51 cout << " LD_LIBRARY_PATH = " << getenv("LD_LIBRARY_PATH") << endl << endl;
52 cout << " If this is the right root-version please do" << endl;
53 cout << " make mrproper && make" << endl;
54 cout << " for a complete recompilation." << endl << endl;
55 cout << " If this is the wrong root-version make sure that the file ~/.bashrc contains:" << endl;
56 cout << " export ROOTSYS=/PathTo/Your/RootVersion" << endl;
57 cout << " export PATH=$ROOTSYS/bin:$PATH" << endl;
58 cout << " export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH" << endl;
59 cout << " and start a new shell. Check it by typing \"export\"" << endl;
60 cout << endl;
61
62 return false;
63}
Note: See TracBrowser for help on using the repository browser.