ATLAS Offline Software
MuonSpectrometer
MuonDigitContainer
src
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
7
#include "
MuonDigitContainer/MdtDigitContainer.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
MdtDigitContainer::MdtDigitContainer
(
unsigned
int
hash_max)
27
:
IdentifiableContainer
<
MdtDigitCollection
>(hash_max)
28
{
29
30
}
31
32
//**********************************************************************
33
34
// Destructor.
35
36
MdtDigitContainer::~MdtDigitContainer
() =
default
;
37
38
//**********************************************************************
39
40
// return the class ID
41
42
const
CLID
&
MdtDigitContainer::classID
()
43
{
44
return
ClassID_traits<MdtDigitContainer>::ID
();
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
53
MdtDigitContainer::size_type
MdtDigitContainer::digit_size
()
const
{
54
MdtDigitContainer::size_type
count
= 0;
55
MdtDigitContainer::const_iterator
it
=
begin
();
56
MdtDigitContainer::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
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
//**********************************************************************
MdtDigitContainer::classID
static const CLID & classID()
Definition:
MdtDigitContainer.cxx:42
skel.it
it
Definition:
skel.GENtoEVGEN.py:396
MdtDigitContainer::~MdtDigitContainer
~MdtDigitContainer()
XMLtoHeader.count
count
Definition:
XMLtoHeader.py:85
ClassID_traits::ID
static const CLID & ID()
the CLID of T
Definition:
Control/AthenaKernel/AthenaKernel/ClassID_traits.h:50
SelectAllObjectMT
Definition:
SelectAllObjectMT.h:11
MdtDigitContainer::digit_size
size_type digit_size() const
Definition:
MdtDigitContainer.cxx:53
MdtDigitContainer::MdtDigitContainer
MdtDigitContainer(unsigned int hash_max)
Definition:
MdtDigitContainer.cxx:26
sel
sel
Definition:
SUSYToolsTester.cxx:97
IdentifiableContainerMT::end
const_iterator end() const
return const_iterator for end of container
Definition:
IdentifiableContainerMT.h:242
IdentifiableContainerMT::const_iterator
Definition:
IdentifiableContainerMT.h:82
IdentifiableContainerMT::begin
const_iterator begin() const
return const_iterator for first entry
Definition:
IdentifiableContainerMT.h:236
CLID
uint32_t CLID
The Class ID type.
Definition:
Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
MdtDigitContainer
Use IdentifiableContainer with MdtDigitCollection.
Definition:
MdtDigitContainer.h:50
MdtDigitContainer::size_type
MdtDigitCollection::size_type size_type
Definition:
MdtDigitContainer.h:55
MdtDigitCollection
Definition:
MdtDigitCollection.h:18
operator<<
ostream & operator<<(ostream &lhs, const MdtDigitContainer &rhs)
Definition:
MdtDigitContainer.cxx:71
MdtDigitContainer.h
DeMoScan.first
bool first
Definition:
DeMoScan.py:536
IdentifiableContainerMT
Definition:
IdentifiableContainerMT.h:30
SelectAllObject.h
Generated on Thu Nov 7 2024 21:20:39 for ATLAS Offline Software by
1.8.18