1 #ifndef _ParameterStorage_ROOT_h_
2 #define _ParameterStorage_ROOT_h_
5 # include <utl/ParameterStorage.h>
7 #include <io/EventIO.h>
26 template<
class ParameterStorage>
29 const auto pars = h.GetEnumVector();
30 for (
const auto p : pars)
31 fParameterMap[
p] = std::make_pair(h.GetParameter(
p), h.GetParameterLockStatus(
p));
33 const auto ppars = h.GetCovarianceEnumVector();
34 for (
const auto& pp : ppars) {
35 const auto& i = pp.first;
36 const auto& j = pp.second;
38 std::make_pair(h.GetParameterCovariance(i, j), h.GetParameterCovarianceLockStatus(i, j));
42 template<
class ParameterStorage>
48 const auto i =
static_cast<typename ParameterStorage::Parameter
>(ivl.first);
49 const auto& vl = ivl.second;
50 const auto& v = vl.first;
51 const auto& l = vl.second;
52 h.SetParameter(i, v, l);
56 const auto& ij = ijvl.first;
57 const auto i =
static_cast<typename ParameterStorage::Parameter
>(ij.first);
58 const auto j =
static_cast<typename ParameterStorage::Parameter
>(ij.second);
59 const auto& vl = ijvl.second;
60 const auto& v = vl.first;
61 const auto& l = vl.second;
62 h.SetParameterCovariance(i, j, v, l);
ParameterStorage_ROOT(const ParameterStorage &h)
ClassDefNV(ParameterStorage_ROOT, DONT_CHANGE_THIS_NUMBER)
Persistent ParameterStorage object using ROOT.
std::map< int, std::pair< double, bool > > fParameterMap
std::map< std::pair< int, int >, std::pair< double, bool > > fParameterCovarianceMap
void operator>>(ParameterStorage &h) const
#define DONT_CHANGE_THIS_NUMBER
std::string fParameterStorageName