Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
DataFormats
HGCDigi
interface
HGCDataFrame.h
Go to the documentation of this file.
1
#ifndef DIGIHGCAL_HGCDATAFRAME_H
2
#define DIGIHGCAL_HGCDATAFRAME_H
3
4
#include <vector>
5
#include <ostream>
6
12
template
<
class
D,
class
S>
13
class
HGCDataFrame
{
14
public
:
15
19
typedef
D
key_type
;
20
24
HGCDataFrame
() :
id_
(0),
maxSampleSize_
(6) {
data_
.resize(
maxSampleSize_
); }
25
explicit
HGCDataFrame
(
const
D
&
id
) :
id_
(id),
maxSampleSize_
(6) {
data_
.resize(
maxSampleSize_
); }
26
30
const
D
&
id
()
const
{
return
id_
; }
31
35
int
size
()
const
{
return
data_
.size() & 0xf; }
36
40
void
resize
(
size_t
s
) {
data_
.resize(s); }
41
45
const
S
&
operator[]
(
int
i
)
const
{
return
data_
[
i
]; }
46
const
S
&
sample
(
int
i
)
const
{
return
data_
[
i
]; }
47
void
setSample
(
int
i
,
const
S
&
sample
) {
if
(i<(
int
)
data_
.size())
data_
[i]=sample; }
48
49
50
private
:
51
52
//collection of samples
53
std::vector<S>
data_
;
54
55
// det id for this data frame
56
D
id_
;
57
58
//number of samples and maximum available
59
size_t
maxSampleSize_
;
60
61
};
62
63
#endif
i
int i
Definition:
DBlmapReader.cc:9
HGCDataFrame::maxSampleSize_
size_t maxSampleSize_
Definition:
HGCDataFrame.h:59
HGCDataFrame::resize
void resize(size_t s)
allow to set size
Definition:
HGCDataFrame.h:40
HGCDataFrame::sample
const S & sample(int i) const
Definition:
HGCDataFrame.h:46
HGCDataFrame::operator[]
const S & operator[](int i) const
assess/set specific samples
Definition:
HGCDataFrame.h:45
HGCDataFrame::key_type
D key_type
key to sort the collection
Definition:
HGCDataFrame.h:19
HGCDataFrame::HGCDataFrame
HGCDataFrame(const D &id)
Definition:
HGCDataFrame.h:25
HGCDataFrame::data_
std::vector< S > data_
Definition:
HGCDataFrame.h:53
HGCDataFrame::id
const D & id() const
det id
Definition:
HGCDataFrame.h:30
funct::D
DecomposeProduct< arg, typename Div::arg > D
Definition:
Factorize.h:150
HGCDataFrame::id_
D id_
Definition:
HGCDataFrame.h:56
alignCSCRings.s
list s
Definition:
alignCSCRings.py:91
S
double S(const TLorentzVector &, const TLorentzVector &)
Definition:
Particle.cc:99
HGCDataFrame
Readout digi for HGC.
Definition:
HGCDataFrame.h:13
HGCDataFrame::setSample
void setSample(int i, const S &sample)
Definition:
HGCDataFrame.h:47
HGCDataFrame::HGCDataFrame
HGCDataFrame()
CTOR.
Definition:
HGCDataFrame.h:24
HGCDataFrame::size
int size() const
total number of samples in the digi
Definition:
HGCDataFrame.h:35
Generated for CMSSW Reference Manual by
1.8.5