Belle II Software  release-05-01-25
TOPGeoFrontEnd.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Staric *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <top/dbobjects/TOPGeoFrontEnd.h>
12 #include <iostream>
13 
14 using namespace std;
15 
16 namespace Belle2 {
22  bool TOPGeoFrontEnd::isConsistent() const
23  {
24  if (m_FBWidth <= 0) return false;
25  if (m_FBHeight <= 0) return false;
26  if (m_FBThickness <= 0) return false;
27  if (m_FBGap < 0) return false;
28  if (m_FBMaterial.empty()) return false;
29 
30  if (m_HVWidth <= 0) return false;
31  if (m_HVLength <= 0) return false;
32  if (m_HVThickness <= 0) return false;
33  if (m_HVGap < 0) return false;
34  if (m_HVMaterial.empty()) return false;
35 
36  if (m_BSWidth <= 0) return false;
37  if (m_BSHeight <= 0) return false;
38  if (m_BSLength <= 0) return false;
39  if (m_BSGap < 0) return false;
40  if (m_BSMaterial.empty()) return false;
41  if (m_spacerWidth <= 0) return false;
42  if (m_spacerMaterial.empty()) return false;
43 
44  return true;
45  }
46 
47 
48  void TOPGeoFrontEnd::print(const std::string& title) const
49  {
50  TOPGeoBase::printUnderlined(title);
51 
52  cout << " Front board: " << getFrontBoardWidth() << " X " <<
53  getFrontBoardHeight() << " X " << getFrontBoardThickness() << " " << s_unitName;
54  cout << ", gap = " << getFrontBoardGap() << " " << s_unitName;
55  cout << ", y = " << getFrontBoardY() << " " << s_unitName;
56  cout << ", material = " << getFrontBoardMaterial() << endl;
57 
58  cout << " HV board: " << getHVBoardWidth() << " X " <<
59  getHVBoardLength() << " X " << getHVBoardThickness() << " " << s_unitName;
60  cout << ", gap = " << getHVBoardGap() << " " << s_unitName;
61  cout << ", y = " << getHVBoardY() << " " << s_unitName;
62  cout << ", material = " << getHVBoardMaterial() << endl;
63 
64  cout << " Board stack: " << getBoardStackWidth() << " X " <<
65  getBoardStackHeight() << " X " << getBoardStackLength() << " " << s_unitName;
66  cout << ", gap = " << getBoardStackGap() << " " << s_unitName;
67  cout << ", y = " << getBoardStackY() << " " << s_unitName;
68  cout << ", material = " << getBoardStackMaterial() << endl;
69 
70  cout << " spacers: width = " << getSpacerWidth() << " " << s_unitName;
71  cout << ", material = " << getSpacerMaterial() << endl;
72 
73  }
74 
76 } // end Belle2 namespace
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19