Belle II Software  release-08-01-10
TOPGeoPrismEnclosure.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/TOPGeoPrismEnclosure.h>
10 #include <framework/gearbox/Unit.h>
11 #include <iostream>
12 
13 using namespace std;
14 
15 namespace Belle2 {
21  bool TOPGeoPrismEnclosure::isConsistent() const
22  {
23  if (m_length <= 0) return false;
24  if (m_height <= 0) return false;
25  if (m_bottomThickness <= 0) return false;
26  if (m_sideThickness <= 0) return false;
27  if (m_backThickness <= 0) return false;
28  if (m_frontThickness <= 0) return false;
29  if (m_extensionThickness <= 0) return false;
30  if (m_material.empty()) return false;
31  return true;
32  }
33 
34 
35  void TOPGeoPrismEnclosure::print(const std::string& title) const
36  {
37  TOPGeoBase::print(title);
38 
39  cout << " length = " << getLength() << " " << s_unitName;
40  cout << ", height = " << getHeight() << " " << s_unitName;
41  cout << ", angle = " << getAngle() / Unit::deg << " deg";
42  cout << ", material = " << getMaterial() << endl;
43 
44  cout << " thicknesses: bottom = " << getBottomThickness() << " " << s_unitName;
45  cout << ", side = " << getSideThickness() << " " << s_unitName;
46  cout << ", back = " << getBackThickness() << " " << s_unitName;
47  cout << ", front = " << getFrontThickness() << " " << s_unitName;
48  cout << ", extension plate = " << getExtensionThickness() << " " << s_unitName << endl;
49  }
50 
52 } // end Belle2 namespace
Abstract base class for different kinds of events.