Belle II Software  release-08-01-10
TOPGeoFrontEnd.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 <top/dbobjects/TOPGeoFrontEnd.h>
10 #include <iostream>
11 
12 using namespace std;
13 
14 namespace Belle2 {
20  bool TOPGeoFrontEnd::isConsistent() const
21  {
22  if (m_FBWidth <= 0) return false;
23  if (m_FBHeight <= 0) return false;
24  if (m_FBThickness <= 0) return false;
25  if (m_FBGap < 0) return false;
26  if (m_FBMaterial.empty()) return false;
27 
28  if (m_HVWidth <= 0) return false;
29  if (m_HVLength <= 0) return false;
30  if (m_HVThickness <= 0) return false;
31  if (m_HVGap < 0) return false;
32  if (m_HVMaterial.empty()) return false;
33 
34  if (m_BSWidth <= 0) return false;
35  if (m_BSHeight <= 0) return false;
36  if (m_BSLength <= 0) return false;
37  if (m_BSGap < 0) return false;
38  if (m_BSMaterial.empty()) return false;
39  if (m_spacerWidth <= 0) return false;
40  if (m_spacerMaterial.empty()) return false;
41 
42  return true;
43  }
44 
45 
46  void TOPGeoFrontEnd::print(const std::string& title) const
47  {
48  TOPGeoBase::printUnderlined(title);
49 
50  cout << " Front board: " << getFrontBoardWidth() << " X " <<
51  getFrontBoardHeight() << " X " << getFrontBoardThickness() << " " << s_unitName;
52  cout << ", gap = " << getFrontBoardGap() << " " << s_unitName;
53  cout << ", y = " << getFrontBoardY() << " " << s_unitName;
54  cout << ", material = " << getFrontBoardMaterial() << endl;
55 
56  cout << " HV board: " << getHVBoardWidth() << " X " <<
57  getHVBoardLength() << " X " << getHVBoardThickness() << " " << s_unitName;
58  cout << ", gap = " << getHVBoardGap() << " " << s_unitName;
59  cout << ", y = " << getHVBoardY() << " " << s_unitName;
60  cout << ", material = " << getHVBoardMaterial() << endl;
61 
62  cout << " Board stack: " << getBoardStackWidth() << " X " <<
63  getBoardStackHeight() << " X " << getBoardStackLength() << " " << s_unitName;
64  cout << ", gap = " << getBoardStackGap() << " " << s_unitName;
65  cout << ", y = " << getBoardStackY() << " " << s_unitName;
66  cout << ", material = " << getBoardStackMaterial() << endl;
67 
68  cout << " spacers: width = " << getSpacerWidth() << " " << s_unitName;
69  cout << ", material = " << getSpacerMaterial() << endl;
70 
71  }
72 
74 } // end Belle2 namespace
Abstract base class for different kinds of events.