Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
CalibFormats
CaloTPG
src
HcalTPGCompressor.cc
Go to the documentation of this file.
1
#include "
CalibFormats/CaloTPG/interface/CaloTPGTranscoder.h
"
2
#include "
CalibFormats/CaloTPG/interface/HcalTPGCompressor.h
"
3
4
HcalTPGCompressor::HcalTPGCompressor
(
const
CaloTPGTranscoder
* coder) : coder_(coder) {
5
}
6
7
void
HcalTPGCompressor::compress
(
const
IntegerCaloSamples
&
ics
,
const
std::vector<bool>& fineGrain,
HcalTriggerPrimitiveDigi
& digi)
const
{
8
digi.
setSize
(ics.
size
());
9
digi.
setPresamples
(ics.
presamples
());
10
for
(
int
i
=0;
i
<ics.
size
();
i
++)
11
digi.
setSample
(
i
,
coder_
->
hcalCompress
(ics.
id
(),ics[
i
],fineGrain[
i
]));
12
}
13
14
HcalTriggerPrimitiveSample
HcalTPGCompressor::compress
(
const
HcalTrigTowerDetId
&
id
,
unsigned
int
sample
,
bool
fineGrain)
const
{
15
return
coder_
->
hcalCompress
(
id
, sample, fineGrain);
16
}
i
int i
Definition:
DBlmapReader.cc:9
HcalTriggerPrimitiveDigi::setSample
void setSample(int i, const HcalTriggerPrimitiveSample &sam)
Definition:
HcalTriggerPrimitiveDigi.h:45
IntegerCaloSamples::presamples
int presamples() const
access presample information
Definition:
IntegerCaloSamples.h:34
IntegerCaloSamples
Definition:
IntegerCaloSamples.h:18
HcalTriggerPrimitiveDigi::setSize
void setSize(int size)
Definition:
HcalTriggerPrimitiveDigi.cc:10
h2_mapping_cfi.ics
tuple ics
Definition:
h2_mapping_cfi.py:4
CaloTPGTranscoder::hcalCompress
virtual HcalTriggerPrimitiveSample hcalCompress(const HcalTrigTowerDetId &id, unsigned int sample, bool fineGrain) const =0
Compression from linear samples+fine grain in the HTR.
CaloTPGTranscoder.h
IntegerCaloSamples::size
int size() const
get the size
Definition:
IntegerCaloSamples.h:27
HcalTPGCompressor.h
HcalTPGCompressor::HcalTPGCompressor
HcalTPGCompressor(const CaloTPGTranscoder *coder)
Definition:
HcalTPGCompressor.cc:4
HcalTriggerPrimitiveSample
Definition:
HcalTriggerPrimitiveSample.h:13
HcalTriggerPrimitiveDigi
Definition:
HcalTriggerPrimitiveDigi.h:15
CaloTPGTranscoder
Definition:
CaloTPGTranscoder.h:26
HcalTriggerPrimitiveDigi::setPresamples
void setPresamples(int ps)
Definition:
HcalTriggerPrimitiveDigi.cc:15
HcalTPGCompressor::compress
void compress(const IntegerCaloSamples &ics, const std::vector< bool > &fineGrain, HcalTriggerPrimitiveDigi &digi) const
Definition:
HcalTPGCompressor.cc:7
HcalTrigTowerDetId
Definition:
HcalTrigTowerDetId.h:16
IntegerCaloSamples::id
DetId id() const
get the (generic) id
Definition:
IntegerCaloSamples.h:24
HcalTPGCompressor::coder_
const CaloTPGTranscoder * coder_
Definition:
HcalTPGCompressor.h:20
compare_using_db.sample
string sample
Definition:
compare_using_db.py:29
Generated for CMSSW Reference Manual by
1.8.5