Make DeUTDetector const correct
The following discussion from !2240 (merged) should be addressed:
-
@graven started a discussion: (+1 comment) It is somewhat surprising (and worrying! that in a method which receives a
const DeUTDetector&
as argument that it is possible to modify the state of a sector obtained from thatconst DeUTDetector&
... it indicates that 'const' is not properly propagated, and thus the compiler cannot help to write const-correct code, which is very important in a multi-threaded program.Anyway, for now, in order to make some progress towards this finally getting merged, let's ignore this, but this hack should be revisited at a later date, and replaced by a proper mechanism where
DeUTDetector
figures out by itself, by eg. using the contents of the conditions database whether 'strip flip' should be true or false for its sectors, as obviously the readout tool has some means of figuring that out already...And in order to not forget, it would be good to add a
FIXME
comment to the code:// FIXME: it should not be possible to modify `aSector` at this point, but it is required // to get the correct mapping of channel ids to geometry for older simulations aSector->setstripflip( stripflip );
and to resolve this gitlab comment/thread into a gitlab issue.