Skip to content

Commit

Permalink
Version checks for SIOTrackHandler.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
madbaron authored May 28, 2024
1 parent ce8d1fd commit 35155c1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/cpp/src/SIO/SIOTrackHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace SIO {
SIO_DATA( device , &(trk->_ndf) , 1 ) ;
SIO_DATA( device , &(trk->_dEdx) , 1 ) ;
SIO_DATA( device , &(trk->_dEdxError) , 1 ) ;
if (vers >= SIO_VERSION_ENCODE(2, 21) {
if (vers >= SIO_VERSION_ENCODE(2, 21)) {
SIO_DATA( device , &(trk->_nholes) , 1 ) ;
}
SIO_DATA( device , &( trk->_radiusOfInnermostHit ) , 1 ) ;
Expand All @@ -60,11 +60,13 @@ namespace SIO {
for( int i=0 ; i<nHitNumbers ; i++ ) {
SIO_DATA( device , &(trk->_subdetectorHitNumbers[i] ), 1 ) ;
}
int nHoleNumbers ;
SIO_DATA( device, &nHoleNumbers , 1 ) ;
trk->subdetectorHoleNumbers().resize( nHoleNumbers ) ;
for( int i=0 ; i<nHoleNumbers ; i++ ) {
SIO_DATA( device , &(trk->_subdetectorHoleNumbers[i] ), 1 ) ;
if (vers >= SIO_VERSION_ENCODE(2, 21)) {
int nHoleNumbers ;
SIO_DATA( device, &nHoleNumbers , 1 ) ;
trk->subdetectorHoleNumbers().resize( nHoleNumbers ) ;
for( int i=0 ; i<nHoleNumbers ; i++ ) {
SIO_DATA( device , &(trk->_subdetectorHoleNumbers[i] ), 1 ) ;
}
}
int nTracks ;
SIO_DATA( device, &nTracks , 1 ) ;
Expand Down

0 comments on commit 35155c1

Please sign in to comment.