Belle II Software  release-08-01-10
ARICHBiasVoltages.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #include <framework/logging/Logger.h>
10 
11 #include <arich/dbobjects/ARICHBiasVoltages.h>
12 #include <iostream>
13 
14 using namespace std;
15 using namespace Belle2;
16 
17 ARICHBiasVoltages::ARICHBiasVoltages()
18 {
19 }
20 
21 std::vector<int> ARICHBiasVoltages::getBiasVoltages(const std::string& hapdID) const
22 {
23  if (hapdID != "") {
24  return m_hapd2voltages.find(hapdID)->second;
25  } else {
26  return std::vector<int>(5, 0);
27  }
28 
29 }
30 
31 void ARICHBiasVoltages::addVoltages(const std::string& hapdID, std::vector<int> biasVoltages)
32 {
33  m_hapd2voltages.insert(std::pair<std::string, std::vector<int>>(hapdID, biasVoltages));
34 }
35 
36 void ARICHBiasVoltages::print() const
37 {
38 
39  for (auto const& x : m_hapd2voltages) {
40  std::vector<int> voltages = x.second;
41  B2INFO("voltages: " << x.first << ": bias A = " << voltages[0] << ", bias B = " << voltages[1] << ", bias C = " << voltages[2] <<
42  ", bias D = " << voltages[3] << ", guard = " << voltages[4]);
43  }
44 }
45 
Abstract base class for different kinds of events.