ATLAS Offline Software
IElementStreamer.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 /*
5  * IElementStreamer.cpp
6  * Formatter
7  *
8  * Created by sroe on 12/01/2010.
9  *
10  */
11 #include "IElementStreamer.h"
12 
13 namespace SCT_CalibAlgs {
14 
15 IElementStreamer::IElementStreamer(const std::string& name, const std::map<std::string, std::string>& attributeMap, std::ostream& os):
16  m_name{name}, m_os{os}, m_depth{0}, m_nodeIndex{0}, m_nodeId{m_nodeIndex} {
17  std::map<std::string, std::string>::const_iterator i{attributeMap.begin()};
18  std::map<std::string, std::string>::const_iterator end{attributeMap.end()};
19  for (; i!=end; ++i) {
20  m_attributeNames.push_back(i->first);
21  m_attributeValues.push_back(i->second);
22  }
23  ++m_depth;
24  ++m_nodeIndex;
25 }
26 
27 IElementStreamer::IElementStreamer(const std::string& name, const std::vector<std::string>& attributeNames, const std::vector<std::string>& attributeValues, std::ostream& os):
28  m_name{name}, m_attributeNames{attributeNames}, m_attributeValues{attributeValues}, m_os{os}, m_nodeIndex{0}, m_nodeId{m_nodeIndex} {
29  ++m_depth;
30  ++m_nodeIndex;
31 }
32 
33 IElementStreamer::IElementStreamer(const std::string& name, const std::string& attributeName, const std::string& attributeValue, std::ostream& os):
34  m_name{name}, m_os{os}, m_nodeIndex{0}, m_nodeId{m_nodeIndex} {
35  m_attributeNames.push_back(attributeName);
36  m_attributeValues.push_back(attributeValue);
37  ++m_depth;
38  ++m_nodeIndex;
39 }
40 
42  --m_depth;
43 }
44 
45 }
SCT_CalibAlgs
Definition: IElementStreamer.cxx:13
SCT_CalibAlgs::IElementStreamer::IElementStreamer
IElementStreamer(const std::string &name, const std::map< std::string, std::string > &attributeMap, std::ostream &os=std::cout)
Definition: IElementStreamer.cxx:15
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
lumiFormat.i
int i
Definition: lumiFormat.py:85
IElementStreamer.h
SCT_CalibAlgs::IElementStreamer::~IElementStreamer
~IElementStreamer()
Definition: IElementStreamer.cxx:41
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SCT_CalibAlgs::IElementStreamer::m_depth
unsigned int m_depth
Definition: IElementStreamer.h:26