11 #include <framework/database/DBImportObjPtr.h>
12 #include <framework/database/DBObjPtr.h>
13 #include <framework/database/DBStore.h>
14 #include <framework/datastore/StoreObjPtr.h>
15 #include <framework/datastore/DataStore.h>
16 #include <framework/dataobjects/EventMetaData.h>
17 #include <framework/logging/LogSystem.h>
18 #include <mdst/dbobjects/TRGGDLDBPrescales.h>
19 #include <mdst/dbobjects/TRGGDLDBFTDLBits.h>
20 #include <mdst/dbobjects/TRGGDLDBInputBits.h>
21 #include <mdst/dbobjects/TRGGDLDBBadrun.h>
22 #include <trg/gdl/dbobjects/TRGGDLDBUnpacker.h>
23 #include <trg/gdl/dbobjects/TRGGDLDBDelay.h>
24 #include <trg/gdl/dbobjects/TRGGDLDBAlgs.h>
40 const int N_BITS_RESERVED = 320;
41 const int N_PSNM_ARRAY = 23 + 1;
43 const int run[N_PSNM_ARRAY][4] = {
70 const int nbit[N_PSNM_ARRAY] = { 0, 18, 44, 63, 63,
72 75, 133, 133, 133, 133,
73 142, 160, 160, 160, 160,
78 psnmValues[N_PSNM_ARRAY][N_BITS_RESERVED] = {
87 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
88 0, 0, 0, 0, 0, 0, 0, 1
94 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
95 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
96 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
97 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
104 0, 0, 1, 1, 0, 0, 1, 1, 1, 0,
105 1, 150, 0, 1, 0, 1, 1, 1, 1, 20,
106 1500, 150, 0, 0, 1, 1, 0, 0, 0, 0,
107 0, 0, 0, 30, 0, 0, 20000, 0, 0, 0,
108 0, 0, 400000, 1, 0, 0, 0, 0, 0, 0,
109 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
117 0, 0, 1, 1, 0, 0, 1, 1, 1, 0,
118 1, 150, 0, 1, 0, 1, 1, 1, 1, 20,
119 1500, 150, 0, 0, 1, 1, 0, 1, 0, 0,
120 0, 0, 0, 30, 0, 0, 20000, 0, 0, 0,
121 0, 0, 400000, 1, 0, 0, 0, 0, 0, 0,
122 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
129 0, 0, 1, 1, 0, 0, 1, 1, 1, 0,
130 1, 150, 0, 1, 0, 1, 1, 1, 1, 20,
131 1500, 150, 0, 0, 1, 1, 0, 0, 0, 0,
132 0, 0, 0, 30, 0, 0, 20000, 0, 0, 0,
133 0, 0, 400000, 1, 0, 0, 0, 0, 0, 0,
134 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
141 0, 0, 1, 1, 0, 0, 1, 1, 1, 0,
142 1, 150, 0, 1, 0, 1, 1, 1, 1, 20,
143 1500, 150, 0, 0, 1, 1, 0, 0, 0, 0,
144 0, 0, 0, 30, 0, 0, 20000, 0, 0, 0,
145 0, 0, 400000, 1, 0, 0, 0, 0, 0, 0,
146 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
147 1, 0, 20, 0, 0, 0, 0, 1, 1, 1,
154 0, 0, 1, 1, 0, 0, 1, 1, 1, 0,
155 1, 150, 0, 1, 0, 1, 1, 1, 1, 20,
156 1500, 150, 0, 0, 1, 1, 0, 0, 0, 0,
157 0, 0, 0, 30, 0, 0, 20000, 0, 0, 0,
158 0, 0, 400000, 1, 0, 0, 0, 0, 0, 0,
159 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
160 1, 0, 20, 0, 0, 0, 0, 1, 1, 1,
167 0, 0, 1, 1, 0, 0, 1, 1, 1, 0,
168 1, 150, 0, 1, 0, 1, 1, 1, 1, 20,
169 1500, 150, 0, 0, 1, 1, 0, 0, 0, 0,
170 0, 0, 0, 300, 0, 0, 20000, 0, 0, 0,
171 0, 0, 400000, 1, 0, 0, 0, 0, 0, 0,
172 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
173 1, 0, 20, 0, 0, 0, 0, 1, 1, 1,
180 0, 0, 1, 1, 0, 0, 1, 1, 1, 0,
181 1, 150, 0, 1, 0, 1, 1, 1, 1, 20,
182 1500, 150, 0, 0, 1, 1, 1, 0, 0, 0,
183 0, 0, 0, 300, 0, 0, 20000, 0, 0, 0,
184 0, 0, 400000, 1, 0, 0, 0, 0, 0, 0,
185 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
186 1, 0, 20, 0, 0, 0, 0, 1, 1, 1,
195 0, 0, 1, 1, 0, 0, 1, 1, 1, 0,
196 1, 150, 0, 1, 0, 1, 1, 1, 1, 20,
197 1500, 150, 0, 0, 1, 1, 1, 0, 0, 0,
198 0, 0, 0, 300, 0, 0, 20000, 0, 0, 0,
199 0, 0, 400000, 1, 0, 0, 0, 0, 0, 0,
200 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
201 1, 0, 20, 1, 1, 1, 1, 1, 1, 1,
208 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
209 20, 0, 0, 0, 0, 0, 0, 1, 0, 0,
210 0, 0, 1, 0, 0, 0, 0, 1, 0, 0,
211 150, 50, 1, 0, 1, 1, 1, 1, 1, 1,
212 1, 1, 1, 20, 1500, 150, 1, 1, 1, 0,
213 0, 0, 60, 40, 40, 160000, 0, 0, 1, 400,
214 0, 2000, 1, 1, 1, 0, 0, 2000, 0, 0,
215 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
216 1, 1, 1, 1, 1, 1, 1, 1, 1, 700,
217 40, 1, 1, 1, 1, 1, 0, 200, 1, 1,
218 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
219 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
220 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
227 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
228 20, 0, 0, 0, 0, 0, 0, 1, 0, 0,
229 0, 0, 1, 0, 0, 0, 0, 1, 0, 0,
230 150, 50, 1, 0, 1, 1, 1, 1, 1, 1,
231 1, 1, 1, 20, 1500, 150, 1, 1, 1, 0,
232 0, 0, 60, 40, 40, 160000, 0, 0, 1, 400,
233 0, 2000, 1, 1, 1, 0, 0, 2000, 0, 0,
234 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
235 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
236 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
237 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
238 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
239 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
246 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
247 20, 0, 0, 0, 0, 0, 0, 1, 0, 0,
248 0, 0, 1, 0, 0, 0, 0, 1, 0, 0,
249 150, 50, 1, 0, 1, 1, 1, 1, 1, 1,
250 1, 1, 1, 20, 1500, 150, 1, 1, 1, 0,
251 0, 0, 60, 40, 40, 160000, 0, 0, 1, 400,
252 0, 2000, 1, 1, 0, 0, 0, 2000, 0, 0,
253 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
254 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
255 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
256 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
257 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
258 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
265 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
266 20, 0, 0, 0, 0, 0, 0, 1, 0, 0,
267 0, 0, 1, 0, 0, 0, 0, 1, 0, 0,
268 150, 50, 1, 0, 1, 1, 1, 1, 1, 1,
269 1, 1, 1, 20, 1500, 150, 1, 1, 1, 0,
270 0, 0, 0, 40, 40, 0, 0, 0, 1, 0,
271 0, 0, 1, 1, 0, 0, 0, 2000, 0, 0,
272 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
273 0, 0, 0, 0, 0, 1, 1, 0, 0, 3000,
274 150, 1, 1, 0, 0, 0, 0, 0, 0, 0,
275 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
276 1, 1, 1, 1, 1, 1, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
332 for (
int i = 0; i < N_PSNM_ARRAY; i++) {
335 for (
int j = 0; j < N_BITS_RESERVED; j++) {
339 for (
int j = 0; j < nbit[i]; j++) {
345 }
else if (ONLINE == 1) {
346 for (
int i = N_PSNM_ARRAY - 1; i < N_PSNM_ARRAY; i++) {
350 for (
int j = 0; j < N_BITS_RESERVED; j++) {
354 for (
int j = 0; j < nbit[i]; j++) {
370 const int N_BITS_RESERVED = 320;
371 const int N_OUTPUT_ARRAY = 11;
373 const int run[N_OUTPUT_ARRAY][4] = {
387 const int nbit[N_OUTPUT_ARRAY] = {62, 62, 63, 67, 75,
388 88, 134, 135, 142, 144,
394 outputBitNames[N_OUTPUT_ARRAY][N_BITS_RESERVED] = {
397 "zzz",
"zzzo",
"fff",
"fffo",
"zz",
"zzo",
"ff",
"ffo",
"hie",
"lowe",
"lume",
"c2",
"c3",
"c4",
"c5",
"bha",
"bha_trk",
"bha_brl",
"bha_ecp",
"g_high",
"g_c1",
"gg",
"mu_pair",
"mu_b2b",
"revo",
"rand",
"bg",
"ecltiming",
"nim0",
"nima03",
"nimo03",
"period",
"eclnima03",
"eclnimo03",
"pls",
"poi",
"klmhit",
"f",
"fe",
"ffe",
"fc",
"ffc",
"cdctiming",
"cdcbb",
"nim1c",
"c1n0",
"c1n1",
"c1n2",
"c1n3",
"c1n4",
"c2n1",
"c2n2",
"c2n3",
"c2n4",
"cdcecl1",
"cdcecl2",
"cdcecl3",
"cdcecl4",
"cdcklm1",
"cdcklm2",
"cdcklm3",
"cdcklm4"
401 "zzz",
"zzzo",
"fff",
"fffo",
"zz",
"zzo",
"ff",
"ffo",
"hie",
"lowe",
"lume",
"c2",
"c3",
"c4",
"c5",
"bha",
"bha_trk",
"bha_brl",
"bha_ecp",
"g_high",
"g_c1",
"gg",
"mu_pair",
"mu_b2b",
"revo",
"rand",
"bg",
"ecltiming",
"nim0",
"nima03",
"nimo03",
"period",
"eclnima03",
"eclnimo03",
"pls",
"poi",
"klmhit",
"f",
"fe",
"ffe",
"fc",
"ffc",
"cdctiming",
"cdcbb",
"nim1c",
"c1n0",
"c1n1",
"c1n2",
"c1n3",
"c1n4",
"c2n1",
"c2n2",
"c2n3",
"c2n4",
"cdcecl1",
"cdcecl2",
"cdcecl3",
"cdcecl4",
"cdcklm1",
"cdcklm2",
"cdcklm3",
"cdcklm4"
405 "zzz",
"zzzo",
"fff",
"fffo",
"zz",
"zzo",
"ffb",
"ffo",
"hie",
"lowe",
"lume",
"c2",
"c3",
"c4",
"c5",
"bha",
"bha_trk",
"bha_brl",
"bha_ecp",
"g_high",
"g_c1",
"gg",
"mu_pair",
"mu_b2b",
"revo",
"rand",
"bg",
"ecltiming",
"nim0",
"nima03",
"nimo03",
"period",
"eclnima03",
"eclnimo03",
"pls",
"poi",
"klmhit",
"f",
"fe",
"ffe",
"fc",
"ffc",
"cdctiming",
"cdcbb",
"nim1c",
"c1n0",
"c1n1",
"c1n2",
"c1n3",
"c1n4",
"c2n1",
"c2n2",
"c2n3",
"c2n4",
"cdcecl1",
"cdcecl2",
"cdcecl3",
"cdcecl4",
"cdcklm1",
"cdcklm2",
"cdcklm3",
"cdcklm4",
"ff"
409 "zzz",
"zzzo",
"fff",
"fffo",
"zz",
"zzo",
"ffb",
"ffo",
"hie",
"lowe",
"lume",
"c2",
"c3",
"c4",
"c5",
"bha",
"bha_trk",
"bha_brl",
"bha_ecp",
"g_high",
"g_c1",
"gg",
"mu_pair",
"mu_b2b",
"revo",
"rand",
"bg",
"ecltiming",
"nim0",
"nima03",
"nimo03",
"period",
"eclnima03",
"eclnimo03",
"pls",
"poi",
"klmhit",
"f",
"fe",
"ffe",
"fc",
"ffc",
"cdctiming",
"cdcbb",
"nim1c",
"c1n0",
"c1n1",
"c1n2",
"c1n3",
"c1n4",
"c2n1",
"c2n2",
"c2n3",
"c2n4",
"cdcecl1",
"cdcecl2",
"cdcecl3",
"cdcecl4",
"cdcklm1",
"cdcklm2",
"cdcklm3",
"cdcklm4",
"ff",
"uuu",
"uuuo",
"uub",
"uuo"
413 "zzz",
"zzzo",
"fff",
"fffo",
"zz",
"zzo",
"ffb",
"ffo",
"hie",
"lowe",
"lume",
"c2",
"c3",
"c4",
"c5",
"bha",
"bha_trk",
"bha_brl",
"bha_ecp",
"g_high",
"g_c1",
"gg",
"mu_pair",
"mu_b2b",
"revo",
"rand",
"bg",
"ecltiming",
"nim0",
"nima03",
"nimo03",
"period",
"eclnima03",
"eclnimo03",
"pls",
"poi",
"klmhit",
"f",
"fe",
"ffe",
"fc",
"ffc",
"cdctiming",
"cdcbb",
"nim1c",
"c1n0",
"c1n1",
"c1n2",
"c1n3",
"c1n4",
"c2n1",
"c2n2",
"c2n3",
"c2n4",
"cdcecl1",
"cdcecl2",
"cdcecl3",
"cdcecl4",
"cdcklm1",
"cdcklm2",
"cdcklm3",
"cdcklm4",
"ff",
"uuu",
"uuuo",
"uub",
"uuo",
"c1hie",
"c1lume",
"n1hie",
"n1lume",
"c3hie",
"c3lume",
"n3hie",
"n3lume"
417 "zzz",
"zzzo",
"fff",
"fffo",
"zz",
"zzo",
"ffb",
"ffo",
"hie",
"lowe",
"lume",
"c2",
"c3",
"c4",
"c5",
"bha",
"bha_trk",
"bha_brl",
"bha_ecp",
"g_high",
"g_c1",
"gg",
"mu_pair",
"mu_b2b",
"revo",
"rand",
"bg",
"ecltiming",
"nim0",
"nima03",
"nimo03",
"period",
"eclnima03",
"eclnimo03",
"pls",
"poi",
"klmhit",
"f",
"fe",
"ffe",
"fc",
"ffc",
"cdctiming",
"cdcbb",
"nim1c",
"c1n0",
"c1n1",
"c1n2",
"c1n3",
"c1n4",
"c2n1",
"c2n2",
"c2n3",
"c2n4",
"cdcecl1",
"cdcecl2",
"cdcecl3",
"cdcecl4",
"cdcklm1",
"cdcklm2",
"cdcklm3",
"cdcklm4",
"ff",
"eed",
"fed",
"fp",
"bha3d",
"c1hie",
"c1lume",
"n1hie",
"n1lume",
"c3hie",
"c3lume",
"n3hie",
"n3lume",
"shem",
"ohem",
"lml0",
"lml1",
"lml2",
"lml3",
"lml4",
"lml5",
"lml6",
"lml7",
"lml8",
"lml9",
"lml10"
421 "fff",
"ffs",
"fss",
"sss",
"ffz",
"fzz",
"zzz",
"ffy",
"fyy",
"yyy",
"ff",
"fs",
"ss",
"fz",
"zz",
"fy",
"yy",
"ffo",
"fso",
"sso",
"fzo",
"fyo",
"ffb",
"fsb",
"ssb",
"fzb",
"fyb",
"hie",
"lowe",
"lume",
"c2",
"c3",
"c4",
"c5",
"bha3d",
"bha",
"bha_trk",
"bha_brl",
"bha_ecp",
"bhapur",
"eclmumu",
"bhauni",
"ecloflo",
"g_high",
"g_c1",
"gg",
"eed",
"fed",
"fp",
"sp",
"zp",
"yp",
"d_5",
"shem",
"ohem",
"toptiming",
"ecltiming",
"cdctiming",
"cdcbb",
"mu_pair",
"mu_b2b",
"klmhit",
"revolution",
"random",
"bg",
"pls",
"poi",
"f",
"s",
"z",
"y",
"nim0",
"nima03",
"nimo03",
"eclnima03",
"eclnimo03",
"n1gev0",
"n1gev1",
"n1gev2",
"n1gev3",
"n1gev4",
"n2gev1",
"n2gev2",
"n2gev3",
"n2gev4",
"c2gev1",
"c2gev2",
"c2gev3",
"c2gev4",
"cdcecl1",
"cdcecl2",
"cdcecl3",
"cdcecl4",
"cdcklm1",
"cdcklm2",
"cdcklm3",
"cdcklm4",
"cdctop1",
"cdctop2",
"cdctop3",
"cdctop4",
"c1hie",
"c1lume",
"n1hie",
"n1lume",
"c3hie",
"c3lume",
"n3hie",
"n3lume",
"lml0",
"lml1",
"lml2",
"lml3",
"lml4",
"lml5",
"lml6",
"lml7",
"lml8",
"lml9",
"lml10",
"lml11",
"zzzv",
"yyyv",
"fffv",
"zzv",
"yyv",
"ffov",
"hiev",
"lumev",
"c4v",
"bhav",
"bhapurv",
"mu_pairv",
"bha3dv"
425 "fff",
"ffs",
"fss",
"sss",
"ffz",
"fzz",
"zzz",
"ffy",
"fyy",
"yyy",
"ff",
"fs",
"ss",
"fz",
"zz",
"fy",
"yy",
"ffo",
"fso",
"sso",
"fzo",
"fyo",
"ffb",
"fsb",
"ssb",
"fzb",
"fyb",
"hie",
"lowe",
"lume",
"c2",
"c3",
"c4",
"c5",
"bha3d",
"bha",
"bha_trk",
"bha_brl",
"bha_ecp",
"bhapur",
"eclmumu",
"bhauni",
"ecloflo",
"g_high",
"g_c1",
"gg",
"eed",
"fed",
"fp",
"sp",
"zp",
"yp",
"d_5",
"shem",
"ohem",
"toptiming",
"ecltiming",
"cdctiming",
"cdcbb",
"mu_pair",
"mu_b2b",
"klmhit",
"revolution",
"random",
"bg",
"pls",
"poi",
"f",
"s",
"z",
"y",
"nim0",
"nima03",
"nimo03",
"eclnima03",
"eclnimo03",
"n1gev0",
"n1gev1",
"n1gev2",
"n1gev3",
"n1gev4",
"n2gev1",
"n2gev2",
"n2gev3",
"n2gev4",
"c2gev1",
"c2gev2",
"c2gev3",
"c2gev4",
"cdcecl1",
"cdcecl2",
"cdcecl3",
"cdcecl4",
"cdcklm1",
"cdcklm2",
"cdcklm3",
"cdcklm4",
"cdctop1",
"cdctop2",
"cdctop3",
"cdctop4",
"c1hie",
"c1lume",
"n1hie",
"n1lume",
"c3hie",
"c3lume",
"n3hie",
"n3lume",
"lml0",
"lml1",
"lml2",
"lml3",
"lml4",
"lml5",
"lml6",
"lml7",
"lml8",
"lml9",
"lml10",
"lml11",
"zzzv",
"yyyv",
"fffv",
"zzv",
"yyv",
"ffov",
"hiev",
"lumev",
"c4v",
"bhav",
"bhapurv",
"mu_pairv",
"bha3dv",
"sl0b2b"
429 "fff",
"ffs",
"fss",
"sss",
"ffz",
"fzz",
"zzz",
"ffy",
"fyy",
"yyy",
"ff",
"fs",
"ss",
"fz",
"zz",
"fy",
"yy",
"ffo",
"fso",
"sso",
"fzo",
"fyo",
"ffb",
"fsb",
"ssb",
"fzb",
"fyb",
"hie",
"lowe",
"lume",
"c2",
"c3",
"c4",
"c5",
"bha3d",
"bha",
"bha_trk",
"bha_brl",
"bha_ecp",
"bhapur",
"eclmumu",
"bhauni",
"ecloflo",
"g_high",
"g_c1",
"gg",
"eed",
"fed",
"fp",
"sp",
"zp",
"yp",
"d_5",
"shem",
"ohem",
"toptiming",
"ecltiming",
"cdctiming",
"cdcbb",
"mu_pair",
"mu_b2b",
"klmhit",
"revolution",
"random",
"bg",
"pls",
"poi",
"f",
"s",
"z",
"y",
"nim0",
"nima03",
"nimo03",
"eclnima03",
"eclnimo03",
"n1gev0",
"n1gev1",
"n1gev2",
"n1gev3",
"n1gev4",
"n2gev1",
"n2gev2",
"n2gev3",
"n2gev4",
"c2gev1",
"c2gev2",
"c2gev3",
"c2gev4",
"cdcecl1",
"cdcecl2",
"cdcecl3",
"cdcecl4",
"cdcklm1",
"cdcklm2",
"cdcklm3",
"cdcklm4",
"cdctop1",
"cdctop2",
"cdctop3",
"cdctop4",
"c1hie",
"c1lume",
"n1hie",
"n1lume",
"c3hie",
"c3lume",
"n3hie",
"n3lume",
"lml0",
"lml1",
"lml2",
"lml3",
"lml4",
"lml5",
"lml6",
"lml7",
"lml8",
"lml9",
"lml10",
"lml11",
"zzzv",
"yyyv",
"fffv",
"zzv",
"yyv",
"ffov",
"hiev",
"lumev",
"c4v",
"bhav",
"bhapurv",
"mu_pairv",
"bha3dv",
"sl0b2b",
"mu_epair",
"mu_eb2b",
"eklmhit",
"fffc",
"fffc2",
"ffoc",
"ffoc2"
433 "fff",
"ffs",
"fss",
"sss",
"ffz",
"fzz",
"zzz",
"ffy",
"fyy",
"yyy",
"ff",
"fs",
"ss",
"fz",
"zz",
"fy",
"yy",
"ffo",
"fso",
"sso",
"fzo",
"fyo",
"ffb",
"fsb",
"ssb",
"fzb",
"fyb",
"hie",
"lowe",
"lume",
"c2",
"c3",
"c4",
"c5",
"bha3d",
"bha",
"bha_trk",
"bha_brl",
"bha_ecp",
"bhapur",
"eclmumu",
"bhauni",
"ecloflo",
"g_high",
"g_c1",
"gg",
"eed",
"fed",
"fp",
"sp",
"zp",
"yp",
"d_5",
"shem",
"ohem",
"toptiming",
"ecltiming",
"cdctiming",
"cdcbb",
"mu_pair",
"mu_b2b",
"klmhit",
"revolution",
"random",
"bg",
"pls",
"poi",
"f",
"s",
"z",
"y",
"nim0",
"nima03",
"nimo03",
"eclnima03",
"eclnimo03",
"n1gev0",
"n1gev1",
"n1gev2",
"n1gev3",
"n1gev4",
"n2gev1",
"n2gev2",
"n2gev3",
"n2gev4",
"c2gev1",
"c2gev2",
"c2gev3",
"c2gev4",
"cdcecl1",
"cdcecl2",
"cdcecl3",
"cdcecl4",
"cdcklm1",
"cdcklm2",
"cdcklm3",
"cdcklm4",
"cdctop1",
"cdctop2",
"cdctop3",
"cdctop4",
"c1hie",
"c1lume",
"n1hie",
"n1lume",
"c3hie",
"c3lume",
"n3hie",
"n3lume",
"lml0",
"lml1",
"lml2",
"lml3",
"lml4",
"lml5",
"lml6",
"lml7",
"lml8",
"lml9",
"lml10",
"lml11",
"zzzv",
"yyyv",
"fffv",
"zzv",
"yyv",
"ffov",
"hiev",
"lumev",
"c4v",
"bhav",
"bhapurv",
"mu_pairv",
"bha3dv",
"sl0b2b",
"mu_epair",
"mu_eb2b",
"eklmhit",
"fffc",
"fffc2",
"ffoc",
"ffoc2",
"fffo",
"fffov"
436 {
"fff",
"ffs",
"fss",
"sss",
"ffz",
"fzz",
"zzz",
"ffy",
"fyy",
"yyy",
"ff",
"fs",
"ss",
"fz",
"zz",
"fy",
"yy",
"ffo",
"fso",
"sso",
"fzo",
"fyo",
"ffb",
"fsb",
"ssb",
"fzb",
"fyb",
"aaa",
"aaao",
"aao",
"aab",
"aa",
"hie",
"lowe",
"lume",
"hade",
"c2",
"c3",
"c4",
"c5",
"bha3d",
"bhabha",
"bhabha_trk",
"bhabha_brl",
"bhabha_ecp",
"bhapur",
"eclmumu",
"bhauni",
"ecloflo",
"eclbst",
"g_high",
"g_c1",
"gg",
"eed",
"fed",
"fp",
"sp",
"zp",
"yp",
"d_5",
"shem",
"ohem",
"toptiming",
"ecltiming",
"cdctiming",
"cdcbb",
"mu_pair",
"mu_b2b",
"klmhit",
"mu_epair",
"mu_eb2b",
"eklmhit",
"revolution",
"random",
"bg",
"pls",
"poisson",
"vetout",
"f",
"s",
"z",
"y",
"a",
"n1gev1",
"n1gev2",
"n1gev3",
"n1gev4",
"n2gev1",
"n2gev2",
"n2gev3",
"n2gev4",
"c2gev1",
"c2gev2",
"c2gev3",
"c2gev4",
"cdcecl1",
"cdcecl2",
"cdcecl3",
"cdcecl4",
"cdcklm1",
"cdcklm2",
"cdcklm3",
"cdcklm4",
"cdctop1",
"cdctop2",
"cdctop3",
"cdctop4",
"c1hie",
"c1lume",
"n1hie",
"n1lume",
"c3hie",
"c3lume",
"n3hie",
"n3lume",
"lml0",
"lml1",
"lml2",
"lml3",
"lml4",
"lml5",
"lml6",
"lml7",
"lml8",
"lml9",
"lml10",
"lml12",
"lml13",
"zzzv",
"yyyv",
"fffv",
"zzv",
"yyv",
"ffov",
"fffov",
"hiev",
"lumev",
"c4v",
"bhabhav",
"mu_pairv",
"bha3dv",
"fffc",
"fffc2",
"ffoc",
"ffoc2",
"fffo",
"sl0b2b",
"sl1b2b",
"sl2b2b",
"sl12b2b",
"gggrl",
"ggtsf",
"ggbrl",
"bhabrl",
"bhamtc1",
"bhamtc2",
"bhaf",
"nim0",
"nima01",
"nimo01"}
444 for (
int i = 0; i < N_OUTPUT_ARRAY; i++) {
447 for (
int j = 0; j < N_BITS_RESERVED; j++) {
451 for (
int j = 0; j < nbit[i]; j++) {
458 }
else if (ONLINE == 1) {
459 for (
int i = N_OUTPUT_ARRAY - 1; i < N_OUTPUT_ARRAY; i++) {
462 for (
int j = 0; j < N_BITS_RESERVED; j++) {
466 for (
int j = 0; j < nbit[i]; j++) {
480 const int N_BITS_RESERVED = 320;
481 const int N_INPUT_ARRAY = 10;
483 const int run[N_INPUT_ARRAY][4] = {
497 const int nbit[N_INPUT_ARRAY] = {
499 111, 130, 131, 132, 160
503 inputBitNames[N_INPUT_ARRAY][N_BITS_RESERVED] = {
506 "t3_0",
"t3_1",
"t3_2",
"t2_0",
"t2_1",
"t2_2",
"cdc_open90",
"cdc_active",
"cdc_b2b3",
"cdc_b2b5",
"cdc_b2b7",
"cdc_b2b9",
"ehigh",
"elow",
"elum",
"ecl_bha",
"bha_0",
"bha_1",
"bha_2",
"bha_3",
"bha_4",
"bha_5",
"bha_6",
"bha_7",
"bha_8",
"bha_9",
"bha_10",
"bha_11",
"bha_12",
"bha_13",
"c_0",
"c_1",
"c_2",
"c_3",
"ebg_0",
"ebg_1",
"ebg_2",
"ecl_active",
"ecl_tim_fwd",
"ecl_tim_brl",
"ecl_tim_bwd",
"ecl_phys",
"top_0",
"top_1",
"top_2",
"top_bb",
"top_active",
"klm_hit",
"klm_0",
"klm_1",
"klm_2",
"klm_3",
"klmb2b_0",
"klmb2b_1",
"klmb2b_2",
"revo",
"her_kick",
"ler_kick",
"bha_delay",
"pseud_rand",
"plsin",
"poiin",
"periodin",
"veto",
"n1_0",
"n1_1",
"n1_2",
"n2_0",
"n2_1",
"n2_2",
"cdcecl_0",
"cdcecl_1",
"cdcecl_2",
"cdcklm_0",
"cdcklm_1",
"cdcklm_2",
"nim0",
"nim1",
"nim2",
"nim3"
510 "t3_0",
"t3_1",
"t3_2",
"t2_0",
"t2_1",
"t2_2",
"cdc_open90",
"cdc_active",
"cdc_b2b3",
"cdc_b2b5",
"cdc_b2b7",
"cdc_b2b9",
"ehigh",
"elow",
"elum",
"ecl_bha",
"bha_0",
"bha_1",
"bha_2",
"bha_3",
"bha_4",
"bha_5",
"bha_6",
"bha_7",
"bha_8",
"bha_9",
"bha_10",
"bha_11",
"bha_12",
"bha_13",
"c_0",
"c_1",
"c_2",
"c_3",
"ebg_0",
"ebg_1",
"ebg_2",
"ecl_active",
"ecl_tim_fwd",
"ecl_tim_brl",
"ecl_tim_bwd",
"ecl_phys",
"top_0",
"top_1",
"top_2",
"top_bb",
"top_active",
"klm_hit",
"klm_0",
"klm_1",
"klm_2",
"klm_3",
"klmb2b_0",
"klmb2b_1",
"klmb2b_2",
"revo",
"her_kick",
"ler_kick",
"bha_delay",
"pseud_rand",
"plsin",
"poiin",
"periodin",
"veto",
"n1_0",
"n1_1",
"n1_2",
"n2_0",
"n2_1",
"n2_2",
"cdcecl_0",
"cdcecl_1",
"cdcecl_2",
"cdcklm_0",
"cdcklm_1",
"cdcklm_2",
"nim0",
"nim1",
"nim2",
"nim3"
514 "t3_0",
"t3_1",
"t3_2",
"t3_3",
"t2_0",
"t2_1",
"t2_2",
"t2_3",
"cdc_open90",
"cdc_active",
"cdc_b2b3",
"cdc_b2b5",
"cdc_b2b7",
"cdc_b2b9",
"ehigh",
"elow",
"elum",
"ecl_bha",
"bha_0",
"bha_1",
"bha_2",
"bha_3",
"bha_4",
"bha_5",
"bha_6",
"bha_7",
"bha_8",
"bha_9",
"bha_10",
"bha_11",
"bha_12",
"bha_13",
"c_0",
"c_1",
"c_2",
"c_3",
"ebg_0",
"ebg_1",
"ebg_2",
"ecl_active",
"ecl_tim_fwd",
"ecl_tim_brl",
"ecl_tim_bwd",
"ecl_phys",
"top_0",
"top_1",
"top_2",
"top_bb",
"top_active",
"klm_hit",
"klm_0",
"klm_1",
"klm_2",
"klm_3",
"klmb2b_0",
"klmb2b_1",
"klmb2b_2",
"revo",
"her_kick",
"ler_kick",
"bha_delay",
"pseud_rand",
"plsin",
"poiin",
"periodin",
"veto",
"n1_0",
"n1_1",
"n1_2",
"n2_0",
"n2_1",
"n2_2",
"cdcecl_0",
"cdcecl_1",
"cdcecl_2",
"cdcecl_3",
"cdcklm_0",
"cdcklm_1",
"cdcklm_2",
"cdcklm_3",
"nim0",
"nim1",
"nim2",
"nim3",
"u2_0",
"u2_1",
"u2_2"
518 "t3_0",
"t3_1",
"t3_2",
"t3_3",
"t2_0",
"t2_1",
"t2_2",
"t2_3",
"cdc_open90",
"cdc_active",
"cdc_b2b3",
"cdc_b2b5",
"cdc_b2b7",
"cdc_b2b9",
"ehigh",
"elow",
"elum",
"ecl_bha",
"bha_0",
"bha_1",
"bha_2",
"bha_3",
"bha_4",
"bha_5",
"bha_6",
"bha_7",
"bha_8",
"bha_9",
"bha_10",
"bha_11",
"bha_12",
"bha_13",
"c_0",
"c_1",
"c_2",
"c_3",
"ebg_0",
"ebg_1",
"ebg_2",
"ecl_active",
"ecl_tim_fwd",
"ecl_tim_brl",
"ecl_tim_bwd",
"ecl_phys",
"top_0",
"top_1",
"top_2",
"top_bb",
"top_active",
"klm_hit",
"klm_0",
"klm_1",
"klm_2",
"klm_3",
"klmb2b_0",
"klmb2b_1",
"klmb2b_2",
"revo",
"her_kick",
"ler_kick",
"bha_delay",
"pseud_rand",
"plsin",
"poiin",
"periodin",
"veto",
"n1_0",
"n1_1",
"n1_2",
"n1_3",
"n2_0",
"n2_1",
"n2_2",
"n2_3",
"cdcecl_0",
"cdcecl_1",
"cdcecl_2",
"cdcecl_3",
"cdcklm_0",
"cdcklm_1",
"cdcklm_2",
"cdcklm_3",
"nim0",
"nim1",
"nim2",
"nim3",
"u2_0",
"u2_1",
"u2_2"
522 "t3_0",
"t3_1",
"t3_2",
"t3_3",
"t2_0",
"t2_1",
"t2_2",
"t2_3",
"cdc_open90",
"cdc_active",
"cdc_b2b3",
"cdc_b2b5",
"cdc_b2b7",
"cdc_b2b9",
"ehigh",
"elow",
"elum",
"ecl_bha",
"bha_0",
"bha_1",
"bha_2",
"bha_3",
"bha_4",
"bha_5",
"bha_6",
"bha_7",
"bha_8",
"bha_9",
"bha_10",
"bha_11",
"bha_12",
"bha_13",
"c_0",
"c_1",
"c_2",
"c_3",
"ebg_0",
"ebg_1",
"ebg_2",
"ecl_active",
"ecl_tim_fwd",
"ecl_tim_brl",
"ecl_tim_bwd",
"ecl_phys",
"ecl_oflo",
"ecl_3dbha",
"lml_0",
"lml_1",
"lml_2",
"lml_3",
"lml_4",
"lml_5",
"lml_6",
"lml_7",
"lml_8",
"lml_9",
"lml_10",
"top_0",
"top_1",
"top_2",
"top_bb",
"top_active",
"klm_hit",
"klm_0",
"klm_1",
"klm_2",
"klm_3",
"klmb2b_0",
"klmb2b_1",
"klmb2b_2",
"revo",
"her_kick",
"ler_kick",
"bha_delay",
"pseud_rand",
"plsin",
"poiin",
"periodin",
"veto",
"samhem",
"opohem",
"n1_0",
"n1_1",
"n1_2",
"n1_3",
"n2_0",
"n2_1",
"n2_2",
"n2_3",
"cdcecl_0",
"cdcecl_1",
"cdcecl_2",
"cdcecl_3",
"cdcklm_0",
"cdcklm_1",
"cdcklm_2",
"cdcklm_3",
"d_b2b3",
"d_b2b5",
"d_b2b7",
"d_b2b9",
"p_b2b3",
"p_b2b5",
"p_b2b7",
"p_b2b9",
"nim0",
"nim1",
"nim2",
"nim3"
526 "t3_0",
"t3_1",
"t3_2",
"t3_3",
"t2_0",
"t2_1",
"t2_2",
"t2_3",
"cdc_open90",
"cdc_active",
"cdc_b2b3",
"cdc_b2b5",
"cdc_b2b7",
"cdc_b2b9",
"ehigh",
"elow",
"elum",
"ecl_bha",
"bha_0",
"bha_1",
"bha_2",
"bha_3",
"bha_4",
"bha_5",
"bha_6",
"bha_7",
"bha_8",
"bha_9",
"bha_10",
"bha_11",
"bha_12",
"bha_13",
"c_0",
"c_1",
"c_2",
"c_3",
"ebg_0",
"ebg_1",
"ebg_2",
"ecl_active",
"ecl_tim_fwd",
"ecl_tim_brl",
"ecl_tim_bwd",
"ecl_phys",
"ecl_oflo",
"ecl_3dbha",
"lml_0",
"lml_1",
"lml_2",
"lml_3",
"lml_4",
"lml_5",
"lml_6",
"lml_7",
"lml_8",
"lml_9",
"lml_10",
"top_0",
"top_1",
"top_2",
"top_bb",
"top_active",
"klm_hit",
"klm_0",
"klm_1",
"klm_2",
"klm_3",
"klmb2b_0",
"klmb2b_1",
"klmb2b_2",
"revo",
"her_kick",
"ler_kick",
"bha_delay",
"pseud_rand",
"plsin",
"poiin",
"periodin",
"veto",
"samhem",
"opohem",
"n1_0",
"n1_1",
"n1_2",
"n1_3",
"n2_0",
"n2_1",
"n2_2",
"n2_3",
"cdcecl_0",
"cdcecl_1",
"cdcecl_2",
"cdcecl_3",
"cdcklm_0",
"cdcklm_1",
"cdcklm_2",
"cdcklm_3",
"d_b2b3",
"d_b2b5",
"d_b2b7",
"d_b2b9",
"p_b2b3",
"p_b2b5",
"p_b2b7",
"p_b2b9",
"track",
"trkflt",
"nim0",
"nim1",
"nim2",
"nim3"
530 "t3_0",
"t3_1",
"t3_2",
"t3_3",
"ty_0",
"ty_1",
"ty_2",
"ty_3",
"t2_0",
"t2_1",
"t2_2",
"t2_3",
"ts_0",
"ts_1",
"ts_2",
"ts_3",
"cdc_open90",
"cdc_active",
"cdc_b2b3",
"cdc_b2b5",
"cdc_b2b7",
"cdc_b2b9",
"ehigh",
"elow",
"elum",
"ecl_bha",
"bha_type_0",
"bha_type_1",
"bha_type_2",
"bha_type_3",
"bha_type_4",
"bha_type_5",
"bha_type_6",
"bha_type_7",
"bha_type_8",
"bha_type_9",
"bha_type_10",
"bha_type_11",
"bha_type_12",
"bha_type_13",
"clst_0",
"clst_1",
"clst_2",
"clst_3",
"ecl_bg_0",
"ecl_bg_1",
"ecl_bg_2",
"ecl_active",
"ecl_timing_fwd",
"ecl_timing_brl",
"ecl_timing_bwd",
"ecl_phys",
"ecl_oflo",
"ecl_3dbha",
"ecl_lml_0",
"ecl_lml_1",
"ecl_lml_2",
"ecl_lml_3",
"ecl_lml_4",
"ecl_lml_5",
"ecl_lml_6",
"ecl_lml_7",
"ecl_lml_8",
"ecl_lml_9",
"ecl_lml_10",
"ecl_lml_11",
"ecl_bhauni",
"ecl_mumu",
"ecl_bhapur",
"top_0",
"top_1",
"top_2",
"top_bb",
"top_active",
"klm_hit",
"klm_0",
"klm_1",
"klm_2",
"klm_3",
"klmb2b_0",
"klmb2b_1",
"klmb2b_2",
"revo",
"her_kick",
"ler_kick",
"bha_delay",
"pseud_rand",
"plsin",
"poissonin",
"veto",
"samhem",
"opohem",
"n1gev_0",
"n1gev_1",
"n1gev_2",
"n1gev_3",
"n2gev_0",
"n2gev_1",
"n2gev_2",
"n2gev_3",
"c2gev_0",
"c2gev_1",
"c2gev_2",
"c2gev_3",
"cdcecl_0",
"cdcecl_1",
"cdcecl_2",
"cdcecl_3",
"cdcklm_0",
"cdcklm_1",
"cdcklm_2",
"cdcklm_3",
"cdctop_0",
"cdctop_1",
"cdctop_2",
"cdctop_3",
"d3",
"d5",
"d7",
"d9",
"p3",
"p5",
"p7",
"p9",
"track",
"trkflt",
"nimin0",
"nimin1",
"nimin2",
"nimin3"
534 "t3_0",
"t3_1",
"t3_2",
"t3_3",
"ty_0",
"ty_1",
"ty_2",
"ty_3",
"t2_0",
"t2_1",
"t2_2",
"t2_3",
"ts_0",
"ts_1",
"ts_2",
"ts_3",
"cdc_open90",
"cdc_active",
"cdc_b2b3",
"cdc_b2b5",
"cdc_b2b7",
"cdc_b2b9",
"ehigh",
"elow",
"elum",
"ecl_bha",
"bha_veto",
"bha_type_0",
"bha_type_1",
"bha_type_2",
"bha_type_3",
"bha_type_4",
"bha_type_5",
"bha_type_6",
"bha_type_7",
"bha_type_8",
"bha_type_9",
"bha_type_10",
"bha_type_11",
"bha_type_12",
"bha_type_13",
"clst_0",
"clst_1",
"clst_2",
"clst_3",
"ecl_bg_0",
"ecl_bg_1",
"ecl_bg_2",
"ecl_active",
"ecl_timing_fwd",
"ecl_timing_brl",
"ecl_timing_bwd",
"ecl_phys",
"ecl_oflo",
"ecl_3dbha",
"ecl_lml_0",
"ecl_lml_1",
"ecl_lml_2",
"ecl_lml_3",
"ecl_lml_4",
"ecl_lml_5",
"ecl_lml_6",
"ecl_lml_7",
"ecl_lml_8",
"ecl_lml_9",
"ecl_lml_10",
"ecl_lml_11",
"ecl_bhauni",
"ecl_mumu",
"ecl_bhapur",
"top_0",
"top_1",
"top_2",
"top_bb",
"top_active",
"klm_hit",
"klm_0",
"klm_1",
"klm_2",
"klm_3",
"klmb2b_0",
"klmb2b_1",
"klmb2b_2",
"revo",
"her_kick",
"ler_kick",
"bha_delay",
"pseud_rand",
"plsin",
"poissonin",
"veto",
"samhem",
"opohem",
"n1gev_0",
"n1gev_1",
"n1gev_2",
"n1gev_3",
"n2gev_0",
"n2gev_1",
"n2gev_2",
"n2gev_3",
"c2gev_0",
"c2gev_1",
"c2gev_2",
"c2gev_3",
"cdcecl_0",
"cdcecl_1",
"cdcecl_2",
"cdcecl_3",
"cdcklm_0",
"cdcklm_1",
"cdcklm_2",
"cdcklm_3",
"cdctop_0",
"cdctop_1",
"cdctop_2",
"cdctop_3",
"d3",
"d5",
"d7",
"d9",
"p3",
"p5",
"p7",
"p9",
"track",
"trkflt",
"nimin0",
"nimin1",
"nimin2",
"nimin3"
538 "t3_0",
"t3_1",
"t3_2",
"t3_3",
"ty_0",
"ty_1",
"ty_2",
"ty_3",
"t2_0",
"t2_1",
"t2_2",
"t2_3",
"ts_0",
"ts_1",
"ts_2",
"ts_3",
"cdc_open90",
"cdc_active",
"cdc_b2b3",
"cdc_b2b5",
"cdc_b2b7",
"cdc_b2b9",
"ehigh",
"elow",
"elum",
"ecl_bha",
"bha_veto",
"bha_type_0",
"bha_type_1",
"bha_type_2",
"bha_type_3",
"bha_type_4",
"bha_type_5",
"bha_type_6",
"bha_type_7",
"bha_type_8",
"bha_type_9",
"bha_type_10",
"bha_type_11",
"bha_type_12",
"bha_type_13",
"clst_0",
"clst_1",
"clst_2",
"clst_3",
"ecl_bg_0",
"ecl_bg_1",
"ecl_bg_2",
"ecl_active",
"ecl_timing_fwd",
"ecl_timing_brl",
"ecl_timing_bwd",
"ecl_phys",
"ecl_oflo",
"ecl_3dbha",
"ecl_lml_0",
"ecl_lml_1",
"ecl_lml_2",
"ecl_lml_3",
"ecl_lml_4",
"ecl_lml_5",
"ecl_lml_6",
"ecl_lml_7",
"ecl_lml_8",
"ecl_lml_9",
"ecl_lml_10",
"ecl_lml_11",
"ecl_bhauni",
"ecl_mumu",
"ecl_bhapur",
"top_0",
"top_1",
"top_2",
"top_bb",
"top_active",
"klm_hit",
"klm_0",
"klm_1",
"klm_2",
"klm_3",
"klmb2b_0",
"klmb2b_1",
"klmb2b_2",
"revo",
"her_kick",
"ler_kick",
"bha_delay",
"pseud_rand",
"plsin",
"poissonin",
"veto",
"samhem",
"opohem",
"n1gev_0",
"n1gev_1",
"n1gev_2",
"n1gev_3",
"n2gev_0",
"n2gev_1",
"n2gev_2",
"n2gev_3",
"c2gev_0",
"c2gev_1",
"c2gev_2",
"c2gev_3",
"cdcecl_0",
"cdcecl_1",
"cdcecl_2",
"cdcecl_3",
"cdcklm_0",
"cdcklm_1",
"cdcklm_2",
"cdcklm_3",
"cdctop_0",
"cdctop_1",
"cdctop_2",
"cdctop_3",
"d3",
"d5",
"d7",
"d9",
"p3",
"p5",
"p7",
"p9",
"track",
"trkflt",
"nimin0",
"nimin1",
"nimin2",
"nimin3",
"tsf0b2b"
541 {
"t3_0",
"t3_1",
"t3_2",
"t3_3",
"ty_0",
"ty_1",
"ty_2",
"ty_3",
"t2_0",
"t2_1",
"t2_2",
"t2_3",
"ts_0",
"ts_1",
"ts_2",
"ts_3",
"ta_0",
"ta_1",
"ta_2",
"ta_3",
"cdc_open90",
"cdc_active",
"cdc_b2b3",
"cdc_b2b5",
"cdc_b2b7",
"cdc_b2b9",
"ehigh",
"elow",
"elum",
"ecl_bha",
"ecl_3dbha",
"bha_veto",
"bha_type_0",
"bha_type_1",
"bha_type_2",
"bha_type_3",
"bha_type_4",
"bha_type_5",
"bha_type_6",
"bha_type_7",
"bha_type_8",
"bha_type_9",
"bha_type_10",
"bha_type_11",
"bha_type_12",
"bha_type_13",
"clst_0",
"clst_1",
"clst_2",
"clst_3",
"ecl_bg_0",
"ecl_bg_1",
"ecl_bg_2",
"ecl_active",
"ecl_timing_fwd",
"ecl_timing_brl",
"ecl_timing_bwd",
"ecl_phys",
"ecl_oflo",
"ecl_lml_0",
"ecl_lml_1",
"ecl_lml_2",
"ecl_lml_3",
"ecl_lml_4",
"ecl_lml_5",
"ecl_lml_6",
"ecl_lml_7",
"ecl_lml_8",
"ecl_lml_9",
"ecl_lml_10",
"ecl_lml_12",
"ecl_lml_13",
"ecl_bhauni",
"ecl_mumu",
"ecl_bhapur",
"ecl_bst",
"top_0",
"top_1",
"top_2",
"top_bb",
"top_active",
"klm_hit",
"klm_0",
"klm_1",
"klm_2",
"klmb2b",
"eklm_hit",
"eklm_0",
"eklm_1",
"eklm_2",
"eklmb2b",
"revo",
"her_kick",
"ler_kick",
"bha_delay",
"pseud_rand",
"plsin",
"poissonin",
"veto",
"injv",
"samhem",
"opohem",
"n1gev_0",
"n1gev_1",
"n1gev_2",
"n1gev_3",
"n2gev_0",
"n2gev_1",
"n2gev_2",
"n2gev_3",
"c2gev_0",
"c2gev_1",
"c2gev_2",
"c2gev_3",
"cdcecl_0",
"cdcecl_1",
"cdcecl_2",
"cdcecl_3",
"cdcklm_0",
"cdcklm_1",
"cdcklm_2",
"cdcklm_3",
"cdctop_0",
"cdctop_1",
"cdctop_2",
"cdctop_3",
"d3",
"d5",
"d7",
"d9",
"p3",
"p5",
"p7",
"p9",
"track",
"trkflt",
"tsf0b2b",
"tsf1b2b",
"tsf2b2b",
"s2s3",
"s2s5",
"s2so",
"s2f3",
"s2f5",
"s2fo",
"fwdsb",
"bwdsb",
"fwdnb",
"bwdnb",
"brlfb1",
"brlfb2",
"brlnb1",
"brlnb2",
"trkbha1",
"trkbha2",
"grlgg1",
"grlgg2",
"nimin0",
"nimin1",
"inp159"}
549 for (
int i = 0; i < N_INPUT_ARRAY; i++) {
552 for (
int j = 0; j < N_BITS_RESERVED; j++) {
556 for (
int j = 0; j < nbit[i]; j++) {
563 }
else if (ONLINE == 1) {
564 for (
int i = N_INPUT_ARRAY - 1; i < N_INPUT_ARRAY; i++) {
567 for (
int j = 0; j < N_BITS_RESERVED; j++) {
571 for (
int j = 0; j < nbit[i]; j++) {
585 const int N_LEAF = 320;
586 const int N_UNPACKER_ARRAY = 16;
588 const int run[N_UNPACKER_ARRAY][4] = {
608 const int nLeafs[N_UNPACKER_ARRAY] = {
615 const int nLeafsExtra[N_UNPACKER_ARRAY] = {
622 const int nClks[N_UNPACKER_ARRAY] = {
629 const int nBits[N_UNPACKER_ARRAY] = {
630 640, 640, 640, 640, 640,
631 640, 640, 640, 640, 640,
632 640, 640, 640, 640, 640,
637 const int nrows[N_UNPACKER_ARRAY] = {
646 const char LeafNames[N_LEAF][100] = {
647 "etffmv",
"l1rvc",
"timtype",
"etyp",
"final",
648 "gdll1rvc",
"etfout",
"etfvd",
"toprvc",
"topvd",
649 "toptiming",
"ecltiming",
"cdctiming",
"rvcout",
"rvcout0",
650 "comrvc",
"etnrvc",
"nim0rvc",
"eclrvc",
"rvc",
651 "drvc",
"ftd2",
"psn2",
"psn1",
"etfth2",
652 "etfhdt",
"etfth",
"psn0",
"ftd1",
"cdcrvc",
653 "ftd0",
"itd2",
"itd1",
"itd0",
"inp2",
654 "inp1",
"inp0",
"evt",
"clk",
"firmid",
655 "firmver",
"coml1rvc",
"b2ldly",
"maxrvc",
"conf",
656 "dtoprvc",
"declrvc",
"dcdcrvc",
"topslot1",
"topslot0",
657 "ntopslot",
"finalrvc",
"tttmdl",
"tdsrcp",
"tdtopp",
658 "tdeclp",
"tdcdcp",
"psn3",
"ftd3",
"itd4",
659 "itd3",
"cnttrg",
"cnttrg8",
"ftd4",
"psn4",
660 "etmdata",
"sepagdll1",
"sepacoml1",
"gdll1rev",
662 "ftd5",
"psn5",
"ttfinal",
"sigfinal",
663 "topqua",
"eclqua",
"cdcqua",
670 inputleafMap[N_UNPACKER_ARRAY][N_LEAF] = {
934 const int BitMap[N_UNPACKER_ARRAY][N_LEAF][2] = {
1499 int m_nword_header[N_UNPACKER_ARRAY] {
1505 int m_conf[N_UNPACKER_ARRAY] {
1511 int m_nword_input[N_UNPACKER_ARRAY] {
1517 int m_nword_output[N_UNPACKER_ARRAY] {
1524 const int BitMap_extra[N_UNPACKER_ARRAY][N_LEAF][3] = {
1778 unpacker.construct();
1780 for (
int i = 0; i < N_UNPACKER_ARRAY; i++) {
1783 unpacker->setnLeafs(nLeafs[i]);
1784 unpacker->setnLeafsExtra(nLeafsExtra[i]);
1785 unpacker->setnClks(nClks[i]);
1786 unpacker->setnBits(nBits[i]);
1787 unpacker->set_nword_header(m_nword_header[i]);
1788 unpacker->set_nword_input(m_nword_input[i]);
1789 unpacker->set_nword_output(m_nword_output[i]);
1790 unpacker->setconf(m_conf[i]);
1793 for (
int j = 0; j < N_LEAF; j++) {
1794 unpacker->setLeafName(j,
"");
1795 unpacker->setLeafMap(j, -1);
1798 for (
int j = 0; j < nrows[i]; j++) {
1799 if ((inputleafMap[i][j] >= 0) && (inputleafMap[i][j] < nLeafs[i] + nLeafsExtra[i])) {
1800 unpacker->setLeafName(j, LeafNames[j]);
1801 unpacker->setLeafMap(j, inputleafMap[i][j]);
1805 for (
int j = 0; j < N_LEAF; j++) {
1806 unpacker->setBitMap(j, 0, BitMap[i][j][0]);
1807 unpacker->setBitMap(j, 1, BitMap[i][j][1]);
1809 for (
int j = 0; j < N_LEAF; j++) {
1810 unpacker->setBitMap_extra(j, 0, BitMap_extra[i][j][0]);
1811 unpacker->setBitMap_extra(j, 1, BitMap_extra[i][j][1]);
1812 unpacker->setBitMap_extra(j, 2, BitMap_extra[i][j][2]);
1814 unpacker.import(iov);
1816 }
else if (ONLINE == 1) {
1817 for (
int i = N_UNPACKER_ARRAY - 1; i < N_UNPACKER_ARRAY; i++) {
1820 unpacker->setnLeafs(nLeafs[i]);
1821 unpacker->setnLeafsExtra(nLeafsExtra[i]);
1822 unpacker->setnClks(nClks[i]);
1823 unpacker->setnBits(nBits[i]);
1824 unpacker->set_nword_header(m_nword_header[i]);
1825 unpacker->set_nword_input(m_nword_input[i]);
1826 unpacker->set_nword_output(m_nword_output[i]);
1827 unpacker->setconf(m_conf[i]);
1830 for (
int j = 0; j < N_LEAF; j++) {
1831 unpacker->setLeafName(j,
"");
1832 unpacker->setLeafMap(j, -1);
1835 for (
int j = 0; j < nrows[i]; j++) {
1836 if ((inputleafMap[i][j] >= 0) && (inputleafMap[i][j] < nLeafs[i] + nLeafsExtra[i])) {
1837 unpacker->setLeafName(j, LeafNames[j]);
1838 unpacker->setLeafMap(j, inputleafMap[i][j]);
1842 for (
int j = 0; j < N_LEAF; j++) {
1843 unpacker->setBitMap(j, 0, BitMap[i][j][0]);
1844 unpacker->setBitMap(j, 1, BitMap[i][j][1]);
1846 for (
int j = 0; j < N_LEAF; j++) {
1847 unpacker->setBitMap_extra(j, 0, BitMap_extra[i][j][0]);
1848 unpacker->setBitMap_extra(j, 1, BitMap_extra[i][j][1]);
1849 unpacker->setBitMap_extra(j, 2, BitMap_extra[i][j][2]);
1851 unpacker.import(iov);
1860 const int N_DELAY_ARRAY = 32;
1862 const int run[N_DELAY_ARRAY][4] = {
1899 const int data_num[N_DELAY_ARRAY] = {
1941 for (
int i = 0; i < N_DELAY_ARRAY; i++) {
1943 for (
int j = 0; j < 320; j++) {
1944 delay->setdelay(j, 0);
1946 sprintf(logname,
"trg/gdl/dbobjects/log/itd_%04d.dat", data_num[i]);
1947 std::ifstream ifs(logname);
1949 std::cout <<
"No logfile to read delay values" <<
" " << logname << std::endl;
1953 while (ifs >> k >> delay_temp) {
1954 delay->setdelay(k, delay_temp);
1959 }
else if (ONLINE == 1) {
1961 for (
int i = 0; i < 1; i++) {
1963 for (
int j = 0; j < 320; j++) {
1964 delay->setdelay(j, 0);
1966 sprintf(logname,
"trg/gdl/dbobjects/log/itd_%04d.dat", data_num[i]);
1967 std::ifstream ifs(logname);
1969 std::cout <<
"No logfile to read delay values" <<
" " << logname << std::endl;
1973 while (ifs >> k >> delay_temp) {
1974 delay->setdelay(k, delay_temp);
1986 const int N_BADRUN_ARRAY = 13;
1988 const int run[N_BADRUN_ARRAY][4] = {
2004 int flag[N_BADRUN_ARRAY] = {
2013 for (
int i = 0; i < N_BADRUN_ARRAY; i++) {
2018 }
else if (ONLINE == 1) {
2019 for (
int i = N_BADRUN_ARRAY - 1; i < N_BADRUN_ARRAY; i++) {
2034 const int run[N][4] = {
2039 const char* alg_file_names[] = {
2040 "ftd_0023.alg",
"ftd_0023.alg"
2047 for (
int i = 0; i < N; i++) {
2048 sprintf(logname,
"trg/gdl/dbobjects/log/%s", alg_file_names[i]);
2052 std::ifstream isload(logname, std::ios::in);
2053 while (std::getline(isload, str)) {
2055 printf(
"i(%d), run[i][0](%d), run[i][1](%d), run[i][2](%d), run[i][3](%d), getnalgs(%d), str=%s\n",
2056 i, run[i][0], run[i][1], run[i][2], run[i][3],
2062 }
else if (ONLINE == 1) {
2063 for (
int i = N - 1; i < N; i++) {
2064 sprintf(logname,
"trg/gdl/dbobjects/log/%s", alg_file_names[i]);
2068 std::ifstream isload(logname, std::ios::in);
2069 while (std::getline(isload, str)) {
2071 printf(
"i(%d), run[i][0](%d), run[i][1](%d), run[i][2](%d), run[i][3](%d), getnalgs(%d), str=%s\n",
2072 i, run[i][0], run[i][1], run[i][2], run[i][3],