ATLAS Offline Software
Loading...
Searching...
No Matches
LAr2DWaveBase.icc
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5// $Id$
6/**
7 * @file LArRawConditions/LAr2DWaveBase.icc
8 * @author scott snyder <snyder@bnl.gov>
9 * @date Apr, 2011
10 * @brief Per-channel class holding wave information in time bins.
11 */
12
13
14#include <cassert>
15
16
17/**
18 * @brief Default constructor.
19 */
20inline
21LAr2DWaveBase::LAr2DWaveBase()
22 : m_timeOffset(0),
23 m_timeBinWidth(25./24.)
24{
25}
26
27
28/**
29 * @brief Is there any data in this channel?
30 */
31inline
32bool LAr2DWaveBase::isEmpty() const
33{
34 return m_waves[0].empty();
35}
36
37
38/**
39 * @brief Return the time offset for this channel.
40 */
41inline
42float LAr2DWaveBase::timeOffset() const
43{
44 return m_timeOffset;
45}
46
47
48/**
49 * @brief Return the time bin width for this channel.
50 */
51inline
52float LAr2DWaveBase::timeBinWidth() const
53{
54 return m_timeBinWidth;
55}
56
57
58/**
59 * @brief Return the number of time bins for a wave.
60 * @param which The type of wave to query.
61 */
62inline
63size_t LAr2DWaveBase::waveSize(unsigned int which) const
64{
65 assert (which < nWaves);
66 return m_waves[which].size();
67}
68
69
70/**
71 * @brief Return wave data.
72 * @param which The type of wave to return.
73 * @param tbin The time bin to return.
74 */
75inline
76LArVectorProxy LAr2DWaveBase::wave (unsigned int which, size_t tbin) const
77{
78 assert (which < nWaves);
79 return m_waves[which].at (tbin);
80}
81