JeffersonLab / NPSlib

hcana classes for the Hall C NPS experiments
0 stars 24 forks source link

Add new NPS config event handler for event 137 #23

Closed sanghwapark closed 10 months ago

sanghwapark commented 10 months ago

This adds a new config event handler class for event type 137, THcNPSConfigEvtHandler. Mainly the class does:

I ended up repeating basically DAQconfig::parse in Analyze function here since initially VTP part of the strings were not parsed properly (I suspect this might be due to some blank lines between FADC config and VTP part). The data are all kept as a single string variable instead of converting them into numeric variables. This makes it easier if one wants to print out parameter with array values.

I will update the replay script and report file template accordingly after merging this PR.

sanghwapark commented 10 months ago

Just for the future reference: In principle, this class doesn't have to be used. Instead one can simply get the information, for example, by adding lines like below in the reply script (after analyzer->Process(run)): gHaRun->GetDAQInfo("FADC250_SPARSIFICATION") And then, the parameters can be added to the report file using THcParmList::AddString or Define method.

Note that, the VTP parameters still need to be parsed from strings after calling gHaRun->GetDAQConfig.