ATLAS Offline Software
Loading...
Searching...
No Matches
sTgcDigitContainer.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5// MuonDigitContainer.cxx
6
9#include <map>
10#include <cassert>
11#include <iostream>
12
13using std::ostream;
14using std::endl;
15
16//**********************************************************************
17// Local definitions
18//**********************************************************************
19
20//**********************************************************************
21// Member functions.
22//**********************************************************************
24 : IdentifiableContainer<sTgcDigitCollection>(1578) //Hard coded max size for dictionary generators
25{
26
27}
28
29
35
36//**********************************************************************
37
38// Destructor.
39
41
42//**********************************************************************
43
44// return the class ID
45
50
52{
53 static const CLID cid = classID();
54 return cid;
55}
56
57//**********************************************************************
58
59// Return the total number of digits in the container.
60
65
66 for (; it != iend; ++it ) {
67 count += (*it)->size();
68 }
69 return count;
70}
71
72
73//**********************************************************************
74// Free functions.
75//**********************************************************************
76
77// Output stream.
78
79ostream& operator<<(ostream& lhs, const sTgcDigitContainer& rhs) {
80 lhs << "sTgcDigitContainer has " << rhs.digit_size() << " digits:" << endl;
82 SELECTOR sel(&rhs);
83 SELECTOR::const_iterator it = sel.begin();
84 SELECTOR::const_iterator it_end = sel.end();
85
86 bool first = true;
87 for ( ; it!=it_end;++it)
88 {
89 if ( first ) {
90 first = false;
91 } else {
92 lhs << endl;
93 }
94 lhs << " " << *it;
95 }
96 return lhs;
97}
98
99//**********************************************************************
uint32_t CLID
The Class ID type.
IdentifiableContainerMT< T > IdentifiableContainer
SelectAllObjectMT< DCC, OBJECT > SelectAllObject
const_iterator end() const
return const_iterator for end of container
const_iterator begin() const
return const_iterator for first entry
Use IdentifiableContainer with sTgcDigitCollection.
virtual const CLID & clID() const override
return class ID
size_type digit_size() const
sTgcDigitCollection::size_type size_type
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146
ostream & operator<<(ostream &lhs, const sTgcDigitContainer &rhs)