ATLAS Offline Software
MioctROIGeometry.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include <iostream>
7 #include <iomanip>
8 using namespace std;
9 
10 
11 std::ostream&
12 mioctIndent(std::ostream& o, int lvl, int size)
13 {
14  int width = lvl*size;
15  if(width==0) return o;
16  o << std::setw(lvl*size) << " ";
17  return o;
18 }
19 
21  m_eta(0),
22  m_phi(0),
23  m_etacode(0),
24  m_phicode(0),
25  m_etamin(0),
26  m_etamax(0),
27  m_phimin(0),
28  m_phimax(0),
29  m_roiid(0)
30 {}
31 
32 void
33 MioctROIGeometry::print(const std::string& indent, unsigned int /*detail*/) const {
34  cout << indent << "MioctROIGeometry: " << endl;
35  //cout << indent << "\tlvl1 master table id: " << lvl1MasterTableId() << endl;
36  //printNameIdV(indent);
37  cout << indent << "\teta " << m_eta ;
38  cout << indent << "\tphi " << m_phi ;
39  cout << indent << "\tetacode " << m_etacode ;
40  cout << indent << "\tphicode " << m_phicode ;
41  cout << indent << "\tetamin " << m_etamin ;
42  cout << indent << "\tetamax " << m_etamax ;
43  cout << indent << "\tphimin " << m_phimin ;
44  cout << indent << "\tphimax " << m_phimax ;
45  cout << indent << "\troiid " << m_roiid << endl;
46 }
47 
48 void
49 MioctROIGeometry::writeXML(std::ostream & xmlfile, int indentLevel, int indentWidth) const {
50  mioctIndent(xmlfile, indentLevel, indentWidth) << "<ROI "
51  << fixed << setprecision(6)
52  << "eta=\"" << m_eta
53  << "\" phi=\"" << m_phi
54  << "\" etacode=\"0x" << std::hex << m_etacode
55  << "\" phicode=\"0x" << std::hex << m_phicode
56  << std::dec << fixed << setprecision(6)
57  << "\" etamin=\"" << std::dec << m_etamin
58  << "\" etamax=\"" << m_etamax
59  << "\" phimin=\"" << m_phimin
60  << "\" phimax=\"" << m_phimax
61  << "\" roiid=\"" << m_roiid
62  << "\"/>" << endl;
63 }
MioctROIGeometry::print
virtual void print(const std::string &indent="", unsigned int detail=1) const
Definition: MioctROIGeometry.cxx:33
MioctROIGeometry::m_phimin
float m_phimin
Definition: MioctROIGeometry.h:59
MioctROIGeometry::m_etacode
unsigned int m_etacode
Definition: MioctROIGeometry.h:55
MioctROIGeometry::m_etamin
float m_etamin
Definition: MioctROIGeometry.h:57
MioctROIGeometry::m_phimax
float m_phimax
Definition: MioctROIGeometry.h:60
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
geometry_dat_to_json.indent
indent
Definition: geometry_dat_to_json.py:36
MioctROIGeometry::writeXML
virtual void writeXML(std::ostream &xmlfile, int indentLevel=0, int indentWidth=2) const
Definition: MioctROIGeometry.cxx:49
MioctROIGeometry::m_etamax
float m_etamax
Definition: MioctROIGeometry.h:58
MioctROIGeometry::MioctROIGeometry
MioctROIGeometry()
Definition: MioctROIGeometry.cxx:20
mioctIndent
std::ostream & mioctIndent(std::ostream &o, int lvl, int size)
Definition: MioctROIGeometry.cxx:12
MioctROIGeometry.h
MioctROIGeometry::m_phi
float m_phi
Definition: MioctROIGeometry.h:54
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
MioctROIGeometry::m_roiid
unsigned int m_roiid
Definition: MioctROIGeometry.h:61
MioctROIGeometry::m_phicode
unsigned int m_phicode
Definition: MioctROIGeometry.h:56
MioctROIGeometry::m_eta
float m_eta
Definition: MioctROIGeometry.h:53