ATLAS Offline Software
MuonSpectrometer
MuonDigitContainer
src
TgcDigitContainer.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
7
#include "
MuonDigitContainer/TgcDigitContainer.h
"
8
#include "
EventContainers/SelectAllObject.h
"
9
#include <map>
10
#include <cassert>
11
#include <iostream>
12
13
using
std::ostream;
14
using
std::endl;
15
16
//**********************************************************************
17
// Local definitions
18
//**********************************************************************
19
20
//**********************************************************************
21
// Member functions.
22
//**********************************************************************
23
24
// Default constructor.
25
26
TgcDigitContainer::TgcDigitContainer
(
unsigned
int
hash_max)
27
:
IdentifiableContainer
<
TgcDigitCollection
>(hash_max)
28
{
29
30
}
31
32
//**********************************************************************
33
34
// Destructor.
35
36
TgcDigitContainer::~TgcDigitContainer
() =
default
;
37
38
//**********************************************************************
39
40
// return the class ID
41
42
const
CLID
&
TgcDigitContainer::classID
()
43
{
44
return
ClassID_traits<TgcDigitContainer>::ID
();
45
// static const CLID CLID_TgcDigitContainer= 4193;
46
// return CLID_TgcDigitContainer ;
47
}
48
49
//**********************************************************************
50
51
// Return the total number of digits in the container.
52
53
TgcDigitContainer::size_type
TgcDigitContainer::digit_size
()
const
{
54
TgcDigitContainer::size_type
count
= 0;
55
TgcDigitContainer::const_iterator
it
=
begin
();
56
TgcDigitContainer::const_iterator
iend =
end
();
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
71
ostream&
operator<<
(ostream& lhs,
const
TgcDigitContainer
& rhs) {
72
lhs <<
"TgcDigitContainer has "
<< rhs.
digit_size
() <<
" digits:"
<< endl;
73
typedef
SelectAllObject<TgcDigitContainer>
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
//**********************************************************************
TgcDigitContainer::size_type
TgcDigitCollection::size_type size_type
Definition:
TgcDigitContainer.h:58
TgcDigitContainer::classID
static const CLID & classID()
Definition:
TgcDigitContainer.cxx:42
skel.it
it
Definition:
skel.GENtoEVGEN.py:396
XMLtoHeader.count
count
Definition:
XMLtoHeader.py:85
TgcDigitContainer::~TgcDigitContainer
~TgcDigitContainer()
ClassID_traits::ID
static const CLID & ID()
the CLID of T
Definition:
Control/AthenaKernel/AthenaKernel/ClassID_traits.h:50
TgcDigitContainer::TgcDigitContainer
TgcDigitContainer(unsigned int hash_max)
Definition:
TgcDigitContainer.cxx:26
SelectAllObjectMT
Definition:
SelectAllObjectMT.h:11
sel
sel
Definition:
SUSYToolsTester.cxx:97
TgcDigitCollection
Definition:
TgcDigitCollection.h:17
IdentifiableContainerMT::end
const_iterator end() const
return const_iterator for end of container
Definition:
IdentifiableContainerMT.h:239
IdentifiableContainerMT::const_iterator
Definition:
IdentifiableContainerMT.h:79
IdentifiableContainerMT::begin
const_iterator begin() const
return const_iterator for first entry
Definition:
IdentifiableContainerMT.h:233
CLID
uint32_t CLID
The Class ID type.
Definition:
Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
TgcDigitContainer::digit_size
size_type digit_size() const
Definition:
TgcDigitContainer.cxx:53
DeMoScan.first
bool first
Definition:
DeMoScan.py:536
TgcDigitContainer
Use IdentifiableContainer with TgcDigitCollection.
Definition:
TgcDigitContainer.h:53
IdentifiableContainerMT
Definition:
IdentifiableContainerMT.h:30
SelectAllObject.h
TgcDigitContainer.h
operator<<
ostream & operator<<(ostream &lhs, const TgcDigitContainer &rhs)
Definition:
TgcDigitContainer.cxx:71
Generated on Mon Dec 23 2024 21:19:36 for ATLAS Offline Software by
1.8.18