GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RunTest.C
Go to the documentation of this file.
1 
2 
3 
5 /*
6 */
7 Bool_t RunTest1()
8 {
9  Int_t err;
10 
11  // symbols in Core library
12  TString symbole("Gw::BaseNucleus anucleus"), lib("libGWCORE"); cout << " ===> Checking " << lib << endl;
13 
14  err = -1; gROOT->ProcessLine(symbole.Data(),&err);
15  if ( err != 0 ) {
16  cout << " *** WARNING *** autoloading cannot be done for " << lib << endl;
17  if ( gSystem->Load(lib.Data()) < 0 ) {
18  cout << " *** ERROR *** cannot load " << lib << endl;
19  return false;
20  }
21  }
22  // symbols in physics library
23  TString symbole("Gw::LevelScheme lev"), lib("libGWPHYSICS") ; cout << " ===> Checking " << lib << endl;
24  err = -1; gROOT->ProcessLine(symbole.Data(),&err);
25  if ( err != 0 ) {
26  cout << " *** WARNING *** autoloading cannot be done for " << lib << endl;
27  if ( gSystem->Load(lib.Data()) < 0 ) {
28  cout << " *** ERROR *** cannot load " << lib << endl;
29  return false;
30  }
31  }
32  // symbols in tools library
33  TString symbole("Gw::HistoDB db"), lib("libGWTOOLS") ; cout << " ===> Checking " << lib << endl;
34  err = -1; gROOT->ProcessLine(symbole.Data(),&err);
35  if ( err != 0 ) {
36  cout << " *** WARNING *** autoloading cannot be done for " << lib << endl;
37  if ( gSystem->Load(lib.Data()) < 0 ) {
38  cout << " *** ERROR *** cannot load " << lib << endl;
39  return false;
40  }
41  }
42  // symbols in gem library
43  TString symbole("Gw::BaseGEM gem"), lib("libGWGEM") ; cout << " ===> Checking " << lib << endl;
44  err = -1; gROOT->ProcessLine(symbole.Data(),&err);
45  if ( err != 0 ) {
46  cout << " *** WARNING *** autoloading cannot be done for " << lib << endl;
47  if ( gSystem->Load(lib.Data()) < 0 ) {
48  cout << " *** ERROR *** cannot load " << lib << endl;
49  return false;
50  }
51  }
52  // symbols in adf library
53  if ( gSystem->Load("libGWADF") < 0 )
54  return false;
55 
56  TString symbole("Gw::Watcher watcher"), lib("libGWADFE") ; cout << " ===> Checking " << lib << endl;
57  err = -1; gROOT->ProcessLine(symbole.Data(),&err);
58  if ( err != 0 ) {
59  cout << " *** WARNING *** autoloading cannot be done for " << lib << endl;
60  if ( gSystem->Load(lib.Data()) < 0 ) {
61  cout << " *** ERROR *** cannot load " << lib << endl;
62  return false;
63  }
64  }
65 
66  return true;
67 }
68 
69 
70 void RunTest()
71 {
72  // check if rootmap correctly installed anf if gw libraries could be loaded
73  cout << " ===> Checking gammaware symboles " << endl;
74  if ( RunTest1() == false )
75  return;
76  cout << " ===> PASSED " << endl;
77 
78  cout << endl << " all tests have been passed with success " << endl;
79 }
Bool_t RunTest1()
check if auto-loading is set properly
Definition: RunTest.C:7
ADF::LogMessage & endl(ADF::LogMessage &log)
void RunTest()
Definition: RunTest.C:70