HighLAND
|
It is not recommended to install highland2 in the same folder of other nd280 packages, otherwise every time you compile with the broadcast option (cmt br make) CMT will recompile also nd280AnalysisTools, ROOT, etc.
To avoid this, you can easily install highland2/psyche in a different workspace folder and properly set the CMTPATH environment variable to point to nd280AnalysisTools.
Also in the case you want to have both a frozen version and the HEAD of highland2/psyche, it's recommended to install them in different workspace folders (otherwise you have to use nd280Highland2/v∗/cmt/fix_requirement, a script which fixes packages dependencies).
highland2/psyche needs nd280AnalysisTools:
When we refer to a version of highland2, we actually refer to the version of the nd280Highland2 package: it's a hat package which properly links all the needed versions of each highland2 and psyche package (for psyche it actually only links a version of nd280Psyche, which in turn links the needed psyche pakcages).
To know which is the last frozen version of highland2 you can have a look at the freezing history, but actually the patched versions are not shown there, thus you'd better check on top of this page: <A HREF= "https://repo.nd280.org/viewvc/ND280/nd280Highland2/doc/nd280Highland2History.dox?sortby=date&sortdir=down&view=log"
To check out (i.e. download) for example nd280Highland2 v1r11, do:
export CVSROOT=:ext:anoncvs@repo.nd280.org:/home/trt2kmgr/ND280Repository mkdir h2_v1r11 cd h2_v1r11 source <your_nd280_folder>/CMT/v*/mgr/setup.sh # alternatively you can source an nd280 setup script cmt co -r v1r11 -R nd280Highland2 # (co=check out, -r=release ID, -R=recursively check out all packages listed in cmt/requirements)
If you want the HEAD, you likely want commit some code: you need to have a "cvs developer account" (how to get it ) : make sure to have it before proceeding! WARNING: never attempt to commit code that was originally checked out as "anoncvs" or as a different user.
Without specifying a release, cmt will check out the HEAD of a package, but in this case -R cannot work, so we have to use a script.
export CVSROOT=:ext:<your_cvs_developer_username>@repo.nd280.org:/home/trt2kmgr/ND280Repository mkdir h2_HEAD cd h2_HEAD source <your_nd280_folder>/CMT/v*/mgr/setup.sh # alternatively you can source an nd280 setup script cmt co nd280Highland2 cd nd280Highland2/v*/cmt/ ./checkout_HEAD #(follow the instructions on the screen, it will create the following script to be run) ./checkout_HEAD_v*
Note that this script will modify nd280Highland2/v∗/cmt/requirements replacing the version of each package with a wildcards
–> do not commit this file!!!
Before compiling you have to properly setup the CMTPATH environment variable:
source <your_nd280_folder>/CMT/v*/mgr/setup.sh # alternatively you can source an nd280 setup script export CMTPATH="<path_to_the_folder_containing_nd280Highland2>:<path_to_the_folder_containing_nd280AnalysisTools" # (paths separeted by columns) source nd280Higland2/v*/cmt/setup.sh
These commands above are needed also to run highland2: to avoid typing every time you could put these lines into a setup script and source it in every new shell.
If the same package is contained in both paths specified in CMTPATH, cmt will use the one contained in the first path.
If ROOT is not in the same folder of nd280AnalysisTools (they are if you have the full nd280 software installed) you need to add its path to CMTPATH:
export CMTPATH="<path_to_the_folder_containing_nd280Highland2>:<path_to_the_folder_containing_nd280AnalysisTools:<path_to_the_folder_containing_ROOT>"
Now you can compile:
cd nd280Higland2/v*/cmt/ # (if you moved/renamed folders, you need to run here 'cmt br make config' to re-set the paths in setup.sh of all package, and source setup.sh again) cmt br make # (br = broadcast = recursively compile all the needed packages which are in the same workspace folder)
If the compilation fails complaining libGLEW.so.1.8 was not found, just create a softlink to another libGLEW (on Xubuntu 14.04 I had the 1.10):
sudo ln -s /usr/lib/x86_64-linux-gnu/libGLEW.so.1.10 /usr/lib/x86_64-linux-gnu/libGLEW.so.1.8
As said in section nd280AnalysisTools (prerequisite), nd280AnalysisTools needs to be compiled with the same production used in highland2.
Since compiling nd280AnalysisTools takes quite a lot a time, if you want to work with two production you'd better install two nd280AnalysisTools: each time you run you can set the CMTPATH to point to one or to the other, as explained in the previous section (Compiling highland2/psyche), and you don't need two full installations of nd280.
Note that the two nd280AnalysisTools cannot stay in folders at the same level of the absolute path: see next section Known issues with CMTPATH.
Also highland2 needs to be recompiled every time you switch between production 5 and 6: make sure you properly clean everything before re-compiling (or alternatively you can install highland2 in two different workspace folders)
cmt br make clean cmt br make
1) If you set CMTPATH=pathA:pathB, the same package can exist in both pathA and pathB but only if pathA and pathB are NOT at the same level of the absolute path (e.g. when there is one nd280AnalysisTools in the nd280 software and one stand-alone):
export CMTPATH="<main_path>/folderA/:<main_path>/<another_folder>/folderB/" # this works and cmt will use the pacakge found in the first path (folderA) export CMTPATH="<main_path>/folderA/:<main_path>/folderB/" # this will complains for conflicting releases
2) On Scientific Linux 5, nd280AnalysisTools and nd280 compile only if their paths are the first ones in CMTPATH. 3) xsTool needs to stay in the same workspace folder of highland (not sure why but even properly setting the CMTPATH it doesn't work)
If everything worked so far, you should be fine. If you want to make sure, try this out:
(if you are in a new shell, you have to source again your setup script, or manually export the CMTPATH and source nd280HighlandTools, as explained in Compiling highland2/psyche)
RunNumuCCAnalysis.exe -o test.root <path-to-oaAnalysis-file>
Now you can check some of the histograms inside the tree:
root test.root TBrowser b
cvs update -d highland2/*/*/ cvs update -d psyche/*/*/
cvs update -d highland2/*/*/ cvs update -d psyche/*/*/
cmt co -R nd280Highland2 -r vXrY (check out recursively the frozen version vXrY) find psyche/* -maxdepth 0 -exec cmt checkout {} \; find highland2/* -maxdepth 0 -exec cmt checkout {} \;
cmt checkout -R nd280Highland2 -r vXrY (check out recursively the frozen version vXrY) cvs update -A -d highland2/*/*/ cvs update -A -d psyche/*/*/(with option -A you get the HEAD not matter the version you are)
This is an update to the previous versions written by Martti and Enrico in 2013.
This was tested on Ubuntu 12.04.4 LTS (Martti) and 13.10/14.04 (Enrico) using the last frozen software version of nd280.
Follow the ND280 workbook instructions for non-standard OS, make a setup script and install CMT:
http://www.hep.lancs.ac.uk/nd280Doc/devel/invariant/nd280Doc/workbook/SoftwareUser.html
For this step, simple install all the needed packages that are not automatically included in Ubuntu:
http://www.hep.lancs.ac.uk/nd280Doc/devel/invariant/nd280Doc/workbook/NonStandardOS.html
To save time, you can also run the script provided on the above page:
http://www.hep.lancs.ac.uk/nd280Doc/devel/invariant/nd280Doc/workbook/aptCommands.sh
You have two options:
Note that you should always check the version IDs (e.g. v11r31) and change them if needed!
Martti wrote two scripts for the two options, they can be found here:
http://www.hep.lancs.ac.uk/nd280Doc/devel/invariant/nd280Doc/workbook/install_full.sh
http://www.hep.lancs.ac.uk/nd280Doc/devel/invariant/nd280Doc/workbook/install_minimal.sh
Note: You must edit the first 3-5 lines of the script to match your desired installation, and your input-file.list (see step 4) must exist in $INSTALLPATH for the scripts to work! No guarantees!
Nevertheless it is probably better to learn the right commands (here below), instead of using my scripts.
Therefore, run your setup script (the one prepared in step 1) and then the following commands:
(as for highland (see first section), if you have other nd280 version installed, it's recommended to install this one in a new workspace folder)
source setup.sh # (the one prepared in step 1) cmt co -r v11r31 -R nd280
source setup.sh # (the one prepared in step 1) cmt co -r v1r55 -R nd280Tools cmt co -r v1r9p3 nd280AnalysisToolsOptional to b): edit nd280Tools/v∗/cmt/requirements and comment the following lines:
Make sure nd280AnalysisTools has an oaAnalysis file to compile with. Edit the file nd280AnalysisTools/v∗/AnalysisTools/input-file.list to point to a valid file location. It is important to choose the proper file for the compilation of nd280AnalysisTools (prod5, or prod6) in order to have highland working properly with the production you want to use!
Note: surely you have data files stored on your local server, otherwise check this page to download them
http://www.t2k.org/nd280/datacomp/howtoaccessdata/accessdatawithgrid
Note2: if any problems occur (doesn't compile etc.) see subsection
This is the part that will take the longest. Make sure you've done all the above steps before continuing!
cd nd280/v*/cmt/ # (if you moved/renamed folders, you need to run here 'cmt br make config' to re-set the paths in setup.sh of all packages) source setup.sh cmt br make
cd nd280Tools/v*/cmt # (if you moved/renamed folders, you need to run here 'cmt br make config' to re-set the paths in setup.sh of all packages) source setup.sh cmt br make
Occasionally, some annoying and difficult-to-fix problems occur with nd280AnalysisTools.
In case you have such problems, you may want to try one of these fixes (that have worked for us):
#application EventDisplay -group=applications ...Having done this, the package should compile, but the EventDisplay won't be available. (Martti)
TTruthUtils.cxx TECALPidDefs.cxx TECALPidLikelihoodHypothesisTest.cxx TECALPidLikelihood.cxx TECALEMEnergyCorrection.cxxThis allows for a “minimal installation” of nd280AnalysisTools. Highland just need a few libraries of nd280AnalysisTools, if it doesn’t finish compiling but the libraries are created, it’s enough. (Enrico)