ATLAS Offline Software
MuonSpectrometer
MuonDigitContainer
src
CscDigitContainer.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/CscDigitContainer.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
CscDigitContainer::CscDigitContainer
(
unsigned
int
hash_max)
27
:
IdentifiableContainer
<
CscDigitCollection
>(hash_max)
28
{
29
30
}
31
32
//**********************************************************************
33
34
// Destructor.
35
36
CscDigitContainer::~CscDigitContainer
() =
default
;
37
38
//**********************************************************************
39
40
// return the class ID
41
42
const
CLID
&
CscDigitContainer::classID
()
43
{
44
return
ClassID_traits<CscDigitContainer>::ID
();
45
// static const CLID CLID_CscDigitContainer= 4194;
46
// return CLID_CscDigitContainer ;
47
}
48
49
//**********************************************************************
50
51
// Return the total number of digits in the container.
52
53
CscDigitContainer::size_type
CscDigitContainer::digit_size
()
const
{
54
CscDigitContainer::size_type
count
= 0;
55
CscDigitContainer::const_iterator
it
=
begin
();
56
CscDigitContainer::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
CscDigitContainer
& rhs) {
72
lhs <<
"CscDigitContainer has "
<< rhs.
digit_size
() <<
" digits:"
<< endl;
73
typedef
SelectAllObject<CscDigitContainer>
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
//**********************************************************************
CscDigitContainer
Use IdentifiableContainer with CscDigitCollection.
Definition:
CscDigitContainer.h:50
skel.it
it
Definition:
skel.GENtoEVGEN.py:396
CscDigitContainer::~CscDigitContainer
~CscDigitContainer()
CscDigitContainer::classID
static const CLID & classID()
Definition:
CscDigitContainer.cxx:42
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
CscDigitContainer::digit_size
size_type digit_size() const
Definition:
CscDigitContainer.cxx:53
SelectAllObjectMT
Definition:
SelectAllObjectMT.h:11
sel
sel
Definition:
SUSYToolsTester.cxx:97
CscDigitContainer::CscDigitContainer
CscDigitContainer(unsigned int hash_max)
Definition:
CscDigitContainer.cxx:26
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
CscDigitCollection
Definition:
CscDigitCollection.h:17
CscDigitContainer.h
DeMoScan.first
bool first
Definition:
DeMoScan.py:536
CscDigitContainer::size_type
CscDigitCollection::size_type size_type
Definition:
CscDigitContainer.h:55
IdentifiableContainerMT
Definition:
IdentifiableContainerMT.h:30
SelectAllObject.h
operator<<
ostream & operator<<(ostream &lhs, const CscDigitContainer &rhs)
Definition:
CscDigitContainer.cxx:71
Generated on Thu Nov 7 2024 21:12:51 for ATLAS Offline Software by
1.8.18