Functions | |
template<class Digi > | |
void | process (const CaloSamples &clf, Digi &df, int fCapIdOffset) |
void CastorNominalCoderTemplate::process | ( | const CaloSamples & | clf, |
Digi & | df, | ||
int | fCapIdOffset | ||
) |
Definition at line 12 of file CastorNominalCoder.cc.
References i, CaloSamples::id(), CaloSamples::presamples(), lumiQueryAPI::q, and CaloSamples::size().
{ df=Digi(clf.id()); df.setSize(clf.size()); df.setPresamples(clf.presamples()); for (int i=0; i<clf.size(); i++) { int capId = (fCapIdOffset + i) % 4; for (int q=1; q<128; q++) { df.setSample(i,HcalQIESample(q,capId,0,0)); if (df[i].nominal_fC()>clf[i]) { df.setSample(i,HcalQIESample(q-1,capId,0,0)); break; } } } }