next up previous contents
Next: Program Flow - C++ Up: How XED Works Previous: How XED Works   Contents

Program Flow - Fortran

XED starts work when XED_XSNOMAN_EXE is first called. This routine (in FORTRAN) is responsible mainly for passing control (and data) to the C++ code that does the major work.

There are several calls that XED performs in this fashion:

If uninitialized, it first passes control to the C routine initialize_xsnoman(), which creates the basic XSnoed data structures and the main XSnoed window. This routine does the job of 'main()' in the standalone version of XSnoed.

Next, the routine transfer_geometry_info() is called. This call passes some of the arrays defined in ge_pmts.inc. These arrays are used to reconstruct the PMT geometry to match that of SNOMAN perfectly. XSnoed has it's own database of PMT positions that is overwritten with this call. This ensures that any analysis done with XSnoman is 'official'. This call concludes the one-time initialization process.

Two more calls get the viewer running. The first is transfer_ds_info. This routine serves two major purposes. First, it passes the memory location of the ZEBRA IQ, RQ, and LQ arrays so that the C++ code can access various banks. Secondly, it sets flags to tell XSnoed whether it can expect a new event, the new version of the same event (i.e. XED has been called multiple times for the same event), or whether the current event contains only permanent data structures.

Last, the call run_xsnoman_until_needy() is made. This call starts the XWindows event loop, returning only when the program decides it needs a new event. run_xsnoman_until_needy has one argument which is used as a return code for the XED processor.


next up previous contents
Next: Program Flow - C++ Up: How XED Works Previous: How XED Works   Contents
sno Guest Acct 2009-09-09