change enum::DataFormat::RAW to Raw, coz stupid apple use RAW as a global varible

This commit is contained in:
Ryan Tang 2023-10-13 12:48:31 -04:00
parent b41c1d1462
commit 12f44e0f74
2 changed files with 10 additions and 10 deletions

View File

@ -10,11 +10,11 @@
enum DataFormat{
ALL = 0,
OneTrace = 1,
NoTrace = 2,
Minimum = 3,
RAW = 0x0A,
ALL = 0x00,
OneTrace = 0x01,
NoTrace = 0x02,
Minimum = 0x03,
Raw = 0x0A,
};
@ -120,7 +120,7 @@ class Hit {
DPPType = dppType;
ClearMemory();
if( dataType == DataFormat::RAW){
if( dataType == DataFormat::Raw){
data = new uint8_t[20*1024*1024];
}else{
analog_probes[0] = new int32_t[MaxTraceLenght];
@ -241,7 +241,7 @@ class Hit {
case DataFormat::OneTrace : printf("============= Type : OneTrace\n"); break;
case DataFormat::NoTrace : printf("============= Type : NoTrace\n"); break;
case DataFormat::Minimum : printf("============= Type : Minimum\n"); break;
case DataFormat::RAW : printf("============= Type : RAW\n"); return; break;
case DataFormat::Raw : printf("============= Type : Raw\n"); return; break;
default : return;
}

View File

@ -118,8 +118,8 @@ inline int SolReader::ReadNextBlock(int isSkip){
return -2 ;
}
if( ( blockStartIdentifier & 0xF ) == DataFormat::RAW ){
hit->SetDataType(DataFormat::RAW, ((blockStartIdentifier >> 1) & 0xF) == 0 ? DPPType::PHA : DPPType::PSD);
if( ( blockStartIdentifier & 0xF ) == DataFormat::Raw ){
hit->SetDataType(DataFormat::Raw, ((blockStartIdentifier >> 1) & 0xF) == 0 ? DPPType::PHA : DPPType::PSD);
}
hit->dataType = blockStartIdentifier & 0xF;
hit->DPPType = ((blockStartIdentifier >> 4) & 0xF) == 0 ? DPPType::PHA : DPPType::PSD;
@ -195,7 +195,7 @@ inline int SolReader::ReadNextBlock(int isSkip){
}else{
fseek(inFile, hit->DPPType == DPPType::PHA ? 9 : 11, SEEK_CUR);
}
}else if( hit->dataType == DataFormat::RAW){
}else if( hit->dataType == DataFormat::Raw){
fread(&hit->dataSize, 8, 1, inFile);
if( isSkip == 0){
fread(hit->data, hit->dataSize, 1, inFile);