mirror of
https://github.com/sesps/SPS_SABRE_EventBuilder.git
synced 2024-11-22 18:18:52 -05:00
Added pch back, removed dumb compiler warnings for system calls, fixed some pathing on headers
This commit is contained in:
parent
b9ed82a593
commit
04aa800c5c
|
@ -19,4 +19,6 @@ endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||||
|
|
||||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
||||||
|
|
||||||
|
set(PCH_DIR ${CMAKE_CURRENT_LIST_DIR}/src/)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
|
@ -6,7 +6,6 @@
|
||||||
#ifndef DATA_STRUCTS_H
|
#ifndef DATA_STRUCTS_H
|
||||||
#define DATA_STRUCTS_H
|
#define DATA_STRUCTS_H
|
||||||
|
|
||||||
|
|
||||||
struct DPPChannel
|
struct DPPChannel
|
||||||
{
|
{
|
||||||
double Timestamp;
|
double Timestamp;
|
||||||
|
|
|
@ -40,9 +40,8 @@ target_sources(EventBuilder
|
||||||
evb/ShiftMap.h
|
evb/ShiftMap.h
|
||||||
spsdict/DataStructs.h
|
spsdict/DataStructs.h
|
||||||
)
|
)
|
||||||
target_include_directories(EventBuilder PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
target_include_directories(EventBuilder PUBLIC ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/evb ${CMAKE_CURRENT_LIST_DIR}/spsdict)
|
||||||
target_include_directories(EventBuilder PUBLIC ${CMAKE_CURRENT_LIST_DIR}/evb)
|
target_precompile_headers(EventBuilder PUBLIC ${PCH_DIR}/EventBuilder.h)
|
||||||
target_include_directories(EventBuilder PUBLIC ${CMAKE_CURRENT_LIST_DIR}/spsdict)
|
|
||||||
target_link_libraries(EventBuilder
|
target_link_libraries(EventBuilder
|
||||||
PUBLIC
|
PUBLIC
|
||||||
SPSDict
|
SPSDict
|
||||||
|
@ -110,10 +109,8 @@ target_sources(EventBuilderGui
|
||||||
guidict/EVBMainFrame.h
|
guidict/EVBMainFrame.h
|
||||||
guidict/FileViewFrame.h
|
guidict/FileViewFrame.h
|
||||||
)
|
)
|
||||||
target_include_directories(EventBuilderGui PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
target_include_directories(EventBuilderGui PUBLIC ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/evb ${CMAKE_CURRENT_LISTDIR}/spsdict ${CMAKE_CURRENT_LIST_DIR}/guidict)
|
||||||
target_include_directories(EventBuilderGui PUBLIC ${CMAKE_CURRENT_LIST_DIR}/evb)
|
target_precompile_headers(EventBuilderGui REUSE_FROM EventBuilder)
|
||||||
target_include_directories(EventBuilderGui PUBLIC ${CMAKE_CURRENT_LIST_DIR}/spsdict)
|
|
||||||
target_include_directories(EventBuilderGui PUBLIC ${CMAKE_CURRENT_LIST_DIR}/guidict)
|
|
||||||
target_link_libraries(EventBuilderGui
|
target_link_libraries(EventBuilderGui
|
||||||
PUBLIC
|
PUBLIC
|
||||||
SPSDict
|
SPSDict
|
||||||
|
|
|
@ -151,6 +151,7 @@ namespace EventBuilder {
|
||||||
|
|
||||||
void EVBApp::Convert2RawRoot()
|
void EVBApp::Convert2RawRoot()
|
||||||
{
|
{
|
||||||
|
int sys_return;
|
||||||
std::string rawroot_dir = m_workspace+"/raw_root/";
|
std::string rawroot_dir = m_workspace+"/raw_root/";
|
||||||
std::string unpack_dir = m_workspace+"/temp_binary/";
|
std::string unpack_dir = m_workspace+"/temp_binary/";
|
||||||
std::string binary_dir = m_workspace+"/raw_binary/";
|
std::string binary_dir = m_workspace+"/raw_binary/";
|
||||||
|
@ -189,9 +190,9 @@ namespace EventBuilder {
|
||||||
unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir;
|
unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir;
|
||||||
wipe_command = "rm -r "+unpack_dir+"*.bin";
|
wipe_command = "rm -r "+unpack_dir+"*.bin";
|
||||||
|
|
||||||
system(unpack_command.c_str());
|
sys_return = system(unpack_command.c_str());
|
||||||
converter.Convert2RawRoot(rawfile);
|
converter.Convert2RawRoot(rawfile);
|
||||||
system(wipe_command.c_str());
|
sys_return = system(wipe_command.c_str());
|
||||||
|
|
||||||
}
|
}
|
||||||
std::cout<<std::endl<<"Conversion complete."<<std::endl;
|
std::cout<<std::endl<<"Conversion complete."<<std::endl;
|
||||||
|
@ -223,6 +224,7 @@ namespace EventBuilder {
|
||||||
|
|
||||||
void EVBApp::Convert2SortedRoot()
|
void EVBApp::Convert2SortedRoot()
|
||||||
{
|
{
|
||||||
|
int sys_return;
|
||||||
std::string sortroot_dir = m_workspace+"/sorted/";
|
std::string sortroot_dir = m_workspace+"/sorted/";
|
||||||
std::string unpack_dir = m_workspace+"/temp_binary/";
|
std::string unpack_dir = m_workspace+"/temp_binary/";
|
||||||
std::string binary_dir = m_workspace+"/raw_binary/";
|
std::string binary_dir = m_workspace+"/raw_binary/";
|
||||||
|
@ -262,9 +264,9 @@ namespace EventBuilder {
|
||||||
unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir;
|
unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir;
|
||||||
wipe_command = "rm -r "+unpack_dir+"*.bin";
|
wipe_command = "rm -r "+unpack_dir+"*.bin";
|
||||||
|
|
||||||
system(unpack_command.c_str());
|
sys_return = system(unpack_command.c_str());
|
||||||
converter.Convert2SortedRoot(sortfile, m_mapfile, m_SlowWindow);
|
converter.Convert2SortedRoot(sortfile, m_mapfile, m_SlowWindow);
|
||||||
system(wipe_command.c_str());
|
sys_return = system(wipe_command.c_str());
|
||||||
|
|
||||||
}
|
}
|
||||||
std::cout<<std::endl<<"Conversion complete."<<std::endl;
|
std::cout<<std::endl<<"Conversion complete."<<std::endl;
|
||||||
|
@ -272,6 +274,7 @@ namespace EventBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EVBApp::Convert2FastSortedRoot() {
|
void EVBApp::Convert2FastSortedRoot() {
|
||||||
|
int sys_return;
|
||||||
std::string sortroot_dir = m_workspace+"/fast/";
|
std::string sortroot_dir = m_workspace+"/fast/";
|
||||||
std::string unpack_dir = m_workspace+"/temp_binary/";
|
std::string unpack_dir = m_workspace+"/temp_binary/";
|
||||||
std::string binary_dir = m_workspace+"/raw_binary/";
|
std::string binary_dir = m_workspace+"/raw_binary/";
|
||||||
|
@ -311,9 +314,9 @@ namespace EventBuilder {
|
||||||
unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir;
|
unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir;
|
||||||
wipe_command = "rm -r "+unpack_dir+"*.bin";
|
wipe_command = "rm -r "+unpack_dir+"*.bin";
|
||||||
|
|
||||||
system(unpack_command.c_str());
|
sys_return = system(unpack_command.c_str());
|
||||||
converter.Convert2FastSortedRoot(sortfile, m_mapfile, m_SlowWindow, m_FastWindowSABRE, m_FastWindowIonCh);
|
converter.Convert2FastSortedRoot(sortfile, m_mapfile, m_SlowWindow, m_FastWindowSABRE, m_FastWindowIonCh);
|
||||||
system(wipe_command.c_str());
|
sys_return = system(wipe_command.c_str());
|
||||||
|
|
||||||
}
|
}
|
||||||
std::cout<<std::endl<<"Conversion complete."<<std::endl;
|
std::cout<<std::endl<<"Conversion complete."<<std::endl;
|
||||||
|
@ -321,6 +324,7 @@ namespace EventBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EVBApp::Convert2SlowAnalyzedRoot() {
|
void EVBApp::Convert2SlowAnalyzedRoot() {
|
||||||
|
int sys_return;
|
||||||
std::string sortroot_dir = m_workspace+"/analyzed/";
|
std::string sortroot_dir = m_workspace+"/analyzed/";
|
||||||
std::string unpack_dir = m_workspace+"/temp_binary/";
|
std::string unpack_dir = m_workspace+"/temp_binary/";
|
||||||
std::string binary_dir = m_workspace+"/raw_binary/";
|
std::string binary_dir = m_workspace+"/raw_binary/";
|
||||||
|
@ -359,9 +363,9 @@ namespace EventBuilder {
|
||||||
unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir;
|
unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir;
|
||||||
wipe_command = "rm -r "+unpack_dir+"*.bin";
|
wipe_command = "rm -r "+unpack_dir+"*.bin";
|
||||||
|
|
||||||
system(unpack_command.c_str());
|
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);
|
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);
|
||||||
system(wipe_command.c_str());
|
sys_return = system(wipe_command.c_str());
|
||||||
|
|
||||||
}
|
}
|
||||||
std::cout<<std::endl<<"Conversion complete."<<std::endl;
|
std::cout<<std::endl<<"Conversion complete."<<std::endl;
|
||||||
|
@ -370,6 +374,7 @@ namespace EventBuilder {
|
||||||
|
|
||||||
void EVBApp::Convert2FastAnalyzedRoot()
|
void EVBApp::Convert2FastAnalyzedRoot()
|
||||||
{
|
{
|
||||||
|
int sys_return;
|
||||||
std::string sortroot_dir = m_workspace+"/analyzed/";
|
std::string sortroot_dir = m_workspace+"/analyzed/";
|
||||||
std::string unpack_dir = m_workspace+"/temp_binary/";
|
std::string unpack_dir = m_workspace+"/temp_binary/";
|
||||||
std::string binary_dir = m_workspace+"/raw_binary/";
|
std::string binary_dir = m_workspace+"/raw_binary/";
|
||||||
|
@ -411,9 +416,9 @@ namespace EventBuilder {
|
||||||
unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir;
|
unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir;
|
||||||
wipe_command = "rm -r "+unpack_dir+"*.bin";
|
wipe_command = "rm -r "+unpack_dir+"*.bin";
|
||||||
|
|
||||||
system(unpack_command.c_str());
|
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);
|
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);
|
||||||
system(wipe_command.c_str());
|
sys_return = system(wipe_command.c_str());
|
||||||
|
|
||||||
}
|
}
|
||||||
std::cout<<std::endl<<"Conversion complete."<<std::endl;
|
std::cout<<std::endl<<"Conversion complete."<<std::endl;
|
||||||
|
|
|
@ -157,6 +157,7 @@ namespace EventBuilder {
|
||||||
|
|
||||||
bool RunCollector::Merge_hadd(const std::string& outname)
|
bool RunCollector::Merge_hadd(const std::string& outname)
|
||||||
{
|
{
|
||||||
|
int sys_return;
|
||||||
if(!m_initFlag)
|
if(!m_initFlag)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -168,7 +169,7 @@ namespace EventBuilder {
|
||||||
for(unsigned int i=0; i<m_filelist.size(); i++)
|
for(unsigned int i=0; i<m_filelist.size(); i++)
|
||||||
clump += " "+m_filelist[i];
|
clump += " "+m_filelist[i];
|
||||||
std::cout<<"Merging runs into single file..."<<std::endl;
|
std::cout<<"Merging runs into single file..."<<std::endl;
|
||||||
std::system(clump.c_str());
|
sys_return = std::system(clump.c_str());
|
||||||
std::cout<<"Finished merging"<<std::endl;
|
std::cout<<"Finished merging"<<std::endl;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -183,13 +184,17 @@ namespace EventBuilder {
|
||||||
for(unsigned int i=0; i<m_filelist.size(); i++)
|
for(unsigned int i=0; i<m_filelist.size(); i++)
|
||||||
clump += " "+m_filelist[i];
|
clump += " "+m_filelist[i];
|
||||||
std::cout<<"Merging runs "<<m_minRun<<" to "<<m_maxRun<<" into a single file..."<<std::endl;
|
std::cout<<"Merging runs "<<m_minRun<<" to "<<m_maxRun<<" into a single file..."<<std::endl;
|
||||||
std::system(clump.c_str());
|
sys_return = std::system(clump.c_str());
|
||||||
std::cout<<"Finished merging"<<std::endl;
|
std::cout<<"Finished merging"<<std::endl;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!sys_return)
|
||||||
|
std::cerr<<"How did i even get here?"<<std::endl;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RunCollector::Merge_TChain(const std::string& outname)
|
bool RunCollector::Merge_TChain(const std::string& outname)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "evb/EventBuilder.h"
|
#include "EventBuilder.h"
|
||||||
#include "spsdict/DataStructs.h"
|
#include "spsdict/DataStructs.h"
|
||||||
#include <TApplication.h>
|
#include <TApplication.h>
|
||||||
#include "guidict/EVBMainFrame.h"
|
#include "guidict/EVBMainFrame.h"
|
||||||
|
|
|
@ -5,7 +5,8 @@ add_custom_command(TARGET GUIDict
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/libGUIDict_rdict.pcm ${CMAKE_INSTALL_PREFIX}/lib/
|
COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/libGUIDict_rdict.pcm ${CMAKE_INSTALL_PREFIX}/lib/
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
target_include_directories(GUIDict PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
target_include_directories(GUIDict PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${PCH_DIR})
|
||||||
|
target_precompile_headers(GUIDict PUBLIC ${PCH_DIR}/EventBuilder.h)
|
||||||
set_target_properties(GUIDict PROPERTIES PUBLIC_HEADER "EVBMainFrame.h;FileViewFrame.h")
|
set_target_properties(GUIDict PROPERTIES PUBLIC_HEADER "EVBMainFrame.h;FileViewFrame.h")
|
||||||
target_link_libraries(GUIDict
|
target_link_libraries(GUIDict
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../evb/EventBuilder.h"
|
#include <EventBuilder.h>
|
||||||
#include "EVBMainFrame.h"
|
#include "EVBMainFrame.h"
|
||||||
#include "FileViewFrame.h"
|
#include "FileViewFrame.h"
|
||||||
#include <TGLabel.h>
|
#include <TGLabel.h>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../evb/EventBuilder.h"
|
#include "EventBuilder.h"
|
||||||
#include "FileViewFrame.h"
|
#include "FileViewFrame.h"
|
||||||
#include <TGTextBuffer.h>
|
#include <TGTextBuffer.h>
|
||||||
#include <TGLabel.h>
|
#include <TGLabel.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "evb/EventBuilder.h"
|
#include "EventBuilder.h"
|
||||||
#include "spsdict/DataStructs.h"
|
#include "spsdict/DataStructs.h"
|
||||||
#include "evb/EVBApp.h"
|
#include "evb/EVBApp.h"
|
||||||
#include "evb/Stopwatch.h"
|
#include "evb/Stopwatch.h"
|
||||||
|
|
|
@ -5,7 +5,8 @@ add_custom_command(TARGET SPSDict
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/libSPSDict_rdict.pcm ${CMAKE_INSTALL_PREFIX}/lib/
|
COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/libSPSDict_rdict.pcm ${CMAKE_INSTALL_PREFIX}/lib/
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
target_include_directories(SPSDict PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
target_include_directories(SPSDict PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${PCH_DIR})
|
||||||
|
target_precompile_headers(SPSDict PUBLIC ${PCH_DIR}/EventBuilder.h)
|
||||||
set_target_properties(SPSDict PROPERTIES PUBLIC_HEADER "DataStructs.h")
|
set_target_properties(SPSDict PROPERTIES PUBLIC_HEADER "DataStructs.h")
|
||||||
target_link_libraries(SPSDict
|
target_link_libraries(SPSDict
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "../evb/EventBuilder.h"
|
#include "EventBuilder.h"
|
||||||
#include "DataStructs.h"
|
#include "DataStructs.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#ifndef DATA_STRUCTS_H
|
#ifndef DATA_STRUCTS_H
|
||||||
#define DATA_STRUCTS_H
|
#define DATA_STRUCTS_H
|
||||||
|
|
||||||
|
|
||||||
struct DPPChannel
|
struct DPPChannel
|
||||||
{
|
{
|
||||||
double Timestamp;
|
double Timestamp;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user