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(PCH_DIR ${CMAKE_CURRENT_LIST_DIR}/src/)
|
||||
|
||||
add_subdirectory(src)
|
|
@ -6,7 +6,6 @@
|
|||
#ifndef DATA_STRUCTS_H
|
||||
#define DATA_STRUCTS_H
|
||||
|
||||
|
||||
struct DPPChannel
|
||||
{
|
||||
double Timestamp;
|
||||
|
|
|
@ -40,9 +40,8 @@ target_sources(EventBuilder
|
|||
evb/ShiftMap.h
|
||||
spsdict/DataStructs.h
|
||||
)
|
||||
target_include_directories(EventBuilder PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
||||
target_include_directories(EventBuilder PUBLIC ${CMAKE_CURRENT_LIST_DIR}/evb)
|
||||
target_include_directories(EventBuilder PUBLIC ${CMAKE_CURRENT_LIST_DIR}/spsdict)
|
||||
target_include_directories(EventBuilder PUBLIC ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/evb ${CMAKE_CURRENT_LIST_DIR}/spsdict)
|
||||
target_precompile_headers(EventBuilder PUBLIC ${PCH_DIR}/EventBuilder.h)
|
||||
target_link_libraries(EventBuilder
|
||||
PUBLIC
|
||||
SPSDict
|
||||
|
@ -110,10 +109,8 @@ target_sources(EventBuilderGui
|
|||
guidict/EVBMainFrame.h
|
||||
guidict/FileViewFrame.h
|
||||
)
|
||||
target_include_directories(EventBuilderGui PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
||||
target_include_directories(EventBuilderGui PUBLIC ${CMAKE_CURRENT_LIST_DIR}/evb)
|
||||
target_include_directories(EventBuilderGui PUBLIC ${CMAKE_CURRENT_LIST_DIR}/spsdict)
|
||||
target_include_directories(EventBuilderGui PUBLIC ${CMAKE_CURRENT_LIST_DIR}/guidict)
|
||||
target_include_directories(EventBuilderGui PUBLIC ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/evb ${CMAKE_CURRENT_LISTDIR}/spsdict ${CMAKE_CURRENT_LIST_DIR}/guidict)
|
||||
target_precompile_headers(EventBuilderGui REUSE_FROM EventBuilder)
|
||||
target_link_libraries(EventBuilderGui
|
||||
PUBLIC
|
||||
SPSDict
|
||||
|
|
|
@ -151,6 +151,7 @@ namespace EventBuilder {
|
|||
|
||||
void EVBApp::Convert2RawRoot()
|
||||
{
|
||||
int sys_return;
|
||||
std::string rawroot_dir = m_workspace+"/raw_root/";
|
||||
std::string unpack_dir = m_workspace+"/temp_binary/";
|
||||
std::string binary_dir = m_workspace+"/raw_binary/";
|
||||
|
@ -189,9 +190,9 @@ namespace EventBuilder {
|
|||
unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir;
|
||||
wipe_command = "rm -r "+unpack_dir+"*.bin";
|
||||
|
||||
system(unpack_command.c_str());
|
||||
sys_return = system(unpack_command.c_str());
|
||||
converter.Convert2RawRoot(rawfile);
|
||||
system(wipe_command.c_str());
|
||||
sys_return = system(wipe_command.c_str());
|
||||
|
||||
}
|
||||
std::cout<<std::endl<<"Conversion complete."<<std::endl;
|
||||
|
@ -223,6 +224,7 @@ namespace EventBuilder {
|
|||
|
||||
void EVBApp::Convert2SortedRoot()
|
||||
{
|
||||
int sys_return;
|
||||
std::string sortroot_dir = m_workspace+"/sorted/";
|
||||
std::string unpack_dir = m_workspace+"/temp_binary/";
|
||||
std::string binary_dir = m_workspace+"/raw_binary/";
|
||||
|
@ -262,9 +264,9 @@ namespace EventBuilder {
|
|||
unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir;
|
||||
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);
|
||||
system(wipe_command.c_str());
|
||||
sys_return = system(wipe_command.c_str());
|
||||
|
||||
}
|
||||
std::cout<<std::endl<<"Conversion complete."<<std::endl;
|
||||
|
@ -272,6 +274,7 @@ namespace EventBuilder {
|
|||
}
|
||||
|
||||
void EVBApp::Convert2FastSortedRoot() {
|
||||
int sys_return;
|
||||
std::string sortroot_dir = m_workspace+"/fast/";
|
||||
std::string unpack_dir = m_workspace+"/temp_binary/";
|
||||
std::string binary_dir = m_workspace+"/raw_binary/";
|
||||
|
@ -311,9 +314,9 @@ namespace EventBuilder {
|
|||
unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir;
|
||||
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);
|
||||
system(wipe_command.c_str());
|
||||
sys_return = system(wipe_command.c_str());
|
||||
|
||||
}
|
||||
std::cout<<std::endl<<"Conversion complete."<<std::endl;
|
||||
|
@ -321,6 +324,7 @@ namespace EventBuilder {
|
|||
}
|
||||
|
||||
void EVBApp::Convert2SlowAnalyzedRoot() {
|
||||
int sys_return;
|
||||
std::string sortroot_dir = m_workspace+"/analyzed/";
|
||||
std::string unpack_dir = m_workspace+"/temp_binary/";
|
||||
std::string binary_dir = m_workspace+"/raw_binary/";
|
||||
|
@ -359,9 +363,9 @@ namespace EventBuilder {
|
|||
unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir;
|
||||
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);
|
||||
system(wipe_command.c_str());
|
||||
sys_return = system(wipe_command.c_str());
|
||||
|
||||
}
|
||||
std::cout<<std::endl<<"Conversion complete."<<std::endl;
|
||||
|
@ -370,6 +374,7 @@ namespace EventBuilder {
|
|||
|
||||
void EVBApp::Convert2FastAnalyzedRoot()
|
||||
{
|
||||
int sys_return;
|
||||
std::string sortroot_dir = m_workspace+"/analyzed/";
|
||||
std::string unpack_dir = m_workspace+"/temp_binary/";
|
||||
std::string binary_dir = m_workspace+"/raw_binary/";
|
||||
|
@ -411,9 +416,9 @@ namespace EventBuilder {
|
|||
unpack_command = "tar -xzf "+binfile+" --directory "+unpack_dir;
|
||||
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);
|
||||
system(wipe_command.c_str());
|
||||
sys_return = system(wipe_command.c_str());
|
||||
|
||||
}
|
||||
std::cout<<std::endl<<"Conversion complete."<<std::endl;
|
||||
|
|
|
@ -157,6 +157,7 @@ namespace EventBuilder {
|
|||
|
||||
bool RunCollector::Merge_hadd(const std::string& outname)
|
||||
{
|
||||
int sys_return;
|
||||
if(!m_initFlag)
|
||||
return false;
|
||||
|
||||
|
@ -168,7 +169,7 @@ namespace EventBuilder {
|
|||
for(unsigned int i=0; i<m_filelist.size(); i++)
|
||||
clump += " "+m_filelist[i];
|
||||
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;
|
||||
return true;
|
||||
}
|
||||
|
@ -183,13 +184,17 @@ namespace EventBuilder {
|
|||
for(unsigned int i=0; i<m_filelist.size(); i++)
|
||||
clump += " "+m_filelist[i];
|
||||
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;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
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)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "evb/EventBuilder.h"
|
||||
#include "EventBuilder.h"
|
||||
#include "spsdict/DataStructs.h"
|
||||
#include <TApplication.h>
|
||||
#include "guidict/EVBMainFrame.h"
|
||||
|
|
|
@ -5,7 +5,8 @@ add_custom_command(TARGET GUIDict
|
|||
POST_BUILD
|
||||
COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/libGUIDict_rdict.pcm ${CMAKE_INSTALL_PREFIX}/lib/
|
||||
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")
|
||||
target_link_libraries(GUIDict
|
||||
PUBLIC
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "../evb/EventBuilder.h"
|
||||
#include <EventBuilder.h>
|
||||
#include "EVBMainFrame.h"
|
||||
#include "FileViewFrame.h"
|
||||
#include <TGLabel.h>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
*/
|
||||
|
||||
#include "../evb/EventBuilder.h"
|
||||
#include "EventBuilder.h"
|
||||
#include "FileViewFrame.h"
|
||||
#include <TGTextBuffer.h>
|
||||
#include <TGLabel.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "evb/EventBuilder.h"
|
||||
#include "EventBuilder.h"
|
||||
#include "spsdict/DataStructs.h"
|
||||
#include "evb/EVBApp.h"
|
||||
#include "evb/Stopwatch.h"
|
||||
|
|
|
@ -5,7 +5,8 @@ add_custom_command(TARGET SPSDict
|
|||
POST_BUILD
|
||||
COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/libSPSDict_rdict.pcm ${CMAKE_INSTALL_PREFIX}/lib/
|
||||
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")
|
||||
target_link_libraries(SPSDict
|
||||
PUBLIC
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "../evb/EventBuilder.h"
|
||||
#include "EventBuilder.h"
|
||||
#include "DataStructs.h"
|
||||
|
||||
/*
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#ifndef DATA_STRUCTS_H
|
||||
#define DATA_STRUCTS_H
|
||||
|
||||
|
||||
struct DPPChannel
|
||||
{
|
||||
double Timestamp;
|
||||
|
|
Loading…
Reference in New Issue
Block a user