ATLAS Offline Software
Loading...
Searching...
No Matches
TileRawDataCollection.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 TileRawDataCollection
6
7#include <iostream>
8#include <sstream>
9#include <iomanip>
10
11/*
12//
13template <typename TELEMENT>
14void TileRawDataCollection<TELEMENT>::setTT(const TT_ID& id,
15 TCollection_const_iterator b, TCollection_const_iterator e)
16{
17 m_Map[id] = ITPAIR(b,e);
18 return ;
19}
20
21template <typename TELEMENT>
22void TileRawDataCollection<TELEMENT>::getTT(const TT_ID& id,
23 TCollection_const_iterator& b, TCollection_const_iterator& e) const
24{
25 ID_IT_MAP_ITER itPair = m_Map.find(id);
26
27 if(itPair!=m_Map.end()){
28 // get the begin and end iterator
29 b = (*itPair).second.first;
30 e = (*itPair).second.second;
31 return;
32 }
33
34// can't find it, return end() ;
35
36 b = end();
37 e = end();
38
39 return ;
40}
41*/
42
43template <typename TELEMENT>
44void TileRawDataCollection<TELEMENT>::clear()
45{
46 m_lvl1Id = 0;
47 m_lvl1Type = 0;
48 m_detEvType = 0;
49 m_rodBCID = 0;
50
51 DataVector<TELEMENT>::clear();
52}
53
54template <typename TELEMENT>
55void TileRawDataCollection<TELEMENT>::print() const
56{
57 std::cout << (std::string) (*this) << std::endl;
58}
59
60template <typename TELEMENT>
61TileRawDataCollection<TELEMENT>::operator std::string() const
62{
63 std::ostringstream text(std::ostringstream::out);
64
65 text << whoami();
66 text << " Id = 0x" << std::hex << identify();
67 text << " size = " << std::dec << this->size() << std::endl;
68
69 std::string result(text.str());
70 std::string newline("\n");
71
72 TCollection_const_iterator it1 = this->begin();
73 TCollection_const_iterator it2 = this->end();
74
75 const TELEMENT * elem;
76
77 for(;it1!=it2;++it1){
78 elem = (*it1);
79 result += (std::string)(*elem) + newline;
80 }
81
82 return result;
83}
84