From 0850f9a5e56476eb9515b2aaec560f6a5519785d Mon Sep 17 00:00:00 2001 From: Gordon McCann Date: Thu, 19 May 2022 14:32:58 -0400 Subject: [PATCH 01/13] Preparing for changes with new CoMPASS version. Binary data format has changed, with headers now included to indicate exsitance of optional data members (i.e. short energy, cal energy, waves). Tested with small data from CoMPASS 2.01.0 --- src/evb/CompassFile.cpp | 132 ++++++++++++++++++++++++---------------- src/evb/CompassFile.h | 38 ++++++++---- src/evb/CompassHit.h | 22 ++++--- src/evb/CompassRun.cpp | 8 +-- src/evb/EVBApp.cpp | 10 +-- src/evb/SFPPlotter.cpp | 6 +- src/evb/SlowSort.cpp | 4 +- 7 files changed, 132 insertions(+), 88 deletions(-) diff --git a/src/evb/CompassFile.cpp b/src/evb/CompassFile.cpp index 5012da3..4b4bbfd 100644 --- a/src/evb/CompassFile.cpp +++ b/src/evb/CompassFile.cpp @@ -14,26 +14,22 @@ namespace EventBuilder { CompassFile::CompassFile() : - m_filename(""), bufferIter(nullptr), bufferEnd(nullptr), m_smap(nullptr), hitUsedFlag(true), m_file(std::make_shared()), eofFlag(false) + m_filename(""), m_bufferIter(nullptr), m_bufferEnd(nullptr), m_smap(nullptr), m_hitUsedFlag(true), m_hitsize(0), m_buffersize(0), + m_file(std::make_shared()), m_eofFlag(false) { - m_buffersize = bufsize*hitsize; - hitBuffer.resize(m_buffersize); } CompassFile::CompassFile(const std::string& filename) : - m_filename(""), bufferIter(nullptr), bufferEnd(nullptr), m_smap(nullptr), hitUsedFlag(true), m_file(std::make_shared()), eofFlag(false) + m_filename(""), m_bufferIter(nullptr), m_bufferEnd(nullptr), m_smap(nullptr), m_hitUsedFlag(true), m_hitsize(0), m_buffersize(0), + m_file(std::make_shared()), m_eofFlag(false) { - m_buffersize = bufsize*hitsize; - hitBuffer.resize(m_buffersize); Open(filename); } CompassFile::CompassFile(const std::string& filename, int bsize) : - m_filename(""), bufferIter(nullptr), bufferEnd(nullptr), m_smap(nullptr), hitUsedFlag(true), - bufsize(bsize), m_file(std::make_shared()), eofFlag(false) + m_filename(""), m_bufferIter(nullptr), m_bufferEnd(nullptr), m_smap(nullptr), m_hitUsedFlag(true), m_bufsize(bsize), m_hitsize(0), + m_buffersize(0), m_file(std::make_shared()), m_eofFlag(false) { - m_buffersize = bufsize*hitsize; - hitBuffer.resize(m_buffersize); Open(filename); } @@ -44,21 +40,24 @@ namespace EventBuilder { void CompassFile::Open(const std::string& filename) { - eofFlag = false; - hitUsedFlag = true; + m_eofFlag = false; + m_hitUsedFlag = true; m_filename = filename; m_file->open(m_filename, std::ios::binary | std::ios::in); m_file->seekg(0, std::ios_base::end); m_size = m_file->tellg(); - m_nHits = m_size/24; if(m_size == 0) { - eofFlag = true; + m_eofFlag = true; } else { m_file->seekg(0, std::ios_base::beg); + ReadHeader(); + m_nHits = m_size/m_hitsize; + m_buffersize = m_hitsize*m_bufsize; + m_hitBuffer.resize(m_buffersize); } } @@ -70,27 +69,39 @@ namespace EventBuilder { } } - int CompassFile::GetHitSize() + void CompassFile::ReadHeader() { if(!IsOpen()) { - EVB_WARN("Unable to get hit size from file {0}, sending invalid value.", m_filename); - return 0; + EVB_WARN("Unable to read header from file. State not validated", m_filename); + return; } - - char* firstHit = new char[24]; //A compass hit by default has 24 bytes (at least in our setup) - - m_file->read(firstHit, 24); - - firstHit += 16; - int nsamples = *((uint32_t*) firstHit); - - m_file->seekg(0, std::ios_base::beg); - - delete[] firstHit; - - return 24 + nsamples*16; - + + char* header = new char[2]; + m_file->read(header, 2); + m_header = *((uint16_t*)header); + m_hitsize = 16; //default hitsize of 16 bytes + if(IsEnergy()) + m_hitsize += 2; + if(IsEnergyCalibrated()) + m_hitsize += 8; + if(IsEnergyShort()) + m_hitsize += 2; + if(IsWaves()) + { + EVB_ERROR("Waveforms are not supported by the SPS_SABRE_EventBuilder. The wave data will be skipped."); + m_hitsize += 5; + char* firstHit = new char[24]; //A compass hit by default has 24 bytes (at least in our setup) + m_file->read(firstHit, 24); + firstHit += m_hitsize - 4; + uint32_t nsamples = *((uint32_t*) firstHit); + m_hitsize += nsamples * 2; //Each sample is a 2 byte data value + m_file->seekg(0, std::ios_base::beg); + m_file->read(header, 2); + delete[] firstHit; + } + + delete[] header; } /* @@ -105,7 +116,7 @@ namespace EventBuilder { { if(!IsOpen()) return true; - if((bufferIter == nullptr || bufferIter == bufferEnd) && !IsEOF()) + if((m_bufferIter == nullptr || m_bufferIter == m_bufferEnd) && !IsEOF()) { GetNextBuffer(); } @@ -113,10 +124,10 @@ namespace EventBuilder { if(!IsEOF()) { ParseNextHit(); - hitUsedFlag = false; + m_hitUsedFlag = false; } - return eofFlag; + return m_eofFlag; } /* @@ -131,34 +142,51 @@ namespace EventBuilder { if(m_file->eof()) { - eofFlag = true; + m_eofFlag = true; return; } - m_file->read(hitBuffer.data(), hitBuffer.size()); + m_file->read(m_hitBuffer.data(), m_hitBuffer.size()); - bufferIter = hitBuffer.data(); - bufferEnd = bufferIter + m_file->gcount(); //one past the last datum + m_bufferIter = m_hitBuffer.data(); + m_bufferEnd = m_bufferIter + m_file->gcount(); //one past the last datum } void CompassFile::ParseNextHit() { - m_currentHit.board = *((uint16_t*)bufferIter); - bufferIter += 2; - m_currentHit.channel = *((uint16_t*)bufferIter); - bufferIter += 2; - m_currentHit.timestamp = *((uint64_t*)bufferIter); - bufferIter += 8; - m_currentHit.lgate = *((uint16_t*)bufferIter); - bufferIter += 2; - m_currentHit.sgate = *((uint16_t*)bufferIter); - bufferIter += 2; - m_currentHit.flags = *((uint32_t*)bufferIter); - bufferIter += 4; - m_currentHit.Ns = *((uint32_t*)bufferIter); - bufferIter += 4; + m_currentHit.board = *((uint16_t*)m_bufferIter); + m_bufferIter += 2; + m_currentHit.channel = *((uint16_t*)m_bufferIter); + m_bufferIter += 2; + m_currentHit.timestamp = *((uint64_t*)m_bufferIter); + m_bufferIter += 8; + if(IsEnergy()) + { + m_currentHit.energy = *((uint16_t*)m_bufferIter); + m_bufferIter += 2; + } + if(IsEnergyCalibrated()) + { + m_currentHit.energyCalibrated = *((uint64_t*)m_bufferIter); + m_bufferIter += 8; + } + if(IsEnergyShort()) + { + m_currentHit.energyShort = *((uint16_t*)m_bufferIter); + m_bufferIter += 2; + } + m_currentHit.flags = *((uint32_t*)m_bufferIter); + m_bufferIter += 4; + if(IsWaves()) + { + m_currentHit.waveCode = *((uint8_t*)m_bufferIter); + m_bufferIter += 1; + m_currentHit.Ns = *((uint32_t*)m_bufferIter); + m_bufferIter += 4; + m_bufferIter += 2*m_currentHit.Ns; + } if(m_smap != nullptr) { //memory safety diff --git a/src/evb/CompassFile.h b/src/evb/CompassFile.h index c39c5f0..193bb70 100644 --- a/src/evb/CompassFile.h +++ b/src/evb/CompassFile.h @@ -32,40 +32,54 @@ namespace EventBuilder { inline bool IsOpen() const { return m_file->is_open(); }; inline CompassHit GetCurrentHit() const { return m_currentHit; } inline std::string GetName() const { return m_filename; } - inline bool CheckHitHasBeenUsed() const { return hitUsedFlag; } //query to find out if we've used the current hit - inline void SetHitHasBeenUsed() { hitUsedFlag = true; } //flip the flag to indicate the current hit has been used - inline bool IsEOF() const { return eofFlag; } //see if we've read all available data - inline bool* GetUsedFlagPtr() { return &hitUsedFlag; } + inline bool CheckHitHasBeenUsed() const { return m_hitUsedFlag; } //query to find out if we've used the current hit + inline void SetHitHasBeenUsed() { m_hitUsedFlag = true; } //flip the flag to indicate the current hit has been used + inline bool IsEOF() const { return m_eofFlag; } //see if we've read all available data + inline bool* GetUsedFlagPtr() { return &m_hitUsedFlag; } inline void AttachShiftMap(ShiftMap* map) { m_smap = map; } inline unsigned int GetSize() const { return m_size; } inline unsigned int GetNumberOfHits() const { return m_nHits; } private: - int GetHitSize(); + void ReadHeader(); void ParseNextHit(); void GetNextBuffer(); + + inline bool IsEnergy() { return (m_header & CoMPASSHeaders::Energy) != 0; } + inline bool IsEnergyCalibrated() { return (m_header & CoMPASSHeaders::EnergyCalibrated) != 0; } + inline bool IsEnergyShort() { return (m_header & CoMPASSHeaders::EnergyShort) != 0; } + inline bool IsWaves() { return (m_header & CoMPASSHeaders::Waves) != 0; } using Buffer = std::vector; using FilePointer = std::shared_ptr; //to make this class copy/movable std::string m_filename; - Buffer hitBuffer; - char* bufferIter; - char* bufferEnd; + Buffer m_hitBuffer; + char* m_bufferIter; + char* m_bufferEnd; ShiftMap* m_smap; //NOT owned by CompassFile. DO NOT delete - bool hitUsedFlag; - int bufsize = 200000; //size of the buffer in hits - int hitsize = 24; //size of a CompassHit in bytes (without alignment padding) + bool m_hitUsedFlag; + int m_bufsize = 200000; //size of the buffer in hits + int m_hitsize; //size of a CompassHit in bytes (without alignment padding) + uint16_t m_header; int m_buffersize; CompassHit m_currentHit; FilePointer m_file; - bool eofFlag; + bool m_eofFlag; unsigned int m_size; //size of the file in bytes unsigned int m_nHits; //number of hits in the file (m_size/24) + + enum CoMPASSHeaders + { + Energy = 0x0001, + EnergyCalibrated = 0x0002, + EnergyShort = 0x0004, + Waves = 0x0008, + }; }; diff --git a/src/evb/CompassHit.h b/src/evb/CompassHit.h index fd5c02f..f430e43 100644 --- a/src/evb/CompassHit.h +++ b/src/evb/CompassHit.h @@ -3,16 +3,18 @@ namespace EventBuilder { - struct CompassHit - { - uint16_t board = 400; - uint16_t channel = 400; - uint64_t timestamp = 0; - uint16_t lgate = 0; - uint16_t sgate = 0; - uint32_t flags = 0; - uint32_t Ns = 0; - }; + struct CompassHit + { + uint16_t board = 400; + uint16_t channel = 400; + uint64_t timestamp = 0; + uint16_t energy = 0; + uint64_t energyCalibrated = 0; + uint16_t energyShort = 0; + uint32_t flags = 0; + uint8_t waveCode = 0; + uint32_t Ns = 0; + }; } diff --git a/src/evb/CompassRun.cpp b/src/evb/CompassRun.cpp index 2ef9a52..6b85425 100644 --- a/src/evb/CompassRun.cpp +++ b/src/evb/CompassRun.cpp @@ -49,7 +49,7 @@ namespace EventBuilder { while(input>>filename) { input>>varname; - filename = m_directory+filename+"_run_"+std::to_string(m_runNum)+".bin"; + filename = m_directory+filename+"_run_"+std::to_string(m_runNum)+".BIN"; m_scaler_map[filename] = TParameter(varname.c_str(), init); } input.close(); @@ -58,7 +58,7 @@ namespace EventBuilder { bool CompassRun::GetBinaryFiles() { std::string prefix = ""; - std::string suffix = ".bin"; //binaries + std::string suffix = ".BIN"; //binaries RunCollector grabber(m_directory, prefix, suffix); grabber.GrabAllFiles(); @@ -168,8 +168,8 @@ namespace EventBuilder { outtree->Branch("Board", &hit.board); outtree->Branch("Channel", &hit.channel); - outtree->Branch("Energy", &hit.lgate); - outtree->Branch("EnergyShort", &hit.sgate); + outtree->Branch("Energy", &hit.energy); + outtree->Branch("EnergyShort", &hit.energyShort); outtree->Branch("Timestamp", &hit.timestamp); outtree->Branch("Flags", &hit.flags); diff --git a/src/evb/EVBApp.cpp b/src/evb/EVBApp.cpp index bd55ef1..38fafdb 100644 --- a/src/evb/EVBApp.cpp +++ b/src/evb/EVBApp.cpp @@ -178,7 +178,7 @@ namespace EventBuilder { EVB_INFO("Converting file {0}...", binfile); rawfile = rawroot_dir + "compass_run_"+ std::to_string(i) + ".root"; unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir; - wipe_command = "rm -r "+unpack_dir+"*.bin"; + wipe_command = "rm -r "+unpack_dir+"*.BIN"; sys_return = system(unpack_command.c_str()); converter.Convert2RawRoot(rawfile); @@ -238,7 +238,7 @@ namespace EventBuilder { sortfile = sortroot_dir +"run_"+std::to_string(i)+ ".root"; unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir; - wipe_command = "rm -r "+unpack_dir+"*.bin"; + wipe_command = "rm -r "+unpack_dir+"*.BIN"; sys_return = system(unpack_command.c_str()); converter.Convert2SortedRoot(sortfile, m_mapfile, m_SlowWindow); @@ -281,7 +281,7 @@ namespace EventBuilder { sortfile = sortroot_dir + "run_" + std::to_string(i) + ".root"; unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir; - wipe_command = "rm -r "+unpack_dir+"*.bin"; + wipe_command = "rm -r "+unpack_dir+"*.BIN"; sys_return = system(unpack_command.c_str()); converter.Convert2FastSortedRoot(sortfile, m_mapfile, m_SlowWindow, m_FastWindowSABRE, m_FastWindowIonCh); @@ -324,7 +324,7 @@ namespace EventBuilder { sortfile = sortroot_dir + "run_" + std::to_string(i) + ".root"; unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir; - wipe_command = "rm -r "+unpack_dir+"*.bin"; + wipe_command = "rm -r "+unpack_dir+"*.BIN"; sys_return = system(unpack_command.c_str()); converter.Convert2SlowAnalyzedRoot(sortfile, m_mapfile, m_SlowWindow, m_ZT, m_AT, m_ZP, m_AP, m_ZE, m_AE, m_BKE, m_B, m_Theta); @@ -368,7 +368,7 @@ namespace EventBuilder { sortfile = sortroot_dir + "run_" + std::to_string(i) + ".root"; unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir; - wipe_command = "rm -r "+unpack_dir+"*.bin"; + wipe_command = "rm -r "+unpack_dir+"*.BIN"; sys_return = system(unpack_command.c_str()); converter.Convert2FastAnalyzedRoot(sortfile, m_mapfile, m_SlowWindow, m_FastWindowSABRE, m_FastWindowIonCh, m_ZT, m_AT, m_ZP, m_AP, m_ZE, m_AE, m_BKE, m_B, m_Theta); diff --git a/src/evb/SFPPlotter.cpp b/src/evb/SFPPlotter.cpp index 8aa7205..b19da12 100644 --- a/src/evb/SFPPlotter.cpp +++ b/src/evb/SFPPlotter.cpp @@ -140,9 +140,9 @@ namespace EventBuilder { if(ev.sabreRingE[i] != -1) //Again, at this point front&back are required { MyFill(table,"sabreRingE_NoCuts",2000,0,20,ev.sabreRingE[i]); - MyFill(table,"sabreRingChannel_sabreRingE_NoCuts",144,0,144,ev.sabreRingChannel[i],200,0,20,ev.sabreRingE[i]); + MyFill(table,"sabreRingChannel_sabreRingE_NoCuts",144,0,144,ev.sabreRingChannel[i],4096,0,16384,ev.sabreRingE[i]); MyFill(table,"sabreWedgeE_NoCuts",2000,0,20,ev.sabreWedgeE[i]); - MyFill(table,"sabreWedgeChannel_sabreWedgeE_NoCuts",144,0,144,ev.sabreWedgeChannel[i],200,0,20,ev.sabreWedgeE[i]); + MyFill(table,"sabreWedgeChannel_sabreWedgeE_NoCuts",144,0,144,ev.sabreWedgeChannel[i],4096,0,16384,ev.sabreWedgeE[i]); } } @@ -277,4 +277,4 @@ namespace EventBuilder { delete outfile; } -} \ No newline at end of file +} diff --git a/src/evb/SlowSort.cpp b/src/evb/SlowSort.cpp index 85edd47..c4e7489 100644 --- a/src/evb/SlowSort.cpp +++ b/src/evb/SlowSort.cpp @@ -76,8 +76,8 @@ namespace EventBuilder { { DPPChannel curHit; curHit.Timestamp = mhit.timestamp; - curHit.Energy = mhit.lgate; - curHit.EnergyShort = mhit.sgate; + curHit.Energy = mhit.energy; + curHit.EnergyShort = mhit.energyShort; curHit.Channel = mhit.channel; curHit.Board = mhit.board; curHit.Flags = mhit.flags; From 946c14cae304e2fb42fab6b92d37c2d8683f04b2 Mon Sep 17 00:00:00 2001 From: Gordon McCann Date: Mon, 23 May 2022 09:14:44 -0400 Subject: [PATCH 02/13] Hotfix for wave analysis, bug in size of test first hit --- src/evb/CompassFile.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/evb/CompassFile.cpp b/src/evb/CompassFile.cpp index 4b4bbfd..7dde091 100644 --- a/src/evb/CompassFile.cpp +++ b/src/evb/CompassFile.cpp @@ -91,7 +91,7 @@ namespace EventBuilder { { EVB_ERROR("Waveforms are not supported by the SPS_SABRE_EventBuilder. The wave data will be skipped."); m_hitsize += 5; - char* firstHit = new char[24]; //A compass hit by default has 24 bytes (at least in our setup) + char* firstHit = new char[m_hitsize]; //A compass hit by default has 24 bytes (at least in our setup) m_file->read(firstHit, 24); firstHit += m_hitsize - 4; uint32_t nsamples = *((uint32_t*) firstHit); @@ -186,6 +186,7 @@ namespace EventBuilder { m_currentHit.Ns = *((uint32_t*)m_bufferIter); m_bufferIter += 4; m_bufferIter += 2*m_currentHit.Ns; + //Skip wavedata for SPS_SABRE_EventBuilder } if(m_smap != nullptr) From 2b00d4e80cde0989ec41de4f3fc8cf80204833a2 Mon Sep 17 00:00:00 2001 From: Gordon McCann Date: Mon, 23 May 2022 09:15:24 -0400 Subject: [PATCH 03/13] Finish hotfix for size of test first hit --- src/evb/CompassFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evb/CompassFile.cpp b/src/evb/CompassFile.cpp index 7dde091..0b74ac9 100644 --- a/src/evb/CompassFile.cpp +++ b/src/evb/CompassFile.cpp @@ -92,7 +92,7 @@ namespace EventBuilder { EVB_ERROR("Waveforms are not supported by the SPS_SABRE_EventBuilder. The wave data will be skipped."); m_hitsize += 5; char* firstHit = new char[m_hitsize]; //A compass hit by default has 24 bytes (at least in our setup) - m_file->read(firstHit, 24); + m_file->read(firstHit, m_hitsize); firstHit += m_hitsize - 4; uint32_t nsamples = *((uint32_t*) firstHit); m_hitsize += nsamples * 2; //Each sample is a 2 byte data value From 60970e52bb6d0e3088e35575e77bfcecd2229863 Mon Sep 17 00:00:00 2001 From: gwm17 Date: Wed, 22 Jun 2022 10:30:23 -0400 Subject: [PATCH 04/13] Fix bug in CompassFile. Previous edge case where channel data file was empty needed to be updated for new case where channel data file only contains the header. --- .gitignore | 1 + src/evb/CompassFile.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 09f7d8d..ae28796 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ pics/ images/ build/ objs/ +.vscode/ ###file types to ignore### *.swp diff --git a/src/evb/CompassFile.cpp b/src/evb/CompassFile.cpp index 0b74ac9..67e7313 100644 --- a/src/evb/CompassFile.cpp +++ b/src/evb/CompassFile.cpp @@ -47,7 +47,7 @@ namespace EventBuilder { m_file->seekg(0, std::ios_base::end); m_size = m_file->tellg(); - if(m_size == 0) + if(m_size == 2) { m_eofFlag = true; } From bcba081e7d9a03fbe74cf4865403f323f82c7b3a Mon Sep 17 00:00:00 2001 From: gwm17 Date: Wed, 22 Jun 2022 13:46:57 -0400 Subject: [PATCH 05/13] Fix OrderChecker bug --- src/evb/OrderChecker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/evb/OrderChecker.cpp b/src/evb/OrderChecker.cpp index 55db24b..4beddb7 100644 --- a/src/evb/OrderChecker.cpp +++ b/src/evb/OrderChecker.cpp @@ -29,7 +29,7 @@ namespace EventBuilder { for(Long64_t i=0; iGetEntries(); i++) { - tree->GetEntry(); + tree->GetEntry(i); if(prevStamp >= ts) { EVB_WARN("Bad order at entry {0} out of {1}",i,tree->GetEntries()); @@ -41,4 +41,4 @@ namespace EventBuilder { return true; } -} \ No newline at end of file +} From acc1ebe2fa3764d93186aa186fb816ba2192de29 Mon Sep 17 00:00:00 2001 From: gwm17 Date: Wed, 22 Jun 2022 15:03:49 -0400 Subject: [PATCH 06/13] Switch to cmake for build system for better ROOT integration --- CMakeLists.txt | 22 ++++ premake5.lua | 217 ------------------------------------- src/.gitignore | 3 - src/CMakeLists.txt | 25 +++++ src/evb/CMakeLists.txt | 52 +++++++++ src/guidict/CMakeLists.txt | 23 ++++ src/spsdict/CMakeLists.txt | 17 +++ 7 files changed, 139 insertions(+), 220 deletions(-) create mode 100644 CMakeLists.txt delete mode 100644 premake5.lua delete mode 100644 src/.gitignore create mode 100644 src/CMakeLists.txt create mode 100644 src/evb/CMakeLists.txt create mode 100644 src/guidict/CMakeLists.txt create mode 100644 src/spsdict/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..15d7198 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.16) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_POSITION_INDEPENDENT_CODE On) + +if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") + set(CMAKE_BUILD_TYPE "Release") + message("Building release") +else() + message("Building debug") +endif() + +project(SPS_SABRE_EventBuilder) + +find_package(ROOT REQUIRED COMPONENTS Gui) + +message("ROOT libs " ${ROOT_LIBRARIES}) + +set(EVB_BINARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/bin) +set(EVB_LIBRARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib) + +add_subdirectory(src) \ No newline at end of file diff --git a/premake5.lua b/premake5.lua deleted file mode 100644 index 0481183..0000000 --- a/premake5.lua +++ /dev/null @@ -1,217 +0,0 @@ -workspace "EVB" - architecture "x64" - configurations { - "Release", - "Debug" - } - -ROOTIncludeDir = "/home/gordon/cern/root-6.22.02/root-install/include" -ROOTLibDir = "/home/gordon/cern/root-6.22.02/root-install/lib" - -project "SPSDict" - kind "SharedLib" - language "C++" - cppdialect "c++11" - targetdir "./lib/" - objdir "./objs/" - - prebuildcommands { - "rootcint -f src/spsdict/sps_dict.cxx src/spsdict/DataStructs.h src/spsdict/LinkDef_sps.h", - "{COPY} src/spsdict/*.pcm ./lib/" - } - - postbuildcommands { - "{COPY} src/spsdict/DataStructs.h ./include/" - } - - files { - "src/spsdict/DataStructs.h", - "src/spsdict/*.cpp", - "src/spsdict/*.cxx" - } - - includedirs { - "./", - "src/spsdict", - } - - sysincludedirs { - ROOTIncludeDir - } - - libdirs { - ROOTLibDir - } - - links { - "Gui", "Core", "Imt", "RIO", "Net", "Hist", - "Graf", "Graf3d", "Gpad", "ROOTDataFrame", "ROOTVecOps", - "Tree", "TreePlayer", "Rint", "Postscript", "Matrix", - "Physics", "MathCore", "Thread", "MultiProc", "m", "dl" - } - - filter "system:macosx or linux" - linkoptions { - "-pthread", - "-rdynamic" - } - - filter "configurations:Debug" - symbols "On" - - filter "configurations:Release" - optimize "On" - -project "EventBuilderCore" - kind "StaticLib" - language "C++" - cppdialect "c++11" - targetdir "./lib/" - objdir "./objs/" - pchheader "EventBuilder.h" - pchsource "./src/EventBuilder.cpp" - - files { - "src/spsdict/DataStructs.h", - "src/evb/*.cpp", - "src/evb/*.h" - } - - defines "ETC_DIR_PATH=\"./etc/\"" - - includedirs { - "./", - "src/", - "vendor/spdlog/include", - "src/evb", - "src/spsdict", - "src/guidict" - } - - sysincludedirs { - ROOTIncludeDir - } - - libdirs { - ROOTLibDir, - } - - links { - "SPSDict", "Gui", "Core", "Imt", "RIO", "Net", "Hist", - "Graf", "Graf3d", "Gpad", "ROOTDataFrame", "ROOTVecOps", - "Tree", "TreePlayer", "Rint", "Postscript", "Matrix", - "Physics", "MathCore", "Thread", "MultiProc", "m", "dl" - } - - filter "system:macosx or linux" - linkoptions { - "-pthread", - "-rdynamic" - } - - filter "configurations:Debug" - symbols "On" - - filter "configurations:Release" - optimize "On" - -project "EventBuilderGui" - kind "ConsoleApp" - language "C++" - cppdialect "c++11" - targetdir "./bin/" - objdir "./objs/" - - prebuildcommands { - "rootcint -f src/guidict/gui_dict.cxx src/guidict/EVBMainFrame.h src/guidict/FileViewFrame.h src/guidict/LinkDef_Gui.h", - "{COPY} src/guidict/*.pcm ./bin/" - } - - files { - "src/guidict/FileViewFrame.h", - "src/guidict/EVBMainFrame.h", - "src/guidict/*.cpp", - "src/guidict/gui_dict.cxx", - "src/gui_main.cpp" - } - - includedirs { - "./", - "vendor/spdlog/include", - "src/evb", - "src/spsdict", - "src/guidict" - } - - sysincludedirs { - ROOTIncludeDir - } - - libdirs { - ROOTLibDir, - } - - links { - "EventBuilderCore", "SPSDict", "Gui", "Core", "Imt", "RIO", "Net", "Hist", - "Graf", "Graf3d", "Gpad", "ROOTDataFrame", "ROOTVecOps", - "Tree", "TreePlayer", "Rint", "Postscript", "Matrix", - "Physics", "MathCore", "Thread", "MultiProc", "m", "dl" - } - - filter "system:macosx or linux" - linkoptions { - "-pthread", - "-rdynamic" - } - - filter "configurations:Debug" - symbols "On" - - filter "configurations:Release" - optimize "On" - -project "EventBuilder" - kind "ConsoleApp" - language "C++" - cppdialect "c++11" - targetdir "./bin/" - objdir "./objs/" - - files { - "src/main.cpp" - } - - includedirs { - "src/", - "vendor/spdlog/include", - "src/evb", - "src/spsdict", - "src/guidict" - } - - sysincludedirs { - ROOTIncludeDir - } - - libdirs { - ROOTLibDir, - } - - links { - "EventBuilderCore", "SPSDict", "Gui", "Core", "Imt", "RIO", "Net", "Hist", - "Graf", "Graf3d", "Gpad", "ROOTDataFrame", "ROOTVecOps", - "Tree", "TreePlayer", "Rint", "Postscript", "Matrix", - "Physics", "MathCore", "Thread", "MultiProc", "m", "dl" - } - - filter "system:macosx or linux" - linkoptions { - "-pthread", - "-rdynamic" - } - - filter "configurations:Debug" - symbols "On" - - filter "configurations:Release" - optimize "On" \ No newline at end of file diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 677d3e5..0000000 --- a/src/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -###ignore the root dictionary generated file### -*.cxx -!.gitignore diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..8937bc4 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,25 @@ +add_subdirectory(spsdict) +add_subdirectory(guidict) +add_subdirectory(evb) + + +add_executable(EventBuilder) +target_include_directories(EventBuilder SYSTEM PUBLIC ../vendor/spdlog/include ${ROOT_INCLUDE_DIRS} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_sources(EventBuilder PRIVATE main.cpp) +target_link_libraries(EventBuilder + SPSDict + EventBuilderCore + ${ROOT_LIBRARIES} +) +set_target_properties(EventBuilder PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${EVB_BINARY_DIR}) + +add_executable(EventBuilderGui) +target_include_directories(EventBuilderGui SYSTEM PUBLIC ../vendor/spdlog/include ${ROOT_INCLUDE_DIRS} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_sources(EventBuilderGui PRIVATE gui_main.cpp) +target_link_libraries(EventBuilderGui + SPSDict + GuiDict + EventBuilderCore + ${ROOT_LIBRARIES} +) +set_target_properties(EventBuilderGui PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${EVB_BINARY_DIR}) \ No newline at end of file diff --git a/src/evb/CMakeLists.txt b/src/evb/CMakeLists.txt new file mode 100644 index 0000000..fd518ff --- /dev/null +++ b/src/evb/CMakeLists.txt @@ -0,0 +1,52 @@ +add_library(EventBuilderCore STATIC) +target_include_directories(EventBuilderCore SYSTEM PUBLIC ../../vendor/spdlog/include ${ROOT_INCLUDE_DIRS} + PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ +) + +target_precompile_headers(EventBuilderCore PRIVATE ../EventBuilder.h) + +target_sources(EventBuilderCore PRIVATE + ChannelMap.cpp + CompassRun.h + FlagHandler.cpp + MassLookup.h + SFPAnalyzer.h + Stopwatch.cpp + ChannelMap.h + CutHandler.cpp + FlagHandler.h + OrderChecker.cpp + SFPPlotter.cpp + Stopwatch.h + CutHandler.h + FP_kinematics.cpp + OrderChecker.h + SFPPlotter.h + CompassFile.cpp + EVBApp.cpp + FP_kinematics.h + ProgressCallback.h + ShiftMap.cpp + CompassFile.h + EVBApp.h + Logger.cpp + RunCollector.cpp + ShiftMap.h + CompassHit.h + FastSort.cpp + Logger.h + RunCollector.h + SlowSort.cpp + CompassRun.cpp + FastSort.h + MassLookup.cpp + SFPAnalyzer.cpp + SlowSort.h +) + +target_link_libraries(EventBuilderCore PUBLIC + SPSDict + ${ROOT_LIBRARIES} +) + +set_target_properties(EventBuilderCore PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${EVB_LIBRARY_DIR}) \ No newline at end of file diff --git a/src/guidict/CMakeLists.txt b/src/guidict/CMakeLists.txt new file mode 100644 index 0000000..cad6e1a --- /dev/null +++ b/src/guidict/CMakeLists.txt @@ -0,0 +1,23 @@ +add_library(GuiDict SHARED) + +target_include_directories(GuiDict SYSTEM PUBLIC ../../vendor/spdlog/include/ ${ROOT_INCLUDE_DIRS} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +ROOT_GENERATE_DICTIONARY(guidict EVBMainFrame.h FileViewFrame.h LINKDEF LinkDef_Gui.h MODULE GuiDict) + +target_sources(GuiDict PRIVATE + FileViewFrame.h + FileViewFrame.cpp + EVBMainFrame.h + EVBMainFrame.cpp +) +target_link_libraries(GuiDict + EventBuilderCore + SPSDict + ${ROOT_LIBRARIES} +) +set_target_properties(GuiDict PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${EVB_LIBRARY_DIR}) + +add_custom_command(TARGET GuiDict POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_BINARY_DIR}/libGuiDict_rdict.pcm + ${EVB_LIBRARY_DIR}/libGuiDict_rdict.pcm +) \ No newline at end of file diff --git a/src/spsdict/CMakeLists.txt b/src/spsdict/CMakeLists.txt new file mode 100644 index 0000000..924db26 --- /dev/null +++ b/src/spsdict/CMakeLists.txt @@ -0,0 +1,17 @@ +add_library(SPSDict SHARED) + +target_include_directories(SPSDict SYSTEM PUBLIC ${ROOT_INCLUDE_DIRS} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +ROOT_GENERATE_DICTIONARY(spsdict DataStructs.h LINKDEF LinkDef_sps.h MODULE SPSDict) + +target_sources(SPSDict PRIVATE + DataStructs.h + DataStructs.cpp +) +target_link_libraries(SPSDict ${ROOT_LIBRARIES}) +set_target_properties(SPSDict PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${EVB_LIBRARY_DIR}) + +add_custom_command(TARGET SPSDict POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_BINARY_DIR}/libSPSDict_rdict.pcm + ${EVB_LIBRARY_DIR}/libSPSDict_rdict.pcm +) \ No newline at end of file From 66984fe6ed95865899fd303dd29300e51e39aa07 Mon Sep 17 00:00:00 2001 From: gwm17 Date: Wed, 22 Jun 2022 15:07:53 -0400 Subject: [PATCH 07/13] Remove test message --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 15d7198..6a6e47c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,8 +14,6 @@ project(SPS_SABRE_EventBuilder) find_package(ROOT REQUIRED COMPONENTS Gui) -message("ROOT libs " ${ROOT_LIBRARIES}) - set(EVB_BINARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/bin) set(EVB_LIBRARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib) From d4f5f49b7f0f32dbd47f87e7a03df2f7cf5ad5ce Mon Sep 17 00:00:00 2001 From: Gordon McCann <43148247+gwm17@users.noreply.github.com> Date: Wed, 22 Jun 2022 15:08:50 -0400 Subject: [PATCH 08/13] Remove old include dir --- include/.gitignore | 5 --- include/DataStructs.h | 82 ------------------------------------------- 2 files changed, 87 deletions(-) delete mode 100644 include/.gitignore delete mode 100644 include/DataStructs.h diff --git a/include/.gitignore b/include/.gitignore deleted file mode 100644 index 57f1fb1..0000000 --- a/include/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -###ignore pch### -*.gch - -###include this### -!.gitignore diff --git a/include/DataStructs.h b/include/DataStructs.h deleted file mode 100644 index d57fb39..0000000 --- a/include/DataStructs.h +++ /dev/null @@ -1,82 +0,0 @@ -/*DataStructs.h - *Data structures for analysis. To be implemented as a dictionary for ROOT in LinkDef - *Based on: FocalPlane_SABRE.h - *Gordon M. Oct. 2019 - */ -#ifndef DATA_STRUCTS_H -#define DATA_STRUCTS_H - -#include - -struct DPPChannel -{ - double Timestamp; - int Channel, Board, Energy, EnergyShort; - int Flags; -}; - -struct DetectorHit -{ - double Long=-1, Short=-1, Time=-1; - int Ch=-1; -}; - -struct SabreDetector -{ - std::vector rings; - std::vector wedges; -}; - -struct FPDetector -{ - std::vector delayFL, delayFR, delayBL, delayBR; - std::vector anodeF, anodeB, scintL, scintR, cathode; - std::vector monitor; -}; - -struct CoincEvent -{ - FPDetector focalPlane; - SabreDetector sabreArray[5]; //index = ChannelMap Id# -1 -}; - -struct ProcessedEvent -{ - double fp1_tdiff = -1e6, fp2_tdiff = -1e6, fp1_tsum = -1, fp2_tsum = -1, - fp1_tcheck = -1, fp2_tcheck = -1; - double fp1_y=-1, fp2_y=-1; - double anodeFront = -1, anodeBack = -1, scintRight = -1, scintLeft = -1; - double scintRightShort = -1, scintLeftShort = -1; - double cathode = -1; - double xavg = -1e6, x1 = -1e6, x2 = -1e6; - double theta = -1e6; - double sabreRingE[5] = {-1,-1,-1,-1,-1}, sabreWedgeE[5] = {-1,-1,-1,-1,-1}; - double sabreRingChannel[5] = {-1,-1,-1,-1,-1}, sabreWedgeChannel[5] = {-1,-1,-1,-1,-1}; - double sabreRingTime[5] = {-1,-1,-1,-1,-1}, sabreWedgeTime[5] = {-1,-1,-1,-1,-1}; - - double delayFrontRightE = -1, delayFrontLeftE = -1; - double delayBackRightE = -1, delayBackLeftE = -1; - double delayFrontRightShort = -1, delayFrontLeftShort = -1; - double delayBackRightShort = -1, delayBackLeftShort = -1; - double anodeFrontTime = -1, anodeBackTime = -1; - double scintRightTime = -1, scintLeftTime = -1; - double delayFrontMaxTime = -1, delayBackMaxTime = -1; - double delayFrontLeftTime = -1, delayFrontRightTime = -1; - double delayBackLeftTime = -1, delayBackRightTime = -1; - double cathodeTime = -1; - - double monitorE = -1, monitorShort = -1; - double monitorTime = -1; - - - SabreDetector sabreArray[5]; //index = ChannelMap Id# -1 -}; - -/* - ROOT does a bad job of ensuring that header-only type dictionaries (the only type they explicity accept) - are linked when compiled as shared libraries (the recommended method). As a work around, as a dummy function that - ensures the library is linked (better than no-as-needed which I dont think is in general supported across platforms) -*/ -bool EnforceDictionaryLinked(); - -#endif From 63991ab124412cc2268b5ce4799e037cb30f0eb7 Mon Sep 17 00:00:00 2001 From: Gordon McCann <43148247+gwm17@users.noreply.github.com> Date: Wed, 22 Jun 2022 15:09:20 -0400 Subject: [PATCH 09/13] Remove old lib dir --- lib/.gitignore | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 lib/.gitignore diff --git a/lib/.gitignore b/lib/.gitignore deleted file mode 100644 index 647adb9..0000000 --- a/lib/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -###ignore these files#### -*.dylib -*.so -*.pcm - -###keep this one### -!.gitignore From 6f9ce36c44c12697482dab9636fc8c885134a489 Mon Sep 17 00:00:00 2001 From: gwm17 Date: Wed, 22 Jun 2022 15:13:32 -0400 Subject: [PATCH 10/13] Updating README --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c3d2f05..3f229a1 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,14 @@ It can convert CoMPASS data to ROOT, sort the data in time, build events, perfor WHEN TESTING, RUN WITH WIDE WINDOWS ## Installation -To install the event builder, the Premake build system is used. To install Premake, simply go to the [Premake](https://premake.github.io/) site and Download the right prebuilt binary for your system (there's no need to try and build from source). Place the binary in a location on your path so that you can call it on the commandline by simply typing `premake5`. +To build and install the event builder, the CMake build system is used. To build, simply run the following commands from the SPS_SABRE_EventBuilder directory: +``` +mkdir build +cd build +cmake .. +make +``` +The executables are then located in the `bin` directory of the SPS_SABRE_EventBuilder repository. To clone the repository use `git clone --recursive https://github.com/sesps/SPS_SABRE_EventBuilder.git`. If you're using the devel branch be sure to specify this with the `--branch` flag. The recursive flag is important; this tells github to pull all submodules associated with the repository. From 5f8dc0650994e8c4b624a2dea3a5fde622003be2 Mon Sep 17 00:00:00 2001 From: gwm17 Date: Wed, 22 Jun 2022 15:16:44 -0400 Subject: [PATCH 11/13] Finish updating README --- README.md | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 3f229a1..e04cdc1 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,7 @@ # SPS-SABRE Data Analysis Package Version 4 This is a software package designed to help experimenters analyze data from SPS-SABRE at FSU. -It can convert CoMPASS data to ROOT, sort the data in time, build events, perform preliminary analysis and provide basic plots. Programs are built using make, and a make file is included. Simply using the command make will build all programs. - -WHEN TESTING, RUN WITH WIDE WINDOWS +It can convert CoMPASS data to ROOT, sort the data in time, build events, perform preliminary analysis and provide basic plots. ## Installation To build and install the event builder, the CMake build system is used. To build, simply run the following commands from the SPS_SABRE_EventBuilder directory: @@ -13,17 +11,12 @@ cd build cmake .. make ``` -The executables are then located in the `bin` directory of the SPS_SABRE_EventBuilder repository. To clone the repository use `git clone --recursive https://github.com/sesps/SPS_SABRE_EventBuilder.git`. If you're using the devel branch be sure to specify this with the `--branch` flag. The recursive flag is important; this tells github to pull all submodules associated with the repository. -Once the repository is cloned, go into the event builder directory and locate the file `premake5.lua`. This is the file which contains the build rules for this project. You will need to specify the location of your `ROOT` install so that we can properly find headers and libraries using the parameters ROOTIncludeDir and ROOTLibDir (lines 8 and 9 of premake5.lua). On unix style systems these paths can be found easily using the `root-config` tool. Simply run `root-config --cflags` and copy the path after the `-I` to ROOTIncludeDir and run `root-config --glibs` and copy the path after the `-L` to ROOTLibDir. Once the `ROOT` paths are set, run the command `premake5 gmake2` on Linux or Mac for a Makefile style build, or `premake5 Xcode4` to build an XCode project on Mac. Then the program can be built using the standard methods of the chosen build type (i.e. `make` or XCode Build). - The binaries are installed to the `bin` directory of the event builder, and should be run from the event builder directory (i.e. `./bin/EventBuilderGui`). -In general, one should only build for Release (this is the default), for maximum optimization. However, it can be useful to run in Debug (in make do `make config=debug`) when testing new features. - -Note: On Mac, if you have XCode installed, it is best to build through XCode. Results when linking can be unreliable otherwise. +In general, one should only build for Release (this is the default), for maximum optimization. However, it can be useful to run in Debug (change the cmake command to `cmake -DCMAKE_BUILD_TYPE_DEBUG ..`) when testing new features. ## EventBuilder vs. EventBuilderGui There are two programs provided. They are `EventBuilderGui` and `EventBuilder`. The first is a full GUI version of the event builder. The GUI supports all conversion methods and the plotting tool. @@ -97,6 +90,5 @@ size (again center the peak on 0, the width of the peak becomes the fast window) Currently the pipeline supports declaring individual digitizer channels as scalers. These channels will be used a pure counting measures. To make a channel a scaler, put the CoMPASS formated name of the channel and board (check the given etc/ScalerFile.txt for an example) in a text file along with a parameter name for the scaler to be saved as. These files are then processed outside of the event building loop, which can greatly increase the computational speed. Future versions will include scaler rates as well. ## System Requirements -Only tested with `ROOT` 6.14, mileage may vary -Uses C++11 standards -Only compatible with MacOSX and Linux \ No newline at end of file +Requires ROOT version which supports CMake dictionary generation +Requires CMake > 3.16 for pch suport \ No newline at end of file From 30fdf9a1cb53d29a9f8f3747ad46dd713be17c51 Mon Sep 17 00:00:00 2001 From: gwm17 Date: Wed, 22 Jun 2022 16:03:00 -0400 Subject: [PATCH 12/13] Update README --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e04cdc1..31b0bd8 100644 --- a/README.md +++ b/README.md @@ -90,5 +90,6 @@ size (again center the peak on 0, the width of the peak becomes the fast window) Currently the pipeline supports declaring individual digitizer channels as scalers. These channels will be used a pure counting measures. To make a channel a scaler, put the CoMPASS formated name of the channel and board (check the given etc/ScalerFile.txt for an example) in a text file along with a parameter name for the scaler to be saved as. These files are then processed outside of the event building loop, which can greatly increase the computational speed. Future versions will include scaler rates as well. ## System Requirements -Requires ROOT version which supports CMake dictionary generation -Requires CMake > 3.16 for pch suport \ No newline at end of file +- Requires ROOT version which supports CMake dictionary generation +- Requires CMake > 3.16 +- This version is for data from CAEN CoMPASS > 2.0. Data from older CoMPASS versions are not compatible. \ No newline at end of file From dca1b5643abf28ad401c0381cb08824befea7b6b Mon Sep 17 00:00:00 2001 From: Gordon McCann Date: Tue, 28 Jun 2022 05:53:14 -0400 Subject: [PATCH 13/13] Fix bug related to dictionaries on Apple, where difference in name case is ignored --- src/guidict/CMakeLists.txt | 4 ++-- src/spsdict/CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/guidict/CMakeLists.txt b/src/guidict/CMakeLists.txt index cad6e1a..37b317c 100644 --- a/src/guidict/CMakeLists.txt +++ b/src/guidict/CMakeLists.txt @@ -1,7 +1,7 @@ add_library(GuiDict SHARED) target_include_directories(GuiDict SYSTEM PUBLIC ../../vendor/spdlog/include/ ${ROOT_INCLUDE_DIRS} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -ROOT_GENERATE_DICTIONARY(guidict EVBMainFrame.h FileViewFrame.h LINKDEF LinkDef_Gui.h MODULE GuiDict) +ROOT_GENERATE_DICTIONARY(gui_dict EVBMainFrame.h FileViewFrame.h LINKDEF LinkDef_Gui.h MODULE GuiDict) target_sources(GuiDict PRIVATE FileViewFrame.h @@ -20,4 +20,4 @@ add_custom_command(TARGET GuiDict POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libGuiDict_rdict.pcm ${EVB_LIBRARY_DIR}/libGuiDict_rdict.pcm -) \ No newline at end of file +) diff --git a/src/spsdict/CMakeLists.txt b/src/spsdict/CMakeLists.txt index 924db26..8f10e0f 100644 --- a/src/spsdict/CMakeLists.txt +++ b/src/spsdict/CMakeLists.txt @@ -1,7 +1,7 @@ add_library(SPSDict SHARED) target_include_directories(SPSDict SYSTEM PUBLIC ${ROOT_INCLUDE_DIRS} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -ROOT_GENERATE_DICTIONARY(spsdict DataStructs.h LINKDEF LinkDef_sps.h MODULE SPSDict) +ROOT_GENERATE_DICTIONARY(sps_dict DataStructs.h LINKDEF LinkDef_sps.h MODULE SPSDict) target_sources(SPSDict PRIVATE DataStructs.h @@ -14,4 +14,4 @@ add_custom_command(TARGET SPSDict POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/libSPSDict_rdict.pcm ${EVB_LIBRARY_DIR}/libSPSDict_rdict.pcm -) \ No newline at end of file +)