G0Analysis Release 0.01 Jason Lenoble; 2001/11/26 20:31:23. Initial CVS release of the G0 Analysis softwre. G0Analysis Release 0.02 Paul King; 2002/02/11 17:39:38. Corrected several minor compilation problems so that G0Analysis now compiles on the JLab Linux machines (ifarml1, etc.) and on the JLab Solaris machines (jlabs2, ifarms1, etc.). G0Analysis Release 0.03 Paul King; 2002/02/18 17:39:00. Added ".keepme" files to the directories: "Analysis/dictionary", "G0ROOT/dictionary", "G0ROOT/scripts", "GUI/dictionary", "bin", and "lib". These files will ensure that the directory is created when the source code is checked out using the "-r" or "-P" options. Also, this release history was implemented. Other changes since release 0.02: * spayde on Fri Feb 15 11:40:10 EST 2002 Modified Files: .G0Setup.bash .G0Setup.csh * pking on Mon Feb 18 15:51:26 EST 2002 Added administrative files to control loggin of the taggin utilities. G0Analysis Release 0.04 Paul King; 2002/03/05 11:45. This will be the last release before switching to the "new" GNUMakefile prepared by Jason. Other changes since release 0.03: * Modified the setup scripts so that if the G0SCRATCH directory does not exist, an error is relayed to the user. Added a setup script for CODA which runs under the bash shell. * Modifed the GetPhysicsEvent to process ROC2 and ROC4 as North American scaler crates. * Compiles the code against libz.so. * Updated the MySQL database interface to reflect the lastest database schema (v0.5). * Major change in how the NA scalers are decoded. * Conditionally includes the ntuples for commisioning. * Modified TAnalysis so that the French ntuple is not included in the G0ROOT G0Analysis Tree if there are no entries in the ntuple. * Several changes in "#include" usage in the modules; this was in preparation for the new "modular" GNUMakefile. * Added fuctionality to fill analysis table in G0 database (G0 database schema v. 0.5). * Transfered path handling and root file handling from class TPilot to new metaclasses MG0PathHandler and MG0ROOTFileHandler. * Added a definition for "gzerol3" to the ET client routines. * Precompiler flags were added to allow conditional inclusion of the Fastbus ntuple. G0Analysis Release 0.05 Paul King; 2002/03/13 19:23. This release is the first version which contains the GNUmakefile as produced by Jason. In a later release, the old "Makefile*" files will be removed. Additional changes: * Added the classes CalcRates, CalcYieldAve, and UpdateRateFile and the GUI main routine G0RateMonitor to allow a 'visual scaler' type display for the events within specified time windows. Several other files were modified to support this functionality. * The database routines were refined further. G0Analysis Release 0.06 Paul King; 2002/03/28 11:20. This release has several modifications. Changes: * Modified the beam and MPS ntuples. Added a fake cut on the beam current in "PassedCuts.C". Minor correction in G0Analysis main loop; it had been counting the number of event one more that the actual. * Correction to GNUmakefile; variable DEBUGS was expected to be named DEBUG within the makefile, so renamed it to have the debug flag taken into account * Linking bug when g0root is built with flag -D__NOFASTBUS fixed by including file TSetupProfiles.h to help the makefile during the config step * Revised decoding for French ntuple (indexes mismatch) * Modifed the fG0FileInfo member of the MG0ROOTFileHandler class; changed MG0FileInfo, can use "PrintInfo" to see all of the info about analysis parameters and run setup as passed from g0analysis through MG0FileInfo to g0root. Extended the calss to pass more information about the analysis parameters. * Changed GetPhysicsEvent to catch the French configuration event. * Several changes to g0root... * Fixed backward incompatability introduced with new version of class MG0FileInfo : old ROOT files couldn't be read anymore. Fixed also a problem when a ROOT file is transfered as is from one computer to another: then the setup file path under $G0SCRATCH is likely to be inaccurate; now before aborting, g0root tries to find the file also in the default setup directory under $G0ANALYSIS * Put in a normalization routine for the French yields. Set up the beam scaler map file decoding. Added an upper limit to the number of entries in the commisioning ntuples; the limit is defined in G0Globals. Updated G0BeamMonitor to remove redundant variables. * Added protection for NA and beam bank reading when one or more scalers are dead. * Revised the asymmetry and average yield calculation. Fixed several bugs in the G0French assignment routine and the normalizing yield routine. Yield & asymmetry for Beam, NA and French class and their running averages and sigma calculations were checked by hand. Fixed several bugs in the ntupling routine. Added the 1st bin (counts accumulated from -6.5ns to 0 ns) for NA data into the TOF histograms. Made the running average and the sigma calculation more object-orientated so that they only take Helicity or Asymmetry objects. Also defined the overloaded running averaging operators in Beam,NA and French class. This proved to improve the speed of the code. * Minor change in "TSetupColumn.h" to use the standard "#include" notation for the iostream.h * Added an installation file with a discussion of the usage of the GNUmakefile. G0Analysis Release 0.07 Paul King; 2002/05/21 11:30. Changes: * Updated the NA scaler map file to include all three crates. * Enabled the code to ignore a new Fastbus decoding word. * Various changes to clean up the code: 1) Did the speed test on the offline code with Wolfgang. Optimized the code at various places. Modified NA ProcessEvent so that it no longer does the dividing of the time bin width (especially the 0th timebin with 6.5 ns width). Dividing the yield at this step creates round-off error. 2) Cleaned up vdetector/tscintillator/octant routines. Provided the "cleaners" for the root objects in NA, French, Beam, Asymmetry and Helicity classes to avoid potential segv. 3) Studied the NA deadtime correction a little more. Implement Wolfgang's changes. Also changed the convergence limit to %5 of statistical error, based on a simulation, to reduce the number of the required iterations. 4) Set the flag to turn off the histogramming for NA, French, Beam, Asymmetry and Helicity classes. The command line flag: --offhists BeNaFrAsYi. (The order of the objects is not important.) Also create TDirectories for these histograms according to the --offhists flag and sort the histograms into them. The dirs are: "NATOF", "FrenchTOF", "BeamHists", "AsymHists", "YieldHists". 5) Multi-run replay (-r firstrun:lastrun) fixed and tested. Fixed some loop counters and misc flags for the purpose of the multi-run replay. 6) Now no error messages for the size of TS crate when doing\ fastbus run replay. * Entered several new Fastbus channel mapping files. The current list of setup files is described in this table. ------------------------------------------------------------ Beginning run Ending run Configuration File 6728 7311 SetupChainTest.05-25-01.dat 7312 8808 SetupChainTest.06-25-01.dat 8809 8869 Setup.11-07-01.dat 8870 9146 Setup.12-04-01.dat 9147 9945 Setup.01-15-02.dat 9946 9950 Setup.04-12-02.dat 9951 9956 Setup.04-16-02.dat 9957 9960 Setup.04-17-02_early.dat 9961 9987 Setup.04-17-02.dat 9988 9995 Setup.04-30-02.dat 9996 999999 Setup.05-06-02.dat ------------------------------------------------------------ * Changed the name of the real-time executable from "g0online" to "g0realtime". * Consolidated all of the file opening operations into a new function, to aid readability of the source code. * Created a function ExitGracefully. This function closes files, etc. in case of problems. * The main G0Analysis routine and the main G0Realtime routine have been modified to use the Fastbus configuration file "Setup.05-06-02.dat" by default if the -s flag is not used on the command line. * More code clean-up: 1) Removed the chain test and system test remainders in the code to avoid confusion. 2) Removed the flag to switch off TS data analysis. We will always analyze the TS crate data. 3) Moved the yield normalization against the beam charge after the event cut on the beam charge. Also reset some quartet and event counters before the run-by-run analysis for proper multi-run replay. 4) Removed ConstructHists(), FillHists() and ClearHists() methods in NA, French, Beam, Yield, Asym classes. Defined a new G0Hists class that handles the histogramming of all the physical classes, except for Fastbus. 5) By default, no histogramming during the on/offline replay. Added --onhists flag on the command line to turn it on, if desired. The histograms are defined in the G0Hists class according to the list Paul sent out (FastBus hists are left out). 6) Added a Sigma function (as inline function.h in sample code) routine to to make the calculation of standard deviation in different classes a little more compact. G0Analysis Release 0.08 Paul King; 2002/05/21 11:30. Version frozen just before addition of the new Fastbus routines. Changes: * Added the error scalers to the "nascalerMap.in" file and updated the NA detector class and the decoding routines to upack them from the data stream. G0Analysis Release 0.09 Paul King; 2002/07/18 14:20. Version frozen just before several obsolete files are removed, and the GNUmakefile is modified to not compile the g0root and g0monitor executables. The obsolete files to be removed are: Analysis/src/Asymmetries.C CompAsyms.C CutOnYield.C NSigmaDiffCut.C SortPosNeg.C TFrenchEvent.C Analysis/include/Asymmetries.h CompAsyms.h CutOnYield.h NSigmaDiffCut.h SortPosNeg.h TFrenchEvent.h Changes: * The French detector TOF decoding was rewritten by Dominique and Jianglai. * The hooks for G0ROOT were removed from the Analysis directory. The Fastbus class was rewritten; the decoding of fastbus buffer is done in a similar way as NA and Beam buffers. Took the original setupfiles of G0ROOT as the fastbus channel maps. * Added the Fastbus ntuples to the G0Ntuple class. * Redefined the ltd_error in TCommunicator as UInt_t for consistency. * Modifed GetPhysicsEvent.C. To optimize the speed, TmpBuffers are no longer filled. * Added some map files in the parameter input directory. "nascalersMap.in.old" is the old NA scaler map for Dec. 01 test. "Setup.05-06-02.dat" and "Setup.12-04-01.dat" are two fastbus map files. "fastbusMap.in" now points to "Setup.05-06-02.dat". * Added an input file in prminput dir dmchs.in which reflects the empty dmchs and missing dmchs. Added the corresponding routine in French and G0ReplayPrms classes to do the reading and processing this file. This change reflected the hardware configuartion change since Dominique's last visit. * Separated out a StringManip.{C,h} routines which is a bunch of string manipulation functions that are used when we read the input files. * Modified G0CodaEvent to correctly skip over the "NULL" ROC buffers. These buffers occur when a particular ROC does not have any data to be read out for the current event type. * Updated the fastbus configuation accordingly to include the 10 new channels for the French anode current and PMT base low voltage level monitoring. Added a "Setup.06-21-2002.dat" to reflect the change. Added a frenchmonitor struct in the fastbus class. Modified the fastbus map file decoding for these 10 channels. * In the fastbus ntuple, also added a frenchmonitor branch to hold the values for these 10 adc channels. Cross-checked the results with Christophe's hbooks and they agreed. Regroup helicity, gms_mask, event_type, micropulse_counter, macropulse_counter into a branch called "misc". * Modified G0Hists to add 512 ADC histograms into the real time mapfile. Not tested yet. * Minor changes in the main and G0CodaEvent routines for more event-type sanity checks before filling the ntuples. * In CalcAsyms.C, increased the upper bound of nplus[] and nminus[] from 2 to 4 to prevent a potential bounds overflow during the helicity pattern check. * Moved compiler optmization flag to the architecture dependent section of GNUmakefile. * In G0ReplayPrms.C, replaced pow(2, 31) with (1 << 31) to get rid of compiler error * In evio.c, typecasted a pointer and commented out a non-reachable statement to get rid of compiler warnings * In TAnalysis.C, Replaced (now private) method TStopwatch::GetRealTime() with TStopwatch::RealTime(); TStopwatch::Continue() * Added lines in the FillFastbusNtuple method to fill the meantimer records in the Fastbus ntuples. The internal variables containing the meantimer data were already existing, just not being used to fill the ntuple entries. G0Analysis Release 0.10 Paul King; 2002/08/23 18:45. Release G0Analysis 0.10 was origianlly created on 23 August 2002 at about 18:45. However, I forgot to generate the change report at that time. Here is the list of changes which went into release 0.10. Changes since release 0.09: =========================== * Changed the default compilation targets to be only "g0analysis" and "g0realtime". * Removed several obsolete files from the Analysis/include and Analysis/src directories. These removed files are: Analysis/include/Asymmetries.h CompAsyms.h CutOnYield.h NSigmaDiffCut.h SortPosNeg.h TFrenchEvent.h Analysis/src/Asymmetries.C CompAsyms.C CutOnYield.C NSigmaDiffCut.C SortPosNeg.C TFrenchEvent.C * Updated helicity predictor routine in G0BeamMonitor according to the new algorithm of the random bit generator of G0 helicity box. * Implemented a test version of G0 SQL query translator in G0SQL class. Added some more string manipulation functions in StringManip.C. Added a G0 database lookup file G0DB_lookup.dat in Analysis/prminput for looking up the variable names, table alias and relations between tables. * Implemented G0SQLResult class to handle the return values from a SQL query. * Reimplemented "-s" command-line flags to choose fastbus map file by hand. * Fixed some small bugs in G0Ntuple.C, G0Hists.C, G0NADetector.C and G0FrenchDetector.C. * Implemented the process by which the analyzer will automatically loop through the run segments when processing a segmented run. The segmented files will be processed in order. The segements will probably still be found even if they are not consecutive. No error checking is done on the event number yet (this would be to be sure that no segments were skipped). * Updated fastbusMap.in to include the setup file "Setup.06-21-02.dat". Corrected both "Setup.05-06-02.dat" and "Setup.06-21-02.dat": the mapping of the French Fastbus channels had used an older scheme (from the chain test) rather than the scheme with the buddy detector signals interleaved. Also, the meantimer cables were installed in reverse order as compared to the initial signal layout. * Added aliases for new program g0acm (G0 Anode Current Monitor) * Changes in the GNUMakefile: - Added g0acm as default for compilation when variable CODA is defined. - Replaced keyword dummy by xxxdummyxxx to prevent weird errors when the set of environment variables is incompletely overridden. - Cleaning now checks for existence of directory SunWS_cache on SunOS. - $(ROOTCINT) is now called with flag -DROOTCINTFIX; that helps hide from the ROOT script some old c standard include files referred to, for example in et.h. * Moved up declaration of duplicated external variables to G0Globals.h to have only one point of intervention * Added a warning comment for the structure FrenchMonitor, because class G0Hists and TGAnodeCurrentMonitor explicitly access its array members and would be affected by any change in size. * Added several global constants for the anode current monitor * In order to get compiler warnings when we try to modify them, moved all global variables that are not currently changed within the source into constants * Added a few methods to encapsulate Fastbus histogram handling; preexisting realtime methods still process everything, but simply call the new methods, when it comes to Fastbus; gained a factor two in speed for the anode current monitor. * vector h_pmt_adc_ref was added as the anode current code needs two sets of histograms * Added a new parameter file to keep the anode current calibration parameters; added the corresponding members and methods with respect with the current model for handling parameter files (this_pedestalsdir,this_pedestalsfile in class G0ReplayPrms) * Edited GetPhysicsEvent to have a system check when the code has failed to recieve data from ET for a few second : this prevents the anode current monitor GUI to go blank and keeps its buttons atcive when nothing is happening. * A small bug fix preventing a tricky initialization of the G0Scint objects (there are twice as many of French scints as NA) from propagating to the entire code : after passing through the constructor where it is altered, kScints is now simply reset to the value it had when entering. * 10 new histograms were added corresponding to the 10 French Fastbus ADC monitoring channels. They are the last ten members of the vector h_pmt_adc, so that looping on the number of PMTs leaves them by default out of the loop. * TGAnodeCurrentWindow.h contains a handful of classes for the anode current monitor program. The latter is designed as a stand-alone program. It uses the common structure under Analysis/ but its classes are unknown to the main code. Therefore only slight adaptations were made to the main source to fit the new program. All classes are derived from native root objects. This was to allow to override methods handling mouse commands, so that the pads for the anode current have special behavior when clicked. * Added a new readout mode for the North American decoding routines: "InvertedBuddies". In this new mode, the buddy scaler channels are assigned to detector channels in reverse order. This is neeed to decode the data coming from the new SIS3801 buddy scalers. Also, corrected two decoding errors in the "Buddies" decoding routine, both related to the order in which the octants and detectors are looped over. The order of buddy signals for the first LTD (as an example) is: DT1 == Detector 5-01 BuddyPre, Number of hits in 5-01 when its buddy was busy from the previous micropulse; DT2 == Detector 5-01 BuddySame, Number of hits in 5-01 when its buddy was busy from the same micropulse; DT3 == Detector 1-01 BuddyPre, Number of hits in 1-01 when its buddy was busy from the previous micropulse; DT4 == Detector 1-01 BuddySame, Number of hits in 1-01 when its buddy was busy from the same micropulse. * New class G0MapFile encapsulates ROOT native class TMapFile. When instantiated, it checks for consistent global memory address and aborts if necessary while saving to disc new higher address to be used from then on by realtime executables. When it aborts, the program also kills all executables previously using the erroneous mapfile. They'll have to be relaunched, but they'll use as a default the higher address saved to disc. The class does not derive from TMapFile, as the latter has no public ctors. Instead it possesses a TMapFile* member, and a few methods imitate the TMapFile behavior for transparency within the main source. As not all methods in TMapFile have their equivalent in G0MapFile, the getter GetMapFile is provided for direct manipulation on the map file. The class G0ReplayPrms was adapted to have now a G0MapFile* member rather than a TMapFile*. All codes connecting to the mapfile should have now this member instead of a mere TMapFile. G0MapFile is currently the only class precompiled in expurged g0root. This is to allow to run consumer scripts while GUI codes are still in the process of being (re)written. The producer is always g0realtime. Map file size will have to be tuned. Currently it is maximized at 10M to be certain all objects will fit in it. * Changed the location of the ".MapFileBaseAddress" file from the environment variable $SETUP to the variable $G0_TMP_DIR. This should allow multiple machines to use the same executable version while maintaining unique memory map locations. * The Fastbus channel mapping files Setup.05-06-02.dat and Setup.06-21-02.dat have been edited by Dominique. These changes should correct the errors in the French CFD channel assignments. * Reimplemented ToF histogramming for each detector (8*16). Added command line flag "--tof". * Merged beamPrms.in (BPMs & BCMs pedestals file) and beamscalersMap.in into beam.in as a single input file. * Split PassedCuts() into PassedEventCuts() to cut bad events and PassedQRTCuts() to take out the bad quartet from asymmetry calculation. * Added a variable NUM_CAVITY in G0Globals.C. If the configuration of the beam scalers is standarized, one should change the value of NUM_BPM, NUM_BCM and NUM_CAVITY to reflect the real number of these monitors. * Made gzerol3 a default producer for the anode current monitor. Typing command g0acm omitting flag '-h' is now OK. * Minor change in the fastbusMap.in file to correct the range of runs for which we should use the setup file "Setup.06-21-02.dat". The run number has now been reset at 11000; all runs from this point should use the setup file "Setup.06-21-02.dat" (unless we change something else later on, of course). * Added option "hardware_prompt" for "--H" flag to treat all the reported helicity bits as prompt. When the analyzer is in this mode, the helicity predictor is not called. * Rearranged the time-encoding event cuts into two levels. The first level is a rudimentary cuts on the event-type (we want 30 Hz mode) and the trigger quality (we expect the correct size from TS crate). If this cut is passed, we fill ToF, MPS and beam ntuples. The 2nd level will set thecut on the beam quality (charge), quartet phase, etc. The events passed this cut will go into the quartet analysis (deadtime correction, normalization, forming quartet structure, etc ...). * In G0Global, define global constants MAX_NUM_BPM, MAX_NUM_BCM and MAX_NUM_CAVITY to give upper bounds of the number of these monitors. As an ugly fix to get the numbers of different types of monitors from the input file, redefined the original NUM_BPM, NUM_BCM, NUM_CAVITY as non-constant global variables. Their value will be reassigned in GetBeamPrms() routine when reading the beam input file and be used in all the subsequent calculation and ntupling routines. * Modified evOpen in evio.c after consultation with Steve Wood. 1) Changed a "case NULL" to "case '\0'"; 2) Relocated a "{" from after the "casr 'R':" to just after the' "switch (*flags)"; 3) Removed a the trailing " BIT64" from two lines "#endif BIT64". * Updated realtime histogram lists in G0Hists. We no longer build 512 ADC histograms, since they are monitored in the stand-alone g0acm. * Made new fastbus setupfile, Setup.08-20-02.dat. Added a channel ADC10ch80 as GMSRefPMT. Also modified relevent mapping and retrieving routines. The value of this ADC channel is passed into G0Hists realtime histogramming routine. * Made default ET host as "gzerol3" in G0RealTime.C. * Implemented a EPICS event processor in G0CodaEvent class. Added a methods G0CodaEvent::ProcessEPICSBuffers(), in parallel with G0CodaEvent::DecodeROCs(), which dumps the data buffers of the epics event (maybe more than one bank) into a big string variable. * Paul designed a new G0EPICSEvent class. Implemented a ExtractBPMAutogains() method to get the autogain values from the string variable filled in ProcessEPICSBuffers(). The empty method ReportAutogains() meant to take the autogain values into G0BeamMonitor class for the position calculations. But the string labels in the EPICS buffer has some discrepancy with the Junho's BPM map. So I will just leave it for now. The bottom line is that the autogain is decoded and stored in a struct in G0EPICSEvent object. * G0ControlEvent class is Paul's prototype class to process the control events. A dummy class for now. * Renamed the realtime histograms for the two striplines on G0 girder to the right names (G0 & G0B). * Added simple-minded IsNumber() methods in StringManip.C. This method is currently used in the EPICS decoder. (In the data stream, if the server timeout happens, the field followed by the varaible name would be "+-", to which we do not want to assign the autogains.) * New bpm calibration. Pedestals with bpm gain 2000-1500 to use for beam ON data until we get autogains into the datastream and do the gain calibration. G0Analysis Release 0.11 Paul King; 2002/11/25, 14:50. This is the fisrt release of the G0Analysis software since the G0 commisioning run began. It includes several changes which were developed during the beam tests as well as some fixes found during the commisioning run. The upcoming changes will be an improved EPICS decoding system and the decoding and analysis of the 120 Hz oversampling data. Changes since release 0.10: =========================== * Added constants kRescaleFactor and kADCGateWidth for g0acm to the G0Globals. Added text entry windows to g0acm to input the rescaling parmeters. The default screen shown only the NA octants. * Changed some names within the beam monitor class for the MPS and quartet counters. Added a dummy calculation routine for the cavity BPMs. Made a routine to be used for runs before 11233, which generates fake MPS and quartet counters. Runs after this have hardware counters. Modified the ntuples to include the new MPS and quartet variables. Modified AssignHelicity to use the new quartet phase counter. Added a routine to calulate the X and Y position at the target from stripline G0 and G0B. Added decoding for the "energy measureing" BPM (stripline 3C12). In G0Hists, modified histograms for X and Y position at the target, energy, and helicity. * The events before the first new quartet in a run are discarded. Added a interactive routine to set the French configuration mode in the realtime analysis. * Minor changes to implement the French "back" scintillator when in "Front or Back" or "Back only" modes. * Implemented SDMCH electronics decoding from the prototype code written by Dominique. At the run end, the summary of the SDMCH data is written to $G0SCRATCH/tmp/DMCH..log (including the DAC values). Renamed the routines for the missing DMCH boards. * Major changes in the helicity predictor to allow the event sampling to be non-continuous, such as when running in the realtime mode. The realtime code now does asymmetry calculations. * Added command line flags to disable the asymmetry calculation of either Beam, NA, or French, or any combination. * Added a command line flag to analyze single run segments. * Minor midifications to g0acm to allow "smoothing" of the data. * Changed the BPM names in the beam_nt and qrt_nt ntuples from names like "X01" to "x_G0"; all of the BPM names now refer to the device names. * Changed the sign of x (BPM) calculation, so that it is consistent with the EPICS calculation. * Minor bug fixes in GetReplayParams nad the helicity predictor. * Modified TEtClientBuffer to make the functions "codaOpen" public. This permits a user to specify a non-standard ET station name for their version of the analyzer. If there are multiple analyzers all connected to the same station, they will share the events (two analyzers each get 50% of the events, etc.); so by specifying a unique station name, a process can be sure of getting as many events as it can take. * Changes to allow the calculation of asymmetries from the SDMCH scaler data and for the NA direct scaler data. Added a histogram input file, to specify at run-time what the histogram properties should be. * Fixed a bug in Helicity.C in the calculation of running average of the quartet yield. Fixed a bug in the quartet ntuple filling, where we rebin French timebin asymmetry to 1ns bins, which had a mistake in the weighted sum. * Modified the retrieving of calibration data from gzero database according to the updated gzero database structure. Modified WriteToSQLDB() according to the updated gzero database structure. At the end of the replay of each run, this routine is called and we fill the measurement table and beam table with asymmetry and yield records of the time-encoding and beam data. Implemented the reading of cut table from the database. Also added a text cut file g0cuts.in in prminput/ for non-database access. Resurrected G0Cuts class to store cuts name, mininum and maximum, etc. * Updated the MySQL query translator. This interface should now be ready to put into the client programs. Up to this stage the writing of gzero mysql database (parity analysis part) via g0analysis is in shape. The database (on hallcl7) also servers as the inputs (calibration, cuts, etc) of the replay. * Updated the cavity BPM/BCM map. * Updated the Meantimer->Scaler mapping to include all 16 NA detector rings. * Implemented with Guillaume his deadtime correction routine for DMCH. MT deadtime was also corrected according to ~32 ns intrinsic deadtime for left-right coincidence. DNL correction of the French electronics is performed once at the end of a run. * Updated the decoding to adapt one more DMA status word in each DMCH board. DMCH Alerts counters are written to the rate file, which "g0ratemonitor" reads. * Updated the decoding of TS0 to accomodate the sub-bank of trigger supervisor data buffer. Coded a "wrapper" class G0TriggerSupervisor derived from G0BeamMonitor, etc. This gives a more natural separation between data of different sub-banks in the TS crate. Jason wrote a G060HzPhaseMonitor class (also a base class of G0TriggerSupervisor) to handle the 60Hz phase monitoring ADCs. * More command line switches and flags: --tscfg