ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
TileSampleBuffer Class Reference

#include <TileSampleBuffer.h>

Inheritance diagram for TileSampleBuffer:
Collaboration diagram for TileSampleBuffer:

Public Member Functions

 TileSampleBuffer ()
 
 TileSampleBuffer (TArrayD *xValues)
 
 TileSampleBuffer (unsigned int nSamples, double sampleStart, double stepLength)
 
virtual ~TileSampleBuffer ()
 
void setValue (unsigned int i, double val)
 
float getValue (unsigned int i)
 
double getTime (unsigned int i)
 
unsigned int size ()
 
unsigned int getMaxValueIndex ()
 
void print ()
 
void setValueNoise (unsigned int i, double val)
 
float getValueNoise (unsigned int i)
 
void getValueVector (std::vector< float > &vec)
 

Private Attributes

std::vector< double > m_x
 
std::vector< float > m_y
 
std::vector< float > m_noiseVector
 

Detailed Description

Definition at line 14 of file TileSampleBuffer.h.

Constructor & Destructor Documentation

◆ TileSampleBuffer() [1/3]

TileSampleBuffer::TileSampleBuffer ( )

Definition at line 12 of file TileSampleBuffer.cxx.

13 {
14 }

◆ TileSampleBuffer() [2/3]

TileSampleBuffer::TileSampleBuffer ( TArrayD *  xValues)

Definition at line 16 of file TileSampleBuffer.cxx.

17 {
18  unsigned int nSamples = xValues->GetSize();
19  m_x.resize(nSamples,0.);
20  m_y.resize(nSamples,0.);
21  for(unsigned int i=0; i<nSamples; ++i){
22  m_x[i] = xValues->At(i);
23  }
24 }

◆ TileSampleBuffer() [3/3]

TileSampleBuffer::TileSampleBuffer ( unsigned int  nSamples,
double  sampleStart,
double  stepLength 
)

Definition at line 26 of file TileSampleBuffer.cxx.

27 {
28  m_x.resize(nSamples,0.);
29  m_y.resize(nSamples,0.);
30  m_noiseVector.resize(nSamples,0.);
31  for(unsigned int i=0; i<nSamples; ++i){
32  m_x[i] = sampleStart + i*stepLength;
33  }
34 }

◆ ~TileSampleBuffer()

TileSampleBuffer::~TileSampleBuffer ( )
virtual

Definition at line 36 of file TileSampleBuffer.cxx.

37 {
38 }

Member Function Documentation

◆ getMaxValueIndex()

unsigned int TileSampleBuffer::getMaxValueIndex ( )

Definition at line 40 of file TileSampleBuffer.cxx.

41 {
42  unsigned int iMax(0);
43  double max(-1e100);
44  for(unsigned int i=0; i<m_y.size(); ++i){
45  if(m_y[i]>max) {
46  max=m_y[i];
47  iMax = i;
48  }
49  }
50  return iMax;
51 }

◆ getTime()

double TileSampleBuffer::getTime ( unsigned int  i)
inline

Definition at line 44 of file TileSampleBuffer.h.

44  {
45  if(i<m_x.size()) return m_x[i];
46  else return -999.;
47 }

◆ getValue()

float TileSampleBuffer::getValue ( unsigned int  i)
inline

Definition at line 38 of file TileSampleBuffer.h.

39 {
40  if(i<m_y.size()) return m_y[i];
41  else return -999.;
42 }

◆ getValueNoise()

float TileSampleBuffer::getValueNoise ( unsigned int  i)
inline

Definition at line 48 of file TileSampleBuffer.h.

49 {
50  if(i<m_noiseVector.size()) return m_noiseVector[i];
51  else return -999.;
52 }

◆ getValueVector()

void TileSampleBuffer::getValueVector ( std::vector< float > &  vec)
inline

Definition at line 29 of file TileSampleBuffer.h.

29 {vec = m_y;}

◆ print()

void TileSampleBuffer::print ( )

Definition at line 53 of file TileSampleBuffer.cxx.

53  {
54  std::cout << "Content of TileSampleBuffer: " << std::endl;
55  for(unsigned int i=0; i<m_y.size(); ++i){
56  std::cout << m_x[i] << "\t" << m_y[i] << std::endl;
57  }
58 }

◆ setValue()

void TileSampleBuffer::setValue ( unsigned int  i,
double  val 
)
inline

Definition at line 21 of file TileSampleBuffer.h.

21 {if(i<m_y.size()) m_y[i]=(float)val;}

◆ setValueNoise()

void TileSampleBuffer::setValueNoise ( unsigned int  i,
double  val 
)
inline

Definition at line 27 of file TileSampleBuffer.h.

27 {if(i<m_noiseVector.size()) m_noiseVector[i]=(float)val;}

◆ size()

unsigned int TileSampleBuffer::size ( )
inline

Definition at line 24 of file TileSampleBuffer.h.

24 {return m_x.size();}

Member Data Documentation

◆ m_noiseVector

std::vector<float> TileSampleBuffer::m_noiseVector
private

Definition at line 34 of file TileSampleBuffer.h.

◆ m_x

std::vector<double> TileSampleBuffer::m_x
private

Definition at line 32 of file TileSampleBuffer.h.

◆ m_y

std::vector<float> TileSampleBuffer::m_y
private

Definition at line 33 of file TileSampleBuffer.h.


The documentation for this class was generated from the following files:
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
TileSampleBuffer::m_noiseVector
std::vector< float > m_noiseVector
Definition: TileSampleBuffer.h:34
TileSampleBuffer::m_y
std::vector< float > m_y
Definition: TileSampleBuffer.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
LArDigits2NtupleDumper.nSamples
nSamples
Definition: LArDigits2NtupleDumper.py:70
readCCLHist.float
float
Definition: readCCLHist.py:83
TileSampleBuffer::m_x
std::vector< double > m_x
Definition: TileSampleBuffer.h:32