1 |
// Loads a bunch of tools in interpretative mode
|
2 |
void setup( bool skipFWLite = false ) {
|
3 |
if (! skipFWLite) {
|
4 |
gSystem->Load("libFWCoreFWLite");
|
5 |
AutoLibraryLoader::enable();
|
6 |
}
|
7 |
|
8 |
gSystem->Load("libGui.so");
|
9 |
gSystem->Load("libPhysics.so");
|
10 |
|
11 |
// Load and compile something to allow proper treatment of vectors
|
12 |
// Not clear that it is needed
|
13 |
gSystem->CompileMacro("loader.C", "++k", "libloader");
|
14 |
gSystem->CompileMacro("histtools.C", "++k", "libhisttools");
|
15 |
|
16 |
std::string cms2Location = "";
|
17 |
if (getenv("CMS2_LOCATION"))
|
18 |
cms2Location = Form("%s/NtupleMacros", getenv("CMS2_LOCATION"));
|
19 |
else {
|
20 |
std::cout<<"CMS2_LOCATION is not set: it should point to what you where a nominal /pathOrRelativePath/CMS2 is"<<std::endl;
|
21 |
if (getenv("CMSSW_BASE")) {
|
22 |
cms2Location = Form("%s/src/CMS2/NtupleMacros", getenv("CMSSW_BASE"));
|
23 |
std::cout<<"You have CMSSW_BASE -- will try "<<cms2Location.c_str()<<std::endl;
|
24 |
}
|
25 |
}
|
26 |
|
27 |
// Punch in more quesses where NtupleMacros are -- don't keep multiple copies ;)
|
28 |
gSystem->AddIncludePath(Form(" -w -I./ -I./CORE -I%s/CORE -I../CMS2/NtupleMacros/CORE -I../../CMS2/NtupleMacros/CORE\
|
29 |
-I../../../CMS2/NtupleMacros/CORE -I../../../../CMS2/NtupleMacros/CORE\
|
30 |
-I%s -I../CMS2/NtupleMacros -I../../CMS2/NtupleMacros -I../../../CMS2/NtupleMacros -I../../../../CMS2/NtupleMacros",
|
31 |
cms2Location.c_str(),cms2Location.c_str() ));
|
32 |
}
|