source: trunk/MagicSoft/Mars/macros/rootlogon.C@ 1381

Last change on this file since 1381 was 1381, checked in by tbretz, 22 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 12/2000 (tbretz@uni-sw.gwdg.de)
19!
20! Copyright: MAGIC Software Development, 2000-2001
21!
22!
23\* ======================================================================== */
24
25Bool_t isloaded()
26{
27 TString str = gSystem->GetLibraries("*/mars.so");
28
29 return !str.IsNull();
30}
31
32void unload()
33{
34 if (!isloaded())
35 return;
36
37 cout << "Unloading 'mars.so'... " << flush;
38 if (gSystem->Unload("mars.so"))
39 cout << "error." << endl;
40 else
41 cout << "done." << endl << endl;
42}
43
44void load()
45{
46 if (isloaded())
47 return;
48
49 cout << "Loading 'mars.so'... " << flush;
50
51 if (gSystem->Load("mars.so")!=0)
52 cout << "error." << endl;
53 else
54 {
55 MParContainer::Class()->IgnoreTObjectStreamer();
56 MArray::Class()->IgnoreTObjectStreamer();
57 cout << "done." << endl;
58 }
59
60 cout << endl;
61}
62
63void make()
64{
65 unload();
66
67 if (gSystem->Exec("make"))
68 {
69 cout << "Error calling make..." << endl;
70 return;
71 }
72
73 load();
74}
75
76void rootlogon()
77{
78 cout << endl;
79
80 load();
81
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("mgui");
89 gInterpreter->AddIncludePath("mhist");
90 gInterpreter->AddIncludePath("mmain");
91 gInterpreter->AddIncludePath("mmc");
92 gInterpreter->AddIncludePath("mmontecarlo");
93 gInterpreter->AddIncludePath("mraw");
94
95 cout << "Welcome to the Mars Root environment." << endl;
96
97 cout << endl;
98}
Note: See TracBrowser for help on using the repository browser.