Loading EEmcTree Dictionaries

How to generate and use EEmcTree dictionaries, to use the trees in root and/or root4star, either on a BNL RCF node or on local machine without the STAR software framework.


If you intend to work on the BNL RCF

I will assume you want to checkout the CVS into a directory called ~/EEmcTreeCVS and your analysis will be a directory called ~/EEmcTreeAnalysis/June2012.  Change the names as appropriate.  Note, if you want to then do another analysis in a directory called, ~/EEmcTreeAnalysis/July2012, you only need to follow Part 2  the instructions.

Part 1

The following will check out the CVS code and compile the code.  Note, the line concerning spin can be removed if you do not need the dictionary for the StSpinInfo_t class, which contains information about the polarization and helicity of the beams.

cd ~/EEmcTreeCVS
cvs co offline/users/sgliske/StRoot/StEEmcPool/EEmcTreeContainers
cvs co offline/users/sgliske/StRoot/StSpinPool/StSpinInfoMaker
cd offline/users/sgliske/
cons

Part 2

Now we want to link to the library locations.  Note the .sl53_gcc432 might be slightly different in your case, depending on version of Scientific Linux and gcc on the particular RCF node to which you are connected.

cd ~/EEmcTreeAnalysis/June2012
ln -s ~/EEmcTreeCVS/offline/users/sgliske/.sl53_gcc432 .

Now to use the dictionaries in an interactive or in a macro session, you just need to do the following (before opening any TFiles containing EEmcTrees them).  To load the part with EEmcTreeContainers, use

gSystem->Load("StEEmcPoolEEmcTreeContainers.so");

while to load the spin information and event header classes in Part 1 of the EEmcTree, use

gROOT->Macro("loadMuDst.C");
gSystem->Load("StSpinDbMaker");
gSystem->Load("StSpinInfoMaker.so");

If you intend to NOT work on the BNL RCF

I'll assume your local machine is called local.machine.edu and you will do your analysis in a directory called ~/EEmcTreeAnalysis/June2012 that already exists on that machine.  If not, change the names appropriately in the following. I'll also assume that we'll put the EEmcTree library things in a directory on your local machine called ~/EEmcTreeAnalysis/EEmcTreeContainers.

Part 1

We'll start by checking out the CVS, making a tar file, and copying the file to your local machine.  The last two lines changes back to your home directory and deletes all the files and directories the first commands generated on the BNL RCF.  On a BNL RCF node, do the following

mkdir /tmp/$USER/EEmcTreeCVS
cd /tmp/$USER/EEmcTreeCVS
cvs co offline/users/sgliske/StRoot/StEEmcPool/EEmcTreeContainers
cd offline/users/sgliske/StRoot/StEEmcPool
tar -czf EEmcTreeContainers.tar.gz EEmcTreeContainers/*.h EEmcTreeContainers/*.cxx EEmcTreeContainers/macros/*.C
scp EEmcTreeContainers.tar.gz local.machine.edu:EEmcTreeAnalysis/.
cd
rm -rf /tmp/$USER/EEmcTreeCVS

Part 2

Now on your local machine, we will run a macro to  make the dictionaries

cd ~/EEmcTreeAnalysis
tar -xzf EEmcTreeContainers.tar.gz
cd EEmcTreeContainers
mv macros/*.C .
rmdir -macros
root -b -q makeDictionaries.C
cd ..

Part 3

The dictionaries are ready.  In your analysis directory, lets add a link to the directory with the dictionaries and things.

cd June2012
ln -s ../EEmcTreeContainers .

Now, you can load the dictionaries, either in an interactive session or in a macro, via

gROOT->LoadMacro("EEmcTreeContainers/loadEEmcTreeDictionaries.C");
loadEEmcTreeDictionaries();

The dictionaries are loaded, and you can read the TFiles, instantiate the classes, etc.  If you want to use the dictionaries in another directory, just repeat Part 3.