ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
D3PDMaker
CaloSysD3PDMaker
src
SGTileModuleBitsGetterTool.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: SGTileModuleBitsGetterTool.cxx
7
* Author: Stephen Cole <stephen.cole@cern.ch>
8
*
9
* Created on March 15, 2012, 2:52 PM
10
*/
11
12
#include "
SGTileModuleBitsGetterTool.h
"
13
14
namespace
D3PD
{
15
SGTileModuleBitsGetterTool::SGTileModuleBitsGetterTool
(
const
std::string&
type
,
16
const
std::string& name,
17
const
IInterface* parent):
18
Base
(
type
,name,parent) {
19
}
20
21
22
SGTileModuleBitsGetterTool::~SGTileModuleBitsGetterTool
() {
23
}
24
25
StatusCode
SGTileModuleBitsGetterTool::initialize
(){
26
MsgStream log(msgSvc(), name());
27
log << MSG::INFO <<
" in SGTileModuleBitsGetterTool::initialize()"
<<
endmsg
;
28
CHECK
(
Base::initialize
());
29
return
StatusCode::SUCCESS;
30
}
31
32
const
std::type_info&
SGTileModuleBitsGetterTool::typeinfo
()
const
{
33
return
typeid
(
TileRawChannelContainer
);
34
}
35
36
const
std::type_info&
SGTileModuleBitsGetterTool::elementTypeinfo
()
const
{
37
return
typeid
(
TileRawChannelCollection
);
38
}
39
40
size_t
SGTileModuleBitsGetterTool::sizeHint
(
bool
allowMissing){
41
const
TileRawChannelContainer
* tdc=
get
(allowMissing);
42
if
(!tdc)
return
0;
43
const
TileRawChannelCollection
* col=*(tdc->
begin
());
44
size_t
rval=0;
45
size_t
digSize=
sizeof
(
TileRawChannel
);
46
TileRawChannelCollection::const_iterator
it;
47
for
(it=col->
begin
();it<col->end();++it)++rval;
48
return
rval*digSize;
49
}
50
51
StatusCode
SGTileModuleBitsGetterTool::reset
(
bool
allowMissing){
52
const
TileRawChannelContainer
* tdc=
get
(allowMissing);
53
if
(!tdc){
54
m_evtItr
=
m_evtEnd
;
55
return
StatusCode::FAILURE;
56
}
57
m_evtItr
=tdc->
begin
();
58
m_evtEnd
=tdc->
end
();
59
if
(
m_evtItr
==
m_evtEnd
){
60
return
StatusCode::SUCCESS;
61
}
62
63
return
StatusCode::SUCCESS;
64
}
65
66
const
void
*
SGTileModuleBitsGetterTool::nextUntyped
(){
67
const
TileRawChannelCollection
* col=0;
68
do
{
69
if
(
m_evtItr
==
m_evtEnd
)
return
0;
70
col=*
m_evtItr
;
71
++
m_evtItr
;
72
}
while
(!col);
73
74
return
col;
75
}
76
77
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
SGTileModuleBitsGetterTool.h
D3PD::SGCollectionGetterTool< TileRawChannelContainer >::get
virtual const TileRawChannelContainer * get(bool allowMissing=false)
D3PD::SGCollectionGetterTool< TileRawChannelContainer >::initialize
virtual StatusCode initialize()
D3PD::SGTileModuleBitsGetterTool::m_evtItr
TileRawChannelContainer::const_iterator m_evtItr
Definition
SGTileModuleBitsGetterTool.h:44
D3PD::SGTileModuleBitsGetterTool::~SGTileModuleBitsGetterTool
virtual ~SGTileModuleBitsGetterTool()
Definition
SGTileModuleBitsGetterTool.cxx:22
D3PD::SGTileModuleBitsGetterTool::sizeHint
size_t sizeHint(bool allowMissing=false)
Return an estimate of the number of elements in the iteration.
Definition
SGTileModuleBitsGetterTool.cxx:40
D3PD::SGTileModuleBitsGetterTool::reset
StatusCode reset(bool allowMissing=false)
Reset the iteration to the start of the collection.
Definition
SGTileModuleBitsGetterTool.cxx:51
D3PD::SGTileModuleBitsGetterTool::typeinfo
const std::type_info & typeinfo() const
Return the type of object retrieved by this tool.
Definition
SGTileModuleBitsGetterTool.cxx:32
D3PD::SGTileModuleBitsGetterTool::elementTypeinfo
const std::type_info & elementTypeinfo() const
Return the element type of the collection.
Definition
SGTileModuleBitsGetterTool.cxx:36
D3PD::SGTileModuleBitsGetterTool::nextUntyped
const void * nextUntyped()
Return a pointer to the next element in the collection.
Definition
SGTileModuleBitsGetterTool.cxx:66
D3PD::SGTileModuleBitsGetterTool::SGTileModuleBitsGetterTool
SGTileModuleBitsGetterTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Definition
SGTileModuleBitsGetterTool.cxx:15
D3PD::SGTileModuleBitsGetterTool::m_evtEnd
TileRawChannelContainer::const_iterator m_evtEnd
Definition
SGTileModuleBitsGetterTool.h:44
D3PD::SGTileModuleBitsGetterTool::initialize
StatusCode initialize()
Standard Gaudi initialize method.
Definition
SGTileModuleBitsGetterTool.cxx:25
D3PD::SGTileModuleBitsGetterTool::Base
D3PD::SGCollectionGetterTool< TileRawChannelContainer > Base
Definition
SGTileModuleBitsGetterTool.h:24
DataVector::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Definition
DataVector.h:838
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