source: branches/MarsISDCBranchBasedOn17887/mbase/MAGIC.cc@ 19921

Last change on this file since 19921 was 17307, checked in by tbretz, 11 years ago
Added wrappers for some defines to the MARS namespace to make that available in rootlogon to pipe that through AcLiC as define to ofits.h
File size: 3.0 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(), "5.22/00")>0 && strcmp(gROOT->GetVersion(), "5.26/00")<0)
43 {
44 cout << "WARNING - Especially root 5.24/00 has a severe bug in projection 2D histograms" << endl;
45 cout << " which might cause unexpected crashes and could also affect the results." << endl;
46 cout << " Please, avoid using these root versions." << endl;
47 }
48
49 if (!strcmp(gROOT->GetVersion(), ROOT_RELEASE))
50 return true;
51
52 cout << "FATAL ERROR - ROOT version mismatch." << endl;
53 cout << " Your mars has been compiled using root v" << ROOT_RELEASE << endl;
54 cout << " The libraries you are using are from root v" << gROOT->GetVersion() << endl;
55 cout << " Your environment contains:" << endl;
56 cout << " ROOTSYS = " << getenv("ROOTSYS") << endl;
57 cout << " PATH = " << getenv("PATH") << endl;
58 cout << " LD_LIBRARY_PATH = " << getenv("LD_LIBRARY_PATH") << endl << endl;
59 cout << " If this is the right root-version please do" << endl;
60 cout << " make mrproper && make" << endl;
61 cout << " for a complete recompilation." << endl << endl;
62 cout << " If this is the wrong root-version make sure that the file ~/.bashrc contains:" << endl;
63 cout << " export ROOTSYS=/PathTo/Your/RootVersion" << endl;
64 cout << " export PATH=$ROOTSYS/bin:$PATH" << endl;
65 cout << " export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH" << endl;
66 cout << " and start a new shell. Check it by typing \"export\"" << endl;
67 cout << endl;
68
69 return false;
70}
71
72TString MARS::GetPackageName() { return PACKAGE_NAME; }
73TString MARS::GetPackageVersion() { return PACKAGE_VERSION; }
74TString MARS::GetRevision() { return REVISION; }
Note: See TracBrowser for help on using the repository browser.