Repository navigation
Extract BES waveform and save it in the ANNIEEvent BoostStore - #397
Conversation
…ders - Save BES raw waveform (crate 1, slot 3, ch 1) for runs >= 5870, controlled by saveBESRaw (default true). - Skip a record header that is split across two frames instead of reading past the end of the frame (that waveform is lost). - Fix channel comments and add a TODO: BRF channel for runs 5870-5914 is not handled yet.
- Get BESRawWaveforms from the CStore (saveBESWaveforms, default true), and apply VME offset correction like RWM/BRF. - Remove unused FinishedRWMWaveforms/FinishedBRFWaveforms and RWMEmplacedTimes/BRFEmplacedTimes.
…gInfo - Save BES raw waveform per event (BESRawWaveform), controlled by saveRawBESWaveform (default true); empty vector if not found. - Set DataStreams Tank/MRD/LAPPD only when the data was actually saved. - Save empty RWM/BRF/BES waveforms in BuildEmptyPMTData() so every event has these keys. - Store ConfigInfo (commit and config) in the ANNIEEvent header.
|
I am good to sign off on this - great to see that we have the BES stored now, thanks! I attached the Claude review (nothing it flagged should prevent merging, but just some things to check) |
- Add crate 1, slot 3, channels 1-4 (BES and three spares) to AuxChannels.csv, so they are mapped Aux channels. - This stops the per-event "Cannot find channel key" messages for these channels in runs >= 5870. - Restore v_error for unmapped channels in PhaseIIADCCalibrator, so a real missing channel mapping is reported again. - Lower verbose in FitRWMWaveformConfig.
- Clear RWM/BRF/BES before Get - Skip empty waveforms when writing histograms
Thanks @S81D for the comments. I went through the document, and there were some really good points. Minor items that don’t affect the data are kept for a later cleanup PR. I’ve added 3 commits for the rest (also listed in the PR description):
|
|
Nice! thanks for doing this |
|
Fixed the two points mentioned above. |
|
The docdb slides you attached on going over claude's findings are really good, thanks Anuj.
Is that a public list? I suppose we could use github issues, but i'm not sure that's the best place tbh. I guess (1) in steven's review of this PR is considered "doesn't affect us" because we're using EBSaver which deletes those waveforms, but if we have a code path with a known catastrophic memory leak like this, we shouldn't lose track of that. In fact generally the CStore is never saved to file, so there's really no point in ever having The channel mapping not being consistent, but also not having a path in code to alter it based on run number, is really quite bad. At minimum we could add config variables to override things, but i think it would be better to alter our channel mapping files to centrally keep track of this and automatically pick the right one based on run number. Otherwise it's just going to cause headaches. (also as per claude's magic numbers remark, these shouldn't be hard-coded). Claude's first two Minor checklist items are worth implementing. |
I think best way is go forward as you suggested "Make a list of known issues, upload in docdb and also inform in the collaboration". I will try to write up a note on the known issues in the near future and share with all. |
These are majorly cout/cerr statements, updating READMEs, etc. which will be taken care by me sooner. I will include this in my "Known Issues" list. |
|
Please also add it to the issues list |
Agreed. EB is only safe today because EBSaver deletes those waveforms, which isn't a good reason to leave the leak in place. I will add it to the known-issues list so it doesn't get lost. |
Thanks Steven. I will do that. |
Yeah, It was giving me headaches too. I think I will create two .csv files, run dependent and then load these files accordingly (in right order) in LoadGeometry. But we should be good for now. |
|
Sorry, closed by mistake. ); |
Agreed, both are on the known-issues list.
|
Describe your changes
This PR is submitted by me on behalf of Amala (BES changes) + me (other minor fixes).
Adds the Beam Extraction Signal (BES) raw waveform to event building, in the same way as the existing RWM and BRF waveforms, and saves it per event in the ANNIEEvent as
BESRawWaveform.Changes:
PMTDataDecoder
EBPMT
EBSaver
FitRWMWaveform
PhaseIIADCCalibrator
AuxChannels.csv, so PhaseIIADCCalibrator skips it (log level of that message lowered to debug) in EventBuilding off mode.Notes:
Additional fixes after review comments
Update AuxChannels.csv: add BES and spare slot-3 channels
Update FitRWMWaveform
Update ProcessedLAPPDFilter: copy BESRawWaveform to filtered output
Checklist before submitting your PR
newusage, there is a reason the data must be on the heapnewthere is adelete, unless I explicitly know why (e.g. ROOT or a BoostStore takes ownership)Additional Material
Attach any validation or demonstration files here. You may also link to relavant docdb articles.