ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TileCalorimeter
TileRecUtils
src
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
*/
12
13
14
#include "
TileRawChannelBuilderTest.h
"
15
#include "
AthAllocators/DataPool.h
"
16
17
23
TileRawChannel
*
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
DataPool.h
DataPool
a typed memory pool that saves time spent allocation small object.
Definition
DataPool.h:63
DataPool::nextElementPtr
pointer nextElementPtr()
obtain the next available element in pool by pointer pool is resized if its limit has been reached On...
TileDigits
Definition
TileDigits.h:30
TileDigits::samples
const std::vector< float > & samples() const
Definition
TileDigits.h:58
TileRawChannelBuilderTest::rawChannel
virtual TileRawChannel * rawChannel(const TileDigits *digits, const EventContext &ctx) override
Builder virtual method to be implemented by subclasses.
Definition
TileRawChannelBuilderTest.cxx:24
TileRawChannel
Definition
TileRawChannel.h:35
TileRawChannel::assign
void assign(const HWIdentifier &id, float amplitude, float time, float quality, float ped=0.0)
Definition
TileRawChannel.h:63
TileRawData::adc_HWID
HWIdentifier adc_HWID(void) const
Definition
TileRawData.h:53
TileRawChannelBuilderTest.h
Helper for testing TileRawChannelBuilder.
Generated on
for ATLAS Offline Software by
1.17.0