ATLAS Offline Software
Loading...
Searching...
No Matches
sTgcDigitContainer.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//**********************************************************************
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
51//**********************************************************************
52
53// Return the total number of digits in the container.
54
59
60 for (; it != iend; ++it ) {
61 count += (*it)->size();
62 }
63 return count;
64}
65
66
67//**********************************************************************
68// Free functions.
69//**********************************************************************
70
71// Output stream.
72
73ostream& operator<<(ostream& lhs, const sTgcDigitContainer& rhs) {
74 lhs << "sTgcDigitContainer has " << rhs.digit_size() << " digits:" << endl;
76 SELECTOR sel(&rhs);
77 SELECTOR::const_iterator it = sel.begin();
78 SELECTOR::const_iterator it_end = sel.end();
79
80 bool first = true;
81 for ( ; it!=it_end;++it)
82 {
83 if ( first ) {
84 first = false;
85 } else {
86 lhs << endl;
87 }
88 lhs << " " << *it;
89 }
90 return lhs;
91}
92
93//**********************************************************************
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.
static const CLID & classID()
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)