Introduction of TRestDBEntryLogger:
This metadata can be put ahead of all others metadata sections in TRestRun section. During initialization, it will ask the user to fill a txt file which contains several lines of run/detector information.
<TRestRun>
...
<TRestPSQLEntryLogger name="DBinfo" skipIfNotEmpty="false" EditWith="vim"/>
</TRestRun>
The txt file is like:
-- updating run in database, id: 6907, version: 2.2.17. Delete this line to cancel.
type: HW_DEBUG
tag:
description: hahaha test
mms_tag: Prototype_7MM
mms_idlist: {0,2,3,4,6,8,9}
mms_active: {f,f,f,t,f,f,f}
mms_hv_mesh: {0,0,0,-300,0,0,0}
mms_hv_internalrim: {0,0,0,0,0,0,0}
mms_hv_externalrim: {0,0,0,0,0,0,0}
mms_aget_boardid: {2,1,2,1,0,3,0}
mms_aget_chipid: {3,12,12,3,12,6,3}
mms_aget_dynamicrange: {0,0,0,120,120,120,120}
daq_threshold: 2-0
daq_samplingrate: 5
daq_triggerdelay: 150
daq_shappingtime:
gas_material:
gas_pressure:
gas_temperature:
gas_flowrate:
gas_driftvoltage: -10
gas_elifetime:
elog:
Here each line represents a column’s name and value in database of the current run. After closing the file, TRestDBEntryLogger will write the above information into the database by calling TRestDataBase::add_metadata().
TRestDBEntryLogger itself can be saved in output root file, keeping the above name-value pairs accessible as metadata