pflib v3.10.0-3-g113fad1
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
global_pedestal_level.h
1#pragma once
2
3#include "../daq_run.h"
4#include "pflib/Target.h"
5
10namespace pflib::algorithm {
11
21 public:
22 DataFitter();
23
24 // Member functions
25
26 void sort_and_append(std::vector<int>& inv_vrefs, std::vector<int>& pedestals,
27 std::vector<double>& stds, int& step);
28 int fit(int target);
29
30 int linear_fit(int& target);
31
32 // Member variables
33
34 struct Point {
35 int x_;
36 int y_;
37 double LH_;
38 double RH_;
39 };
40 std::vector<Point> linear_;
41 std::vector<Point> nonlinear_;
42 double LH_median_;
43 double LH_std_median_;
44 double RH_median_;
45};
46
51void get_param(Target* tgt, DecodeAndBuffer& buffer, const std::size_t& nevents,
52 int& step, std::map<int, std::vector<int>>& pedestals_l0,
53 std::map<int, std::vector<double>>& stds_l0,
54 std::map<int, std::vector<int>>& pedestals_l1,
55 std::map<int, std::vector<double>>& stds_l1,
56 std::map<int, std::vector<int>>& inv_vrefs,
57 std::map<int, std::array<int, 2>>& noinv_vref);
58
68
69} // namespace pflib::algorithm
Consume an event packet, decode it, and save to buffer.
Definition daq_run.h:132
encapulating a given setup's access rules
Definition Target.h:25
Data class that stores information about each point in a 1d space.
Definition global_pedestal_level.h:20
housing of higher-level methods for repeatable tasks
Definition get_calibs.cxx:10
void get_param(Target *tgt, DecodeAndBuffer &buffer, const std::size_t &nevents, int &step, std::map< int, std::vector< int > > &pedestals_l0, std::map< int, std::vector< double > > &stds_l0, std::map< int, std::vector< int > > &pedestals_l1, std::map< int, std::vector< double > > &stds_l1, std::map< int, std::vector< int > > &inv_vrefs, std::map< int, std::array< int, 2 > > &noinv_vref)
Collect inv_vref data for the constant input noinv_vref parameter.
Definition global_pedestal_level.cxx:172
std::map< int, std::map< std::string, std::map< std::string, uint64_t > > > global_pedestal_level(Target *tgt)
Find the inv_vref and noinv_vref parameters.
Definition global_pedestal_level.cxx:231
Definition global_pedestal_level.h:34