Skip to content
Snippets Groups Projects
Commit 5f61ecc8 authored by Matthias Steinke's avatar Matthias Steinke
Browse files

dirty hack in Jamroot to switch Minuit2 libs

parent 83bc46b8
No related branches found
No related tags found
No related merge requests found
import os ;
local MinuitVariant = [ os.environ MinuitVariant ] ;
path-constant TOP : . ;
local rlibs = [ SHELL "$(ROOTSYS)/bin/root-config --libs" ] ;
ROOTLIBS = [ MATCH "(.*)[\n]" : $(rlibs) ] ;
......@@ -13,7 +15,7 @@ project :
<cxxflags>-fopenmp
<linkflags>$(ROOTLIBS)
<linkflags>$(BOOSTLIBS)
<linkflags>-lMinuit2
<linkflags>-l$(MinuitVariant)
<linkflags>-lgomp
<linkflags>-pthread
<linkflags>-fopenmp
......
#ifndef ERRVALUE_HH
#define ERRVALUE_HH
#pragma once
#include <iostream>
class ErrValue
{
class ErrValue {
public:
ErrValue();
......@@ -36,13 +34,9 @@ public:
bool operator>=(ErrValue& v) const;
private:
double meanValue;
double plus;
double minus;
friend std::ostream &operator<<(std::ostream &o, const ErrValue &v);
};
#endif
#ifndef MATHUTILS_HH
#define MATHUTILS_HH
#pragma once
#include <cassert>
inline double pow(double x, int p)
{
inline double pow(double x, int p) {
if(p == 0) return 1.0;
if(x == 0.0 && p > 0) return 0.0;
if(p < 0) {p=-p; x=1/x;}
......@@ -17,8 +15,7 @@ inline double pow(double x, int p)
}
}
inline double pow(double x, unsigned int p)
{
inline double pow(double x, unsigned int p) {
if(p == 0) return 1.0;
if(x == 0.0) return 0.0;
......@@ -30,9 +27,7 @@ inline double pow(double x, unsigned int p)
}
}
inline int pow(int x, int p)
{
inline int pow(int x, int p) {
if(p == 0) return 1;
if(x == 0 && p > 0) return 0;
if(p < 0) {assert(x == 1 || x == -1); return (-p % 2) ? x : 1;}
......@@ -45,8 +40,7 @@ inline int pow(int x, int p)
}
}
inline unsigned int pow(unsigned int x, unsigned int p)
{
inline unsigned int pow(unsigned int x, unsigned int p) {
if(p == 0) return 1;
if(x == 0) return 0;
......@@ -57,5 +51,3 @@ inline unsigned int pow(unsigned int x, unsigned int p)
x *= x;
}
}
#endif
#ifndef _PawianCollectionUtils_H
#define _PawianCollectionUtils_H
#pragma once
#include <algorithm>
#include <boost/shared_ptr.hpp>
namespace pawian {
namespace Collection {
struct PtrLess {
template<class PtrType>
template<class PtrType>
bool operator()(PtrType ptr1, PtrType ptr2) const {
return (*ptr1) < (*ptr2);
}
};
struct SharedPtrLess {
template<class PtrType>
bool operator()(boost::shared_ptr<PtrType> shptr1, boost::shared_ptr<PtrType> shptr2) const {
template<class PtrType>
bool operator()(boost::shared_ptr<PtrType> shptr1,
boost::shared_ptr<PtrType> shptr2) const {
PtrType* ptr1=shptr1.get();
PtrType* ptr2=shptr2.get();
return (*ptr1) < (*ptr2);
}
};
}
}
#endif
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment