Skip to content

Commit

Permalink
Fix some errors and warnings when compiling on macOS
Browse files Browse the repository at this point in the history
Summary:
Compiling on macOS Mojave produces some errors and warnings.
This revision fixes those issues.

Test Plan: Compile again with the fixes.

Differential Revision: https://phab.hepforge.org/D63
  • Loading branch information
tomlatham committed Mar 16, 2021
1 parent 6d93ea5 commit ccad6c7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 19 deletions.
5 changes: 3 additions & 2 deletions src/EvtGenBase/EvtGenKine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
#include "EvtGenBase/EvtGenKine.hh"

#include "EvtGenBase/EvtConst.hh"
#include "EvtGenBase/EvtParticle.hh"
#include "EvtGenBase/EvtPatches.hh"
#include "EvtGenBase/EvtRandom.hh"
#include "EvtGenBase/EvtReport.hh"
#include "EvtGenBase/EvtVector4R.hh"
#include "EvtGenBase/EvtParticle.hh"

#include <cmath>
#include <iostream>
#include <math.h>

using std::endl;

double EvtPawt( double a, double b, double c )
Expand Down
32 changes: 19 additions & 13 deletions src/EvtGenExternal/EvtExternalGenFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,12 @@ EvtExternalGenFactory* EvtExternalGenFactory::getInstance()
return theFactory;
}

// Only define the generator if we have the external ifdef variable set
#ifdef EVTGEN_PYTHIA
void EvtExternalGenFactory::definePythiaGenerator( std::string xmlDir,
bool convertPhysCodes,
bool useEvtGenRandom )
{
// Only define the generator if we have the external ifdef variable set
#ifdef EVTGEN_PYTHIA

int genId = EvtExternalGenFactory::PythiaGenId;

EvtGenReport( EVTGEN_INFO, "EvtGen" )
Expand All @@ -93,15 +92,17 @@ void EvtExternalGenFactory::definePythiaGenerator( std::string xmlDir,
EvtAbsExternalGen* pythiaGenerator =
new EvtPythiaEngine( xmlDir, convertPhysCodes, useEvtGenRandom );
_extGenMap[genId] = pythiaGenerator;

#endif
}
#else
void EvtExternalGenFactory::definePythiaGenerator( std::string, bool, bool )
{
}
#endif

#ifdef EVTGEN_PHOTOS
void EvtExternalGenFactory::definePhotosGenerator( std::string photonType,
bool useEvtGenRandom )
{
#ifdef EVTGEN_PHOTOS

int genId = EvtExternalGenFactory::PhotosGenId;

EvtGenReport( EVTGEN_INFO, "EvtGen" )
Expand All @@ -110,23 +111,28 @@ void EvtExternalGenFactory::definePhotosGenerator( std::string photonType,
EvtAbsExternalGen* photosGenerator = new EvtPhotosEngine( photonType,
useEvtGenRandom );
_extGenMap[genId] = photosGenerator;

#endif
}
#else
void EvtExternalGenFactory::definePhotosGenerator( std::string, bool )
{
}
#endif

#ifdef EVTGEN_TAUOLA
void EvtExternalGenFactory::defineTauolaGenerator( bool useEvtGenRandom )
{
#ifdef EVTGEN_TAUOLA

int genId = EvtExternalGenFactory::TauolaGenId;

EvtGenReport( EVTGEN_INFO, "EvtGen" ) << "Defining EvtTauolaEngine." << endl;

EvtAbsExternalGen* tauolaGenerator = new EvtTauolaEngine( useEvtGenRandom );
_extGenMap[genId] = tauolaGenerator;

#endif
}
#else
void EvtExternalGenFactory::defineTauolaGenerator( bool )
{
}
#endif

EvtAbsExternalGen* EvtExternalGenFactory::getGenerator( int genId )
{
Expand Down
5 changes: 1 addition & 4 deletions src/EvtGenModels/EvtFlatSqDalitz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,8 @@
#include "EvtGenBase/EvtRandom.hh"
#include "EvtGenBase/EvtReport.hh"

#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
#include <string>
using std::fstream;

EvtFlatSqDalitz::~EvtFlatSqDalitz()
{
Expand Down

0 comments on commit ccad6c7

Please sign in to comment.