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