Hv preprocessing

Aus HERMESwiki
Version vom 28. Oktober 2011, 16:07 Uhr von Caro (Diskussion _ Beiträge)
(Unterschied) ← Nächstältere Version _ Aktuelle Version (Unterschied) _ Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

HV trip preprocessor for the uDST production

The HV trip information cannot be taken directly from the fillfile by the uDST production program because this information is timestamped with the UNIX time from the R5 machine while the slow control production is time-synced with the VME time from the DAQ front-end. Since these two times do not agree, the uDST production program needs to sync this information on its own. For this reason, the HV trip information is extracted from the ADAMO tables and placed into an ASCII file during a preprocessing step. This ASCII file is then read by the uDST production program.

In the standard production, one of the two udst_handleCAENHV.sh scripts is executed by the handle_uDSTproduction script via the udst_handleCAENHV.sh symlink in the bin directory. These scripts process the CAEN HV trip information into a file (typically called trip_list.dat) which is later read by the uDST production program. The choice of the script is based upon the source for the hv trip information; the choices are:

  1. udst_handleCAENHV.sh.viafillfile for using the HV tables in the fillfile, or
  2. udst_handleCAENHV.sh.viahvDfl for using the HV tables in hvDfl.fz files for each run in the fill

No matter which script is chosen, the scripts produce the "hv trip information" file in the following three steps:

Step 1: the hv trip information is extracted from ADAMO tables in either the fillfiles via the scripts or the hvDfl.fz files made by HDC for each run via the readhv code. This information is placed into the "tripsbyfill_wo_CAENcheck.dat" file.
Step 2: the hv_caen.c program is then executed on the "tripsbyfill.dat" file to insert records for when the CAEN system is not properly monitoring for HV trips. The program detects these gaps by looking for periods when there are no CAEN HV updates for more than 20 seconds. The output of this program is to the standard output. The standard scripts pipe this output to the "tripsbyfill_with_CAENcheck.dat" file.
Step 3: the hv_trip_processor.c program is then executed on the "tripsbyfill_with_CAENcheck.dat" file to map the CAEN crate and channel number into HERMES detector names. The mapping file used by this code is expected to be located in the "hvtodets.map" file of the hv_info subdirectory of the production. The output of this step is the final "trip_list.dat" file and contains a list of the all detected trips (including an entry for each period when the CAEN was not monitoring as a trip).