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