Skip to content
Snippets Groups Projects
Commit d14c0186 authored by Scott Snyder's avatar Scott Snyder Committed by scott snyder
Browse files

TrigT1CaloByteStream: Fix const problems.

DataVector has had a long-standing bug in which it was possible to
get a non-const pointer from a const_iterator.  This package was relying
on that bug to compile.  Rework so that it handles const properly.

Classes in this package are used for both packing to bytestream and unpacking
from bytestream.  To do this, they use they use temporary maps stored
in data members with types like std::map<int, LVL1::CpmHits*>.
For the case of unpacking from bytestream, this is ok; however, for the
case of packing to bytestream, the pointers being entered into the
map should actually be const.

Reworked in this manner.  Bytestream packing is largely the same, with
the maps changed to be const.  For bytestream unpacking, we create
non-const maps as local variables and pass them around as needed.

Eventually, it would be nice to get rid of the member variables used for
packing as well.



Former-commit-id: 5e8c5163
parent 10a8c533
No related branches found
No related tags found
Loading
Showing
with 1029 additions and 591 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment