test
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
#include <iostream>
7
13
template
<
class
D,
class
S>
14
class
HGCDataFrame
{
15
public
:
16
20
typedef
D
key_type
;
21
25
HGCDataFrame
() :
id_
(0),
maxSampleSize_
(15) {
data_
.resize(
maxSampleSize_
); }
26
explicit
HGCDataFrame
(
const
D
&
id
) :
id_
(id),
maxSampleSize_
(15) {
data_
.resize(
maxSampleSize_
); }
27
31
const
D
&
id
()
const
{
return
id_
; }
32
36
int
size
()
const
{
return
data_
.size() & 0xf; }
37
41
void
resize
(
size_t
s
) {
data_
.resize(s); }
42
46
const
S
&
operator[]
(
int
i
)
const
{
return
data_
[
i
]; }
47
const
S
&
sample
(
int
i
)
const
{
return
data_
[
i
]; }
48
void
setSample
(
int
i
,
const
S
&
sample
) {
if
(i<(
int
)
data_
.size())
data_
[i]=sample; }
49
void
print
(std::ostream &
out
=
std::cout
)
50
{
51
for
(
size_t
i
=0;
i
<
data_
.size();
i
++)
52
{
53
out
<<
"["
<<
i
<<
"] "
;
54
data_
[
i
].print(
out
);
55
}
56
}
57
58
59
private
:
60
61
//collection of samples
62
std::vector<S>
data_
;
63
64
// det id for this data frame
65
D
id_
;
66
67
//number of samples and maximum available
68
size_t
maxSampleSize_
;
69
70
};
71
72
#endif
i
int i
Definition:
DBlmapReader.cc:9
HGCDataFrame::maxSampleSize_
size_t maxSampleSize_
Definition:
HGCDataFrame.h:68
HGCDataFrame::print
void print(std::ostream &out=std::cout)
Definition:
HGCDataFrame.h:49
HGCDataFrame::resize
void resize(size_t s)
allow to set size
Definition:
HGCDataFrame.h:41
HGCDataFrame::sample
const S & sample(int i) const
Definition:
HGCDataFrame.h:47
HGCDataFrame::operator[]
const S & operator[](int i) const
assess/set specific samples
Definition:
HGCDataFrame.h:46
HGCDataFrame::key_type
D key_type
key to sort the collection
Definition:
HGCDataFrame.h:20
HGCDataFrame::HGCDataFrame
HGCDataFrame(const D &id)
Definition:
HGCDataFrame.h:26
HGCDataFrame::data_
std::vector< S > data_
Definition:
HGCDataFrame.h:62
GenerateHcalLaserBadRunList.out
tuple out
Definition:
GenerateHcalLaserBadRunList.py:91
HGCDataFrame::id
const D & id() const
det id
Definition:
HGCDataFrame.h:31
funct::D
DecomposeProduct< arg, typename Div::arg > D
Definition:
Factorize.h:150
HGCDataFrame::id_
D id_
Definition:
HGCDataFrame.h:65
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:14
HGCDataFrame::setSample
void setSample(int i, const S &sample)
Definition:
HGCDataFrame.h:48
gather_cfg.cout
tuple cout
Definition:
gather_cfg.py:145
HGCDataFrame::HGCDataFrame
HGCDataFrame()
CTOR.
Definition:
HGCDataFrame.h:25
HGCDataFrame::size
int size() const
total number of samples in the digi
Definition:
HGCDataFrame.h:36
Generated for CMSSW Reference Manual by
1.8.5