[Rivet] Rivet

Andrii Verbytskyi andrii.verbytskyi at desy.de
Fri Dec 5 12:44:44 GMT 2014


Dear Andy,
here are some (hopefully useful) improvements for Rivet.

In addition to --analysis-path I think it would be useful to have

--ref-path, --info-path, --plot-path.


So here are the files with the changes. Please note that rivet should be
generated from rivet.in with a substitution of install paths.

Best regards,
Andrii
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rivet.in
Type: text/x-python
Size: 19553 bytes
Desc: not available
URL: <https://www.hepforge.org/lists-archive/rivet/attachments/20141205/37dd9f89/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RivetPaths.hh
Type: text/x-c++hdr
Size: 3429 bytes
Desc: not available
URL: <https://www.hepforge.org/lists-archive/rivet/attachments/20141205/37dd9f89/attachment.hh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RivetPaths.cc
Type: text/x-c++src
Size: 5420 bytes
Desc: not available
URL: <https://www.hepforge.org/lists-archive/rivet/attachments/20141205/37dd9f89/attachment.cc>
-------------- next part --------------
from libcpp.map cimport map
from libcpp.pair cimport pair
from libcpp.vector cimport vector
from libcpp cimport bool
from libcpp.string cimport string

ctypedef int PdgId
ctypedef pair[PdgId,PdgId] PdgIdPair

cdef extern from "Rivet/AnalysisHandler.hh" namespace "Rivet":
    cdef cppclass AnalysisHandler:
        void setIgnoreBeams(bool)
        AnalysisHandler& addAnalysis(string)
        void writeData(string&)
        double crossSection()
        void finalize()

cdef extern from "Rivet/Run.hh" namespace "Rivet":
    cdef cppclass Run:
        Run(AnalysisHandler)
        Run& setCrossSection(double) # For chaining?
        Run& setListAnalyses(bool)
        bool init(string, double) # $2=1.0
        bool openFile(string, double) # $2=1.0
        bool readEvent()
        bool processEvent()
        bool finalize()

cdef extern from "Rivet/Analysis.hh" namespace "Rivet":
    cdef cppclass Analysis:
        vector[PdgIdPair]& requiredBeams()
        vector[pair[double, double]] requiredEnergies()
        vector[string] authors()
        vector[string] references()
        string name()
        string bibTeX()
        string bibKey()
        string collider()
        string description()
        string experiment()
        string inspireId()
        string spiresId()
        string runInfo()
        string status()
        string summary()
        string year()

# Might need to translate the following errors, although I believe 'what' is now
# preserved. But often, we need the exception class name.
#Error
#RangeError
#LogicError
#PidError
#InfoError
#WeightError
#UserError

cdef extern from "Rivet/AnalysisLoader.hh":
    vector[string] AnalysisLoader_analysisNames "Rivet::AnalysisLoader::analysisNames" ()
    Analysis* AnalysisLoader_getAnalysis "Rivet::AnalysisLoader::getAnalysis" (string)

cdef extern from "Rivet/Tools/RivetPaths.hh" namespace "Rivet":
    void addAnalysisLibPath(string)
    void addAnalysisInfoPath(string)
    void addAnalysisPlotPath(string)
    void addAnalysisRefPath(string)
    string findAnalysisRefFile(string)
    vector[string] getAnalysisLibPaths()
    void setAnalysisLibPaths(vector[string])
    vector[string] getAnalysisInfoPaths()
    void setAnalysisInfoPaths(vector[string])
    vector[string] getAnalysisPlotPaths()
    void setAnalysisPlotPaths(vector[string])
    vector[string] getAnalysisRefPaths()
    void setAnalysisRefPaths(vector[string])

cdef extern from "Rivet/Rivet.hh" namespace "Rivet":
    string version()

cdef extern from "Rivet/Tools/Logging.hh":
    void setLogLevel "Rivet::Log::setLevel" (string, int)


More information about the Rivet mailing list