Overriding Gleam's JobOptions Files

This section provides an example of how to create a Gleam JobOptions file when you want to change the parameter(s) or redirect the output of the Root files by creating and supplying your own jobOptions.txt file. (See Supplying a New Gleam JobOptions File.)

Creating a New File the Easy Way

The easiest way to create a new jobOptions file is to include one or more of Gleam's JobOptions files (e.g., basicOptions.txt, or jobOptions.txt) in your own jobOptions.txt file and then overriding the original options to achieve your objectives. Remember, the last definition of a command wins.

The following example includes the basicOptions.txt file using an #include statement. This file will run simulation + recon + write output Root files.

  Note: If you copy the following example to use for test purposes, or to build your own jobOptions file, be sure to remove the brackets and the numbers [1-7]; they are not part of the actual file!

 

//##############################################################
//
// Job options file for Gleam job
// $Header: /nfs/slac/g/glast/ground/cvs/Gleam/src/jobOptions.txt,v 1.7 2002/07/27 08:48:10
burnett Exp $
 
#include "$GLEAMROOT/src/basicOptions.txt"  [1]
//#include "$GLEAMROOT/src/guiOptions.txt" [2]
//#include "$GLEAMROOT/src/fredOptions.txt"  
 
MessageSvc.OutputLevel = 3; [3]
 
[4]
mcRootWriterAlg.mcRootFile =
"$(yourEnvironmentVariable)/glastPackTest/surveyCALHE/mc-gamma100MeV-vert-180.root";
digiRootWriterAlg.digiRootFile =
"$(yourEnvironmentVariable)/glastPackTest/surveyCALHE/digi-gamma100MeV-vert-180.root";
reconRootWriterAlg.reconRootFile =
"$(yourEnvironmentVariable)/glastPackTest/surveyCALHE/recon-gamma100MeV-vert-180.root";
 
  [5]
FluxSvc.source_lib = {"$(yourEnvironmentVariable)/glastPackTest/surveyCALHE/test_sources.xml"};
FluxAlg.source_name="gamma_100MeV"; [6]
ApplicationMgr.EvtMax = 5000;
 
// temporary?
ApplicationMgr.DLLs += {"merit"};  [7]
Triggered.Members += { "meritAlg" };
//==============================================================
//
// End of job options file
//
//##############################################################
   
Notes:  
  • [1]
- include Gleam's basicOptions
     
  • [2]
- if you want an event viewer, uncomment either the guiOptions or fredOptions
statement
     
  • [3]
- set the debug level a little less chatty if you want. It's interesting to see all the messages the first few times
     
  • [4]
- reset where the Root files go. The paths here are just examples from one of my configurations
     
  • [5]
- if you need a special source, you can specify your own source file
     
  • [6]
- pick the source you want
     
  • [7]
- add other algorithms as needed
 
  • Gaudi provides two ways to override:
    In [5] you see '=' where '=' sets the value and '+=' adds to the list.
    in [7] you see '+='
     
    So [7] adds an algorithm and DLL to the lists, while [5] resets the source list.
One could have used '+=' in [5] as well, but I believe you have to watch out
for duplicate sources in the various files.

In the example, a line is declared as follows:

  FluxSvc.source_lib = {"$(yourEnvironmentVariable)/glastPackTest/surveyCALHE/test_sources.xml"};
   
  This line sets the xml file that Gleam can get sources from.

How Gleam knows which source to use:

In the JobOptions file, the source to be used for the simulation is declared in the line:

FluxAlg.source_name="gamma_100MeV";

Note: The source name can be changed to any source name that Gleam knows about (i.e., any source name contained in an xml file that Gleam knows about through the FluxSvc.source_lib jobOptions parameter.

Related Topics

Additional Resources

 


Owned by: R.Dubois

Last updated by: Chuck Patterson 01/09/2007