Skip to content

Commit

Permalink
Merge pull request #294 from project8/feature/ghcrTesting
Browse files Browse the repository at this point in the history
Feature/ghcr testing
  • Loading branch information
pslocum authored Sep 19, 2023
2 parents 9408505 + 8424cd9 commit 1c4ed69
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 19 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cmake_minimum_required( VERSION 3.1 )

# Define the project
cmake_policy( SET CMP0048 NEW ) # version in project()
project( locust_mc VERSION 2.5.2)
project( locust_mc VERSION 2.5.3)


list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/Scarab/cmake )
Expand Down
8 changes: 3 additions & 5 deletions Source/Fields/LMCCylindricalCavity.cc
Original file line number Diff line number Diff line change
Expand Up @@ -484,15 +484,13 @@ namespace locust

void CylindricalCavity::PrintModeMaps(int nModes, bool bTE, double zSlice)
{
scarab::path dataDir = TOSTRING(PB_DATA_INSTALL_DIR);
std::string sFileName = (dataDir / "../output/ModemapOutput.root").string();

#ifdef ROOT_FOUND

scarab::path dataDir = TOSTRING(PB_DATA_INSTALL_DIR);
FileWriter* aRootHistoWriter = RootHistoWriter::get_instance();
char cBufferFileName[60];
int n = sprintf(cBufferFileName, "%s/../output/ModeMapOutput_z%dmm.root", dataDir.string().c_str(), (int)(zSlice*1.e3));
const char *cFileName = cBufferFileName;
aRootHistoWriter->SetFilename(cFileName);
aRootHistoWriter->SetFilename(sFileName);
aRootHistoWriter->OpenFile("RECREATE");

int nbins = GetNPixels();
Expand Down
10 changes: 4 additions & 6 deletions Source/Fields/LMCRectangularWaveguide.cc
Original file line number Diff line number Diff line change
Expand Up @@ -400,15 +400,13 @@ namespace locust

void RectangularWaveguide::PrintModeMaps(int nModes, bool bTE, double zSlice)
{
scarab::path dataDir = TOSTRING(PB_DATA_INSTALL_DIR);
std::string sFileName = (dataDir / "../output/ModemapOutput.root").string();

#ifdef ROOT_FOUND
scarab::path dataDir = TOSTRING(PB_DATA_INSTALL_DIR);
FileWriter* aRootHistoWriter = RootHistoWriter::get_instance();
char cBufferFileName[60];
int n = sprintf(cBufferFileName, "%s/../output/ModeMapOutput.root", dataDir.string().c_str());
const char *cFileName = cBufferFileName;
aRootHistoWriter->SetFilename(cFileName);
aRootHistoWriter->SetFilename(cFileName);
aRootHistoWriter->SetFilename(sFileName);
aRootHistoWriter->SetFilename(sFileName);
aRootHistoWriter->OpenFile("RECREATE");

int nbins = GetNPixels();
Expand Down
11 changes: 4 additions & 7 deletions Source/RxComponents/LMCCavityModes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,14 @@ namespace locust
if( aParam.has( "norm-check" ) )
{
scarab::path dataDir = TOSTRING(PB_DATA_INSTALL_DIR);
char cBufferFileName[60];
int n = sprintf(cBufferFileName, "%s/../output/ModeEnergies.txt", dataDir.string().c_str());
const char *cFileName = cBufferFileName;
fp = fopen(cFileName, "w");
std::string sFileName = (dataDir / "../output/ModeEnergies.root").string();
std::string sTextFileName = (dataDir / "../output/ModeEnergies.txt").string();
fp = fopen(sTextFileName.c_str(), "w");
fclose(fp);

#ifdef ROOT_FOUND
fRootHistoWriter = RootHistoWriter::get_instance();
n = sprintf(cBufferFileName, "%s/../output/ModeEnergies.root", dataDir.string().c_str());
cFileName = cBufferFileName;
fRootHistoWriter->SetFilename(cFileName);
fRootHistoWriter->SetFilename(sFileName);
fRootHistoWriter->OpenFile("RECREATE");
fRootHistoWriter->CloseFile();
#endif
Expand Down

0 comments on commit 1c4ed69

Please sign in to comment.