Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions inc/TRestDetectorSignal.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,18 @@ class TRestDetectorSignal {

ClassDef(TRestDetectorSignal, 4);
};

// Schema evolution: fSignalTime and fSignalCharge changed from vector<Float_t> to
// vector<Double_t> in ClassDef v4 (PR#109, March 2024). Files written with ClassDef
// version <= 3 store the float layout; these rules tell ROOT how to convert on read.
// Note: the rules can only fire when the input file contains the StreamerInfo of the
// on-disk version of this class. See rest-for-physics/detectorlib#125.
#pragma read sourceClass = "TRestDetectorSignal" version = "[-3]" source = \
"std::vector<Float_t> fSignalTime" targetClass = "TRestDetectorSignal" target = "fSignalTime" code = \
"{ fSignalTime.assign(onfile.fSignalTime.begin(), onfile.fSignalTime.end()); }"

#pragma read sourceClass = "TRestDetectorSignal" version = "[-3]" source = \
"std::vector<Float_t> fSignalCharge" targetClass = "TRestDetectorSignal" target = "fSignalCharge" code = \
"{ fSignalCharge.assign(onfile.fSignalCharge.begin(), onfile.fSignalCharge.end()); }"

#endif
Loading