]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/scripts/LoadDummy.C
Minor updates
[u/mrichter/AliRoot.git] / FMD / scripts / LoadDummy.C
1 //
2 //
3 //
4 Bool_t
5 LoadDummy()
6 {
7   const char*  alice_root = gSystem->Getenv("ALICE_ROOT");
8   const char*  dirs[]     = { "", "include", "ITS", 0 };
9   const char** d          = dirs;
10   TString newpath("-DCOMPILING=1 ");
11   newpath += gSystem->GetIncludePath();
12   do {
13     TString flag(Form("-I%s/%s", alice_root, *d));
14     if (newpath.Index(flag) == TString::kNPOS) {
15       std::cerr << "Adding " << flag << std::endl;
16       newpath += " ";
17       newpath += flag;
18     }
19   } while (*(++d));
20
21   gSystem->SetIncludePath(newpath.Data());
22   std::cout << "Include path is\n\t" << gSystem->GetIncludePath() << std::endl;
23   gROOT->LoadMacro("Dummy.C+g");
24   if (!gROOT->GetClass("Dummy<AliITSvPPRasymmFMD>")) {
25     std::cerr << "Failed to make DummyITS" << std::endl;
26     return kFALSE;
27   }
28   return kTRUE;
29 }
30 //
31 // EOF
32 //