Protect AdcChannelData against inadvertant copy of large data blocks
AdcChannelData holds a copies of raw and processed samples, quality flags, (ROI) signal flags and a DFT representation. These vectors typically have length of 6000 for protoDUNE and the current plan is 10800 for DUNE FD. To avoid inadvertent copying of these arrays, the original design deleted the assignment and copy operators. The assignment remains deleted but the copy operator is needed to put the class in a Root dictionary. Copy is also needed at present to build the multiple-channel AdcChannelDataMap used in data processing.
The current (v08_30_01) model has a public default assignment operator. This allows inadvertent copying when user passes data or maps by value instead of reference or when user loops over map elements by value.
#1 Updated by David Adams 7 months ago
- Status changed from New to Work in progress
The copy ctor operator for AdcChannelData is being modified to limit the copy to the event and channel description and exclude the sample-length vectors. Six existing unit tests failed. One was a tool passing by copy instead of reference, three were loops by copy inside of tests and the others (and some of these) needed explicit copy of the raw or samples after use of the copy ctor.