To give commands to ROOT, one uses a "macro" which can be
written in C++ or CINT (C interpreter)
STAR library macros are located under $STAR/StRoot/macros and
a short description is also available on the WWW at
STAR -> computing -> Root for STAR -> Available Root Macros
To run all the different software tasks in ROOT, we use a "chain"
of "Makers". The Makers are C++ classes (that inherit from StMaker)
that either do a specific
task (such as TPC tracking or event I/O) or else they call a
"pam" (written in fortran or C) which does the task.
To setup and run a chain of Makers, you run the constructor for each Maker
in the order you want them called in the macro. Then when running the
macro:
the Init method of each Maker will be called once at the beginning
in the order you specified
the Make method will be called once for each event
the Finish method will be called at the end of the job
The main reconstruction
macro chain that STAR uses is $STAR/StRoot/macros/bfc.C.
This is a "framework" chain that can be run in many different modes,
depending on what you want to do. Basically it is for the pre-DST
processing. It reads either real or simulated data in,
does detector signal simulations (if needed), does detector reconstruction,
global event reconstruction, builds and writes out the DST.
Information about the ways to run bfc.C can be found from
STAR -> Computing -> Tutorials -> bfc.C Usage (1/2way down page)
Our DSTs are written in "table" format from bfc.C. The dst tables
are basically C structs and are defined in "idl" (interface definition
language) files under $STAR/pams/global/idl/*.idl (a subset of the ones
in this directory).
The DST table data is written to a *.dst.root file at the end of
the bfc chain macro.
Each Maker can not only read in table data and write out new table data,
but can also book and fill histograms. One should book histograms in
the Init method and fill them in the Make method. The histograms then
will exist under the MakerName/hist directory in memory.
At the end of the chain macro job, histograms from each Maker are
automatically moved to a *.hist.root file and kept under their
associated Maker directory.
Many macros are already in the library that read a DST produced from
bfc.C and allow one to look at the dst table data or histograms. For
example, you can just try running the following macros in
$STAR/StRoot/macros/analysis
QA_bfcread_dst_tables.C - prints out info about tables for each event
bfcread_dst_QAhist.C - this is a chain that reads a DST data file
using
StIOMaker,
runs the St_QA_Maker class to book and fill QA
histograms, and then draws and prints the histograms
bfcread_hist_to_ps.C - reads the DST hist file and then
prints out all histograms from a selected Maker
In order to test the code in the DEV library, a number of test-DEV
DSTs (also test-NEW when DEV is released to NEW) are produced
everynight. You can see the schedule and status of jobs at:
STAR -> Computing -> Offline Software -> Library Validation
The "Auto-QA" system automatically reads in the above test-DEV & test-NEW
DSTs, and also any cosmic data DSTs and runs several macros to check
the data and records the results with a QA summary report.
All histograms that were produced
are sent to postscript files. You can get to this system by
going to
STAR -> Computing -> QA -> Auto-QA
We write the DSTs in table format, but these are not really C++
objects. For doing physics analysis on the DSTs, we transform the
table data into true C++ object data defined in the StEvent class.
You can get StEvent information from
STAR -> Computing -> Tutorials -> Using StEvent and filling Physics Tags
(about 1/3way down page)
To read the DST, transform to StEvent data structures and run a
physics analysis module, use the basic framework macro chain doEvents.C.
As is bfc.C, this is also a chain, but this now deals with post-DST
data. As it exists in the library, it uses the following Makers in
a chain: StIOMaker (to read the dst), StEventMaker (to fill StEvent),
StAnalysisMaker (simple examples and printouts of how to
navigate StEvent). Another library macro that uses StEvent is
bfcread_dst_EventQAhist.C - reads the DST, transforms to StEvent,
runs StEventQAMaker to book/fill histograms from StEvent objects, then
draws/prints the histograms.
Above is all the basics of our system. Please let me know if you
find any glaring mistakes or omissions. Also, there is a lot of
information about code development, etc. on the Tutorials WWW pages
that you should read after this note!