9 #include "EEdsm0Tree.h"
16 EEdsm0Tree::EEdsm0Tree(
const char *nameX) {
22 strncpy(name,nameX,mxTxt);
27 EEdsm0Tree::~EEdsm0Tree() {
33 void EEdsm0Tree :: clear() {
35 for (i=0;i<Nee0;i++) ee0[i].clear();
36 memset(ee0outTPsum,0,
sizeof(ee0outTPsum));
37 memset( ee0outHT2bit,0,
sizeof( ee0outHT2bit));
38 memset( ee0outTP2bit,0,
sizeof( ee0outTP2bit));
39 memset(ee0outHTTP2bit,0,
sizeof(ee0outHTTP2bit));
40 memset( ee0out16bit,0,
sizeof( ee0out16bit));
47 EEdsm0Tree::setInp12bit(
int HankCh,
short val){
49 assert(ibr>=0 && ibr<Nee0);
51 ee0[ibr].setInp12bit(ch,val);
60 EEdsm0Tree::getInp12bit(
int HankCh)
const {
62 assert(ibr>=0 && ibr<Nee0);
64 return ee0[ibr].getInp12bit(ch);
70 EEdsm0Tree::setYear(
int y,
int*HTth,
int*TPth ) {
72 for (i=0;i<Nee0;i++) ee0[i].setYear(y, HTth, TPth);
79 EEdsm0Tree::compute() {
90 ee0outTPsum[j]= ee0[i].getOutTPsum();
91 ee0outTP2bit[j]= ee0[i].getOutTP2bit();
92 ee0outHT2bit[j]= ee0[i].getOutHT2bit();
93 ee0outHTTP2bit[j]= ee0[i].getOutHTTP2bit();
94 ee0out16bit[j]= ee0[i].getOut16bit();
96 if(i==1 || i==4 || i==7) {
97 ee0outTPsum[j]= ee0[i].getOutTPsum(1);
98 ee0outTP2bit[j]= ee0[i].getOutTP2bit(1);
99 ee0outHT2bit[j]= ee0[i].getOutHT2bit(1);
100 ee0outHTTP2bit[j]= ee0[i].getOutHTTP2bit(1);
101 ee0out16bit[j]= ee0[i].getOut16bit(1);
111 EEdsm0Tree::print(
int k)
const {
112 printf(
"EEdsm0Tree(%s) \n",name);
115 for(i=0;i<Nee0;i++) {
116 printf(
"\n----------- level-0 Board %2d ",i+1);
120 printf(
"\n----------- level-0 emulated output \n ch =");
121 for(i=Nee0out-1;i>=0; i--) printf(
" %2d ",i);
123 for(i=Nee0out-1;i>=0; i--) printf(
" %3d ",ee0outTPsum[i]);
125 for(i=Nee0out-1;i>=0; i--) printf(
" %3d ",ee0outHT2bit[i]);
128 for(i=Nee0out-1;i>=0; i--) printf(
" %3d ",ee0outHTTP2bit[i]);