Updating the Database  /MUON_DB

  1. Make new configuration text file      OLD FILES AND MU_MASK DMON
    1. for a new cable configuration and alignment file, you can simply edit an old configuration file by hand. Old cable configuration files are found in /afs/desy.de/group/hera-b/MUON/db. Old alignment files are found in /hb/muon/Mu_Alignment.
    2. for a hot channel mask file,
      1. run mu_mask over the file(s) you want the new mask for.
      2. edit the created text mask file, Mu.mask_run*, by hand using the diagnostic plots created with the text file.
  2. Saving the new configuration text file to the database      ARTE-03-06 AND MUDBFILLHOT
    1. Currently you need to do this in ARTE-03-06 or a later version for the configuration or alignment file. You can use this method for the masking as well. To fill the database, you need to have the environmental variables, HBNAMEROOT and HBDATAROOT, unset.
      1. Copy /hb/muon/user/boris/DB/DB2/uskuip.cdf to your ARTE directory. This will allow you to call the database filling routine, mudbfill.
      2. In the ARTE kumac, set the MUON ARTE enviromental variables to the fill you want to put in the database:
        setenv MUON_ALIGN {filename}
        setenv MUON_CONFIG {filename}
        setenv MUON_BADFILE {filename}

        Only set the variable for the file you want to put in the database! Leave the others unset!
      3. Start ARTE.
      4. From the command line, type 'mudbfill {run number}' where {run number} is the run number of the file. Now the file is in the database. Our database tables are organized to coorespond to the actual run number of the data sample.
      5. Exit ARTE.
    2. I now have created a program, mudbfillhot, to update the masking table outside of ARTE. To use it, use a Linux_intel, go to /hb/muon2/user/buchler/dbfill, and type
      mudbfillhot {run number} {filename}

      That's it. You've filled the database.
  3. Let us know what you did      DB_CONTENTS
  4. Updating the keytables      TABLEX AND KEYTOOL
    1. Even though the file is now the database, the online version of ARTE will not read it yet. It reads the configuration by the keytable which is another table in the database. If you don't want ARTE online to use the inputed file, then you're done.
    2. To update the keytables,
      1. Go to /afs/desy.de/group/hera-b/DATABASE/devdev/Linux_intel/bin.
      2. Type 'keytool /key_table keytable list' to see the run numbers the keytable is looking at. The name of our database is /MUON_DB and the tables we have are called
        MuonAlignment,
        MuonConfig, and
        MuonHots.
      3. To update the keytable, type: 'tablex /MUON_DB distribute {table name} 0 {run number} 0' where {table name} is MuonAlignment, MuonConfig, or MuonHots and {run number} is the run number.
      4. Use the 'keytool' command from step 2 to confirm you file is being used by the keytable, and you're done!
  5. Looking at the database      DBEDIT
    1. You can look through the database if you want. Here's how to do it.
    2. Run /afs/desy.de/group/hera-b/DATABASE/devdev/Linux_intel/bin/dbedit. This calls up a GUI.
    3. Click on "Files", then "Servers", then "/MUON_DB".
    4. Now click on "Files", then "Tables/Databases", then "MuonConfig". This shows you the cable configuration.
    5. Clicking on "MuonHots" instead of "MuonConfig" shows you the mask file. Note, the mask is stored as a 16-bit number, where 0 means the channel is masked.
    6. Clicking on "MuonAlignment" or the other tables "MuonNede" and "MuonNesl" shows what may appear to be nonsense, but that is only because dbedit cannot show the complex relation between the items in these databases.
    7. By the way, "MuonNede" and "MuonNesl" are tables containing the default alignment of the Muon system. They should only be changed by Boris.

Mark Buchler
Last modified: Thu May 18 15:30:56 MET DST 2000