ATLAS Offline Software
Loading...
Searching...
No Matches
MioctGeometry.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
7#include <iostream>
8
9using namespace std;
10
16
17void
18MioctGeometry::print(const std::string& indent, unsigned int /*detail*/) const {
19 cout << indent << "MioctGeometry: " << endl;
20 cout << indent << "\tid: " << m_mioctid << endl;
21 cout << indent << "\tslot: " << m_slot << endl;
22 for(std::vector<MioctSectorGeometry>::const_iterator isec = m_Sectors.begin(); isec < m_Sectors.end(); ++isec)
23 isec->print(indent+indent);
24 for(std::vector<MioctSectorGeometry>::const_iterator isec = m_Sectors.begin(); isec < m_Sectors.end(); ++isec)
25 isec->print(indent+indent);
26
27}
28
29void
30MioctGeometry::writeXML(std::ostream & xmlfile, int indentLevel, int indentWidth) const {
31 mioctIndent(xmlfile, indentLevel, indentWidth) << "<MIOCT "
32 << "id=\"" << m_mioctid
33 << "\" slot=\"" << m_slot
34 << "\">" << endl;
35 std::string xtmp = "<!-- contains sectors ";
36 for(std::vector<MioctSectorGeometry>::const_iterator isec = m_Sectors.begin(); isec < m_Sectors.end(); ++isec)
37 {
38 xtmp.append(isec->name());
39 if (isec+1 != m_Sectors.end())
40 xtmp.append(", ");
41 }
42
43 mioctIndent(xmlfile, indentLevel+1, indentWidth) <<xtmp << " -->"<<endl;
44 for(std::vector<MioctSectorGeometry>::const_iterator isec = m_Sectors.begin(); isec < m_Sectors.end(); ++isec)
45 isec->writeXML(xmlfile, indentLevel+1, indentWidth);
46
47 mioctIndent(xmlfile, indentLevel+1, indentWidth) << "<Decode>\n";
48 for(std::vector<MioctTopoCellGeometry>::const_iterator itopo = m_TopoCells.begin(); itopo < m_TopoCells.end(); ++itopo)
49 itopo->writeXML(xmlfile, indentLevel+2, indentWidth);
50 mioctIndent(xmlfile, indentLevel+1, indentWidth) << "</Decode>\n";
51
52 mioctIndent(xmlfile, indentLevel, indentWidth) << "</MIOCT>" << endl;
53
54}
std::ostream & mioctIndent(std::ostream &o, int lvl, int size)
unsigned int m_mioctid
std::vector< MioctSectorGeometry > m_Sectors
std::vector< MioctTopoCellGeometry > m_TopoCells
virtual void print(const std::string &indent="", unsigned int detail=1) const
virtual void writeXML(std::ostream &xmlfile, int indentLevel=0, int indentWidth=2) const
unsigned int m_slot
static std::vector< std::string > xmlfile
Definition iLumiCalc.h:29
STL namespace.