Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ using namespace gen;

DataCardFileWriter::DataCardFileWriter(const edm::ParameterSet& pset) {
std::string FileName = pset.getParameter<std::string>("FileName");
std::string Base = std::getenv("CMSSW_BASE");
char* tmp = std::getenv("CMSSW_BASE");
assert(tmp);
std::string Base(tmp);
Base += "/src/";
std::cout << "Writting file:" << Base + FileName << std::endl;
std::ofstream outputFile(Base + FileName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,13 +301,16 @@ void EvtGenInterface::init() {
//Setup evtGen following instructions on http://evtgen.warwick.ac.uk/docs/external/
bool convertPythiaCodes = fPSet->getUntrackedParameter<bool>(
"convertPythiaCodes", true); // Specify if we want to use Pythia 6 physics codes for decays
std::string pythiaDir =
char* tmp =
std::getenv("PYTHIA8DATA"); // Specify the pythia xml data directory to use the default PYTHIA8DATA location
if (pythiaDir.empty()) {

if (tmp == nullptr) {
edm::LogError("EvtGenInterface::~EvtGenInterface")
<< "EvtGenInterface::init() PYTHIA8DATA not defined. Terminating program ";
exit(0);
}

std::string pythiaDir(tmp);
std::string photonType("gamma"); // Specify the photon type for Photos
bool useEvtGenRandom(true); // Specify if we want to use the EvtGen random number engine for these generators

Expand Down
3 changes: 3 additions & 0 deletions GeneratorInterface/RivetInterface/plugins/RivetAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ void RivetAnalyzer::beginJob() {
//set the environment, very ugly but rivet is monolithic when it comes to paths
char* cmsswbase = std::getenv("CMSSW_BASE");
char* cmsswrelease = std::getenv("CMSSW_RELEASE_BASE");
// These should never fail
assert(cmsswbase);
assert(cmsswrelease);
if (!std::getenv("RIVET_REF_PATH")) {
const std::string rivetref = string(cmsswbase) +
"/src/GeneratorInterface/RivetInterface/data:" + string(cmsswrelease) +
Expand Down