Database Access

Under:

How to access database:

  • Instantiate StFgtDbMaker ->  StFgtDbMaker *myStFgtDbMaker=new StFgtDbMaker();
  • Then get tables ->  StFgtDb * fgtTables = myStFgtDbMaker->getDbTables();
  • Now you can go get whatever geometry stuff you might need from StFgtDb.  For example:
    • fgtTables->getPhysicalCoordinateFromGeoId(geoId, &disc, &quad, &layer, &ordinate, &lower, &upper);
    • fgtTables->getGeoIdfromElecCoord(rdo, arm, apv, ch);

Electronic ID Formula:

    if ( apv > 11 ) apv = apv - 2;

    ElectId = channel + 128 * ( apv + 20 * (arm + 6 * ( rdo - 1) ) );

 

General Database Info (from Dmitry)

1. For real .daq files processing, timestamp is taken from event - it cannot be set by user. For example, if event timestamp is XYZ, then db maker will get db entries with time validity spanning from [XYZ - some_time_1] to [XYZ + some_time_2] where some_time1 is the beginTime of the db entry received, and some_time_2 is the beginTime of the next db entry with beginTime > XYZ.

2. DBV option (in chain) only freezes validity range, which means "do not consider calibrations uploaded later than DBVXXYYZZ". This allows to reproduce any past conditions. So, if you set DBV to today's date, you will get latest calibration dataset. If you set it to some past date (e.g. 2010-01-01) then you will get only those datasets which were uploaded before 2010-01-01. So, tables are read using both beginTime and entryTime..