ATLAS Offline Software
Loading...
Searching...
No Matches
BunchGroup.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4
6#include <iostream>
7
8using namespace std;
9
16
18 m_Bunches.push_back(b);
19}
20
21void
26
27void
28TrigConf::BunchGroup::print(const std::string& indent, unsigned int detail) const {
29 if(detail>=2) {
30 cout << indent << "BunchGroup ";
32 if(detail>=3) {
33 cout << indent << "\t partition # :\t\t\t" << m_Partition << endl;
34 cout << indent << "\t internal # :\t\t\t" << m_InternalNumber << endl;
35 cout << indent << "\t Bunches: " << m_Bunches.size() << "\t\t";
36 cout << indent;
37 for(unsigned int i=0; i < m_Bunches.size();i++) {
38 cout << m_Bunches[i] << " ";
39 }
40 cout << endl;
41 }
42 }
43}
44
45void TrigConf::BunchGroup::writeXML(std::ostream & xmlfile, int indentLevel, int indentWidth) const {
46 indent(xmlfile,indentLevel, indentWidth)
47 << "<BunchGroup internalNumber=\"" << m_InternalNumber << "\" name=\"" << name() << "\"";
48 if(m_Bunches.size()==0) {
49 xmlfile << "/>" << endl;
50 } else {
51 xmlfile << ">" << endl;
52 for(unsigned int i=0; i < m_Bunches.size();i++)
53 indent(xmlfile,indentLevel+1, indentWidth)
54 << "<Bunch bunchNumber=\"" << m_Bunches[i] << "\"/>" << endl;
55 indent(xmlfile,indentLevel, indentWidth)
56 << "</BunchGroup>" << endl;
57 }
58}
59
60
virtual void print(const std::string &indent="", unsigned int detail=1) const override
unsigned int m_InternalNumber
Definition BunchGroup.h:37
unsigned int m_Partition
Definition BunchGroup.h:38
void writeXML(std::ostream &xmlfile, int indentLevel=0, int indentWidth=2) const
std::vector< int > m_Bunches
Definition BunchGroup.h:39
std::ostream & indent(std::ostream &o, int lvl, int size) const
void printNameIdV(const std::string &indent="") const
static std::vector< std::string > xmlfile
Definition iLumiCalc.h:29
STL namespace.