ATLAS Offline Software
Loading...
Searching...
No Matches
TgcDigitContainer.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//**********************************************************************
23
24// Default constructor.
25
28{
29
30}
31
32//**********************************************************************
33
34// Destructor.
35
37
38//**********************************************************************
39
40// return the class ID
41
46
48{
49 static const CLID cid = classID();
50 return cid;
51}
52
53//**********************************************************************
54
55// Return the total number of digits in the container.
56
61
62 for (; it != iend; ++it ) {
63 count += (*it)->size();
64 }
65 return count;
66}
67
68
69//**********************************************************************
70// Free functions.
71//**********************************************************************
72
73// Output stream.
74
75ostream& operator<<(ostream& lhs, const TgcDigitContainer& rhs) {
76 lhs << "TgcDigitContainer has " << rhs.digit_size() << " digits:" << endl;
77 typedef SelectAllObject<TgcDigitContainer> SELECTOR;
78 SELECTOR sel(&rhs);
79 SELECTOR::const_iterator it = sel.begin();
80 SELECTOR::const_iterator it_end = sel.end();
81
82 bool first = true;
83 for ( ; it!=it_end;++it)
84 {
85 if ( first ) {
86 first = false;
87 } else {
88 lhs << endl;
89 }
90 lhs << " " << *it;
91 }
92 return lhs;
93}
94
95//**********************************************************************
uint32_t CLID
The Class ID type.
IdentifiableContainerMT< T > IdentifiableContainer
SelectAllObjectMT< DCC, OBJECT > SelectAllObject
ostream & operator<<(ostream &lhs, const TgcDigitContainer &rhs)
const_iterator end() const
return const_iterator for end of container
const_iterator begin() const
return const_iterator for first entry
Use IdentifiableContainer with TgcDigitCollection.
virtual const CLID & clID() const override
return class ID
TgcDigitCollection::size_type size_type
size_type digit_size() const
TgcDigitContainer(unsigned int hash_max)
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146