Main Features of the software.
Contents
-
General overview
-
Protection of variables
-
Calibration parameters
-
Portability of the code and data files
-
User written code
General overview
-
OO programming, modern programming language
-
lots of ready to use constructs from ROOT including great graphics
-
lots of tutorials and samples for ROOT ( great for starters in C++)
-
All histograms and other object are written and read to/from file
automatically as long as they are data members of an object being written.
-
Everything could be kept in order with directory structure of a ROOT file
( diferent directories and same histo names ).
Protection of variables
Plan is to protect all original event data ( the one that comes from data
file) and calibrated data ( the one that results after applying calibration
routines) along all steps of processing so that an user may not cahnge
them accidentally. Also "utility variables" such as counters, flags,ponters
to global objects need to be protected from acidental change.
At the moment due to exponential development of software and
lack of time NO PROTECTION is implemented for many variables. One may potentially
screw up things if changing wrong variables in wrong time in classes
such as LegsRun,LegsDB,LegsHit,LegsTagHit,LegsPart.
Calibration parameters
All calibration parameters are kept in ASCII files named according to run
number and date when calibration becomes valid.
One may change calibration files and run UpdateCalib program (supplied
with SasySoft) to let th eprogram know about the change.
The files must be written in same format for all different calibrations.
The program tries to read in an array with dimensions specified on 2-nd
line. The only thing program checks while reading in a calibration file
- did I encounter end of file when I still did not get all elements
of 2-dimensional ARRAY, dimensions of which are specified on 2-nd line
of the file ?
Portability of the code and data files
All data is kept in ROOT files and may be provided to interested members
of LEGS group through FTP or tape or CD upon request.
They are portable to most platforms just as ROOT is ( UNIX, Linux,
Windows ...).
The code of SasySoft is NOT ready to run on anything except
UNIX-like systems. Amount of changes required is not large though.
So, it is possible to port the code to another system ( must have
ROOT installed first) with very limited amount of work, most
of which boils down to rewriting Makefiles and portions of code that deals
with input-output to file system.
User written code
According to design of SasySoft user may write so called "makers"
- classes that are children of class LegsMaker. Inside of these classes
user may do pretty much anything he/she wants with the data. Several functions
are "A MUST" such as Init(),Make(),RunEnd() and user may add any number
of other functions. Function Init() is automatically called at the
beginning of run. Make() is called every event and RunEnd() is called as
you no doubt have guessed at the end of run. From within these functions
one may call other member functions of the same maker or some global functions
or else. Since makers are provided with pointer to LegsRun object they
can access pretty much anything ( read "Protection of variables"
above).
Every user also can have his own programs.
Addition of new user code is as simple as making new directory makerNewUserInitials
and putting copies of other user makers in it ( of course you have
to change names of files-makers and reflect new names in your Makefile).
Then new user may change the makers to fit his needs.
The same way new user may have his own programs directory with his
own programs ( compiled macros).