5 if ((nsamples<0) || (nsamples>
HO_TP_SAMPLES_MAX)) printf(
"HOTRiggerPrimitiveDigi: nsamples out of range.");
6 if ((whichSampleTriggered<0) || (whichSampleTriggered>nsamples))
7 printf(
"HOTriggerPrimitiveDigi: specified Triggering Sample out of range");
8 if ( (databits>>nsamples) != 0x0000)
9 printf(
"HOTRiggerPrimitiveDigi: Specified extra bits out of nsamples range.");
11 if (samples<0) samples=0;
14 theHO_TP=(
abs(ieta)&0xf) | ((ieta<0)?(0x10):(0x00)) |
16 ((samples&0xF)<<12) | (((whichSampleTriggered)&0xF)<<16) |
17 ((databits&0x3FF)<<20);
22 if ((whichbit<0) || (whichbit>
nsamples())) {
23 printf(
"HOTPDigi: Sample bit requested out of range.");
25 return ((
theHO_TP>>(20+whichbit))&0x0001);
30 s <<
"(HO TP " << HOtpd.
ieta() <<
", " << HOtpd.
iphi() <<
", ";
32 for (
int bit=0; bit<HOtpd.
nsamples(); bit++) {
33 if (HOtpd.
data(bit)) s <<
"1";
std::ostream & operator<<(std::ostream &out, const ALILine &li)
static const int HO_TP_SAMPLES_MAX
int iphi() const
get the iphi value
bool data(int whichbit=HO_TP_SAMPLES_MAX) const
int ieta() const
get the signed ieta value
int nsamples() const
get the number of samples used to compute the TP
int whichSampleTriggered() const
get the number of the triggering sample