fix Hit.h for Mac

This commit is contained in:
Ryan@MBA2024 2024-07-04 18:30:21 -04:00
parent 2e287f4496
commit 3a79c40b32
3 changed files with 17 additions and 4 deletions

View File

@ -11,7 +11,19 @@
"cStandard": "c17", "cStandard": "c17",
"cppStandard": "gnu++17", "cppStandard": "gnu++17",
"intelliSenseMode": "linux-gcc-x64" "intelliSenseMode": "linux-gcc-x64"
},
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "linux-gcc-x64"
} }
], ],
"version": 4 "version": 4
} }

View File

@ -1,5 +1,6 @@
CC=g++ CC=g++
CFLAG= -g # CFLAG= -g
CFLAG= -O2
ROOTFLAG=`root-config --cflags --glibs` ROOTFLAG=`root-config --cflags --glibs`
all: EventBuilder all: EventBuilder

6
Hit.h
View File

@ -153,7 +153,7 @@ class Hit {
} }
void PrintEnergyTimeStamp(){ void PrintEnergyTimeStamp(){
printf("ch: %2d, energy: %u, timestamp: %lu ch, traceLenght: %lu\n", channel, energy, timestamp, traceLenght); printf("ch: %2d, energy: %u, timestamp: %llu ch, traceLenght: %lu\n", channel, energy, timestamp, traceLenght);
} }
std::string AnaProbeType(uint8_t probeType){ std::string AnaProbeType(uint8_t probeType){
@ -248,8 +248,8 @@ class Hit {
} }
printf("ch : %2d (0x%02X), fail: %d, flush: %d\n", channel, channel, board_fail, flush); printf("ch : %2d (0x%02X), fail: %d, flush: %d\n", channel, channel, board_fail, flush);
if( DPPType == DPPType::PHA ) printf("energy: %u, timestamp: %lu, fine_timestamp: %u \n", energy, timestamp, fine_timestamp); if( DPPType == DPPType::PHA ) printf("energy: %u, timestamp: %llu, fine_timestamp: %u \n", energy, timestamp, fine_timestamp);
if( DPPType == DPPType::PSD ) printf("energy: %u, energy_S : %u, timestamp: %lu, fine_timestamp: %u \n", energy, energy_short, timestamp, fine_timestamp); if( DPPType == DPPType::PSD ) printf("energy: %u, energy_S : %u, timestamp: %llu, fine_timestamp: %u \n", energy, energy_short, timestamp, fine_timestamp);
printf("flag (high): 0x%02X, (low): 0x%03X, traceLength: %lu\n", flags_high_priority, flags_low_priority, traceLenght); printf("flag (high): 0x%02X, (low): 0x%03X, traceLength: %lu\n", flags_high_priority, flags_low_priority, traceLenght);
printf("Agg counter : %u, trigger Thr.: %u, downSampling: %u \n", aggCounter, trigger_threashold, downSampling); printf("Agg counter : %u, trigger Thr.: %u, downSampling: %u \n", aggCounter, trigger_threashold, downSampling);
printf("AnaProbe Type: %s(%u), %s(%u)\n", AnaProbeType(analog_probes_type[0]).c_str(), analog_probes_type[0], printf("AnaProbe Type: %s(%u), %s(%u)\n", AnaProbeType(analog_probes_type[0]).c_str(), analog_probes_type[0],