fix bugs on BinReader.h
This commit is contained in:
parent
800fb4e55d
commit
8ce3b4f274
12
BinReader.h
12
BinReader.h
|
@ -45,9 +45,9 @@ struct Data{
|
|||
printf("header : 0x%X \n", Header);
|
||||
printf(" Board : %u , Channel : %u\n", BoardID, Channel);
|
||||
if( Header & 4 ) {
|
||||
printf("Energy : %5u, Energy2 : %5u, TimeStamp : %16llu ps\n", Energy, Energy_short, TimeStamp);
|
||||
printf("Energy : %5u, Energy2 : %5u, TimeStamp : %16lu ps\n", Energy, Energy_short, TimeStamp);
|
||||
}else{
|
||||
printf("Energy : %5u, TimeStamp : %16llu ps\n", Energy, TimeStamp);
|
||||
printf("Energy : %5u, TimeStamp : %16lu ps\n", Energy, TimeStamp);
|
||||
}
|
||||
printf(" Flag : 0x%08X\n", Flags);
|
||||
if( (Header & 0x8 ) >= 1 ){ /// is waevform exist
|
||||
|
@ -282,14 +282,14 @@ int BinReader::ReadBlock(int skipTrace){
|
|||
FillData(&data.TimeStamp);
|
||||
if( timeOffset != 0 ) data.TimeStamp += timeOffset;
|
||||
|
||||
if( (data.Header & 0x3) != 0 ) FillData(&data.Energy);
|
||||
if( (data.Header & 0x3) ) FillData(&data.Energy);
|
||||
|
||||
if( (data.Header & 0x2) == 1 ) {
|
||||
if( (data.Header & 0x2) ) {
|
||||
uint64_t dummy = 0;
|
||||
FillData(&dummy);
|
||||
}
|
||||
|
||||
if( (data.Header & 0x4 ) != 0 ) FillData(&data.Energy_short);
|
||||
if( (data.Header & 0x4 ) ) FillData(&data.Energy_short);
|
||||
|
||||
FillData(&data.Flags);
|
||||
|
||||
|
@ -299,7 +299,7 @@ int BinReader::ReadBlock(int skipTrace){
|
|||
}
|
||||
|
||||
/// check is wave form exist
|
||||
if( (data.Header & 0x8) == 1){
|
||||
if( (data.Header & 0x8) ){
|
||||
FillData(&data.WaveformCode);
|
||||
FillData(&data.NSample);
|
||||
if( skipTrace == 0 ){
|
||||
|
|
Loading…
Reference in New Issue
Block a user