ATLAS Offline Software
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 
8 using namespace std;
9 
12  m_InternalNumber( 99 ),
13  m_Partition( 0 ),
14  m_Bunches()
15 {}
16 
18  m_Bunches.push_back(b);
19 }
20 
21 void
23  m_InternalNumber = 99;
24  m_Bunches.clear();
25 }
26 
27 void
28 TrigConf::BunchGroup::print(const std::string& indent, unsigned int detail) const {
29  if(detail>=2) {
30  cout << indent << "BunchGroup ";
31  printNameIdV(indent);
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 
45 void 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 
TrigConf::BunchGroup::clear
void clear()
Definition: BunchGroup.cxx:22
TrigConf::BunchGroup::BunchGroup
BunchGroup()
Definition: BunchGroup.cxx:10
detail
Definition: extract_histogram_tag.cxx:14
geometry_dat_to_json.indent
indent
Definition: geometry_dat_to_json.py:36
lumiFormat.i
int i
Definition: lumiFormat.py:85
BunchGroup.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
TrigConf::BunchGroup::addBunch
void addBunch(int)
Definition: BunchGroup.cxx:17
TrigConf::L1DataBaseclass
Definition: L1DataBaseclass.h:22
TrigConf::BunchGroup::writeXML
void writeXML(std::ostream &xmlfile, int indentLevel=0, int indentWidth=2) const
Definition: BunchGroup.cxx:45
TrigConf::BunchGroup::print
virtual void print(const std::string &indent="", unsigned int detail=1) const override
Definition: BunchGroup.cxx:28