Constituents in MOOD

Table definitions

Two new tables have been added: one to keep interesting information about constituents, the other to keep track of which SBS's refer to any given constituent.

mysql> describe Constituents;
+---------------+------------------+------+-----+---------+----------------+
| Field         | Type             | Null | Key | Default | Extra          |
+---------------+------------------+------+-----+---------+----------------+
| prim_key      | int(10) unsigned |      | PRI | NULL    | auto_increment |
| dir           | varchar(16)      |      |     |         |                |
| pkg           | varchar(32)      |      | MUL |         |                |
| ver           | varchar(32)      |      |     |         |                |
| name          | varchar(255)     |      |     |         |                |
| FSW_id        | int(10) unsigned |      | MUL | 0       |                |
| src_path      | text             |      |     |         |                |
| fmx_db        | varchar(32)      |      |     | none    |                |
| fmx_path      | text             |      |     |         |                |
| schema_id     | smallint(6)      | YES  |     | NULL    |                |
| instance_id   | smallint(6)      | YES  |     | NULL    |                |
| version_id    | smallint(6)      | YES  |     | NULL    |                |
| status        | varchar(32)      |      |     | new     |                |
| creator       | varchar(32)      |      |     |         |                |
| creation_time | datetime         | YES  |     | NULL    |                |
+---------------+------------------+------+-----+---------+----------------+
15 rows in set (0.00 sec)

mysql> describe SBS_to_Constituents;
+-----------------+------------------+------+-----+---------+----------------+
| Field           | Type             | Null | Key | Default | Extra          |
+-----------------+------------------+------+-----+---------+----------------+
| prim_key        | int(10) unsigned |      | PRI | NULL    | auto_increment |
| sbs_fk          | int(10) unsigned |      | MUL | 0       |                |
| Constituents_fk | int(10) unsigned |      | MUL | 0       |                |
| status          | varchar(32)      |      |     | active  |                |
| creation_time   | datetime         | YES  |     | NULL    |                |
| creator         | varchar(32)      |      |     |         |                |
+-----------------+------------------+------+-----+---------+----------------+
6 rows in set (0.00 sec)

Constituents_fk is a foreign key referring to Constituents.prim_key. sbs_fk is a foreign key referring to FSW_inputs.FSW_input_key.

Table contents after invoking MootBuild::registerConstituents

All constituents referenced by the SBS are registered and all get entries in Constituents and SBS_to_Constituents. Only cdm's (and, for now, only cdm's in the packages GFC_DB or XFC_DB) are "translated" to xml.

mysql> select prim_key,name,pkg,ver,schema_id,instance_id,version_id,src_path from Constituents where pkg="XFC_DB" or pkg="GFC_DB";
+----------+------------------------+--------+--------+-----------+-------------+------------+------------------------------------------------------------+
| prim_key | name                   | pkg    | ver    | schema_id | instance_id | version_id | src_path                                                   |
+----------+------------------------+--------+--------+-----------+-------------+------------+------------------------------------------------------------+
|       47 | gamma_normal           | GFC_DB | V2-1-0 |       225 |           0 |          1 | Constit/2008-04/GFC_DB/0000002f-gamma_normal.xml           |
|       48 | gamma_normal_leak      | GFC_DB | V2-1-0 |       225 |           1 |          1 | Constit/2008-04/GFC_DB/00000030-gamma_normal_leak.xml      |
|       49 | gamma_normal_leak_21a  | GFC_DB | V2-1-0 |       225 |           8 |          1 | Constit/2008-04/GFC_DB/00000031-gamma_normal_leak_21a.xml  |
|       50 | gamma_normal_leak_17a  | GFC_DB | V2-1-0 |       225 |           9 |          1 | Constit/2008-04/GFC_DB/00000032-gamma_normal_leak_17a.xml  |
|       51 | gamma_calib            | GFC_DB | V2-1-0 |       225 |           2 |          1 | Constit/2008-04/GFC_DB/00000033-gamma_calib.xml            |
|       52 | gamma_calib_leak       | GFC_DB | V2-1-0 |       225 |           3 |          1 | Constit/2008-04/GFC_DB/00000034-gamma_calib_leak.xml       |
|       53 | gamma_calib_a          | GFC_DB | V2-1-0 |       225 |           4 |          1 | Constit/2008-04/GFC_DB/00000035-gamma_calib_a.xml          |
|       54 | gamma_calib_a_leak     | GFC_DB | V2-1-0 |       225 |           5 |          1 | Constit/2008-04/GFC_DB/00000036-gamma_calib_a_leak.xml     |
|       55 | gamma_eff              | GFC_DB | V2-1-0 |       225 |           6 |          1 | Constit/2008-04/GFC_DB/00000037-gamma_eff.xml              |
|       56 | gamma_eff_taper        | GFC_DB | V2-1-0 |       225 |           7 |          1 | Constit/2008-04/GFC_DB/00000038-gamma_eff_taper.xml        |
|       57 | gamma_master           | GFC_DB | V2-1-0 |       225 |          -1 |          1 | Constit/2008-04/GFC_DB/00000039-gamma_master.xml           |
|       77 | dgn_primitive          | XFC_DB | V3-1-0 |       229 |           0 |          0 | Constit/2008-04/XFC_DB/0000004d-dgn_primitive.xml          |
|       78 | dgn_gem                | XFC_DB | V3-1-0 |       229 |           1 |          0 | Constit/2008-04/XFC_DB/0000004e-dgn_gem.xml                |
|       79 | dgn_gem_500            | XFC_DB | V3-1-0 |       229 |           4 |          0 | Constit/2008-04/XFC_DB/0000004f-dgn_gem_500.xml            |
|       80 | dgn_gem_1000           | XFC_DB | V3-1-0 |       229 |           5 |          0 | Constit/2008-04/XFC_DB/00000050-dgn_gem_1000.xml           |
|       81 | dgn_tkr                | XFC_DB | V3-1-0 |       229 |           2 |          0 | Constit/2008-04/XFC_DB/00000051-dgn_tkr.xml                |
|       82 | dgn_ground_hi          | XFC_DB | V3-1-0 |       229 |           3 |          0 | Constit/2008-04/XFC_DB/00000052-dgn_ground_hi.xml          |
|       83 | dgn_master             | XFC_DB | V3-1-0 |       229 |          -1 |          0 | Constit/2008-04/XFC_DB/00000053-dgn_master.xml             |
|       84 | hip_normal             | XFC_DB | V3-1-0 |       228 |           0 |          0 | Constit/2008-04/XFC_DB/00000054-hip_normal.xml             |
|       85 | hip_leo                | XFC_DB | V3-1-0 |       228 |           1 |          0 | Constit/2008-04/XFC_DB/00000055-hip_leo.xml                |
|       86 | hip_eff                | XFC_DB | V3-1-0 |       228 |           2 |          0 | Constit/2008-04/XFC_DB/00000056-hip_eff.xml                |
|       87 | hip_eff_taper          | XFC_DB | V3-1-0 |       228 |           3 |          0 | Constit/2008-04/XFC_DB/00000057-hip_eff_taper.xml          |
|       88 | hip_master             | XFC_DB | V3-1-0 |       228 |          -1 |          0 | Constit/2008-04/XFC_DB/00000058-hip_master.xml             |
|       89 | mip_off_axis           | XFC_DB | V3-1-0 |       227 |           0 |          0 | Constit/2008-04/XFC_DB/00000059-mip_off_axis.xml           |
|       90 | mip_eff_off_axis       | XFC_DB | V3-1-0 |       227 |           1 |          0 | Constit/2008-04/XFC_DB/0000005a-mip_eff_off_axis.xml       |
|       91 | mip_eff_taper_off_axis | XFC_DB | V3-1-0 |       227 |           2 |          0 | Constit/2008-04/XFC_DB/0000005b-mip_eff_taper_off_axis.xml |
|       92 | mip_all_axis           | XFC_DB | V3-1-0 |       227 |           3 |          0 | Constit/2008-04/XFC_DB/0000005c-mip_all_axis.xml           |
|       93 | mip_master             | XFC_DB | V3-1-0 |       227 |          -1 |          0 | Constit/2008-04/XFC_DB/0000005d-mip_master.xml             |
+----------+------------------------+--------+--------+-----------+-------------+------------+------------------------------------------------------------+
28 rows in set (0.00 sec)

fmx_path

mysql> select name,src_path,fmx_path from Constituents where prim_key > 85 and prim_key < 90;
+---------------+---------------------------------------------------+---------------------------------------------------------------+
| name          | src_path                                          | fmx_path                                                      |
+---------------+---------------------------------------------------+---------------------------------------------------------------+
| hip_eff       | Constit/2008-04/XFC_DB/00000056-hip_eff.xml       | cdm/XFC_DB/V3-1-0/linux-gcc/hip_eff/libhip_eff.so             |
| hip_eff_taper | Constit/2008-04/XFC_DB/00000057-hip_eff_taper.xml | cdm/XFC_DB/V3-1-0/linux-gcc/hip_eff_taper/libhip_eff_taper.so |
| hip_master    | Constit/2008-04/XFC_DB/00000058-hip_master.xml    | cdm/XFC_DB/V3-1-0/linux-gcc/hip_master/libhip_master.so       |
| mip_off_axis  | Constit/2008-04/XFC_DB/00000059-mip_off_axis.xml  | cdm/XFC_DB/V3-1-0/linux-gcc/mip_off_axis/libmip_off_axis.so   |
+---------------+---------------------------------------------------+---------------------------------------------------------------+
4 rows in set (0.00 sec)

Files

Files are generated and archived (in

Typical filter config file

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<FSW>

  <FMX>
    <FMX_FILE>/afs/slac/g/glast/fmx/cdm/GFC_DB/V2-1-0/linux-gcc/gamma_normal/libgamma_normal.so</FMX_FILE>
    <FMX_KEY>0xffffffff</FMX_KEY>
    <FMX_SCHEMA>0x00e1</FMX_SCHEMA>
    <FMX_VERSION>1</FMX_VERSION>
    <FMX_INSTANCE>0</FMX_INSTANCE>
  </FMX>

  <GFC_DB_schema>
    <EFC_Sampler>
      <Enabled>0x7b3f4400</Enabled>
      <Prescalers>
        <Prescale line="0">0</Prescale>
        <Prescale line="1">0</Prescale>
        <Prescale line="2">0</Prescale>
        <Prescale line="3">0</Prescale>
        <Prescale line="4">0</Prescale>
        <Prescale line="5">0</Prescale>
        <Prescale line="6">0</Prescale>
        <Prescale line="7">0</Prescale>
        <Prescale line="8">0</Prescale>
        <Prescale line="9">0</Prescale>
        <Prescale line="10">0</Prescale>
        <Prescale line="11">0</Prescale>
        <Prescale line="12">0</Prescale>
        <Prescale line="13">0</Prescale>
        <Prescale line="14">0</Prescale>
        <Prescale line="15">0</Prescale>
        <Prescale line="16">0</Prescale>
        <Prescale line="17">0</Prescale>
        <Prescale line="18">0</Prescale>
        <Prescale line="19">0</Prescale>
        <Prescale line="20">0</Prescale>
        <Prescale line="21">0</Prescale>
        <Prescale line="22">0</Prescale>
        <Prescale line="23">0</Prescale>
        <Prescale line="24">0</Prescale>
        <Prescale line="25">0</Prescale>
        <Prescale line="26">0</Prescale>
        <Prescale line="27">0</Prescale>
        <Prescale line="28">0</Prescale>
        <Prescale line="29">0</Prescale>
        <Prescale line="30">0</Prescale>
        <Prescale line="31">0</Prescale>
        <Input_Prescale>0</Input_Prescale>
        <Output_Prescale>0</Output_Prescale>
      </Prescalers>
    </EFC_Sampler>
    <GFC_Params>
      <GFC_ACD>
        <TopSide_Energy_Max>10</TopSide_Energy_Max>
        <TopSideFilter_Energy_Max>350</TopSideFilter_Energy_Max>
        <Splash_Energy_Max>40000</Splash_Energy_Max>
        <Splash_Count>4</Splash_Count>
        <Splash_Map>0x0</Splash_Map>
      </GFC_ACD>
      <GFC_ATF>
        <Energy_Max>5000</Energy_Max>
        <Shadowed_Map>0x0</Shadowed_Map>
      </GFC_ATF>
      <GFC_ZBottom>
        <Energy_Min>100</Energy_Min>
      </GFC_ZBottom>
      <GFC_CAL>
        <Energy_Pass>20000</Energy_Pass>
        <Energy_Min>0</Energy_Min>
        <Energy_Max>300</Energy_Max>
        <Layer0_Ratio_Low>10</Layer0_Ratio_Low>
        <Layer0_Ratio_High>900</Layer0_Ratio_High>
      </GFC_CAL>
      <GFC_TKR>
        <Row2_Energy_Max>30000</Row2_Energy_Max>
        <Row1_Energy_Max>10000</Row1_Energy_Max>
        <Top_Energy_Max>30000</Top_Energy_Max>
        <Zero_Track_Energy_Min>250</Zero_Track_Energy_Min>
        <Two_Track_Energy_Max>5</Two_Track_Energy_Max>
        <Skirt_Energy_Max>20</Skirt_Energy_Max>
      </GFC_TKR>
    </GFC_Params>
  </GFC_DB_schema>

</FSW>

Typical master file

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<FSW>

  <FMX>
    <FMX_FILE>/afs/slac/g/glast/fmx/cdm/GFC_DB/V2-1-0/linux-gcc/gamma_master/libgamma_master.so</FMX_FILE>
    <FMX_KEY>0xffffffff</FMX_KEY>
    <FMX_SCHEMA>0x00e1</FMX_SCHEMA>
    <FMX_VERSION>1</FMX_VERSION>
    <FMX_INSTANCE>-1</FMX_INSTANCE>
  </FMX>

  <EFC_DB_SchemaFilter>
    <FilterSchemaId>0x00e1</FilterSchemaId>
    <Instances>
      <InstanceId>0</InstanceId>
      <InstanceId>1</InstanceId>
      <InstanceId>8</InstanceId>
      <InstanceId>9</InstanceId>
      <InstanceId>2</InstanceId>
      <InstanceId>3</InstanceId>
      <InstanceId>4</InstanceId>
      <InstanceId>5</InstanceId>
      <InstanceId>6</InstanceId>
      <InstanceId>7</InstanceId>
    </Instances>
    <Mode2cfg>
      <Mode modeNum="0">1</Mode>
      <Mode modeNum="1">1</Mode>
      <Mode modeNum="2">1</Mode>
      <Mode modeNum="3">1</Mode>
      <Mode modeNum="4">1</Mode>
      <Mode modeNum="5">1</Mode>
      <Mode modeNum="6">1</Mode>
      <Mode modeNum="7">1</Mode>
    </Mode2cfg>
    <EFC_DB_SchemaRsd>
      <Nbytes>-1</Nbytes>
    </EFC_DB_SchemaRsd>
  </EFC_DB_SchemaFilter>

</FSW>

Initial draft: 9 April 2008
Last revised:
J. Bogart jumping