9#include <framework/database/DBImportObjPtr.h>
10#include <framework/database/DBObjPtr.h>
11#include <framework/database/DBStore.h>
12#include <framework/datastore/StoreObjPtr.h>
13#include <framework/datastore/DataStore.h>
14#include <framework/dataobjects/EventMetaData.h>
15#include <framework/logging/LogSystem.h>
16#include <mdst/dbobjects/TRGGDLDBPrescales.h>
17#include <mdst/dbobjects/TRGGDLDBFTDLBits.h>
18#include <mdst/dbobjects/TRGGDLDBInputBits.h>
19#include <mdst/dbobjects/TRGGDLDBBadrun.h>
20#include <trg/gdl/dbobjects/TRGGDLDBUnpacker.h>
21#include <trg/gdl/dbobjects/TRGGDLDBDelay.h>
22#include <trg/gdl/dbobjects/TRGGDLDBAlgs.h>
37const int N_FTD_VERS = 22;
38const int ftd_run[N_FTD_VERS][4] = {
62const int ftd_version[] = {
63 24, 11, 12, 13, 14, 15, 14, 15, 16, 17, 22, 23, 24, 25, 26, 29, 30, 32, 33, 34, 35, 36
71 const int N_BITS_RESERVED = 320;
72 const int N_PSNM_ARRAY = 51 + 1;
74 const int run[N_PSNM_ARRAY][4] = {
100 {12, 1743, 12, 1907},
101 {12, 1908, 12, 2133},
102 {12, 2134, 12, 2334},
103 {12, 2335, 12, 2719},
104 {12, 2720, 12, 6372},
110 {14, 1752, 14, 1752},
111 {14, 1753, 14, 1771},
112 {14, 1772, 14, 1772},
113 {14, 1773, 14, 1971},
114 {14, 1972, 14, 1972},
115 {14, 1973, 14, 1992},
116 {14, 1993, 14, 2040},
117 {14, 2041, 14, 2055},
122 {16, 1061, 16, 1061},
129 const int nbit[N_PSNM_ARRAY] = { 0, 18, 44, 63, 63,
131 75, 133, 133, 133, 133,
132 142, 160, 160, 160, 160,
133 160, 160, 160, 160, 160,
134 160, 160, 160, 160, 160,
135 160, 192, 192, 192, 192,
136 192, 192, 192, 192, 192,
137 192, 192, 192, 192, 192,
138 192, 192, 192, 192, 192,
143 psnmValues[N_PSNM_ARRAY][N_BITS_RESERVED] = {
152 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
153 0, 0, 0, 0, 0, 0, 0, 1
159 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
160 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
161 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
162 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
169 0, 0, 1, 1, 0, 0, 1, 1, 1, 0,
170 1, 150, 0, 1, 0, 1, 1, 1, 1, 20,
171 1500, 150, 0, 0, 1, 1, 0, 0, 0, 0,
172 0, 0, 0, 30, 0, 0, 20000, 0, 0, 0,
173 0, 0, 400000, 1, 0, 0, 0, 0, 0, 0,
174 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
182 0, 0, 1, 1, 0, 0, 1, 1, 1, 0,
183 1, 150, 0, 1, 0, 1, 1, 1, 1, 20,
184 1500, 150, 0, 0, 1, 1, 0, 1, 0, 0,
185 0, 0, 0, 30, 0, 0, 20000, 0, 0, 0,
186 0, 0, 400000, 1, 0, 0, 0, 0, 0, 0,
187 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
194 0, 0, 1, 1, 0, 0, 1, 1, 1, 0,
195 1, 150, 0, 1, 0, 1, 1, 1, 1, 20,
196 1500, 150, 0, 0, 1, 1, 0, 0, 0, 0,
197 0, 0, 0, 30, 0, 0, 20000, 0, 0, 0,
198 0, 0, 400000, 1, 0, 0, 0, 0, 0, 0,
199 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
206 0, 0, 1, 1, 0, 0, 1, 1, 1, 0,
207 1, 150, 0, 1, 0, 1, 1, 1, 1, 20,
208 1500, 150, 0, 0, 1, 1, 0, 0, 0, 0,
209 0, 0, 0, 30, 0, 0, 20000, 0, 0, 0,
210 0, 0, 400000, 1, 0, 0, 0, 0, 0, 0,
211 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
212 1, 0, 20, 0, 0, 0, 0, 1, 1, 1,
219 0, 0, 1, 1, 0, 0, 1, 1, 1, 0,
220 1, 150, 0, 1, 0, 1, 1, 1, 1, 20,
221 1500, 150, 0, 0, 1, 1, 0, 0, 0, 0,
222 0, 0, 0, 30, 0, 0, 20000, 0, 0, 0,
223 0, 0, 400000, 1, 0, 0, 0, 0, 0, 0,
224 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
225 1, 0, 20, 0, 0, 0, 0, 1, 1, 1,
232 0, 0, 1, 1, 0, 0, 1, 1, 1, 0,
233 1, 150, 0, 1, 0, 1, 1, 1, 1, 20,
234 1500, 150, 0, 0, 1, 1, 0, 0, 0, 0,
235 0, 0, 0, 300, 0, 0, 20000, 0, 0, 0,
236 0, 0, 400000, 1, 0, 0, 0, 0, 0, 0,
237 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
238 1, 0, 20, 0, 0, 0, 0, 1, 1, 1,
245 0, 0, 1, 1, 0, 0, 1, 1, 1, 0,
246 1, 150, 0, 1, 0, 1, 1, 1, 1, 20,
247 1500, 150, 0, 0, 1, 1, 1, 0, 0, 0,
248 0, 0, 0, 300, 0, 0, 20000, 0, 0, 0,
249 0, 0, 400000, 1, 0, 0, 0, 0, 0, 0,
250 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
251 1, 0, 20, 0, 0, 0, 0, 1, 1, 1,
260 0, 0, 1, 1, 0, 0, 1, 1, 1, 0,
261 1, 150, 0, 1, 0, 1, 1, 1, 1, 20,
262 1500, 150, 0, 0, 1, 1, 1, 0, 0, 0,
263 0, 0, 0, 300, 0, 0, 20000, 0, 0, 0,
264 0, 0, 400000, 1, 0, 0, 0, 0, 0, 0,
265 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,
266 1, 0, 20, 1, 1, 1, 1, 1, 1, 1,
273 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
274 20, 0, 0, 0, 0, 0, 0, 1, 0, 0,
275 0, 0, 1, 0, 0, 0, 0, 1, 0, 0,
276 150, 50, 1, 0, 1, 1, 1, 1, 1, 1,
277 1, 1, 1, 20, 1500, 150, 1, 1, 1, 0,
278 0, 0, 60, 40, 40, 160000, 0, 0, 1, 400,
279 0, 2000, 1, 1, 1, 0, 0, 2000, 0, 0,
280 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
281 1, 1, 1, 1, 1, 1, 1, 1, 1, 700,
282 40, 1, 1, 1, 1, 1, 0, 200, 1, 1,
283 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
284 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
285 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
292 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
293 20, 0, 0, 0, 0, 0, 0, 1, 0, 0,
294 0, 0, 1, 0, 0, 0, 0, 1, 0, 0,
295 150, 50, 1, 0, 1, 1, 1, 1, 1, 1,
296 1, 1, 1, 20, 1500, 150, 1, 1, 1, 0,
297 0, 0, 60, 40, 40, 160000, 0, 0, 1, 400,
298 0, 2000, 1, 1, 1, 0, 0, 2000, 0, 0,
299 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
300 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
301 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
302 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
303 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
304 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
311 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
312 20, 0, 0, 0, 0, 0, 0, 1, 0, 0,
313 0, 0, 1, 0, 0, 0, 0, 1, 0, 0,
314 150, 50, 1, 0, 1, 1, 1, 1, 1, 1,
315 1, 1, 1, 20, 1500, 150, 1, 1, 1, 0,
316 0, 0, 60, 40, 40, 160000, 0, 0, 1, 400,
317 0, 2000, 1, 1, 0, 0, 0, 2000, 0, 0,
318 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
319 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
320 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
321 0, 1, 1, 1, 1, 1, 1, 1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, 200, 0, 400, 0, 0, 0, 0, 100, 0, 100, 100, 0, 1, 100, 100, 10, 0, 1, 1, 1, 100, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 150, 50, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 20, 1500, 150, 0, 1, 0, 0, 1, 100, 0, 1, 1, 0, 0, 0, 1, 1, 40, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 100, 1, 10, 10, 10, 0, 0, 0, 0, 40, 40, 3000, 150, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 20000, 4000, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 0, 0, 8000, 0, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
448 {100, 100, 100, 0, 100, 0, 0, 0, 1, 0, 0, 2000, 0, 400, 0, 0, 0, 0, 100, 0, 100, 1000, 0, 1, 100, 100, 10, 0, 1, 1, 1, 100, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 100, 0, 150, 50, 1, 0, 100, 100, 10, 0, 0, 0, 0, 1, 0, 0, 0, 1, 20, 1500, 150, 0, 1, 0, 0, 1, 100, 0, 1, 1, 0, 0, 0, 1, 1, 40, 0, 0, 1, 0, 1, 2, 1, 100, 10, 100, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 100, 0, 100, 1, 10, 10, 10, 0, 0, 0, 0, 40, 40, 3000, 150, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 20000, 4000, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 0, 0, 8000, 0, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0},
450 {100, 100, 100, 0, 100, 1, 0, 0, 1, 0, 0, 2000, 0, 400, 0, 0, 0, 0, 100, 0, 100, 1000, 1, 1, 100, 100, 10, 0, 1, 1, 1, 100, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 100, 0, 150, 50, 1, 0, 100, 100, 10, 0, 0, 0, 0, 1, 0, 0, 0, 1, 20, 1500, 150, 0, 1, 0, 0, 1, 100, 0, 1, 1, 0, 0, 0, 1, 1, 40, 0, 0, 1, 0, 1, 2, 1, 100, 10, 100, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 100, 0, 100, 1, 10, 10, 10, 0, 0, 0, 0, 40, 40, 3000, 150, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 20000, 4000, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 0, 0, 8000, 0, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0},
452 {100, 100, 100, 0, 100, 1, 0, 0, 1, 0, 0, 2000, 0, 400, 0, 0, 0, 0, 100, 0, 100, 1000, 1, 1, 100, 100, 10, 0, 1, 1, 1, 100, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 100, 0, 150, 50, 1, 0, 100, 100, 10, 0, 0, 0, 0, 1, 0, 0, 0, 1, 20, 1500, 150, 0, 1, 0, 0, 1, 100, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 2, 1, 100, 10, 100, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 100, 0, 100, 1, 10, 10, 10, 0, 0, 0, 0, 40, 40, 3000, 150, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 20000, 4000, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 0, 0, 8000, 0, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0}
458 prescales.construct();
460 for (
int i = 0; i < N_PSNM_ARRAY; i++) {
463 for (
int j = 0; j < N_BITS_RESERVED; j++) {
464 prescales->setprescales(j, 0);
467 for (
int j = 0; j < nbit[i]; j++) {
468 prescales->setprescales(j, psnmValues[i][j]);
470 prescales->setnoutbit(nbit[i]);
471 prescales.import(iov);
473 }
else if (ONLINE == 1 || ONLINE == 2) {
474 for (
int i = N_PSNM_ARRAY - 1; i < N_PSNM_ARRAY; i++) {
478 for (
int j = 0; j < N_BITS_RESERVED; j++) {
479 prescales->setprescales(j, 0);
482 for (
int j = 0; j < nbit[i]; j++) {
483 prescales->setprescales(j, psnmValues[i][j]);
485 prescales->setnoutbit(nbit[i]);
486 prescales.import(iov);
498 const int N_BITS_RESERVED = 320;
509 for (
int i = 0; i < N_FTD_VERS; i++) {
512 for (
int j = 0; j < N_BITS_RESERVED; j++) {
513 ftdlbits->setoutbitname(j,
"");
517 sprintf(logname,
"trg/gdl/dbobjects/log/ftd_%04d.oup", ftd_version[i]);
518 std::ifstream isinp(logname, std::ios::in);
521 if (i == N_FTD_VERS - 1) {
522 printf(
"i(%d), logname(%s)\n", i, logname);
524 while (std::getline(isinp, str)) {
527 std::istringstream strS(str);
528 strS >> bitnum >> bitname;
529 ftdlbits->setoutbitname(j, bitname.data());
531 if (i == N_FTD_VERS - 1) {
532 printf(
"i(%d), j(%d), bitname(%s), str(%s)\n",
533 i, j, bitname.c_str(), str.c_str());
537 ftdlbits->setnoutbit(j);
540 }
else if (ONLINE == 1 || ONLINE == 2) {
541 for (
int i = N_FTD_VERS - 1; i < N_FTD_VERS; i++) {
544 for (
int j = 0; j < N_BITS_RESERVED; j++) {
545 ftdlbits->setoutbitname(j,
"");
549 sprintf(logname,
"trg/gdl/dbobjects/log/ftd_%04d.oup", ftd_version[i]);
550 std::ifstream isinp(logname, std::ios::in);
553 while (std::getline(isinp, str)) {
556 std::istringstream strS(str);
557 strS >> bitnum >> bitname;
558 ftdlbits->setoutbitname(j, bitname.data());
562 ftdlbits->setnoutbit(j);
572 const int N_BITS_RESERVED = 320;
577 for (
int i = 0; i < N_FTD_VERS; i++) {
580 for (
int j = 0; j < N_BITS_RESERVED; j++) {
581 inputbits->setinbitname(j,
"");
585 sprintf(logname,
"trg/gdl/dbobjects/log/ftd_%04d.inp", ftd_version[i]);
586 std::ifstream isinp(logname, std::ios::in);
589 while (std::getline(isinp, str)) {
592 std::istringstream strS(str);
593 strS >> bitnum >> bitname;
594 inputbits->setinbitname(j, bitname.data());
598 inputbits->setninbit(j);
601 }
else if (ONLINE == 1 || ONLINE == 2) {
602 for (
int i = N_FTD_VERS - 1; i < N_FTD_VERS; i++) {
605 for (
int j = 0; j < N_BITS_RESERVED; j++) {
606 inputbits->setinbitname(j,
"");
610 sprintf(logname,
"trg/gdl/dbobjects/log/ftd_%04d.inp", ftd_version[i]);
611 std::ifstream isinp(logname, std::ios::in);
614 while (std::getline(isinp, str)) {
617 std::istringstream strS(str);
618 strS >> bitnum >> bitname;
619 inputbits->setinbitname(j, bitname.data());
623 inputbits->setninbit(j);
633 const int N_LEAF = 320;
634 const int N_UNPACKER_ARRAY = 16;
636 const int run[N_UNPACKER_ARRAY][4] = {
656 const int nLeafs[N_UNPACKER_ARRAY] = {
663 const int nLeafsExtra[N_UNPACKER_ARRAY] = {
670 const int nClks[N_UNPACKER_ARRAY] = {
677 const int nBits[N_UNPACKER_ARRAY] = {
678 640, 640, 640, 640, 640,
679 640, 640, 640, 640, 640,
680 640, 640, 640, 640, 640,
685 const int nrows[N_UNPACKER_ARRAY] = {
694 const char LeafNames[N_LEAF][100] = {
695 "etffmv",
"l1rvc",
"timtype",
"etyp",
"final",
696 "gdll1rvc",
"etfout",
"etfvd",
"toprvc",
"topvd",
697 "toptiming",
"ecltiming",
"cdctiming",
"rvcout",
"rvcout0",
698 "comrvc",
"etnrvc",
"nim0rvc",
"eclrvc",
"rvc",
699 "drvc",
"ftd2",
"psn2",
"psn1",
"etfth2",
700 "etfhdt",
"etfth",
"psn0",
"ftd1",
"cdcrvc",
701 "ftd0",
"itd2",
"itd1",
"itd0",
"inp2",
702 "inp1",
"inp0",
"evt",
"clk",
"firmid",
703 "firmver",
"coml1rvc",
"b2ldly",
"maxrvc",
"conf",
704 "dtoprvc",
"declrvc",
"dcdcrvc",
"topslot1",
"topslot0",
705 "ntopslot",
"finalrvc",
"tttmdl",
"tdsrcp",
"tdtopp",
706 "tdeclp",
"tdcdcp",
"psn3",
"ftd3",
"itd4",
707 "itd3",
"cnttrg",
"cnttrg8",
"ftd4",
"psn4",
708 "etmdata",
"sepagdll1",
"sepacoml1",
"gdll1rev",
710 "ftd5",
"psn5",
"ttfinal",
"sigfinal",
711 "topqua",
"eclqua",
"cdcqua",
718 inputleafMap[N_UNPACKER_ARRAY][N_LEAF] = {
982 const int BitMap[N_UNPACKER_ARRAY][N_LEAF][2] = {
1547 int m_nword_header[N_UNPACKER_ARRAY] {
1553 int m_conf[N_UNPACKER_ARRAY] {
1559 int m_nword_input[N_UNPACKER_ARRAY] {
1565 int m_nword_output[N_UNPACKER_ARRAY] {
1572 const int BitMap_extra[N_UNPACKER_ARRAY][N_LEAF][3] = {
1826 unpacker.construct();
1828 for (
int i = 0; i < N_UNPACKER_ARRAY; i++) {
1831 unpacker->setnLeafs(nLeafs[i]);
1832 unpacker->setnLeafsExtra(nLeafsExtra[i]);
1833 unpacker->setnClks(nClks[i]);
1834 unpacker->setnBits(nBits[i]);
1835 unpacker->set_nword_header(m_nword_header[i]);
1836 unpacker->set_nword_input(m_nword_input[i]);
1837 unpacker->set_nword_output(m_nword_output[i]);
1838 unpacker->setconf(m_conf[i]);
1841 for (
int j = 0; j < N_LEAF; j++) {
1842 unpacker->setLeafName(j,
"");
1843 unpacker->setLeafMap(j, -1);
1846 for (
int j = 0; j < nrows[i]; j++) {
1847 if ((inputleafMap[i][j] >= 0) && (inputleafMap[i][j] < nLeafs[i] + nLeafsExtra[i])) {
1848 unpacker->setLeafName(j, LeafNames[j]);
1849 unpacker->setLeafMap(j, inputleafMap[i][j]);
1853 for (
int j = 0; j < N_LEAF; j++) {
1854 unpacker->setBitMap(j, 0, BitMap[i][j][0]);
1855 unpacker->setBitMap(j, 1, BitMap[i][j][1]);
1857 for (
int j = 0; j < N_LEAF; j++) {
1858 unpacker->setBitMap_extra(j, 0, BitMap_extra[i][j][0]);
1859 unpacker->setBitMap_extra(j, 1, BitMap_extra[i][j][1]);
1860 unpacker->setBitMap_extra(j, 2, BitMap_extra[i][j][2]);
1862 unpacker.import(iov);
1864 }
else if (ONLINE == 1) {
1865 for (
int i = N_UNPACKER_ARRAY - 1; i < N_UNPACKER_ARRAY; i++) {
1868 unpacker->setnLeafs(nLeafs[i]);
1869 unpacker->setnLeafsExtra(nLeafsExtra[i]);
1870 unpacker->setnClks(nClks[i]);
1871 unpacker->setnBits(nBits[i]);
1872 unpacker->set_nword_header(m_nword_header[i]);
1873 unpacker->set_nword_input(m_nword_input[i]);
1874 unpacker->set_nword_output(m_nword_output[i]);
1875 unpacker->setconf(m_conf[i]);
1878 for (
int j = 0; j < N_LEAF; j++) {
1879 unpacker->setLeafName(j,
"");
1880 unpacker->setLeafMap(j, -1);
1883 for (
int j = 0; j < nrows[i]; j++) {
1884 if ((inputleafMap[i][j] >= 0) && (inputleafMap[i][j] < nLeafs[i] + nLeafsExtra[i])) {
1885 unpacker->setLeafName(j, LeafNames[j]);
1886 unpacker->setLeafMap(j, inputleafMap[i][j]);
1890 for (
int j = 0; j < N_LEAF; j++) {
1891 unpacker->setBitMap(j, 0, BitMap[i][j][0]);
1892 unpacker->setBitMap(j, 1, BitMap[i][j][1]);
1894 for (
int j = 0; j < N_LEAF; j++) {
1895 unpacker->setBitMap_extra(j, 0, BitMap_extra[i][j][0]);
1896 unpacker->setBitMap_extra(j, 1, BitMap_extra[i][j][1]);
1897 unpacker->setBitMap_extra(j, 2, BitMap_extra[i][j][2]);
1899 unpacker.import(iov);
1901 }
else if (ONLINE == 2) {
1902 for (
int i = 15 - 1; i < 16 - 1; i++) {
1905 unpacker->setnLeafs(nLeafs[i]);
1906 unpacker->setnLeafsExtra(nLeafsExtra[i]);
1907 unpacker->setnClks(nClks[i]);
1908 unpacker->setnBits(nBits[i]);
1909 unpacker->set_nword_header(m_nword_header[i]);
1910 unpacker->set_nword_input(m_nword_input[i]);
1911 unpacker->set_nword_output(m_nword_output[i]);
1912 unpacker->setconf(m_conf[i]);
1915 for (
int j = 0; j < N_LEAF; j++) {
1916 unpacker->setLeafName(j,
"");
1917 unpacker->setLeafMap(j, -1);
1920 for (
int j = 0; j < nrows[i]; j++) {
1921 if ((inputleafMap[i][j] >= 0) && (inputleafMap[i][j] < nLeafs[i] + nLeafsExtra[i])) {
1922 unpacker->setLeafName(j, LeafNames[j]);
1923 unpacker->setLeafMap(j, inputleafMap[i][j]);
1927 for (
int j = 0; j < N_LEAF; j++) {
1928 unpacker->setBitMap(j, 0, BitMap[i][j][0]);
1929 unpacker->setBitMap(j, 1, BitMap[i][j][1]);
1931 for (
int j = 0; j < N_LEAF; j++) {
1932 unpacker->setBitMap_extra(j, 0, BitMap_extra[i][j][0]);
1933 unpacker->setBitMap_extra(j, 1, BitMap_extra[i][j][1]);
1934 unpacker->setBitMap_extra(j, 2, BitMap_extra[i][j][2]);
1936 unpacker.import(iov);
1945 const int N_DELAY_ARRAY = 32;
1947 const int run[N_DELAY_ARRAY][4] = {
1984 const int data_num[N_DELAY_ARRAY] = {
2026 for (
int i = 0; i < N_DELAY_ARRAY; i++) {
2028 for (
int j = 0; j < 320; j++) {
2029 delay->setdelay(j, 0);
2031 sprintf(logname,
"trg/gdl/dbobjects/log/itd_%04d.dat", data_num[i]);
2032 std::ifstream ifs(logname);
2034 std::cout <<
"No logfile to read delay values" <<
" " << logname << std::endl;
2038 while (ifs >> k >> delay_temp) {
2039 delay->setdelay(k, delay_temp);
2044 }
else if (ONLINE == 1 || ONLINE == 2) {
2046 for (
int i = 0; i < 1; i++) {
2048 for (
int j = 0; j < 320; j++) {
2049 delay->setdelay(j, 0);
2051 sprintf(logname,
"trg/gdl/dbobjects/log/itd_%04d.dat", data_num[i]);
2052 std::ifstream ifs(logname);
2054 std::cout <<
"No logfile to read delay values" <<
" " << logname << std::endl;
2058 while (ifs >> k >> delay_temp) {
2059 delay->setdelay(k, delay_temp);
2071 const int N_BADRUN_ARRAY = 13;
2073 const int run[N_BADRUN_ARRAY][4] = {
2089 int flag[N_BADRUN_ARRAY] = {
2098 for (
int i = 0; i < N_BADRUN_ARRAY; i++) {
2100 badrun->setflag(flag[i]);
2103 }
else if (ONLINE == 1 || ONLINE == 2) {
2104 for (
int i = N_BADRUN_ARRAY - 1; i < N_BADRUN_ARRAY; i++) {
2106 badrun->setflag(flag[i]);
2120 for (
int i = 0; i < N_FTD_VERS; i++) {
2121 sprintf(logname,
"trg/gdl/dbobjects/log/ftd_%04d.alg", ftd_version[i]);
2125 std::ifstream isload(logname, std::ios::in);
2126 while (std::getline(isload, str)) {
2127 db_algs->setalg(str);
2128 printf(
"i(%d), run[i][0](%d), run[i][1](%d), run[i][2](%d), run[i][3](%d), getnalgs(%d), str=%s\n",
2129 i, ftd_run[i][0], ftd_run[i][1], ftd_run[i][2], ftd_run[i][3],
2130 db_algs->getnalgs(), str.c_str());
2135 }
else if (ONLINE == 1 || ONLINE == 2) {
2136 for (
int i = N_FTD_VERS - 1; i < N_FTD_VERS; i++) {
2137 sprintf(logname,
"trg/gdl/dbobjects/log/ftd_%04d.alg", ftd_version[i]);
2141 std::ifstream isload(logname, std::ios::in);
2142 while (std::getline(isload, str)) {
2143 db_algs->setalg(str);
2144 printf(
"i(%d), run[i][0](%d), run[i][1](%d), run[i][2](%d), run[i][3](%d), getnalgs(%d), str=%s\n",
2145 i, ftd_run[i][0], ftd_run[i][1], ftd_run[i][2], ftd_run[i][3],
2146 db_algs->getnalgs(), str.c_str());
bool import(const IntervalOfValidity &iov)
Import the object to database.
virtual void clear()
Clear the content, e.g.
Class for importing a single object to the database.
void construct(Args &&... params)
Construct an object of type T in this DBImportObjPtr using the provided constructor arguments.
A class that describes the interval of experiments/runs for which an object in the database is valid.
Abstract base class for different kinds of events.