ATLAS Offline Software
MuonSpectrometer
MuonDigitContainer
src
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
7
#include "
MuonDigitContainer/sTgcDigitContainer.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
sTgcDigitContainer::sTgcDigitContainer
()
24
:
IdentifiableContainer
<
sTgcDigitCollection
>(1578)
//Hard coded max size for dictionary generators
25
{
26
27
}
28
29
30
sTgcDigitContainer::sTgcDigitContainer
(
unsigned
int
hash_max)
31
:
IdentifiableContainer
<
sTgcDigitCollection
>(hash_max)
32
{
33
34
}
35
36
//**********************************************************************
37
38
// Destructor.
39
40
sTgcDigitContainer::~sTgcDigitContainer
() =
default
;
41
42
//**********************************************************************
43
44
// return the class ID
45
46
const
CLID
&
sTgcDigitContainer::classID
()
47
{
48
return
ClassID_traits<sTgcDigitContainer>::ID
();
49
}
50
51
//**********************************************************************
52
53
// Return the total number of digits in the container.
54
55
sTgcDigitContainer::size_type
sTgcDigitContainer::digit_size
()
const
{
56
sTgcDigitContainer::size_type
count
= 0;
57
sTgcDigitContainer::const_iterator
it
=
begin
();
58
sTgcDigitContainer::const_iterator
iend =
end
();
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
73
ostream&
operator<<
(ostream& lhs,
const
sTgcDigitContainer
& rhs) {
74
lhs <<
"sTgcDigitContainer has "
<< rhs.
digit_size
() <<
" digits:"
<< endl;
75
typedef
SelectAllObject<sTgcDigitContainer>
SELECTOR;
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
//**********************************************************************
sTgcDigitContainer
Use IdentifiableContainer with sTgcDigitCollection.
Definition:
sTgcDigitContainer.h:50
sTgcDigitContainer::classID
static const CLID & classID()
Definition:
sTgcDigitContainer.cxx:46
skel.it
it
Definition:
skel.GENtoEVGEN.py:396
XMLtoHeader.count
count
Definition:
XMLtoHeader.py:85
sTgcDigitContainer::sTgcDigitContainer
sTgcDigitContainer()
Definition:
sTgcDigitContainer.cxx:23
ClassID_traits::ID
static const CLID & ID()
the CLID of T
Definition:
Control/AthenaKernel/AthenaKernel/ClassID_traits.h:50
SelectAllObjectMT
Definition:
SelectAllObjectMT.h:11
sTgcDigitCollection
Definition:
sTgcDigitCollection.h:18
sel
sel
Definition:
SUSYToolsTester.cxx:97
IdentifiableContainerMT::end
const_iterator end() const
return const_iterator for end of container
Definition:
IdentifiableContainerMT.h:239
IdentifiableContainerMT::const_iterator
Definition:
IdentifiableContainerMT.h:79
sTgcDigitContainer::digit_size
size_type digit_size() const
Definition:
sTgcDigitContainer.cxx:55
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
operator<<
ostream & operator<<(ostream &lhs, const sTgcDigitContainer &rhs)
Definition:
sTgcDigitContainer.cxx:73
DeMoScan.first
bool first
Definition:
DeMoScan.py:536
sTgcDigitContainer.h
IdentifiableContainerMT
Definition:
IdentifiableContainerMT.h:30
SelectAllObject.h
sTgcDigitContainer::~sTgcDigitContainer
~sTgcDigitContainer()
sTgcDigitContainer::size_type
sTgcDigitCollection::size_type size_type
Definition:
sTgcDigitContainer.h:57
Generated on Sun Dec 22 2024 21:18:31 for ATLAS Offline Software by
1.8.18