mirror of
https://github.com/sesps/SPS_SABRE_EventBuilder.git
synced 2024-11-22 18:18:52 -05:00
Switched build systems to premake, more flexible at cost of some auto-finding with ROOT. Changed build process such that static lib EventBuilderCore is generated and then linked to build EventBuilder and EventBuilderGui classes. Gui dictionary is now staticly linked (undefined symbols were an issue on some platforms). Minor bugfixes.
This commit is contained in:
parent
2365316c26
commit
3200b73313
|
@ -1,25 +0,0 @@
|
|||
cmake_minimum_required(VERSION 3.13)
|
||||
project(SPS_SABRE_EventBuilder)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
find_package(ROOT 6.22 CONFIG REQUIRED)
|
||||
|
||||
if(${ROOT_VERSION} VERSION_LESS "6.20")
|
||||
include("${ROOT_DIR}/modules/RootNewMacros.cmake")
|
||||
# For ROOT versions than 6.16, things break
|
||||
# if nothing is in the global include list!
|
||||
if (${ROOT_VERSION} VERSION_LESS "6.16")
|
||||
include_directories(ROOT_NONEXISTENT_DIRECTORY_HACK)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "..." FORCE)
|
||||
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(vendor/spdlog)
|
||||
add_subdirectory(src)
|
|
@ -6,6 +6,8 @@
|
|||
#ifndef DATA_STRUCTS_H
|
||||
#define DATA_STRUCTS_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
struct DPPChannel
|
||||
{
|
||||
double Timestamp;
|
||||
|
|
|
@ -1,108 +0,0 @@
|
|||
#ifndef EVBMAINFRAME_H
|
||||
#define EVBMAINFRAME_H
|
||||
|
||||
#include <TGClient.h>
|
||||
#include <TGWindow.h>
|
||||
#include <TGFrame.h>
|
||||
#include <TGNumberEntry.h>
|
||||
#include <TGTextEntry.h>
|
||||
#include <TGButton.h>
|
||||
#include <TGMenu.h>
|
||||
#include <TGTextViewStream.h>
|
||||
#include <TGProgressBar.h>
|
||||
#include <TTimer.h>
|
||||
#include <TGFileDialog.h>
|
||||
#include <TGComboBox.h>
|
||||
#include "../evb/EVBApp.h"
|
||||
|
||||
|
||||
class EVBMainFrame : public TGMainFrame
|
||||
{
|
||||
public:
|
||||
EVBMainFrame(const TGWindow* p, UInt_t w, UInt_t h);
|
||||
virtual ~EVBMainFrame();
|
||||
void CloseWindow();
|
||||
void HandleMenuSelection(int id);
|
||||
void DoOpenWorkdir();
|
||||
void DoOpenCMapfile();
|
||||
void DoOpenSMapfile();
|
||||
void DoOpenScalerfile();
|
||||
void DoOpenCutfile();
|
||||
void DoRun();
|
||||
void HandleTypeSelection(int box, int entry);
|
||||
bool SetParameters();
|
||||
void DisplayWorkdir(const char* dir);
|
||||
void DisplayCMap(const char* file);
|
||||
void DisplaySMap(const char* file);
|
||||
void DisplayScaler(const char* file);
|
||||
void DisplayCut(const char* file);
|
||||
void SaveConfig(const char* file);
|
||||
void LoadConfig(const char* file);
|
||||
void UpdateWorkdir();
|
||||
void UpdateCMap();
|
||||
void UpdateSMap();
|
||||
void UpdateScaler();
|
||||
void UpdateCut();
|
||||
void RunPlot();
|
||||
void RunMerge(const char* dir, const char* file);
|
||||
void DisableAllInput();
|
||||
void EnableAllInput();
|
||||
void SetProgressBarPosition(long value, long total);
|
||||
|
||||
|
||||
enum WidgetId
|
||||
{
|
||||
WorkDir,
|
||||
Cmap,
|
||||
Smap,
|
||||
Scaler,
|
||||
Cut,
|
||||
PlotF,
|
||||
BField,
|
||||
Bke,
|
||||
Theta,
|
||||
ZT,
|
||||
AT,
|
||||
ZP,
|
||||
AP,
|
||||
ZE,
|
||||
AE,
|
||||
SlowWind,
|
||||
FastWind_IC,
|
||||
FastWind_Sabre,
|
||||
TypeBox,
|
||||
RMin,
|
||||
RMax,
|
||||
M_Load_Config,
|
||||
M_Save_Config,
|
||||
M_Exit
|
||||
};
|
||||
|
||||
ClassDef(EVBMainFrame, 0);
|
||||
|
||||
private:
|
||||
TGTextButton *fRunButton, *fOpenWorkButton, *fOpenCMapButton, *fOpenSMapButton, *fOpenScalerButton, *fOpenCutButton;
|
||||
TGTextEntry *fWorkField;
|
||||
TGTextEntry *fCMapField, * fSMapField;
|
||||
TGTextEntry *fScalerField, *fCutField;
|
||||
TGComboBox *fTypeBox;
|
||||
|
||||
TGNumberEntryField *fZTField, *fATField, *fZPField, *fAPField, *fZEField, *fAEField;
|
||||
TGNumberEntryField *fBField, *fBKEField, *fThetaField;
|
||||
TGNumberEntryField *fSlowWindowField, *fFastICField, *fFastSABREField;
|
||||
TGNumberEntryField *fRMinField, *fRMaxField;
|
||||
|
||||
TGHProgressBar* fProgressBar;
|
||||
|
||||
TGPopupMenu *fFileMenu;
|
||||
|
||||
TGFileInfo* fInfo;
|
||||
|
||||
EventBuilder::EVBApp fBuilder;
|
||||
|
||||
int counter;
|
||||
UInt_t MAIN_W, MAIN_H;
|
||||
|
||||
|
||||
};
|
||||
#endif
|
|
@ -1,46 +0,0 @@
|
|||
/*
|
||||
|
||||
FileViewFrame.h
|
||||
Wrapper class on a TGTransientFrame (temporary frame assoc. with a main frame)
|
||||
Designed to graphically display directories and files for selection. Takes in a type
|
||||
to specify the signal pathing.
|
||||
|
||||
Written by G.W. McCann Sep. 2020
|
||||
|
||||
*/
|
||||
|
||||
#ifndef FILEVIEWFRAME_H
|
||||
#define FILEVIEWFRAME_H
|
||||
|
||||
#include "EVBMainFrame.h"
|
||||
#include <TGTextEntry.h>
|
||||
#include <TGFSContainer.h>
|
||||
#include <TGListView.h>
|
||||
#include <TQObject.h>
|
||||
#include <RQ_OBJECT.h>
|
||||
|
||||
class FileViewFrame {
|
||||
|
||||
RQ_OBJECT("FileViewFrame"); //ROOT wrapping into the gui environment
|
||||
public:
|
||||
FileViewFrame(const TGWindow* p, const TGFrame* main, UInt_t w, UInt_t h, EVBMainFrame *parent, int type);
|
||||
virtual ~FileViewFrame();
|
||||
void CloseWindow();
|
||||
void DoOk();
|
||||
void DoCancel();
|
||||
void DoDoubleClick(TGLVEntry* entry, int id);
|
||||
void DisplayDir(const TString& name);
|
||||
void SendText(const char* text); // *SIGNAL*
|
||||
ClassDef(FileViewFrame, 0); //ROOT requirement
|
||||
|
||||
private:
|
||||
TGTransientFrame *fMain;
|
||||
TGTextButton *fOkButton, *fCancelButton;
|
||||
TGTextEntry *fNameField;
|
||||
TGFileContainer *fContents;
|
||||
TGListView *fViewer;
|
||||
std::string suffix;
|
||||
bool dirFlag;
|
||||
};
|
||||
|
||||
#endif
|
217
premake5.lua
Normal file
217
premake5.lua
Normal file
|
@ -0,0 +1,217 @@
|
|||
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"
|
|
@ -1,146 +0,0 @@
|
|||
add_subdirectory(spsdict)
|
||||
add_subdirectory(guidict)
|
||||
|
||||
add_executable(EventBuilder)
|
||||
target_compile_definitions(EventBuilder PUBLIC ETC_DIR_PATH="${CMAKE_CURRENT_SOURCE_DIR}/../etc/")
|
||||
target_sources(EventBuilder
|
||||
PRIVATE
|
||||
main.cpp
|
||||
evb/ChannelMap.cpp
|
||||
evb/ChannelMap.h
|
||||
evb/CompassFile.cpp
|
||||
evb/CompassFile.h
|
||||
evb/CompassRun.cpp
|
||||
evb/CompassRun.h
|
||||
evb/CutHandler.cpp
|
||||
evb/CutHandler.h
|
||||
evb/EVBApp.cpp
|
||||
evb/EVBApp.h
|
||||
evb/FastSort.cpp
|
||||
evb/FastSort.h
|
||||
evb/FlagHandler.cpp
|
||||
evb/FlagHandler.h
|
||||
evb/FP_kinematics.cpp
|
||||
evb/FP_kinematics.h
|
||||
evb/MassLookup.cpp
|
||||
evb/MassLookup.h
|
||||
evb/OrderChecker.cpp
|
||||
evb/OrderChecker.h
|
||||
evb/RunCollector.cpp
|
||||
evb/RunCollector.h
|
||||
evb/SFPAnalyzer.cpp
|
||||
evb/SFPAnalyzer.h
|
||||
evb/SFPPlotter.cpp
|
||||
evb/SFPPlotter.h
|
||||
evb/SlowSort.cpp
|
||||
evb/SlowSort.h
|
||||
evb/Stopwatch.cpp
|
||||
evb/Stopwatch.h
|
||||
evb/ShiftMap.cpp
|
||||
evb/ShiftMap.h
|
||||
evb/Logger.h
|
||||
evb/Logger.cpp
|
||||
spsdict/DataStructs.h
|
||||
)
|
||||
target_include_directories(EventBuilder PUBLIC ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/evb ${CMAKE_CURRENT_LIST_DIR}/spsdict ${SPDLOG_INCLUDE})
|
||||
target_precompile_headers(EventBuilder PUBLIC ${PCH_DIR}/EventBuilder.h)
|
||||
target_link_libraries(EventBuilder
|
||||
PUBLIC
|
||||
SPSDict
|
||||
ROOT::Gui
|
||||
ROOT::Core
|
||||
ROOT::Gpad
|
||||
ROOT::Graf3d
|
||||
ROOT::Graf
|
||||
ROOT::Hist
|
||||
ROOT::Imt
|
||||
ROOT::MathCore
|
||||
ROOT::Matrix
|
||||
ROOT::MultiProc
|
||||
ROOT::Net
|
||||
ROOT::Physics
|
||||
ROOT::Postscript
|
||||
ROOT::RIO
|
||||
ROOT::ROOTDataFrame
|
||||
ROOT::ROOTVecOps
|
||||
ROOT::Rint
|
||||
ROOT::Thread
|
||||
ROOT::TreePlayer
|
||||
ROOT::Tree
|
||||
spdlog::spdlog
|
||||
)
|
||||
|
||||
|
||||
add_executable(EventBuilderGui)
|
||||
target_compile_definitions(EventBuilderGui PUBLIC ETC_DIR_PATH="${CMAKE_CURRENT_SOURCE_DIR}/../etc/")
|
||||
target_sources(EventBuilderGui
|
||||
PRIVATE
|
||||
gui_main.cpp
|
||||
evb/ChannelMap.cpp
|
||||
evb/ChannelMap.h
|
||||
evb/CompassFile.cpp
|
||||
evb/CompassFile.h
|
||||
evb/CompassRun.cpp
|
||||
evb/CompassRun.h
|
||||
evb/CutHandler.cpp
|
||||
evb/CutHandler.h
|
||||
evb/EVBApp.cpp
|
||||
evb/EVBApp.h
|
||||
evb/FastSort.cpp
|
||||
evb/FastSort.h
|
||||
evb/FlagHandler.cpp
|
||||
evb/FlagHandler.h
|
||||
evb/FP_kinematics.cpp
|
||||
evb/FP_kinematics.h
|
||||
evb/MassLookup.cpp
|
||||
evb/MassLookup.h
|
||||
evb/OrderChecker.cpp
|
||||
evb/OrderChecker.h
|
||||
evb/RunCollector.cpp
|
||||
evb/RunCollector.h
|
||||
evb/SFPAnalyzer.cpp
|
||||
evb/SFPAnalyzer.h
|
||||
evb/SFPPlotter.cpp
|
||||
evb/SFPPlotter.h
|
||||
evb/SlowSort.cpp
|
||||
evb/SlowSort.h
|
||||
evb/Stopwatch.cpp
|
||||
evb/Stopwatch.h
|
||||
evb/ShiftMap.cpp
|
||||
evb/ShiftMap.h
|
||||
evb/Logger.h
|
||||
evb/Logger.cpp
|
||||
spsdict/DataStructs.h
|
||||
guidict/EVBMainFrame.h
|
||||
guidict/FileViewFrame.h
|
||||
)
|
||||
target_include_directories(EventBuilderGui PUBLIC ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/evb ${CMAKE_CURRENT_LISTDIR}/spsdict ${CMAKE_CURRENT_LIST_DIR}/guidict ${SPDLOG_INCLUDE})
|
||||
target_precompile_headers(EventBuilderGui REUSE_FROM EventBuilder)
|
||||
target_link_libraries(EventBuilderGui
|
||||
PUBLIC
|
||||
SPSDict
|
||||
GUIDict
|
||||
ROOT::Gui
|
||||
ROOT::Core
|
||||
ROOT::Gpad
|
||||
ROOT::Graf3d
|
||||
ROOT::Graf
|
||||
ROOT::Hist
|
||||
ROOT::Imt
|
||||
ROOT::MathCore
|
||||
ROOT::Matrix
|
||||
ROOT::MultiProc
|
||||
ROOT::Net
|
||||
ROOT::Physics
|
||||
ROOT::Postscript
|
||||
ROOT::RIO
|
||||
ROOT::ROOTDataFrame
|
||||
ROOT::ROOTVecOps
|
||||
ROOT::Rint
|
||||
ROOT::Thread
|
||||
ROOT::TreePlayer
|
||||
ROOT::Tree
|
||||
spdlog::spdlog
|
||||
)
|
||||
|
||||
install(TARGETS EventBuilder EventBuilderGui RUNTIME DESTINATION bin)
|
3
src/EventBuilder.cpp
Normal file
3
src/EventBuilder.cpp
Normal file
|
@ -0,0 +1,3 @@
|
|||
//For MSVC pch
|
||||
|
||||
#include "EventBuilder.h"
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
Written by G.W. McCann Oct. 2020
|
||||
*/
|
||||
#include "EventBuilder.h"
|
||||
#include "ChannelMap.h"
|
||||
|
||||
namespace EventBuilder {
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
Written by G.W. McCann Oct. 2020
|
||||
*/
|
||||
#include "EventBuilder.h"
|
||||
#include "CompassFile.h"
|
||||
|
||||
namespace EventBuilder {
|
||||
|
@ -86,7 +87,7 @@ namespace EventBuilder {
|
|||
|
||||
m_file->seekg(0, std::ios_base::beg);
|
||||
|
||||
delete firstHit;
|
||||
delete[] firstHit;
|
||||
|
||||
return 24 + nsamples*16;
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
Updated to also handle scaler data. -- GWM Oct. 2020
|
||||
*/
|
||||
#include "EventBuilder.h"
|
||||
#include "CompassRun.h"
|
||||
#include "RunCollector.h"
|
||||
#include "SlowSort.h"
|
||||
|
@ -247,7 +248,7 @@ namespace EventBuilder {
|
|||
{
|
||||
count = 0;
|
||||
flush_count++;
|
||||
m_progressCallback(count, m_totalHits);
|
||||
m_progressCallback(flush_count*flush, m_totalHits);
|
||||
}
|
||||
|
||||
if(!GetHitsFromFiles())
|
||||
|
@ -315,7 +316,7 @@ namespace EventBuilder {
|
|||
{
|
||||
count = 0;
|
||||
flush_count++;
|
||||
m_progressCallback(count, m_totalHits);
|
||||
m_progressCallback(flush_count*flush, m_totalHits);
|
||||
}
|
||||
|
||||
if(!GetHitsFromFiles())
|
||||
|
@ -405,7 +406,7 @@ namespace EventBuilder {
|
|||
{
|
||||
count = 0;
|
||||
flush_count++;
|
||||
m_progressCallback(count, m_totalHits);
|
||||
m_progressCallback(flush_count*flush, m_totalHits);
|
||||
}
|
||||
|
||||
if(!GetHitsFromFiles())
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include "EventBuilder.h"
|
||||
#include "CutHandler.h"
|
||||
|
||||
namespace EventBuilder {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
Written by G.W. McCann Oct. 2020
|
||||
*/
|
||||
#include "EventBuilder.h"
|
||||
#include <cstdlib>
|
||||
#include "EVBApp.h"
|
||||
#include "RunCollector.h"
|
||||
|
@ -20,7 +21,8 @@ namespace EventBuilder {
|
|||
EVBApp::EVBApp() :
|
||||
m_rmin(0), m_rmax(0), m_ZT(0), m_AT(0), m_ZP(0), m_AP(0), m_ZE(0), m_AE(0), m_ZR(0), m_AR(0),
|
||||
m_B(0), m_Theta(0), m_BKE(0), m_progressFraction(0.1), m_workspace("none"), m_mapfile("none"), m_shiftfile("none"),
|
||||
m_cutList("none"), m_SlowWindow(0), m_FastWindowIonCh(0), m_FastWindowSABRE(0) {
|
||||
m_cutList("none"), m_scalerfile("none"), m_SlowWindow(0), m_FastWindowIonCh(0), m_FastWindowSABRE(0)
|
||||
{
|
||||
SetProgressCallbackFunc(BIND_PROGRESS_CALLBACK_FUNCTION(EVBApp::DefaultProgressCallback));
|
||||
}
|
||||
|
||||
|
@ -30,7 +32,7 @@ namespace EventBuilder {
|
|||
|
||||
void EVBApp::DefaultProgressCallback(long curVal, long totalVal)
|
||||
{
|
||||
double fraction = curVal/totalVal;
|
||||
double fraction = ((double)curVal)/totalVal;
|
||||
EVB_INFO("Percent of run built: {0}", fraction*100);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
*/
|
||||
|
||||
#include "EventBuilder.h"
|
||||
#include <cmath>
|
||||
#include "MassLookup.h"
|
||||
#include "FP_kinematics.h"
|
||||
|
@ -97,7 +98,6 @@ namespace EventBuilder {
|
|||
double denom = ME + MR - sqrt(MP*ME*EP/EE)*cos(angle);
|
||||
|
||||
K /= denom;
|
||||
std::cout<<"Delta Z= "<<-1*rho*DISP*MAG*K<<std::endl;
|
||||
return -1*rho*DISP*MAG*K; //delta-Z in cm
|
||||
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include "EventBuilder.h"
|
||||
#include "FastSort.h"
|
||||
|
||||
namespace EventBuilder {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include "EventBuilder.h"
|
||||
#include "FlagHandler.h"
|
||||
|
||||
namespace EventBuilder {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include "EventBuilder.h"
|
||||
#include "spdlog/sinks/stdout_color_sinks.h"
|
||||
|
||||
namespace EventBuilder {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#ifndef LOGGER_H
|
||||
#define LOGGER_H
|
||||
|
||||
#include <memory>
|
||||
#include "spdlog/spdlog.h"
|
||||
#include "spdlog/fmt/ostr.h"
|
||||
|
||||
namespace EventBuilder {
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ of this map (MASS) for use throughout code it is included into.
|
|||
Written by G.W. McCann Aug. 2020
|
||||
|
||||
*/
|
||||
#include "EventBuilder.h"
|
||||
#include "MassLookup.h"
|
||||
|
||||
namespace EventBuilder {
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
Written by G.W. McCann Oct. 2020
|
||||
*/
|
||||
#include "EventBuilder.h"
|
||||
#include "OrderChecker.h"
|
||||
|
||||
namespace EventBuilder {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include "EventBuilder.h"
|
||||
#include "RunCollector.h"
|
||||
#include <TSystemDirectory.h>
|
||||
#include <TSystemFile.h>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
*
|
||||
* Position calibrations swapped as of Aug. 2021 due to detector fixes -- GWM
|
||||
*/
|
||||
#include "EventBuilder.h"
|
||||
#include "SFPAnalyzer.h"
|
||||
|
||||
namespace EventBuilder {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
*Created Jan 2020 by GWM
|
||||
*/
|
||||
|
||||
#include "EventBuilder.h"
|
||||
#include "SFPPlotter.h"
|
||||
#include <TSystem.h>
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
Written by G.W. McCann Oct. 2020
|
||||
*/
|
||||
#include "EventBuilder.h"
|
||||
#include "ShiftMap.h"
|
||||
|
||||
namespace EventBuilder {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
*Refurbished and updated Jan 2020 GWM
|
||||
*/
|
||||
#include "EventBuilder.h"
|
||||
#include "SlowSort.h"
|
||||
|
||||
namespace EventBuilder {
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
Written by G.W. McCann Oct. 2020
|
||||
*/
|
||||
#include "EventBuilder.h"
|
||||
#include "Stopwatch.h"
|
||||
|
||||
namespace EventBuilder {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include "evb/Logger.h"
|
||||
#include "spsdict/DataStructs.h"
|
||||
#include <TApplication.h>
|
||||
#include "guidict/EVBMainFrame.h"
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
root_generate_dictionary(G__GUIDict EVBMainFrame.h FileViewFrame.h LINKDEF LinkDef_Gui.h)
|
||||
|
||||
add_library(GUIDict SHARED EVBMainFrame.cpp FileViewFrame.cpp EVBMainFrame.h FileViewFrame.h G__GUIDict.cxx)
|
||||
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} ${PCH_DIR} ${SPDLOG_INCLUDE} ${CMAKE_CURRENT_SOURCE_DIR}/../evb)
|
||||
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
|
||||
ROOT::Gui
|
||||
ROOT::Core
|
||||
ROOT::Gpad
|
||||
ROOT::Graf3d
|
||||
ROOT::Graf
|
||||
ROOT::Hist
|
||||
ROOT::Imt
|
||||
ROOT::MathCore
|
||||
ROOT::Matrix
|
||||
ROOT::MultiProc
|
||||
ROOT::Net
|
||||
ROOT::Physics
|
||||
ROOT::Postscript
|
||||
ROOT::RIO
|
||||
ROOT::ROOTDataFrame
|
||||
ROOT::ROOTVecOps
|
||||
ROOT::Rint
|
||||
ROOT::Thread
|
||||
ROOT::TreePlayer
|
||||
ROOT::Tree
|
||||
spdlog::spdlog
|
||||
)
|
||||
|
||||
install(TARGETS GUIDict
|
||||
LIBRARY DESTINATION lib
|
||||
PUBLIC_HEADER DESTINATION include)
|
|
@ -276,11 +276,13 @@ void EVBMainFrame::HandleMenuSelection(int id)
|
|||
if(id == M_Save_Config)
|
||||
{
|
||||
new TGFileDialog(gClient->GetRoot(), this, kFDOpen, fInfo);
|
||||
if(fInfo->fFilename)
|
||||
SaveConfig(fInfo->fFilename);
|
||||
}
|
||||
else if(id == M_Load_Config)
|
||||
{
|
||||
new TGFileDialog(gClient->GetRoot(), this, kFDOpen, fInfo);
|
||||
if(fInfo->fFilename)
|
||||
LoadConfig(fInfo->fFilename);
|
||||
}
|
||||
else if(id == M_Exit)
|
||||
|
@ -295,24 +297,28 @@ void EVBMainFrame::DoOpenWorkdir()
|
|||
void EVBMainFrame::DoOpenCMapfile()
|
||||
{
|
||||
new TGFileDialog(gClient->GetRoot(), this, kFDOpen, fInfo);
|
||||
if(fInfo->fFilename)
|
||||
DisplayCMap(fInfo->fFilename);
|
||||
}
|
||||
|
||||
void EVBMainFrame::DoOpenSMapfile()
|
||||
{
|
||||
new TGFileDialog(gClient->GetRoot(), this, kFDOpen, fInfo);
|
||||
if(fInfo->fFilename)
|
||||
DisplaySMap(fInfo->fFilename);
|
||||
}
|
||||
|
||||
void EVBMainFrame::DoOpenScalerfile()
|
||||
{
|
||||
new TGFileDialog(gClient->GetRoot(), this, kFDOpen, fInfo);
|
||||
if(fInfo->fFilename)
|
||||
DisplayScaler(fInfo->fFilename);
|
||||
}
|
||||
|
||||
void EVBMainFrame::DoOpenCutfile()
|
||||
{
|
||||
new TGFileDialog(gClient->GetRoot(), this, kFDOpen, fInfo);
|
||||
if(fInfo->fFilename)
|
||||
DisplayCut(fInfo->fFilename);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include "evb/Logger.h"
|
||||
#include "spsdict/DataStructs.h"
|
||||
#include "evb/EVBApp.h"
|
||||
#include "evb/Stopwatch.h"
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
root_generate_dictionary(G__SPSDict DataStructs.h LINKDEF LinkDef_sps.h)
|
||||
|
||||
add_library(SPSDict SHARED DataStructs.h DataStructs.cpp G__SPSDict.cxx)
|
||||
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} ${PCH_DIR} ${SPDLOG_INCLUDE} ${CMAKE_CURRENT_SOURCE_DIR}/../evb)
|
||||
target_precompile_headers(SPSDict PUBLIC ${PCH_DIR}/EventBuilder.h)
|
||||
set_target_properties(SPSDict PROPERTIES PUBLIC_HEADER "DataStructs.h")
|
||||
target_link_libraries(SPSDict
|
||||
PUBLIC
|
||||
ROOT::Gui
|
||||
ROOT::Core
|
||||
ROOT::Gpad
|
||||
ROOT::Graf3d
|
||||
ROOT::Graf
|
||||
ROOT::Hist
|
||||
ROOT::Imt
|
||||
ROOT::MathCore
|
||||
ROOT::Matrix
|
||||
ROOT::MultiProc
|
||||
ROOT::Net
|
||||
ROOT::Physics
|
||||
ROOT::Postscript
|
||||
ROOT::RIO
|
||||
ROOT::ROOTDataFrame
|
||||
ROOT::ROOTVecOps
|
||||
ROOT::Rint
|
||||
ROOT::Thread
|
||||
ROOT::TreePlayer
|
||||
ROOT::Tree
|
||||
spdlog::spdlog
|
||||
)
|
||||
|
||||
install(TARGETS SPSDict
|
||||
LIBRARY DESTINATION lib
|
||||
PUBLIC_HEADER DESTINATION include)
|
|
@ -6,6 +6,8 @@
|
|||
#ifndef DATA_STRUCTS_H
|
||||
#define DATA_STRUCTS_H
|
||||
|
||||
#include <vector>
|
||||
|
||||
struct DPPChannel
|
||||
{
|
||||
double Timestamp;
|
||||
|
|
Loading…
Reference in New Issue
Block a user