From 3a79c40b32f023a336d1ee7c596c3ee027bbcf00 Mon Sep 17 00:00:00 2001 From: "Ryan@MBA2024" Date: Thu, 4 Jul 2024 18:30:21 -0400 Subject: [PATCH] fix Hit.h for Mac --- .vscode/c_cpp_properties.json | 12 ++++++++++++ Aux/Makefile | 3 ++- Hit.h | 6 +++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 7112b59..9a0ea06 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -11,7 +11,19 @@ "cStandard": "c17", "cppStandard": "gnu++17", "intelliSenseMode": "linux-gcc-x64" + }, + { + "name": "Mac", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": [], + "compilerPath": "/usr/bin/gcc", + "cStandard": "c17", + "cppStandard": "gnu++17", + "intelliSenseMode": "linux-gcc-x64" } + ], "version": 4 } \ No newline at end of file diff --git a/Aux/Makefile b/Aux/Makefile index 125976e..ae33766 100644 --- a/Aux/Makefile +++ b/Aux/Makefile @@ -1,5 +1,6 @@ CC=g++ -CFLAG= -g +# CFLAG= -g +CFLAG= -O2 ROOTFLAG=`root-config --cflags --glibs` all: EventBuilder diff --git a/Hit.h b/Hit.h index 0905e8f..854979f 100644 --- a/Hit.h +++ b/Hit.h @@ -153,7 +153,7 @@ class Hit { } 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){ @@ -248,8 +248,8 @@ class Hit { } 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::PSD ) printf("energy: %u, energy_S : %u, timestamp: %lu, fine_timestamp: %u \n", energy, energy_short, 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: %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("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],