7 #include "DSMAlgo_BW001_2009.hh"
8 #include "DSMAlgo_BW003_2009.hh"
9 #include "DSMAlgo_BE001_2009.hh"
10 #include "DSMAlgo_BE003_2009.hh"
11 #include "DSMLayer_B001_2009.hh"
18 for (
int dsm = 0; dsm < 15; ++dsm)
19 (*
this)[dsm].setName(
"BW", 0, dsm);
23 for (
int dsm = 15; dsm < 30; ++dsm)
24 (*
this)[dsm].setName(
"BE", 0, dsm-15);
31 bool bcw_in =
event.MainX[BCW_CONF_NUM].offset &&
event.MainX[BCW_CONF_NUM].length;
37 for (
int dsm = 0; dsm < 15; ++dsm) {
38 copy_and_swap16(&cbuffer[dsm*16], &bcw->BEMCWest[dsm*16]);
39 char* cpMin = &cbuffer[dsm*16];
40 char* cpMax = cpMin+15;
41 short* sp = (*this)[dsm].channels;
42 for (
char* cp = cpMin; cp < cpMax; cp += 3) {
45 *sp++ = *ip >> 12 & 0xfff;
52 bool bce_in =
event.MainX[BCE_CONF_NUM].offset &&
event.MainX[BCE_CONF_NUM].length;
58 for (
int dsm = 0; dsm < 15; ++dsm) {
59 copy_and_swap16(&cbuffer[dsm*16], &bce->BEMCEast[dsm*16]);
60 char* cpMin = &cbuffer[dsm*16];
61 char* cpMax = cpMin+15;
62 short* sp = (*this)[dsm+15].channels;
63 for (
char* cp = cpMin; cp < cpMax; cp += 3) {
66 *sp++ = *ip >> 12 & 0xfff;
71 return (bcw_in || bce_in);
86 layer[dsm].channels[0] = (*this)[dsmEast++].output;
87 layer[dsm].channels[1] = (*this)[dsmWest++].output;
88 layer[dsm].channels[2] = (*this)[dsmEast++].output;
89 layer[dsm].channels[3] = (*this)[dsmWest++].output;
90 layer[dsm].channels[4] = (*this)[dsmEast].output & 0xffff;
91 layer[dsm].channels[5] = (*this)[dsmWest].output & 0xffff;
97 layer[dsm].channels[0] = (*this)[dsmEast++].output >> 16 & 0xffff;
98 layer[dsm].channels[1] = (*this)[dsmWest++].output >> 16 & 0xffff;
99 layer[dsm].channels[2] = (*this)[dsmEast++].output;
100 layer[dsm].channels[3] = (*this)[dsmWest++].output;
101 layer[dsm].channels[4] = (*this)[dsmEast++].output;
102 layer[dsm].channels[5] = (*this)[dsmWest++].output;
108 void DSMLayer_B001_2009::run()