ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
LArSamples::DataContainer Class Reference

#include <DataContainer.h>

Collaboration diagram for LArSamples::DataContainer:

Public Member Functions

 DataContainer ()
 Constructor
More...
 
 DataContainer (CaloGain::CaloGain gain, const std::vector< short > &samples, float energy, float time, float quality, int eventIndex, LArVectorProxy autoCorr, float noise=-1, float pedestal=0, float pedestalRMS=-1, int status=-1, float adcMax=-1)
 
 DataContainer (CaloGain::CaloGain gain, const std::vector< short > &samples, const std::vector< float > &corrs, int eventIndex, float energy, float time, float quality, float pedestal, float pedestalRMS, int status, float adcMax)
 
 DataContainer (const DataContainer &other, double adcMax=-1, double time=-1)
 
virtual ~DataContainer ()
 Destructor. More...
 
CaloGain::CaloGain gain () const
 
unsigned int nSamples () const
 
const std::vector< short > & samples () const
 
const short & sample (unsigned int i) const
 
int eventIndex () const
 
float energy () const
 
float ofcTime () const
 
float quality () const
 
float pedestal () const
 
float pedestalRMS () const
 
int status () const
 
const std::vector< float > & corrs () const
 
float adcMax () const
 
double footprint () const
 
void setADCMax (float adcMax)
 
void setTime (float time)
 
void setEventIndex (int index)
 
void set (unsigned int i, short val)
 
bool isValid () const
 

Private Member Functions

DataContaineroperator= (const DataContainer &)
 

Private Attributes

CaloGain::CaloGain m_gain
 gain More...
 
std::vector< short > m_samples
 vector of ADC samples More...
 
std::vector< float > m_corrs
 noise + correlations in MeV More...
 
int m_eventIndex
 
float m_energy
 
float m_time
 
float m_quality
 
float m_pedestal
 
float m_pedestalRMS
 
unsigned int m_status
 
float m_adcMax
 

Detailed Description

Definition at line 25 of file DataContainer.h.

Constructor & Destructor Documentation

◆ DataContainer() [1/4]

DataContainer::DataContainer ( )

◆ DataContainer() [2/4]

DataContainer::DataContainer ( CaloGain::CaloGain  gain,
const std::vector< short > &  samples,
float  energy,
float  time,
float  quality,
int  eventIndex,
LArVectorProxy  autoCorr,
float  noise = -1,
float  pedestal = 0,
float  pedestalRMS = -1,
int  status = -1,
float  adcMax = -1 
)

Definition at line 27 of file DataContainer.cxx.

37 {
38  ClassCounts::incrementInstanceCount("DataContainer");
39  m_corrs.reserve( autoCorrs.size());
40  m_corrs.push_back(noise*noise);
41  for (unsigned int i = 0; i < autoCorrs.size() && i < nSamples() - 1; ++i)
42  m_corrs.push_back(autoCorrs[i]*noise*noise);
43 }

◆ DataContainer() [3/4]

DataContainer::DataContainer ( CaloGain::CaloGain  gain,
const std::vector< short > &  samples,
const std::vector< float > &  corrs,
int  eventIndex,
float  energy,
float  time,
float  quality,
float  pedestal,
float  pedestalRMS,
int  status,
float  adcMax 
)

◆ DataContainer() [4/4]

DataContainer::DataContainer ( const DataContainer other,
double  adcMax = -1,
double  time = -1 
)

Definition at line 61 of file DataContainer.cxx.

62  : m_gain(other.m_gain), m_samples(other.m_samples), m_corrs(other.m_corrs),
63  m_eventIndex(other.m_eventIndex),
64  m_energy(other.m_energy), m_time(adcMax > 0 ? time : other.m_time), m_quality(other.m_quality),
65  m_pedestal(other.m_pedestal), m_pedestalRMS(other.m_pedestalRMS),
66  m_status(other.m_status), m_adcMax(adcMax > 0 ? adcMax : other.m_adcMax)
67 {
68  ClassCounts::incrementInstanceCount("DataContainer");
69 }

◆ ~DataContainer()

DataContainer::~DataContainer ( )
virtual

Destructor.

Definition at line 72 of file DataContainer.cxx.

73 {
74  ClassCounts::decrementInstanceCount("DataContainer");
75 }

Member Function Documentation

◆ adcMax()

float LArSamples::DataContainer::adcMax ( ) const
inline
Returns
OFC peak parameters

Definition at line 86 of file DataContainer.h.

86 { return m_adcMax; }

◆ corrs()

const std::vector<float>& LArSamples::DataContainer::corrs ( ) const
inline
Returns
correlation matrix

Definition at line 83 of file DataContainer.h.

83 { return m_corrs; }

◆ energy()

float LArSamples::DataContainer::energy ( ) const
inline
Returns
energy

Definition at line 67 of file DataContainer.h.

67 { return m_energy; }

◆ eventIndex()

int LArSamples::DataContainer::eventIndex ( ) const
inline
Returns
event index

Definition at line 64 of file DataContainer.h.

64 { return m_eventIndex; }

◆ footprint()

double LArSamples::DataContainer::footprint ( ) const
inline

Definition at line 88 of file DataContainer.h.

88 { return sizeof(*this) + m_samples.size()*sizeof(short) + m_corrs.size()*sizeof(float); }

◆ gain()

CaloGain::CaloGain LArSamples::DataContainer::gain ( ) const
inline
Returns
gain value

Definition at line 54 of file DataContainer.h.

54 { return m_gain; }

◆ isValid()

bool DataContainer::isValid ( ) const

Definition at line 78 of file DataContainer.cxx.

79 {
80  //if (gain() == CaloGain::UNKNOWNGAIN) return false;
81  if (eventIndex() < 0) return false;
82  if (Definitions::isNone(energy())) return false;
83  if (Definitions::isNone(ofcTime())) return false;
84  if (Definitions::isNone(quality())) return false;
85  //if (Definitions::isNone(pedestal())) return false;
86  //if (m_corrs.size() == 0) return false; temporary
87  if (status() < 0) return false;
88 
89  return true;
90 }

◆ nSamples()

unsigned int LArSamples::DataContainer::nSamples ( ) const
inline
Returns
number of samples

Definition at line 57 of file DataContainer.h.

57 { return m_samples.size(); }

◆ ofcTime()

float LArSamples::DataContainer::ofcTime ( ) const
inline
Returns
time

Definition at line 70 of file DataContainer.h.

70 { return m_time; }

◆ operator=()

DataContainer& LArSamples::DataContainer::operator= ( const DataContainer )
private

◆ pedestal()

float LArSamples::DataContainer::pedestal ( ) const
inline
Returns
pedestal

Definition at line 76 of file DataContainer.h.

76 { return m_pedestal; }

◆ pedestalRMS()

float LArSamples::DataContainer::pedestalRMS ( ) const
inline

Definition at line 77 of file DataContainer.h.

77 { return m_pedestalRMS; }

◆ quality()

float LArSamples::DataContainer::quality ( ) const
inline
Returns
quality

Definition at line 73 of file DataContainer.h.

73 { return m_quality; }

◆ sample()

const short& LArSamples::DataContainer::sample ( unsigned int  i) const
inline

Definition at line 61 of file DataContainer.h.

61 { return m_samples[i]; }

◆ samples()

const std::vector<short>& LArSamples::DataContainer::samples ( ) const
inline
Returns
a sample value

Definition at line 60 of file DataContainer.h.

60 { return m_samples; }

◆ set()

void LArSamples::DataContainer::set ( unsigned int  i,
short  val 
)
inline

Definition at line 95 of file DataContainer.h.

95 { m_samples[i] = val; }

◆ setADCMax()

void LArSamples::DataContainer::setADCMax ( float  adcMax)
inline

Definition at line 90 of file DataContainer.h.

90 { m_adcMax = adcMax; }

◆ setEventIndex()

void LArSamples::DataContainer::setEventIndex ( int  index)
inline

Definition at line 92 of file DataContainer.h.

92 { m_eventIndex = index; }

◆ setTime()

void LArSamples::DataContainer::setTime ( float  time)
inline

Definition at line 91 of file DataContainer.h.

91 { m_time = time; }

◆ status()

int LArSamples::DataContainer::status ( ) const
inline
Returns
status

Definition at line 80 of file DataContainer.h.

80 { return m_status; }

Member Data Documentation

◆ m_adcMax

float LArSamples::DataContainer::m_adcMax
private

Definition at line 114 of file DataContainer.h.

◆ m_corrs

std::vector<float> LArSamples::DataContainer::m_corrs
private

noise + correlations in MeV

Definition at line 107 of file DataContainer.h.

◆ m_energy

float LArSamples::DataContainer::m_energy
private

Definition at line 111 of file DataContainer.h.

◆ m_eventIndex

int LArSamples::DataContainer::m_eventIndex
private

Definition at line 109 of file DataContainer.h.

◆ m_gain

CaloGain::CaloGain LArSamples::DataContainer::m_gain
private

gain

Definition at line 101 of file DataContainer.h.

◆ m_pedestal

float LArSamples::DataContainer::m_pedestal
private

Definition at line 112 of file DataContainer.h.

◆ m_pedestalRMS

float LArSamples::DataContainer::m_pedestalRMS
private

Definition at line 112 of file DataContainer.h.

◆ m_quality

float LArSamples::DataContainer::m_quality
private

Definition at line 111 of file DataContainer.h.

◆ m_samples

std::vector<short> LArSamples::DataContainer::m_samples
private

vector of ADC samples

Definition at line 104 of file DataContainer.h.

◆ m_status

unsigned int LArSamples::DataContainer::m_status
private

Definition at line 113 of file DataContainer.h.

◆ m_time

float LArSamples::DataContainer::m_time
private

Definition at line 111 of file DataContainer.h.


The documentation for this class was generated from the following files:
LArSamples::DataContainer::m_samples
std::vector< short > m_samples
vector of ADC samples
Definition: DataContainer.h:104
xAOD::short
short
Definition: Vertex_v1.cxx:165
LArSamples::DataContainer::m_status
unsigned int m_status
Definition: DataContainer.h:113
LArSamples::DataContainer::m_time
float m_time
Definition: DataContainer.h:111
LArSamples::DataContainer::gain
CaloGain::CaloGain gain() const
Definition: DataContainer.h:54
LArSamples::DataContainer::samples
const std::vector< short > & samples() const
Definition: DataContainer.h:60
CaloGain::UNKNOWNGAIN
@ UNKNOWNGAIN
Definition: CaloGain.h:20
LArSamples::DataContainer::ofcTime
float ofcTime() const
Definition: DataContainer.h:70
LArSamples::DataContainer::adcMax
float adcMax() const
Definition: DataContainer.h:86
LArSamples::DataContainer::nSamples
unsigned int nSamples() const
Definition: DataContainer.h:57
LArSamples::DataContainer::m_eventIndex
int m_eventIndex
Definition: DataContainer.h:109
LArSamples::DataContainer::pedestalRMS
float pedestalRMS() const
Definition: DataContainer.h:77
LArSamples::DataContainer::m_pedestalRMS
float m_pedestalRMS
Definition: DataContainer.h:112
lumiFormat.i
int i
Definition: lumiFormat.py:85
LArSamples::Definitions::none
static const double none
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/Definitions.h:17
LArSamples::ClassCounts::decrementInstanceCount
void decrementInstanceCount() const
Definition: LArCafJobs/LArCafJobs/ClassCounts.h:33
LArSamples::DataContainer::m_corrs
std::vector< float > m_corrs
noise + correlations in MeV
Definition: DataContainer.h:107
LArSamples::DataContainer::m_adcMax
float m_adcMax
Definition: DataContainer.h:114
LArSamples::DataContainer::m_energy
float m_energy
Definition: DataContainer.h:111
LArSamples::DataContainer::m_gain
CaloGain::CaloGain m_gain
gain
Definition: DataContainer.h:101
LArSamples::DataContainer::energy
float energy() const
Definition: DataContainer.h:67
LArSamples::ClassCounts::incrementInstanceCount
void incrementInstanceCount() const
Definition: LArCafJobs/LArCafJobs/ClassCounts.h:32
LArSamples::DataContainer::m_pedestal
float m_pedestal
Definition: DataContainer.h:112
DeMoScan.index
string index
Definition: DeMoScan.py:364
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
LArSamples::DataContainer::eventIndex
int eventIndex() const
Definition: DataContainer.h:64
LArSamples::DataContainer::m_quality
float m_quality
Definition: DataContainer.h:111
LArSamples::Definitions::isNone
static bool isNone(double x)
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/Definitions.h:18
LArSamples::DataContainer::status
int status() const
Definition: DataContainer.h:80
LArSamples::DataContainer::pedestal
float pedestal() const
Definition: DataContainer.h:76
LArSamples::DataContainer::corrs
const std::vector< float > & corrs() const
Definition: DataContainer.h:83
LArSamples::DataContainer::quality
float quality() const
Definition: DataContainer.h:73
readCCLHist.float
float
Definition: readCCLHist.py:83
WriteCellNoiseToCool.noise
noise
Definition: WriteCellNoiseToCool.py:380