168 |
TRK_CALIB_USED = 0; |
TRK_CALIB_USED = 0; |
169 |
CAL_DSP_MASK = 0; |
CAL_DSP_MASK = 0; |
170 |
BOOT_NUMBER = 0; |
BOOT_NUMBER = 0; |
171 |
|
PHYSENDRUN_MASK_S3S2S12 = 0; |
172 |
|
PHYSENDRUN_MASK_S11CRC = 0; |
173 |
VALIDATION = 0; |
VALIDATION = 0; |
174 |
} |
} |
175 |
|
|
205 |
TRK_CALIB_USED = 0; |
TRK_CALIB_USED = 0; |
206 |
CAL_DSP_MASK = 0; |
CAL_DSP_MASK = 0; |
207 |
BOOT_NUMBER = 0; |
BOOT_NUMBER = 0; |
208 |
|
PHYSENDRUN_MASK_S3S2S12 = 0; |
209 |
|
PHYSENDRUN_MASK_S11CRC = 0; |
210 |
VALIDATION = 0; |
VALIDATION = 0; |
211 |
} |
} |
212 |
|
|
372 |
COMPILATIONTIMESTAMP = value; |
COMPILATIONTIMESTAMP = value; |
373 |
}; |
}; |
374 |
|
|
375 |
|
void GL_RUN:: SetPHYSENDRUN_MASK_S3S2S12(UInt_t value){ |
376 |
|
PHYSENDRUN_MASK_S3S2S12 = value; |
377 |
|
}; |
378 |
|
|
379 |
|
void GL_RUN:: SetPHYSENDRUN_MASK_S11CRC(UInt_t value){ |
380 |
|
PHYSENDRUN_MASK_S11CRC = value; |
381 |
|
}; |
382 |
|
|
383 |
|
|
384 |
void GL_RUN:: SetFAV_WRK_SCHEDULE(UInt_t value){ |
void GL_RUN:: SetFAV_WRK_SCHEDULE(UInt_t value){ |
385 |
FAV_WRK_SCHEDULE = value; |
FAV_WRK_SCHEDULE = value; |
386 |
}; |
}; |
448 |
RM_ACQ_AFTER_CALIB = runh->RM_ACQ_AFTER_CALIB; |
RM_ACQ_AFTER_CALIB = runh->RM_ACQ_AFTER_CALIB; |
449 |
RM_ACQ_SETTING_MODE = runh->RM_ACQ_SETTING_MODE; |
RM_ACQ_SETTING_MODE = runh->RM_ACQ_SETTING_MODE; |
450 |
TRK_CALIB_USED = runh->TRK_CALIB_USED; |
TRK_CALIB_USED = runh->TRK_CALIB_USED; |
451 |
CAL_DSP_MASK = runh->CAL_DSP_MASK; |
CAL_DSP_MASK = runh->CAL_DSP_MASK; |
452 |
}; |
}; |
453 |
|
|
454 |
void GL_RUN::Set_GL_RUNT0(){ |
void GL_RUN::Set_GL_RUNT0(){ |
478 |
}; |
}; |
479 |
|
|
480 |
void GL_RUN::Set_GL_RUN(TSQLRow *Row){ |
void GL_RUN::Set_GL_RUN(TSQLRow *Row){ |
481 |
for( Int_t t = 0; t < 30; t++){ |
for( Int_t t = 0; t < 32; t++){ |
482 |
if (t== 0) ID = (UInt_t)atoll(Row->GetField(t)); |
if (t== 0) ID = (UInt_t)atoll(Row->GetField(t)); |
483 |
if (t== 1) ID_RUN_FRAG = (UInt_t)atoll(Row->GetField(t)); |
if (t== 1) ID_RUN_FRAG = (UInt_t)atoll(Row->GetField(t)); |
484 |
if (t== 2) ID_ROOT_L0 = (UInt_t)atoll(Row->GetField(t)); |
if (t== 2) ID_ROOT_L0 = (UInt_t)atoll(Row->GetField(t)); |
508 |
if (t==26) CAL_DSP_MASK = (UInt_t)atoll(Row->GetField(t)); |
if (t==26) CAL_DSP_MASK = (UInt_t)atoll(Row->GetField(t)); |
509 |
if (t==27) LAST_TIMESYNC = (UInt_t)atoll(Row->GetField(t)); |
if (t==27) LAST_TIMESYNC = (UInt_t)atoll(Row->GetField(t)); |
510 |
if (t==28) OBT_TIMESYNC = (UInt_t)atoll(Row->GetField(t)); |
if (t==28) OBT_TIMESYNC = (UInt_t)atoll(Row->GetField(t)); |
511 |
if (t==29) VALIDATION = (UInt_t)atoll(Row->GetField(t)); |
if (t==29) PHYSENDRUN_MASK_S3S2S12 = (UInt_t)atoll(Row->GetField(t)); |
512 |
|
if (t==30) PHYSENDRUN_MASK_S11CRC = (UInt_t)atoll(Row->GetField(t)); |
513 |
|
if (t==31) VALIDATION = (UInt_t)atoll(Row->GetField(t)); |
514 |
}; |
}; |
515 |
|
|
516 |
} |
} |
560 |
myquery << ",CAL_DSP_MASK"; |
myquery << ",CAL_DSP_MASK"; |
561 |
myquery << ",LAST_TIMESYNC"; |
myquery << ",LAST_TIMESYNC"; |
562 |
myquery << ",OBT_TIMESYNC"; |
myquery << ",OBT_TIMESYNC"; |
563 |
|
myquery << ",PHYSENDRUN_MASK_S3S2S12"; |
564 |
|
myquery << ",PHYSENDRUN_MASK_S11CRC"; |
565 |
myquery << ",VALIDATION"; |
myquery << ",VALIDATION"; |
566 |
myquery << ",INSERT_TIME"; |
myquery << ",INSERT_TIME"; |
567 |
myquery << ") SELECT * FROM "; |
myquery << ") SELECT * FROM "; |
750 |
myquery << ",CAL_DSP_MASK"; |
myquery << ",CAL_DSP_MASK"; |
751 |
myquery << ",LAST_TIMESYNC"; |
myquery << ",LAST_TIMESYNC"; |
752 |
myquery << ",OBT_TIMESYNC"; |
myquery << ",OBT_TIMESYNC"; |
753 |
|
myquery << ",PHYSENDRUN_MASK_S3S2S12"; |
754 |
|
myquery << ",PHYSENDRUN_MASK_S11CRC"; |
755 |
myquery << ",VALIDATION"; |
myquery << ",VALIDATION"; |
756 |
myquery << ",INSERT_TIME"; |
myquery << ",INSERT_TIME"; |
757 |
myquery << ") SELECT "; |
myquery << ") SELECT "; |
784 |
myquery << ",CAL_DSP_MASK"; |
myquery << ",CAL_DSP_MASK"; |
785 |
myquery << ",LAST_TIMESYNC"; |
myquery << ",LAST_TIMESYNC"; |
786 |
myquery << ",OBT_TIMESYNC"; |
myquery << ",OBT_TIMESYNC"; |
787 |
|
myquery << ",PHYSENDRUN_MASK_S3S2S12"; |
788 |
|
myquery << ",PHYSENDRUN_MASK_S11CRC"; |
789 |
myquery << ",VALIDATION"; |
myquery << ",VALIDATION"; |
790 |
myquery << ",INSERT_TIME"; |
myquery << ",INSERT_TIME"; |
791 |
myquery << " FROM GL_RUN_TRASH "; |
myquery << " FROM GL_RUN_TRASH "; |
851 |
myquery << ",TRK_CALIB_USED"; |
myquery << ",TRK_CALIB_USED"; |
852 |
myquery << ",CAL_DSP_MASK"; |
myquery << ",CAL_DSP_MASK"; |
853 |
myquery << ",BOOT_NUMBER"; |
myquery << ",BOOT_NUMBER"; |
854 |
|
myquery << ",PHYSENDRUN_MASK_S3S2S12"; |
855 |
|
myquery << ",PHYSENDRUN_MASK_S11CRC"; |
856 |
myquery << ",VALIDATION"; |
myquery << ",VALIDATION"; |
857 |
myquery << ") VALUES ('"; |
myquery << ") VALUES ('"; |
858 |
|
|
885 |
myquery << (UInt_t)TRK_CALIB_USED << "','"; |
myquery << (UInt_t)TRK_CALIB_USED << "','"; |
886 |
myquery << (UInt_t)CAL_DSP_MASK << "','"; |
myquery << (UInt_t)CAL_DSP_MASK << "','"; |
887 |
myquery << (UInt_t)BOOT_NUMBER << "','"; |
myquery << (UInt_t)BOOT_NUMBER << "','"; |
888 |
|
myquery << (UInt_t)PHYSENDRUN_MASK_S3S2S12 << "','"; |
889 |
|
myquery << (UInt_t)PHYSENDRUN_MASK_S11CRC << "','"; |
890 |
myquery << (UInt_t)VALIDATION << "');"; |
myquery << (UInt_t)VALIDATION << "');"; |
891 |
// |
// |
892 |
// printf("myquery is %s \n",myquery.str().c_str()); |
// printf("myquery is %s \n",myquery.str().c_str()); |
938 |
myquery << ",TRK_CALIB_USED"; |
myquery << ",TRK_CALIB_USED"; |
939 |
myquery << ",CAL_DSP_MASK"; |
myquery << ",CAL_DSP_MASK"; |
940 |
myquery << ",BOOT_NUMBER"; |
myquery << ",BOOT_NUMBER"; |
941 |
|
myquery << ",PHYSENDRUN_MASK_S3S2S12"; |
942 |
|
myquery << ",PHYSENDRUN_MASK_S11CRC"; |
943 |
myquery << ") VALUES ('"; |
myquery << ") VALUES ('"; |
944 |
myquery << (UInt_t)ID << "','"; |
myquery << (UInt_t)ID << "','"; |
945 |
myquery << (UInt_t)ID_ROOT_L0 << "','"; |
myquery << (UInt_t)ID_ROOT_L0 << "','"; |
967 |
myquery << (UInt_t)PKT_READY_COUNTER << "','"; |
myquery << (UInt_t)PKT_READY_COUNTER << "','"; |
968 |
myquery << (UInt_t)TRK_CALIB_USED << "','"; |
myquery << (UInt_t)TRK_CALIB_USED << "','"; |
969 |
myquery << (UInt_t)CAL_DSP_MASK << "','"; |
myquery << (UInt_t)CAL_DSP_MASK << "','"; |
970 |
myquery << (UInt_t)BOOT_NUMBER << "');"; |
myquery << (UInt_t)BOOT_NUMBER << "','"; |
971 |
|
myquery << (UInt_t)PHYSENDRUN_MASK_S3S2S12 << "','"; |
972 |
|
myquery << (UInt_t)PHYSENDRUN_MASK_S11CRC << "');"; |
973 |
// |
// |
974 |
// printf("myquery is %s \n",myquery.str().c_str()); |
// printf("myquery is %s \n",myquery.str().c_str()); |
975 |
// |
// |
1028 |
myquery << ",TRK_CALIB_USED"; |
myquery << ",TRK_CALIB_USED"; |
1029 |
myquery << ",CAL_DSP_MASK"; |
myquery << ",CAL_DSP_MASK"; |
1030 |
myquery << ",BOOT_NUMBER"; |
myquery << ",BOOT_NUMBER"; |
1031 |
|
myquery << ",PHYSENDRUN_MASK_S3S2S12"; |
1032 |
|
myquery << ",PHYSENDRUN_MASK_S11CRC"; |
1033 |
myquery << ",VALIDATION"; |
myquery << ",VALIDATION"; |
1034 |
myquery << " from GL_RUN where ID=" << run << ";"; |
myquery << " from GL_RUN where ID=" << run << ";"; |
1035 |
// |
// |
1076 |
if (t==26) TRK_CALIB_USED = (UInt_t)atoll(Row->GetField(t)); |
if (t==26) TRK_CALIB_USED = (UInt_t)atoll(Row->GetField(t)); |
1077 |
if (t==27) CAL_DSP_MASK = (UInt_t)atoll(Row->GetField(t)); |
if (t==27) CAL_DSP_MASK = (UInt_t)atoll(Row->GetField(t)); |
1078 |
if (t==28) BOOT_NUMBER = (UInt_t)atoll(Row->GetField(t)); |
if (t==28) BOOT_NUMBER = (UInt_t)atoll(Row->GetField(t)); |
1079 |
if (t==29) VALIDATION = (UInt_t)atoll(Row->GetField(t)); |
if (t==29) PHYSENDRUN_MASK_S3S2S12 = (UInt_t)atoll(Row->GetField(t)); |
1080 |
|
if (t==30) PHYSENDRUN_MASK_S11CRC = (UInt_t)atoll(Row->GetField(t)); |
1081 |
|
if (t==31) VALIDATION = (UInt_t)atoll(Row->GetField(t)); |
1082 |
}; |
}; |
1083 |
}; |
}; |
1084 |
// delete pResult; |
// delete pResult; |
1131 |
myquery << ",TRK_CALIB_USED"; |
myquery << ",TRK_CALIB_USED"; |
1132 |
myquery << ",CAL_DSP_MASK"; |
myquery << ",CAL_DSP_MASK"; |
1133 |
myquery << ",BOOT_NUMBER"; |
myquery << ",BOOT_NUMBER"; |
1134 |
|
myquery << ",PHYSENDRUN_MASK_S3S2S12"; |
1135 |
|
myquery << ",PHYSENDRUN_MASK_S11CRC"; |
1136 |
myquery << ",VALIDATION"; |
myquery << ",VALIDATION"; |
1137 |
myquery << " from GL_RUN_FRAGMENTS where " << where.Data() << ";"; |
myquery << " from GL_RUN_FRAGMENTS where " << where.Data() << ";"; |
1138 |
// |
// |
1175 |
if (t==26) TRK_CALIB_USED = (UInt_t)atoll(Row->GetField(t)); |
if (t==26) TRK_CALIB_USED = (UInt_t)atoll(Row->GetField(t)); |
1176 |
if (t==27) CAL_DSP_MASK = (UInt_t)atoll(Row->GetField(t)); |
if (t==27) CAL_DSP_MASK = (UInt_t)atoll(Row->GetField(t)); |
1177 |
if (t==28) BOOT_NUMBER = (UInt_t)atoll(Row->GetField(t)); |
if (t==28) BOOT_NUMBER = (UInt_t)atoll(Row->GetField(t)); |
1178 |
if (t==29) VALIDATION = (UInt_t)atoll(Row->GetField(t)); |
if (t==29) PHYSENDRUN_MASK_S3S2S12 = (UInt_t)atoll(Row->GetField(t)); |
1179 |
|
if (t==30) PHYSENDRUN_MASK_S11CRC = (UInt_t)atoll(Row->GetField(t)); |
1180 |
|
if (t==31) VALIDATION = (UInt_t)atoll(Row->GetField(t)); |
1181 |
}; |
}; |
1182 |
}; |
}; |
1183 |
// delete pResult; |
// delete pResult; |
1347 |
// |
// |
1348 |
// if the selected calibration is too old (more than 5 orbits old) try to take the closest not corrupted one |
// if the selected calibration is too old (more than 5 orbits old) try to take the closest not corrupted one |
1349 |
// |
// |
1350 |
if ( (time-myfromtime)>28500 ){ |
if ( (time-myfromtime)>28500 && myfromtime > 0 ){ |
1351 |
// |
// |
1352 |
myquery.str(""); |
myquery.str(""); |
1353 |
myquery << "select ID_ROOT_L0, FROM_TIME, TO_TIME, EV_ROOT from GL_CALO_CALIB where SECTION=" << section; |
myquery << "select ID_ROOT_L0, FROM_TIME, TO_TIME, EV_ROOT from GL_CALO_CALIB where SECTION=" << section; |