ATLAS Offline Software
Loading...
Searching...
No Matches
MdtDigitContainer.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 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
43{
45 // static const CLID CLID_MdtDigitContainer= 4191;
46 // return CLID_MdtDigitContainer ;
47}
48
49//**********************************************************************
50
51// Return the total number of digits in the container.
52
57
58 for (; it != iend; ++it ) {
59 count += (*it)->size();
60 }
61 return count;
62}
63
64
65//**********************************************************************
66// Free functions.
67//**********************************************************************
68
69// Output stream.
70
71ostream& operator<<(ostream& lhs, const MdtDigitContainer& rhs) {
72 lhs << "MdtDigitContainer has " << rhs.digit_size() << " digits:" << endl;
73 typedef SelectAllObject<MdtDigitContainer> SELECTOR;
74 SELECTOR sel(&rhs);
75 SELECTOR::const_iterator it = sel.begin();
76 SELECTOR::const_iterator it_end = sel.end();
77
78 bool first = true;
79 for ( ; it!=it_end;++it)
80 {
81 if ( first ) {
82 first = false;
83 } else {
84 lhs << endl;
85 }
86 lhs << " " << *it;
87 }
88 return lhs;
89}
90
91//**********************************************************************
uint32_t CLID
The Class ID type.
IdentifiableContainerMT< T > IdentifiableContainer
ostream & operator<<(ostream &lhs, const MdtDigitContainer &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 MdtDigitCollection.
MdtDigitCollection::size_type size_type
static const CLID & classID()
MdtDigitContainer(unsigned int hash_max)
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