STAR   Computing  
How to create your own "chain"/"maker"
  Maintenance Valeri Fine

What is a "chain" ?

Some terms:

  1. "Maker" stands for the USER DEFINED C++ class derived from the StMaker class. It is not "ROOT macro". That means "Maker" must be compiled with the "native" compiler and packed into "native" share/dynamic library (for each STAR platform) with the "regular" STAR "cons script file". The base class for all STAR "makers" - StMaker class is compiled with the native compiler as well and packed into the "$STAR/lib/StChain.so(.dll)" share/dynamic library together with StChain class (see next point). Maker class is class derived from TDataSet class. It is supposed to

    Usually the only mandatory method the user code would overload is StMaker::Make.

  1. "Chain" stands for the user NOT defined C++ class StChain to control the various "makers" supplied by different "users" to perform some "analysis" in chain. Again "Chain" is NOT ROOT macro. It is C++ class compiled with the native compiler and packed into "$STAR/lib/StChain.so" share library. It is expected at this stage the user doesn't change this class. There is a class derived from StChain. It is StBFChain. Sometimes speaking on "chain" they keep in mind the ROOT macros to launch StBFChain/StChain/StMaker-based production.

  2. "macros" - very likely in this context this stands for the short ROOT macro to

    3.1. LOAD all STAR share libraries into the ROOT session

    3.2. Create one instance of the "common" object of class StChain

    3.3. Define which "maker" will be in use for the current session.

    Namely to achieve that one:

    • 3.3.1. Loads share libraries defining the particular chain/makers/pams implemetation

    • 3.3.2. Creates one instance of each Maker one wants to employ for this particular session in the "right" order.

    3.4. to create a C++ loop "by event" to reach the goal of this particular ROOT session.

    (see: $STAR/StRoot/macros/bfc.C as example)

<should be written>

 

How to create your own Maker and launch your chain

 

To develope your own code within STAR/ROOT framework one needs:

  1. Set up the "regular" STAR and ROOT env (new, pro, dev)

  2. Check ROOT env (ROOTSYS, .rootrc). The ROOT environment is defined with one environment variable ROOTSYS and ROOT resource file ".rootrc". The regular STAR logon script will set that variable and provide you the default version of the ROOT resource file as well. One may find this file under

    $ROOTSYS/.rootrc

    Its syntax is described with this ROOT Web pag

  3. Choose (create ) any ("standard" STAR) working directory and check out ROOT subtree in there

    cvs co StRoot/St_TLA_Maker
    cvs co StRoot/macros

  4. Edit St_TLA_Maker (replacing TLA with the name of your maker)

  5. Edit macros/bfc.C

  6. Create share library with cons

    cons +St_TLA_Maker

  1. Fix compilation problem. Go to 6.

  2. Start STAR version of "ROOT" launching root4star.
    The STAR version of ROOT - 'root4star' is the "regular"
    ROOT compiled with the "debug" mode and linked with CERNLIB as well. (see: /STAR/comp/root )

    1. Set the debug ROOT mode

      root [1] .T

    2. Launch your ROOT chain

      root [2] .x bfc.C

  3. How to make HTML doc.

    To get a nice Html automatic docs of your classes you need comments placed at the three strategic points in your source code as described at section "Requirements" of http://root.cern.ch/root/Documentation.html. To generate the Html docs of your maker (let's say TLA) place the two C++ statements

    St_TLA_Maker laser;
    laser.MakeDoc();

    somewhere in you code to produce the Web page:

    /STAR/comp/root/html/St_TLA_Maker.html

  4. Relax.

  5. Send questions to mailto:starsofi_l@bnl.gov or complain via "Problem and Bug Reporting"