ATLAS Offline Software
Loading...
Searching...
No Matches
TileContainer.icc
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4
5// implementation of TileContainer
6
7#include <iostream>
8#include <sstream>
9#include <iomanip>
10
11template <typename TELEMENT>
12void TileContainer<TELEMENT>::print() const
13{
14 std::cout << (std::string) (*this) << std::endl;
15}
16
17template <typename TELEMENT>
18TileContainer<TELEMENT>::operator std::string() const
19{
20 std::ostringstream text(std::ostringstream::out);
21
22 text << whoami();
23 text << " size = " << this->size() << std::endl;
24
25 std::string result(text.str());
26 std::string newline("\n");
27
28 my_const_iterator it1 = this->begin();
29 my_const_iterator it2 = this->end();
30
31 const TELEMENT * elem;
32
33 for(;it1!=it2;++it1){
34 elem = (*it1);
35 result += (std::string)(*elem) + newline;
36 }
37
38 return result;
39}