pflib v3.9.5-18-g30f792c
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
TempParameters.h
1#pragma once
2#ifndef PFLIB_TEMPPARAMETERS_H
3#define PFLIB_TEMPPARAMETERS_H
4
5namespace pflib {
6
7template <class Chip>
9 public:
12 Chip& chip,
14 : chip_{chip} {
15 previous_registers_ = chip_.applyParameters(parameters);
16 }
21 TempParameters& operator=(const TempParameters&) = delete;
23 class Builder {
25 Chip& chip_;
26
27 public:
28 Builder(Chip& chip) : parameters_{}, chip_{chip} {}
29 Builder& add(const std::string& page, const std::string& param,
30 const uint64_t& val) {
31 parameters_[page][param] = val;
32 return *this;
33 }
34 [[nodiscard]] TempParameters apply() {
35 return TempParameters(chip_, parameters_);
36 }
37 };
38
39 private:
41 Chip& chip_;
44};
45
46} // namespace pflib
47
48#endif
Build a TempParameters class parameter by parameters.
Definition TempParameters.h:23
Definition TempParameters.h:8
Chip & chip_
handle to a Chip that has setRegisters
Definition TempParameters.h:41
~TempParameters()
applies the previous registers back onto the chip
Definition TempParameters.h:18
std::map< int, std::map< int, uint8_t > > previous_registers_
values for previous registers that were touched upon construction
Definition TempParameters.h:43
TempParameters(const TempParameters &)=delete
cannot copy or assign this lock
TempParameters(Chip &chip, const std::map< std::string, std::map< std::string, uint64_t > > &parameters)
applies the new parameters and holds the previous registers
Definition TempParameters.h:11
This version of the fast control code interfaces with the CMS Fast control library which can be contr...
Definition Backend.cxx:3