StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mix_fe101_2009_a.cc
1 //
2 // Pibero Djawotho <pibero@tamu.edu>
3 // Texas A&M University
4 // 20 Jan 2011
5 //
6 
7 #include "bits.hh"
8 #include "Board.hh"
9 #include "mix_fe101_2009_a.hh"
10 
11 void mix_fe101_2009_a(Board& fe101, int t){
12  int* fe101channels = (int*)fe101.channels[t];
13  int qt1sum = getbits(fe101channels[0],0,17);
14  int qt2sum = getbits(fe101channels[1],0,17);
15  int qt3sum = getbits(fe101channels[2],0,17);
16  int qt4sum = getbits(fe101channels[3],0,17);
17  int sum1 = qt1sum+qt2sum;
18  int sum2 = qt3sum+qt4sum;
19  const int R0 = fe101.registers[0];
20  const int R1 = fe101.registers[1];
21  const int fpeThr = R1 << 12 | R0;
22  int fpe1 = sum1 > fpeThr;
23  int fpe2 = sum2 > fpeThr;
24  fe101.output[t] = fpe1 | fpe2 << 1;
25 }
Definition: Board.hh:14