ATLAS Offline Software
TileRawChannelBuilderTest.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 /*
5  */
15 #include "AthAllocators/DataPool.h"
16 
17 
24 TileRawChannelBuilderTest::rawChannel (const TileDigits* digits, const EventContext& /*ctx*/)
25 {
26  const std::vector<float>& samples = digits->samples();
27  float amp = samples.size() > 0 ? samples[0] : 0;
28  float time = samples.size() > 1 ? samples[1] : 0;
29  float qual = samples.size() > 2 ? samples[2] : 0;
30  float ped = samples.size() > 3 ? samples[3] : 0;
31 
32  DataPool<TileRawChannel> tileRchPool (100);
33  TileRawChannel *rawCh = tileRchPool.nextElementPtr();
34  rawCh->assign (digits->adc_HWID(), amp, time, qual, ped);
35  return rawCh;
36 }
37 
TileRawData::adc_HWID
HWIdentifier adc_HWID(void) const
Definition: TileRawData.h:53
TileRawChannel::assign
void assign(const HWIdentifier &id, float amplitude, float time, float quality, float ped=0.0)
Definition: TileRawChannel.h:63
01SubmitToGrid.samples
samples
Definition: 01SubmitToGrid.py:58
TileRawChannel
Definition: TileRawChannel.h:35
DataPool::nextElementPtr
pointer nextElementPtr()
obtain the next available element in pool by pointer pool is resized if its limit has been reached On...
TileDigits::samples
const std::vector< float > & samples() const
Definition: TileDigits.h:58
DataPool.h
TileDigits
Definition: TileDigits.h:30
TileRawChannelBuilderTest::rawChannel
virtual TileRawChannel * rawChannel(const TileDigits *digits, const EventContext &ctx) override
Builder virtual method to be implemented by subclasses.
Definition: TileRawChannelBuilderTest.cxx:24
TileRawChannelBuilderTest.h
Helper for testing TileRawChannelBuilder.
Example_ReadSampleNoise.ped
ped
Definition: Example_ReadSampleNoise.py:45
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
DataPool
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
Definition: DataPool.h:47
beamspotman.qual
qual
Definition: beamspotman.py:481