You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

This page gives some tips for using  FRED with the Beam test software releases, but also with any other GLAST software release.

The page is devided in 3 sections.

  • Setting the environment variables to use a specific software package
  • Useful macro to select  the events you want to display with FRED
  • Setting FRED GLAST panel to visualize the desired data

 

The scripts and macros use paths which are from the machines at SLAC. In order to work on other cluster of computers one needs to replace the pathnames. 

1 -  Setting the environment variables to use a specific software package

 

The software to analyze GLAST data is pretty complex. It involves several (similar) release packages (BeamtestRelease,  EngineeringModel,  GlastRelease and  ScienceTools) and many different
release versions. In order to add more complexity to the issue, different release packages run with different root versions, and different programs might be running with different shell flavours. That implies that one needs to be careful when changing software package; the chances of  working with a not properly set package (i.e. wrong libraries) are not negligible.

In this section you can find a set of very simple scripts and a even more simple root macro that help setting the environment variables in rather easy and systematic way.

 

1.1 - Scripts to set some environment variables 

 

The script  .SetSoftRelease (.SetSoftRelease_bash for bash or sh shell) sets the environement variables CMTCONFIG (to "rh9_gcc32opt"), GLAST_EXT (to "/afs/slac/g/glast/ground/GLAST_EXT/$CMTCONFIG") and the variable CMTPATH. The first 2 point to the directory where all the software packages hang, therefore they DO NOT need to be replaced. On the other hand, the variable CMTPATH points to the specific software package to be used, and consequently it needs to be modified every time you want to change software package or release. Because of that, the script has 2 arguments:

 

  1. Software package; _BeamtestRelease, EngineeringModel... _
  2. Release version: v3r0907p2, v6r070329p17 ...

An example of how to use it follows:

source .SetSoftRelease BeamtestRelease v3r0907p2

I have this script in my home directory, which allows me to call it from everywhere in the following way:

source $HOME/.SetSoftRelease BeamtestRelease v3r0907p2

 
It is important to note that different software packages might be using different root versions. That is the case (at August 2006) for the BeamtestRelease and the EngineeringModel, which uses root 5 and root 4 respectively. That implies that the root version (and related environment variables) have to be also modified when switching between these two software packages.

The script SetSoftCode_Generic.csh (SetSoftCode_Generic.sh for bash or sh SHELL) can be used to set both, the software package environment variables and the root environment variable ROOTSYS (updating also LD_LIBRARY_PATH and PATH appropriately). An example of how to use it follows:

 
source SetSoftCode_Generic.csh BeamtestRelease v3r0907p2
Here i also provide few scripts which can be used to set some (useful) selected combinations of software package and release version.

An example of how to use them follows:

source  BeamtestRelease-v4r0909p2.csh

Important Remarks 

  • The above mentioined scripts use the script  .SetSoftRelease, and they all assume that this script is located in the $HOME directory. Therefore, if you want to place .SetSoftRelease in any other place, you have to change the scripts accordingly...
  • I do have csh and sh scripts because, even though I particularly use csh, FRED wants to use bash (see section 3), and therefore I need both. I do not know whether this applies to you... but that might be useful.

 

1.2 - Root macro to load root libraries

 The macro LoadLibraries.C can be used to load (within a root session) the following root libraries:

  •  libcommonRootData.so
  •  libmcRootData.so
  •  libdigiRootData.so
  •  libreconRootData.so
  •  libPhysics.so

 The only argument of this macro is a string containing the software package and the release version to be used, in the following way:

"SoftPackage-Version"

An example of how to use it follows:

root [0] .x  [LoadLibraries.C]("BeamtestRelease-v3r0907p2")

As it will be shown in the next section, one can also include this macro in another macro and execute it from there:

#include "LoadLibraries.C

void sillymacro(TString softrelease = "BeamtestRelease-v3r0907p2")

{

 LoadLibraries(softrelease.Data())

 etc,etc, etc...

Important Remark

Since the macro is executed within root, it cannot modify the root version accordingly to the software package to be used. Therefore, before executing this macro, check that you are using the appropriate root version for the software package you want to use.

 

2 -  Useful macro to select  the events you want to display with FRED

 

 

 

3 -  Setting the FRED GLAST panel to visualize the desired data

 

  • No labels