ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDMaker
CaloSysD3PDMaker
src
SGTileDigitsGetterTool.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
/*
6
* File: SGTileDigitsGetterTool.cxx
7
* Author: Stephen Cole <scole@niu.edu>
8
*
9
* Created on February 28, 2011, 10:36 AM
10
*/
11
12
#include "
SGTileDigitsGetterTool.h
"
13
#include "
TileEvent/TileDigits.h
"
14
15
namespace
D3PD
{
16
17
SGTileDigitsGetterTool::SGTileDigitsGetterTool
(
const
std::string&
type
,
18
const
std::string& name,
19
const
IInterface* parent):
20
Base
(
type
,name,parent) {
21
}
22
23
SGTileDigitsGetterTool::~SGTileDigitsGetterTool
() {
24
}
25
26
StatusCode
SGTileDigitsGetterTool::initialize
(){
27
CHECK
(
Base::initialize
());
28
return
StatusCode::SUCCESS;
29
}
30
31
const
std::type_info&
SGTileDigitsGetterTool::typeinfo
()
const
{
32
return
typeid
(
TileDigitsContainer
);
33
}
34
35
const
std::type_info&
SGTileDigitsGetterTool::elementTypeinfo
()
const
{
36
return
typeid
(
TileDigits
);
37
}
38
39
size_t
SGTileDigitsGetterTool::sizeHint
(
bool
allowMissing){
40
const
TileDigitsContainer
* tdc=
get
(allowMissing);
41
if
(!tdc)
return
0;
42
const
TileDigitsCollection
* col=*(tdc->
begin
());
43
size_t
rval=0;
44
size_t
digSize=
sizeof
(
TileDigits
);
45
TileDigitsCollection::const_iterator
it;
46
for
(it=col->
begin
();it<col->end();++it)++rval;
47
return
rval*digSize;
48
}
49
50
StatusCode
SGTileDigitsGetterTool::reset
(
bool
allowMissing){
51
const
TileDigitsContainer
* tdc=
get
(allowMissing);
52
if
(!tdc){
53
m_evtItr
=
m_evtEnd
;
54
m_digItr
=
TileDigitsCollection::const_iterator
();
55
m_digEnd
=
TileDigitsCollection::const_iterator
();
56
return
StatusCode::FAILURE;
57
}
58
m_evtItr
=tdc->
begin
();
59
m_evtEnd
=tdc->
end
();
60
if
(
m_evtItr
==
m_evtEnd
){
61
m_digItr
=
m_digEnd
;
62
return
StatusCode::SUCCESS;
63
}
64
const
TileDigitsCollection
* col=*
m_evtItr
;
65
m_digItr
=col->
begin
();
66
m_digEnd
=col->
end
();
67
68
return
StatusCode::SUCCESS;
69
}
70
71
const
void
*
SGTileDigitsGetterTool::nextUntyped
(){
72
const
TileDigits
* tileD=0;
73
const
TileDigitsCollection
* col=0;
74
do
{
75
if
(
m_evtItr
==
m_evtEnd
)
return
0;
76
if
(
m_digItr
==
m_digEnd
){
77
tileD=0;
78
++
m_evtItr
;
79
if
(
m_evtItr
!=
m_evtEnd
){
80
col=*
m_evtItr
;
81
m_digItr
=col->
begin
();
82
m_digEnd
=col->
end
();
83
}
84
}
85
else
{
86
tileD=*
m_digItr
;
87
++
m_digItr
;
88
}
89
}
while
(!tileD);
90
91
// if(m_evtItr==m_evtEnd)return 0;
92
// col=*m_evtItr;
93
// ++m_evtItr;
94
95
return
tileD;
96
}
97
98
}
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
SGTileDigitsGetterTool.h
TileDigits.h
D3PD::SGCollectionGetterTool< TileDigitsContainer >::get
virtual const TileDigitsContainer * get(bool allowMissing=false)
D3PD::SGCollectionGetterTool< TileDigitsContainer >::initialize
virtual StatusCode initialize()
D3PD::SGTileDigitsGetterTool::elementTypeinfo
const std::type_info & elementTypeinfo() const
Return the element type of the collection.
Definition
SGTileDigitsGetterTool.cxx:35
D3PD::SGTileDigitsGetterTool::m_evtItr
TileDigitsContainer::const_iterator m_evtItr
Definition
SGTileDigitsGetterTool.h:44
D3PD::SGTileDigitsGetterTool::initialize
StatusCode initialize()
Standard Gaudi initialize method.
Definition
SGTileDigitsGetterTool.cxx:26
D3PD::SGTileDigitsGetterTool::SGTileDigitsGetterTool
SGTileDigitsGetterTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Definition
SGTileDigitsGetterTool.cxx:17
D3PD::SGTileDigitsGetterTool::m_evtEnd
TileDigitsContainer::const_iterator m_evtEnd
Definition
SGTileDigitsGetterTool.h:44
D3PD::SGTileDigitsGetterTool::~SGTileDigitsGetterTool
virtual ~SGTileDigitsGetterTool()
Definition
SGTileDigitsGetterTool.cxx:23
D3PD::SGTileDigitsGetterTool::sizeHint
size_t sizeHint(bool allowMissing=false)
Return an estimate of the number of elements in the iteration.
Definition
SGTileDigitsGetterTool.cxx:39
D3PD::SGTileDigitsGetterTool::Base
D3PD::SGCollectionGetterTool< TileDigitsContainer > Base
Definition
SGTileDigitsGetterTool.h:24
D3PD::SGTileDigitsGetterTool::m_digItr
TileDigitsCollection::const_iterator m_digItr
Definition
SGTileDigitsGetterTool.h:45
D3PD::SGTileDigitsGetterTool::m_digEnd
TileDigitsCollection::const_iterator m_digEnd
Definition
SGTileDigitsGetterTool.h:45
D3PD::SGTileDigitsGetterTool::typeinfo
const std::type_info & typeinfo() const
Return the type of object retrieved by this tool.
Definition
SGTileDigitsGetterTool.cxx:31
D3PD::SGTileDigitsGetterTool::nextUntyped
const void * nextUntyped()
Return a pointer to the next element in the collection.
Definition
SGTileDigitsGetterTool.cxx:71
D3PD::SGTileDigitsGetterTool::reset
StatusCode reset(bool allowMissing=false)
Reset the iteration to the start of the collection.
Definition
SGTileDigitsGetterTool.cxx:50
DataVector::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Definition
DataVector.h:838
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
IdentifiableContainerMT::end
const_iterator end() const
return const_iterator for end of container
Definition
IdentifiableContainerMT.h:248
IdentifiableContainerMT::begin
const_iterator begin() const
return const_iterator for first entry
Definition
IdentifiableContainerMT.h:242
TileDigitsCollection
Definition
TileDigitsCollection.h:18
TileDigitsContainer
Definition
TileDigitsContainer.h:13
TileDigits
Definition
TileDigits.h:30
D3PD
Block filler tool for noisy FEB information.
Definition
CaloCellDetailsFillerTool.cxx:29
type
Generated on
for ATLAS Offline Software by
1.17.0