Page MenuHomeHEPForge

No OneTemporary

diff --git a/Utilities/RunDirectories.cc b/Utilities/RunDirectories.cc
--- a/Utilities/RunDirectories.cc
+++ b/Utilities/RunDirectories.cc
@@ -1,111 +1,111 @@
// -*- C++ -*-
//
// RunDirectories.cc is a part of Herwig++ - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2012 The Herwig Collaboration
//
// Herwig++ is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#include "RunDirectories.h"
#include "ThePEG/Utilities/Exception.h"
#include "ThePEG/Handlers/SamplerBase.h"
#include <boost/filesystem.hpp>
using namespace ThePEG;
using namespace Herwig;
void RunDirectories::prefix(string p) {
if ( *p.rbegin() != '/' )
p += "/";
thePrefix() = p;
}
const string& RunDirectories::prefix() {
return thePrefix();
}
string& RunDirectories::thePrefix() {
- static string p = "./Matchbox/";
+ static string p = "./Herwig/";
return p;
}
string& RunDirectories::theBuildStorage() {
static string builds = "";
return builds;
}
const string& RunDirectories::buildStorage() {
if ( !theBuildStorage().empty() )
return theBuildStorage();
theBuildStorage() = prefix();
if ( theBuildStorage().empty() )
- theBuildStorage() = "./Matchbox/";
+ theBuildStorage() = "./Herwig/";
else if ( *theBuildStorage().rbegin() != '/' )
theBuildStorage() += "/";
theBuildStorage() += "Build/";
if ( boost::filesystem::exists(theBuildStorage()) ) {
if ( !boost::filesystem::is_directory(theBuildStorage()) )
- throw Exception() << "Matchbox build storage '"
+ throw Exception() << "Herwig build storage '"
<< theBuildStorage() << "' existing but not a directory."
<< Exception::abortnow;
} else {
boost::filesystem::create_directories(theBuildStorage());
}
return theBuildStorage();
}
bool RunDirectories::empty() {
return theRunDirectories().empty();
}
list<string>& RunDirectories::theRunDirectories() {
static list<string> rundirs;
return rundirs;
}
const string& RunDirectories::runStorage() {
if ( theRunDirectories().empty() )
throw Exception() << "No run directory stack has been allocated."
<< Exception::abortnow;
if ( boost::filesystem::exists(theRunDirectories().front()) ) {
if ( !boost::filesystem::is_directory(theRunDirectories().front()) )
- throw Exception() << "Matchbox run storage '"
+ throw Exception() << "Herwig run storage '"
<< theRunDirectories().front() << "' existing but not a directory."
<< Exception::abortnow;
} else {
boost::filesystem::create_directories(theRunDirectories().front());
}
return theRunDirectories().front();
}
const string& RunDirectories::interfaceStorage() {
if ( SamplerBase::runLevel() == SamplerBase::IntegrationMode ||
SamplerBase::runLevel() == SamplerBase::RunMode )
return runStorage();
return buildStorage();
}
void RunDirectories::pushRunId(string p) {
if ( *p.rbegin() != '/' )
p += "/";
if ( theRunDirectories().empty() ) {
theRunDirectories().push_front(prefix() + p);
return;
}
theRunDirectories().push_front(theRunDirectories().front() + p);
}
RunDirectories::RunDirectories()
: directoriesLeft(theRunDirectories()) {}
string RunDirectories::nextRunStorage() {
if ( directoriesLeft.empty() )
throw Exception() << "No more run directories left to try."
<< Exception::abortnow;
string res = directoriesLeft.front();
directoriesLeft.pop_front();
return res;
}
diff --git a/src/Makefile.am b/src/Makefile.am
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,197 +1,197 @@
SUBDIRS = defaults
AUTOMAKE_OPTIONS = -Wno-portability
defaultsdir = ${pkgdatadir}/defaults
bin_PROGRAMS = Herwig++
Herwig___SOURCES = Herwig++.cc herwigopts.c herwigopts.h
BUILT_SOURCES = herwigopts.c herwigopts.h
Herwig___LDFLAGS = $(AM_LDFLAGS) -export-dynamic $(THEPEGLDFLAGS) \
$(BOOST_SYSTEM_LDFLAGS) $(BOOST_FILESYSTEM_LDFLAGS)
Herwig___LDADD = $(THEPEGLIB) -ldl \
$(top_builddir)/Utilities/libHwRunDirectories.la \
$(BOOST_SYSTEM_LIBS) $(BOOST_FILESYSTEM_LIBS)
Herwig___CPPFLAGS = $(AM_CPPFLAGS) \
-DHERWIG_PKGDATADIR="\"$(pkgdatadir)\"" \
-DHERWIG_PKGLIBDIR="\"$(pkglibdir)\"" \
-DTHEPEG_PKGLIBDIR="\"$(THEPEGLIBPATH)\""
bin_SCRIPTS = herwig-config
HELPERFILES = CMSSM40.1.1.slha RPV3.1.slha NMSSM.spc \
ADD.model \
Leptoquark.model \
LH.model \
LHTP.model \
MSSM.model \
MUED.model \
NMSSM.model \
RPV-Bi.model \
RPV-Tri.model \
RS.model \
Sextet.model \
TTBA.model \
Zprime.model \
RPV-BI.slha \
RPV-TRI.slha \
RPV-UDD.slha
INPUTFILES = \
DIS.in \
DIS-Matchbox.in \
GammaGamma.in \
ILC.in \
ILC-MSSM.in \
ILC-MUED.in \
ILC-RS.in \
LEP.in \
LEP-Matchbox.in \
LHC-ADD.in \
LHC-diffractive.in \
LHC-GammaGamma.in \
LHC.in \
LHC-Matchbox.in \
LHC-LQ.in \
LHC-MSSM.in \
LHC-MUED.in \
LHC-NMSSM.in \
LHC-Powheg.in \
LHC-RPV.in \
LHC-RS.in \
LHC-Sextet.in \
LHC-TRP.in \
LHC-TTBA.in \
LHC-MB.in \
LHC-ZP.in \
TVT.in \
TVT-Powheg.in \
TVT-TTBA.in \
LHC-LH.in \
LHC-LHTP.in \
DipoleShowerParameters.in
dist_pkgdata_DATA = $(INPUTFILES) $(HELPERFILES)
pkgdata_DATA = Makefile-UserModules
CLEANFILES = HerwigDefaults.rpo \
*.run *.log *.out *.tex \
multi.test *.output probs.test chisq.value \
LHC-RS-BR.spc LHC-MSSM-BR.spc LHC-RPV-BR.spc
clean-local:
- -rm -rf Matchbox
+ -rm -rf Herwig
## checking targets ##
HerwigDefaults.rpo: Herwig++ $(srcdir)/defaults/*.in defaults/PDF.in defaults/Analysis.in $(top_builddir)/lib/*.so
./Herwig++ init -L$(top_builddir)/lib defaults/HerwigDefaults.in -D
check_BSM_Full=
check_BSM=
if WANT_BSM
check_BSM += check-LHC-RPV check-LHC-RS
check_BSM_Full += \
check-LHC-RPV check-LHC-MSSM check-ILC-MSSM \
check-LHC-NMSSM \
check-LHC-MUED check-ILC-MUED \
check-LHC-RS check-ILC-RS check-LHC-ADD \
check-LHC-LH check-LHC-LHTP \
check-LHC-TRP \
check-LHC-TTBA check-TVT-TTBA \
check-LHC-ZP \
check-LHC-LQ \
check-LHC-Sextet
endif
check-local: check-LEP check-LHC $(check_BSM) check-DIS check-ILC check-GammaGamma check-LHC-Powheg
check-Powheg: check-LHC-Powheg check-TVT-Powheg
check-BSM: $(check_BSM_Full)
check_Matchbox= \
check-LEP-Matchbox check-DIS-Matchbox check-LHC-Matchbox
check-Matchbox: $(check_Matchbox)
check-extra: check-LHC-diffractive check-LHC-GammaGamma check-LHC-MB check-TVT
check-all: check-local check-Powheg check-BSM check-Matchbox check-extra
link-helper-files:
@for i in $(HELPERFILES); do \
if test -f $(srcdir)/$$i -a ! -e $$i; then \
$(LN_S) -f $(srcdir)/$$i; fi; done
CHECKCOMMAND = ./Herwig++ run $(notdir $(subst .in,.run,$<)) -N500 -d1 -D
check-%: $(srcdir)/%.in HerwigDefaults.rpo link-helper-files
./Herwig++ read $< -D
@echo $(CHECKCOMMAND)
@$(CHECKCOMMAND) && echo "# $@ OK #" \
|| (echo "###### $@ BAD ######"; false)
## valgrind targets ##
VALGRIND=valgrind --leak-check=full --num-callers=25 --freelist-vol=100000000 --leak-resolution=med --trace-children=yes
valgrind: valgrind-init valgrind-read valgrind-run
valgrind-init:
$(VALGRIND) ./Herwig++ init -d1 -D -L$(top_builddir)/lib defaults/HerwigDefaults.in \
&> /tmp/valgrind-init.log
valgrind-read:
$(VALGRIND) ./Herwig++ read -d1 -D LHC.in &> /tmp/valgrind-read.log
valgrind-run:
$(VALGRIND) ./Herwig++ run -d1 -D -N5 LHC.run &> /tmp/valgrind-run.log
SETUPTHEPEG=$(THEPEGPATH)/bin/setupThePEG
THEPEGREPO=$(THEPEGLIBPATH)/ThePEGDefaults.rpo
install-data-hook:
@echo Creating repository
@./Herwig++ init -L$(DESTDIR)$(pkglibdir) -i$(DESTDIR)$(pkgdatadir) $(DESTDIR)$(defaultsdir)/HerwigDefaults.in --repo=$(DESTDIR)$(pkgdatadir)/HerwigDefaults.rpo
@if test -n "$(DESTDIR)"; \
then sed -i.bak -e "s@$(DESTDIR)@@g" $(DESTDIR)$(pkgdatadir)/HerwigDefaults.rpo; \
rm -f $(DESTDIR)$(pkgdatadir)/HerwigDefaults.rpo.bak; \
fi
uninstall-hook:
rm -f $(DESTDIR)$(pkgdatadir)/HerwigDefaults.rpo
register: register-with-thepeg-repo
register-with-thepeg-repo:
@if test -x "$(SETUPTHEPEG)" -a -w "$(THEPEGREPO)"; \
then echo Registering with ThePEG; \
"$(SETUPTHEPEG)" --init \
$(DESTDIR)$(defaultsdir)/HerwigDefaults.in \
-r "$(THEPEGREPO)" -o "$(THEPEGREPO)" \
-i $(DESTDIR)$(pkgdatadir) \
-l$(DESTDIR)$(pkglibdir) ; \
if test -n "$(DESTDIR)"; \
then sed -i -e "s@$(DESTDIR)@@g" "$(THEPEGREPO)" ; fi ; \
fi
unregister : unregister-from-thepeg-repo
unregister-from-thepeg-repo:
@if test -x "$(SETUPTHEPEG)" -a -w "$(THEPEGREPO)"; \
then echo Unregistering with ThePEG; \
"$(SETUPTHEPEG)" --init defaults/HerwigCleanup.in \
-r "$(THEPEGREPO)" -o "$(THEPEGREPO)" \
-l$(DESTDIR)$(pkglibdir) ; \
fi
EXTRA_DIST = herwigopts.ggo
GENGETOPT = gengetopt
%opts.h %opts.c : %opts.ggo
$(GENGETOPT) < $<

File Metadata

Mime Type
text/x-diff
Expires
Sat, Dec 21, 5:04 PM (18 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4023566
Default Alt Text
(8 KB)

Event Timeline