ATLAS Offline Software
Loading...
Searching...
No Matches
DataContainer.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5
10
11#ifndef LArSamples_DataContainer_H
12#define LArSamples_DataContainer_H
13
16#include <vector>
19
20class TH1D;
21
22
23namespace LArSamples {
24
26
27 public:
28
31
32 DataContainer(CaloGain::CaloGain gain, const std::vector<short>& samples,
33 float energy, float time, float quality,
34 int eventIndex,
35 LArVectorProxy autoCorr,
36 //const std::vector<float>& autoCorr,
37 float noise = -1,
38 float pedestal = 0, float pedestalRMS = -1,
39 int status = -1, float adcMax = -1);
40
41 DataContainer(CaloGain::CaloGain gain, const std::vector<short>& samples,
42 const std::vector<float>& corrs,
43 int eventIndex,
44 float energy, float time, float quality,
45 float pedestal, float pedestalRMS,
46 int status, float adcMax);
47
48 DataContainer(const DataContainer& other, double adcMax = -1, double time = -1);
49
51 virtual ~DataContainer();
52
54 CaloGain::CaloGain gain() const { return m_gain; }
55
57 unsigned int nSamples() const { return m_samples.size(); }
58
60 const std::vector<short>& samples() const { return m_samples; }
61 const short& sample(unsigned int i) const { return m_samples[i]; }
62
64 int eventIndex() const { return m_eventIndex; }
65
67 float energy() const { return m_energy; }
68
70 float ofcTime() const { return m_time; }
71
73 float quality() const { return m_quality; }
74
76 float pedestal() const { return m_pedestal; }
77 float pedestalRMS() const { return m_pedestalRMS; }
78
80 int status() const { return m_status; }
81
83 const std::vector<float>& corrs() const { return m_corrs; }
84
86 float adcMax() const { return m_adcMax; }
87
88 double footprint() const { return sizeof(*this) + m_samples.size()*sizeof(short) + m_corrs.size()*sizeof(float); }
89
90 void setADCMax(float adcMax) { m_adcMax = adcMax; }
91 void setTime (float time) { m_time = time; }
93
94 // debug only, use with care!
95 void set(unsigned int i, short val) { m_samples[i] = val; }
96 bool isValid() const;
97
98 private:
99
102
104 std::vector<short> m_samples;
105
107 std::vector<float> m_corrs;
108
110
113 unsigned int m_status;
114 float m_adcMax;
115
116 DataContainer& operator= (const DataContainer&);
117 };
118}
119#endif
120
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition AtlasPID.h:878
Proxy for accessing a range of float values like a vector.
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
CaloGain::CaloGain gain() const
void setEventIndex(int index)
const std::vector< short > & samples() const
unsigned int nSamples() const
const short & sample(unsigned int i) const
void set(unsigned int i, short val)
void setADCMax(float adcMax)
void setTime(float time)
std::vector< short > m_samples
vector of ADC samples
CaloGain::CaloGain m_gain
gain
const std::vector< float > & corrs() const
std::vector< float > m_corrs
noise + correlations in MeV
Proxy for accessing a range of float values like a vector.
Definition index.py:1