Main Page
Namespaces
Classes
Package Documentation
DataFormats
FTLDigi
interface
FTLDataFrameT.h
Go to the documentation of this file.
1
#ifndef DIGIFTL_FTLDATAFRAMET_H
2
#define DIGIFTL_FTLDATAFRAMET_H
3
4
#include <vector>
5
#include <ostream>
6
#include <iostream>
7
13
template
<
class
D,
class
S>
14
class
FTLDataFrameT
{
15
public
:
16
20
typedef
D
key_type
;
21
25
FTLDataFrameT
() :
id_
(0),
maxSampleSize_
(15) {
data_
.resize(
maxSampleSize_
); }
26
FTLDataFrameT
(
const
D
&
id
) :
id_
(id),
maxSampleSize_
(15) {
data_
.resize(
maxSampleSize_
); }
27
FTLDataFrameT
(
const
FTLDataFrameT
&
o
) :
data_
(o.
data_
),
id_
(o.
id_
),
maxSampleSize_
(o.
maxSampleSize_
) { }
28
32
const
D
&
id
()
const
{
return
id_
; }
33
37
int
size
()
const
{
return
data_
.size() & 0xf; }
38
42
void
resize
(
size_t
s
) {
data_
.resize(s); }
43
47
const
S
&
operator[]
(
int
i
)
const
{
return
data_
[
i
]; }
48
const
S
&
sample
(
int
i
)
const
{
return
data_
[
i
]; }
49
void
setSample
(
int
i
,
const
S
&
sample
) {
if
(i<(
int
)
data_
.size())
data_
[i]=sample; }
50
void
print
(std::ostream &
out
=
std::cout
)
51
{
52
for
(
size_t
i
=0;
i
<
data_
.size();
i
++)
53
{
54
out
<<
"["
<<
i
<<
"] "
;
55
data_
[
i
].print(
out
);
56
}
57
}
58
59
60
private
:
61
62
//collection of samples
63
std::vector<S>
data_
;
64
65
// det id for this data frame
66
D
id_
;
67
68
//number of samples and maximum available
69
size_t
maxSampleSize_
;
70
71
};
72
73
#endif
mps_fire.i
i
Definition:
mps_fire.py:269
alignCSCRings.s
s
Definition:
alignCSCRings.py:91
FTLDataFrameT::id_
D id_
Definition:
FTLDataFrameT.h:66
FTLDataFrameT::print
void print(std::ostream &out=std::cout)
Definition:
FTLDataFrameT.h:50
FTLDataFrameT::FTLDataFrameT
FTLDataFrameT()
CTOR.
Definition:
FTLDataFrameT.h:25
FTLDataFrameT::id
const D & id() const
det id
Definition:
FTLDataFrameT.h:32
FTLDataFrameT::operator[]
const S & operator[](int i) const
assess/set specific samples
Definition:
FTLDataFrameT.h:47
FTLDataFrameT::key_type
D key_type
key to sort the collection
Definition:
FTLDataFrameT.h:20
FTLDataFrameT::resize
void resize(size_t s)
allow to set size
Definition:
FTLDataFrameT.h:42
FTLDataFrameT::FTLDataFrameT
FTLDataFrameT(const FTLDataFrameT &o)
Definition:
FTLDataFrameT.h:27
FTLDataFrameT::maxSampleSize_
size_t maxSampleSize_
Definition:
FTLDataFrameT.h:69
FTLDataFrameT::setSample
void setSample(int i, const S &sample)
Definition:
FTLDataFrameT.h:49
FTLDataFrameT::sample
const S & sample(int i) const
Definition:
FTLDataFrameT.h:48
connectstrParser.o
o
Definition:
connectstrParser.py:70
MillePedeFileConverter_cfg.out
out
Definition:
MillePedeFileConverter_cfg.py:31
funct::D
DecomposeProduct< arg, typename Div::arg > D
Definition:
Factorize.h:151
FTLDataFrameT::size
int size() const
total number of samples in the digi
Definition:
FTLDataFrameT.h:37
S
double S(const TLorentzVector &, const TLorentzVector &)
Definition:
Particle.cc:99
FTLDataFrameT
Readout digi for HGC.
Definition:
FTLDataFrameT.h:14
gather_cfg.cout
cout
Definition:
gather_cfg.py:145
FTLDataFrameT::data_
std::vector< S > data_
Definition:
FTLDataFrameT.h:63
FTLDataFrameT::FTLDataFrameT
FTLDataFrameT(const D &id)
Definition:
FTLDataFrameT.h:26
Generated for CMSSW Reference Manual by
1.8.11