J S F
( sorry, but this document is under construction)
 

What is JSF ?

JSF ( JLC Study Framework) is a collection of classes for analysis of HEP data, coded based on ROOT.  HEP data are usually consists of many events data of many runs.  Each event data are collection of data from several sub-detector components, and their analysis can be performed rather independantly. Focusing on such feature, the JSF is designed to allow modular data analysis.

Two basic classes of JSF (JLC Study Framework) are JSFSteer and JSFModule.  JSFMoulde is a basic class for data analysis. It includes Initialize(), BeginRun(run), Process(event), EndRun(), and Terminate(). In  a job of data analysis, several analysis module is performed sequentially, and the JSFSteer class is provided to control execution of modules.

General structure of JSF job is shown below.  This flow is provided by ROOT macro.  User writes a class for data analysis. The class should be derived from JSFModule ( or class derived from JSFModule.)  If user's analysis module is construced, JSFSteer execute it properly. Typical JSF analysis flow is show below.
 


 

Where is it ?

JSF is currently installed in ccjlc ( HI-UX ) in /proj.hi/phys/lclib/jsf directory.  Binary codes for Redhat 5.1 linux system is also available.
 
 

Is there example ?

Two types of examples are included in the current release (version 0.4.3). One for JLC detector simulation with lclib libarries,
and the other for beam test data analysis.
 

Input and Output of JSF

The event data are stored in the ROOT Tree.  The input are (1) the event object stored in the ROOT file, (2) data generated within JSF process ( such as the case of the event generator), or (3) non-root file such as the beam test data. The output of JSF is the ROOT file where analized event data and/or histograms are stored.

The root file (TFile object) must be created before JSFSteer object is created.  JSFSteer class has pointers to the input file and output file, inaddition to the input tres and the output tree.  When TFile object is created, ROOT stores the pointer in the global variable gFile.  When the JSFSteer object is created,  JSFSteer assumes gFile is output file if gFile is Writable, otherwise it is considered as the input file.  If user needs to specify both input and output, or does not happy with the default behaviour, specify the pointers for input and/or output file using the JSFSteer's SetInput(TFile *file) and/or SetOutput(TFile *file) method. SetInput and SetOutput must be called prior to the JSFSteer::Initialize() where input and output files are accessed to create tree or set branch addresses.
 

How to read/store module's data

Event data is stored in the JSFEventBuf class or classes derived from it. The pointer to the JSFEventBuf is the data member of the JSFModule class.  JSFSteer::MakeBranch() is called during the Initialize() of JSFSteer to create a branch for JSFEventBuf.  If user want to creates branches differentlly, MakeBranch() method must overwritten.  Other non-event data are data member of JSFModule class.  They are stored in ( read from ) the conf directory of the output (input) root file at Initialize(), BeginRun(), EndRun(), and/or Terminate().  Histogram objects are written in the top directory.
 

ROOT/JSF analysis style

On the HI-UX system, there are some problem related to the dynamical shared library loading. Therefore, JSF libary must be statically linked to its application.  Imakefile to create JSF application are found in the example directory.  The JSF application is the ROOT with pre-linked JSF library.  Any ROOT and CINT command can be executed in the JSF application.

Most of the C++ language are supported by CINT, but classes defined in the macro can not process properly.  So user need to define new class, it must be compiled and linked and his/hers own JSF application must be prepared.   If what user want to do is just the use of class member and the function, he/she can do it by macro.

According to the ROOT convension, meanings of the file prefix are as follows.
.h      ; header file
.C     ; root macro file
.cxx  ; C++ source code for the pre-compiled library
.o      ; object file.
.root  ; root file.
 

Command line options

Format of the JSF application command is,
 

How to browse histogram in the root file ?

Among several method to display histograms in the root file, the easiest is to use TBorwser.  To do it,

$ jsf
......
root[1] b = new TBrowser("disp");
   -->  Browser canvas shows up.
   -->  In the menubar, select File => Open , and open the root file.
   -->  Click "ROOT Files" in the "All Folders" list
   -->  Double Click "root_file" in the "Contents of "ROOT Files" list
   -->  Histogram objects are in the top directory.  When the opbject is clicked,
        object is drawn on the canvas.

Note: Each histogram objects has own key name.  The objects in the file has cycle number, i.e, the number attached to the key name a la VAXVMX system ( like,  hist;1).  When object is clicked and drawn on the screen, the new memory objects are created on the same directory which does not have cycle number.  Becarefull not to confuse those with cycle number anad those without.


ROOT file system
 

  1. Basic operation
  2. TFile  f("filename.root", "RECREATE") ;  //  Recreate a file filename.root for output
    TFile  f(""filename.root") ;                              //  Open a file, filename.root for READONLY
    f->mkdir("mydir") ;                                         //  Create a directory mydir ( on the top of the file f.)
    f->cd("mydir");                                                //   cd to mydir directory, subsequent Read/Write is performed
                                                                                   //    on this directory.

akiya.miyamoto@kek.jp 20-October-1998