Task #23243

Protect AdcChannelData against inadvertant copy of large data blocks

Added by David Adams about 1 year ago. Updated 11 months ago.

Start date:
Due date:
% Done:


Estimated time:


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 about 1 year 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.

#2 Updated by David Adams about 1 year ago

The above change id committed to dunetpc. All unit tests pass but our coverage certainly could miss something. Christoph and Tingjun, please let me know if the build tests for any others turn up any problems.

#3 Updated by Christoph Alt about 1 year ago

Everything looks fine from the CI test side.


#4 Updated by David Adams about 1 year ago

Thanks for checking. Do these include dual-phase processing?

#5 Updated by Christoph Alt about 1 year ago

It includes a protoDUNE dual phase CI test that runs gen, g4, detsim and reco, but no real data processing if that's what you mean.

#6 Updated by David Adams 11 months ago

  • Status changed from Work in progress to Closed

Also available in: Atom PDF