MaCh3  2.6.0
Reference Guide
SampleHandlerFunctional.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 #include <functional>
5 
6 namespace M3::detail {
7 
30 struct Functional {
31  struct Shift {
32  std::vector<double> par_vals;
33  std::function<void(std::vector<double> &)> update_vals;
34  std::function<void(std::vector<double> const &, const int)> apply;
35  };
36  std::vector<Shift> shifts;
37  void update_vals() {
38  for (auto &shift : shifts) {
39  shift.update_vals(shift.par_vals);
40  }
41  }
42  std::vector<std::vector<int>> event_shifts;
43 };
44 
45 } // namespace M3::detail
Implementation details only for experts.
std::function< void(std::vector< double > const &, const int)> apply
std::function< void(std::vector< double > &)> update_vals
Helper object for storing/updating information related to functional shift parameters.
std::vector< Shift > shifts
std::vector< std::vector< int > > event_shifts