ATLAS Offline Software
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 
13 
14 namespace D3PD{
16  const std::string& name,
17  const IInterface* parent):
18  Base(type,name,parent) {
19  }
20 
21 
23  }
24 
26  MsgStream log(msgSvc(), name());
27  log << MSG::INFO << " in SGTileModuleBitsGetterTool::initialize()" << endmsg;
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);
47  for(it=col->begin();it<col->end();++it)++rval;
48  return rval*digSize;
49  }
50 
52  const TileRawChannelContainer* tdc=get(allowMissing);
53  if(!tdc){
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 
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 }
TileRawChannelContainer
Definition: TileRawChannelContainer.h:13
D3PD::SGTileModuleBitsGetterTool::nextUntyped
const void * nextUntyped()
Return a pointer to the next element in the collection.
Definition: SGTileModuleBitsGetterTool.cxx:66
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
D3PD::SGTileModuleBitsGetterTool::initialize
StatusCode initialize()
Standard Gaudi initialize method.
Definition: SGTileModuleBitsGetterTool.cxx:25
D3PD::SGTileModuleBitsGetterTool::elementTypeinfo
const std::type_info & elementTypeinfo() const
Definition: SGTileModuleBitsGetterTool.cxx:36
D3PD::SGTileModuleBitsGetterTool::sizeHint
size_t sizeHint(bool allowMissing=false)
Return an estimate of the number of elements in the iteration.
Definition: SGTileModuleBitsGetterTool.cxx:40
skel.it
it
Definition: skel.GENtoEVGEN.py:396
D3PD::SGTileModuleBitsGetterTool::~SGTileModuleBitsGetterTool
virtual ~SGTileModuleBitsGetterTool()
Definition: SGTileModuleBitsGetterTool.cxx:22
D3PD::SGCollectionGetterTool< TileRawChannelContainer >
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_evtItr
TileRawChannelContainer::const_iterator m_evtItr
Definition: SGTileModuleBitsGetterTool.h:44
D3PD
Block filler tool for noisy FEB information.
Definition: CaloCellDetailsFillerTool.cxx:29
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
D3PD::SGTileModuleBitsGetterTool::reset
StatusCode reset(bool allowMissing=false)
Reset the iteration to the start of the collection.
Definition: SGTileModuleBitsGetterTool.cxx:51
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SGTileModuleBitsGetterTool.h
TileRawChannel
Definition: TileRawChannel.h:35
test_pyathena.parent
parent
Definition: test_pyathena.py:15
IdentifiableContainerMT::end
const_iterator end() const
return const_iterator for end of container
Definition: IdentifiableContainerMT.h:242
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
D3PD::SGCollectionGetterTool< TileRawChannelContainer >::initialize
virtual StatusCode initialize()
Standard Gaudi initialize method.
IdentifiableContainerMT::begin
const_iterator begin() const
return const_iterator for first entry
Definition: IdentifiableContainerMT.h:236
D3PD::SGTileModuleBitsGetterTool::m_evtEnd
TileRawChannelContainer::const_iterator m_evtEnd
Definition: SGTileModuleBitsGetterTool.h:44
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TileRawChannelCollection
Definition: TileRawChannelCollection.h:12
query_example.col
col
Definition: query_example.py:7
TileRawChannelContainer
Athena::TPCnvVers::Old Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current TileRawChannelContainer
Definition: TileTPCnv.cxx:127
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
D3PD::SGCollectionGetterTool< TileRawChannelContainer >::get
virtual const TileRawChannelContainer * get(bool allowMissing=false)
Type-safe wrapper for get.
D3PD::SGTileModuleBitsGetterTool::typeinfo
const std::type_info & typeinfo() const
Return the type of object retrieved by this tool.
Definition: SGTileModuleBitsGetterTool.cxx:32