9 #include "EEfeeTPTree.h"
12 #define EEmapFEE_USE // trick instattiates data only in the cxx
20 EEfeeTPTree::EEfeeTPTree(
const char *nameX,
int nc) {
22 memset(feeTP,0,
sizeof(feeTP));
23 memset(TPmap,0,
sizeof(TPmap));
29 EEfeeTPmap *x=eeTPmap+i;
30 feeTP[i]=
new EEfeeTP( x->JP,x->name,x->lenCh,x->cha0L,x->cha0H);
36 strncpy(name,nameX,mxTxt);
41 EEfeeTPTree::~EEfeeTPTree() {
42 for (
int i = 0; i < 90; ++i) {
51 EEfeeTPTree::clear() {
54 if( feeTP[i]==0)
continue;
65 EEfeeTPTree::compute(
int *rawAdc,
int *feePed,
int *feeMask,
int* highTowerMask,
int* patchSumMask) {
69 if( feeTP[i]==0)
continue;
70 int icr=feeTP[i]->getCrateID()-1;
72 feeTP[i]->compute(rawAdc+off, feePed+off, feeMask+off, highTowerMask[i], patchSumMask[i]);
76 EEfeeTPTree::test(
int *tp,
int *ht)
80 feeTP[i]->test(tp[i], ht[i]);
87 EEfeeTPTree::setInput12bit(
int HankCh,
short val){
89 assert(ibr>=0 && ibr<Nee0);
91 ee0[ibr].setInput12bit(ch,val);
100 EEfeeTPTree::getInput12bit(
int HankCh){
102 assert(ibr>=0 && ibr<Nee0);
104 return ee0[ibr].getInput12bit(ch);
110 EEfeeTPTree::setYear(
int y,
int*HTth,
int*TPth ) {
112 for (i=0;i<Nee0;i++) ee0[i].setYear(y,HTth,TPth );
118 EEfeeTPTree::print(
int k) {
119 printf(
"EEfeeTPTree(%s) \n",name);
122 for(i=0;i<Nee0;i++) {
123 printf(
"\n----------- level-0 Board %2d ",i+1);
127 printf(
"\n----------- level-0 emulated output \n ch =");
128 for(i=Nee0out-1;i>=0; i--) printf(
" %2d ",i);
130 for(i=Nee0out-1;i>=0; i--) printf(
" %3d ",ee0outTPsum[i]);
132 for(i=Nee0out-1;i>=0; i--) printf(
" %3d ",ee0outHT2bit[i]);
135 for(i=Nee0out-1;i>=0; i--) printf(
" %3d ",ee0outHTTP2bit[i]);