Feature #1183
openTask #1168: Generalize Detector Decode methods
Task #1186: Update Detector classes
Move detector map initialization to THaDetectorBase
Description
Implement a virtual ReadDetectorMap method that can be used by all detectors and which can handle both v1 and v2 detector map formats.
Updated by Ole Hansen about 8 hours ago
- Status changed from New to Resolved
- Start date set to 03/22/2026
- % Done changed from 0 to 100
Implemented as virtual Int_t THaDetectorBase::ReadDetMap( FILE* file, TDatime& date, UInt_t flags = 0 ); Searches first for optional key "detector_map" followed by a string (v2 format). If not found, searches for required key "detmap" followed by the usual n-tuples of integers, where n is depends on the given flags (v1 format). The flags are ignored if the detector map has v2 format. If both v1 and v2 keys are present, the v1 definition is ignored (for efficiency).
Updated by Ole Hansen about 8 hours ago
This feature also comes with unit test in DetMap_t that uses a mock detector test fixture, Podd::Tests::DetMapFromDB and associated database files db_DM1.dat and db_DM2.dat.