41 int firstbin = floor(t/25.);
42 double f = t/25. - firstbin;
43 int nextbin = firstbin + 1;
44 double v1 = (firstbin < 0 || firstbin >=
MAXSAMPLES) ? 0. :
data_[firstbin];
45 double v2 = (nextbin < 0 || nextbin >=
MAXSAMPLES) ? 0. :
data_[nextbin];
46 data[
i] = (v1*(1.-
f)+v2*f);
72 s <<
"DetId=" << samples.
id().
rawId();
73 s <<
", "<< samples.
size() <<
"samples" << std::endl;
74 for (
int i=0;
i<samples.
size();
i++)
75 s <<
i <<
":" << samples[
i] << std::endl;
CaloSamples & scale(double value)
multiply each item by this value
static const int MAXSAMPLES
std::ostream & operator<<(std::ostream &out, const ALILine &li)
uint32_t rawId() const
get the raw id
void setPresamples(int pre)
set presample information
unsigned int offset(bool)
int size() const
get the size
CaloSamples & offsetTime(double offset)
shift all the samples by a time, in ns, interpolating
char data[epos_bytes_allocation]
CaloSamples & operator+=(double value)
add a value to all samples
DetId id() const
get the (generic) id
tuple size
Write out results.