ATLAS Offline Software
MioctSectorGeometry.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 #include <iostream>
8 
9 using namespace std;
10 
12  m_connector(0),
13  m_name(""),
14  m_ROIs()
15 {}
16 
17 void
18 MioctSectorGeometry::print(const std::string& indent, unsigned int /*detail*/) const {
19  cout << indent << "MioctSectorGeometry: " << endl;
20  cout << indent << "\tconnector: " << m_connector << endl;
21  cout << indent << "\tname: " << m_name << endl;
22  for(std::vector<MioctROIGeometry>::const_iterator iROI = m_ROIs.begin(); iROI < m_ROIs.end(); ++iROI)
23  iROI->print(indent+indent);
24 
25 }
26 
27 void
28 MioctSectorGeometry::writeXML(std::ostream & xmlfile, int indentLevel, int indentWidth) const {
29  mioctIndent(xmlfile, indentLevel, indentWidth) << "<Sector "
30  << "connector=\"" << m_connector
31  << "\" name=\"" << m_name << "\">" << endl;
32  mioctIndent(xmlfile, indentLevel+1, indentWidth) << "<!-- contains "<< m_ROIs.size() << " ROIs -->\n";
33  mioctIndent(xmlfile, indentLevel+1, indentWidth) << "<!-- mapping from ROI to coding scheme -->\n";
34  for(std::vector<MioctROIGeometry>::const_iterator iROI = m_ROIs.begin(); iROI < m_ROIs.end(); ++iROI)
35  iROI->writeXML(xmlfile, indentLevel+1, indentWidth);
36  mioctIndent(xmlfile, indentLevel, indentWidth) << "</Sector>" << endl;
37 
38 }
MioctSectorGeometry::m_connector
unsigned int m_connector
Definition: MioctSectorGeometry.h:39
MioctSectorGeometry::m_name
std::string m_name
Definition: MioctSectorGeometry.h:40
MioctSectorGeometry::print
virtual void print(const std::string &indent="", unsigned int detail=1) const
Definition: MioctSectorGeometry.cxx:18
geometry_dat_to_json.indent
indent
Definition: geometry_dat_to_json.py:18
MioctSectorGeometry::m_ROIs
std::vector< MioctROIGeometry > m_ROIs
Definition: MioctSectorGeometry.h:41
mioctIndent
std::ostream & mioctIndent(std::ostream &o, int lvl, int size)
Definition: MioctROIGeometry.cxx:12
MioctROIGeometry.h
MioctSectorGeometry.h
MioctSectorGeometry::MioctSectorGeometry
MioctSectorGeometry()
Definition: MioctSectorGeometry.cxx:11
MioctSectorGeometry::writeXML
virtual void writeXML(std::ostream &xmlfile, int indentLevel=0, int indentWidth=2) const
Definition: MioctSectorGeometry.cxx:28