Skip to content

Commit

Permalink
More work on templating batch results.
Browse files Browse the repository at this point in the history
Added HTML report and HTML summary.
Renamed or re-defined a lot of the JSON variables, and fixed some bugs with them.
Maybe fix a compile issue with tests on Win32.
Getting closer to having templating of act/shield fit results good-enough.
  • Loading branch information
wcjohns committed Sep 9, 2024
1 parent 7b06723 commit 9c205e6
Show file tree
Hide file tree
Showing 12 changed files with 973 additions and 208 deletions.
20 changes: 7 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,24 +135,17 @@ set(MAX_SPECTRUM_MEMMORY_SIZE_MB 256
"Amount of memory to allow spectra to take up before trying to offload them onto disk when not in use"
)

# If we are creating the normal InterSpec executable, and the InterSpec_batch executable,
# we will compile LibInterSpec as a shared library, so both exes can use it; otherwise
# we will create a static library, and statically link it into our final executable.
# (Electron doesnt need a separate exe for batch)
if( (USE_BATCH_TOOLS AND NOT BUILD_AS_ELECTRON_APP) OR BUILD_AS_OSX_APP )
set( INTERSPEC_LIB_TYPE SHARED )
else()
set( INTERSPEC_LIB_TYPE STATIC )
endif()


if(WIN32)
#0x0601==Win7, 0x0501=WinXP (Wt CMakeLists.txt uses 0x0501x)
#target_compile_definitions( InterSpecLib PUBLIC -D _WIN32_WINNT=0x0601 -D WINVER=0x0601 -D _SCL_SECURE_NO_WARNINGS /bigobj /MP )

# set(EXECUTABLE_OUTPUT_PATH . CACHE PATH "Path to executables" FORCE)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj /MP /wd4996 /wd4267" )
else(WIN32)
# set(EXECUTABLE_OUTPUT_PATH bin CACHE PATH "Path to executables" FORCE)
endif(WIN32)


SET(MYSQL_DATABASE_TO_USE "dev" CACHE STRING "Which mysql database to use (if applicable): dev/qc/prod")


Expand Down Expand Up @@ -642,11 +635,12 @@ target_compile_options(InterSpecLib PRIVATE
>)
if(WIN32)
#0x0601==Win7, 0x0501=WinXP (Wt CMakeLists.txt uses 0x0501x)
target_compile_definitions( InterSpecLib PUBLIC -D _WIN32_WINNT=0x0601 -D WINVER=0x0601 -D _SCL_SECURE_NO_WARNINGS )
target_compile_definitions( InterSpecLib PUBLIC -D _WIN32_WINNT=0x0601 -D WINVER=0x0601 -D _SCL_SECURE_NO_WARNINGS /bigobj )
target_compile_definitions( InterSpecLib PRIVATE InterSpec_EXPORTS )

if( USE_BATCH_TOOLS )
target_compile_options( InterSpecLib PUBLIC /bigobj )
# We get error compiling multi-processor debug build of shared LibInterSpec, presumably due to some
# file locking issues, so only enable parallel builds for release, if we are building shared LibInterSpec
target_compile_options( InterSpecLib PUBLIC $<$<CONFIG:Release>:/MP> )
else( USE_BATCH_TOOLS )
add_definitions( /MP )
Expand Down
1 change: 1 addition & 0 deletions InterSpec/AppUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ namespace AppUtils
const bool include_path );
#endif //#if( !ANDROID && !IOS && !BUILD_FOR_WEB_DEPLOYMENT )

InterSpec_API std::string file_contents( const std::string &filename );

#ifdef _WIN32
/** Get command line arguments encoded as UTF-8.
Expand Down
2 changes: 1 addition & 1 deletion InterSpec/BatchPeak.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ namespace BatchPeak
std::vector<std::string> report_templates;

/** File path to report templates that summarizes all input files. */
std::string summary_report_template;
std::vector<std::string> summary_report_templates;
};//struct BatchPeakFitOptions


Expand Down
4 changes: 3 additions & 1 deletion InterSpec/GammaInteractionCalc.h
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,9 @@ struct PeakResultPlotInfo
*/
struct PeakDetail
{
double energy, decayParticleEnergy, fwhm, counts, countsUncert, cps, cpsUncert;
double energy, decayParticleEnergy, fwhm;
/** counts=peak.peakArea(); countsUncert=peak.peakAreaUncert(); cps=peak.peakArea()/LiveTime*/
double counts, countsUncert, cps, cpsUncert;
double expectedCounts, observedCounts, observedUncert, numSigmaOff;
double observedOverExpected, observedOverExpectedUncert;
//float modelInto4Pi, modelInto4PiCps;
Expand Down
Loading

0 comments on commit 9c205e6

Please sign in to comment.