Belle II Software  release-05-01-25
ARICHBiasVoltages.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Manca Mrvar *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <framework/logging/Logger.h>
12 
13 #include <arich/dbobjects/ARICHBiasVoltages.h>
14 #include <iostream>
15 
16 using namespace std;
17 using namespace Belle2;
18 
19 ARICHBiasVoltages::ARICHBiasVoltages()
20 {
21 }
22 
23 std::vector<int> ARICHBiasVoltages::getBiasVoltages(const std::string& hapdID) const
24 {
25  if (hapdID != "") {
26  return m_hapd2voltages.find(hapdID)->second;
27  } else {
28  return std::vector<int>(5, 0);
29  }
30 
31 }
32 
33 void ARICHBiasVoltages::addVoltages(const std::string& hapdID, std::vector<int> biasVoltages)
34 {
35  m_hapd2voltages.insert(std::pair<std::string, std::vector<int>>(hapdID, biasVoltages));
36 }
37 
38 void ARICHBiasVoltages::print() const
39 {
40 
41  for (auto const& x : m_hapd2voltages) {
42  std::vector<int> voltages = x.second;
43  B2INFO("voltages: " << x.first << ": bias A = " << voltages[0] << ", bias B = " << voltages[1] << ", bias C = " << voltages[2] <<
44  ", bias D = " << voltages[3] << ", guard = " << voltages[4]);
45  }
46 }
47 
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19