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 |
|
|
218 |
NAME = ""; |
NAME = ""; |
219 |
} |
} |
220 |
|
|
221 |
|
GL_RAW::GL_RAW(){ |
222 |
|
ID = 0; |
223 |
|
PATH = ""; |
224 |
|
NAME = ""; |
225 |
|
BOOT_NUMBER = 0; |
226 |
|
} |
227 |
|
|
228 |
GL_PARAM::GL_PARAM(){ |
GL_PARAM::GL_PARAM(){ |
229 |
ID = 0; |
ID = 0; |
230 |
PATH = ""; |
PATH = ""; |
379 |
COMPILATIONTIMESTAMP = value; |
COMPILATIONTIMESTAMP = value; |
380 |
}; |
}; |
381 |
|
|
382 |
|
void GL_RUN:: SetPHYSENDRUN_MASK_S3S2S12(UInt_t value){ |
383 |
|
PHYSENDRUN_MASK_S3S2S12 = value; |
384 |
|
}; |
385 |
|
|
386 |
|
void GL_RUN:: SetPHYSENDRUN_MASK_S11CRC(UInt_t value){ |
387 |
|
PHYSENDRUN_MASK_S11CRC = value; |
388 |
|
}; |
389 |
|
|
390 |
|
|
391 |
void GL_RUN:: SetFAV_WRK_SCHEDULE(UInt_t value){ |
void GL_RUN:: SetFAV_WRK_SCHEDULE(UInt_t value){ |
392 |
FAV_WRK_SCHEDULE = value; |
FAV_WRK_SCHEDULE = value; |
393 |
}; |
}; |
455 |
RM_ACQ_AFTER_CALIB = runh->RM_ACQ_AFTER_CALIB; |
RM_ACQ_AFTER_CALIB = runh->RM_ACQ_AFTER_CALIB; |
456 |
RM_ACQ_SETTING_MODE = runh->RM_ACQ_SETTING_MODE; |
RM_ACQ_SETTING_MODE = runh->RM_ACQ_SETTING_MODE; |
457 |
TRK_CALIB_USED = runh->TRK_CALIB_USED; |
TRK_CALIB_USED = runh->TRK_CALIB_USED; |
458 |
CAL_DSP_MASK = runh->CAL_DSP_MASK; |
CAL_DSP_MASK = runh->CAL_DSP_MASK; |
459 |
}; |
}; |
460 |
|
|
461 |
void GL_RUN::Set_GL_RUNT0(){ |
void GL_RUN::Set_GL_RUNT0(){ |
485 |
}; |
}; |
486 |
|
|
487 |
void GL_RUN::Set_GL_RUN(TSQLRow *Row){ |
void GL_RUN::Set_GL_RUN(TSQLRow *Row){ |
488 |
for( Int_t t = 0; t < 30; t++){ |
for( Int_t t = 0; t < 32; t++){ |
489 |
if (t== 0) ID = (UInt_t)atoll(Row->GetField(t)); |
if (t== 0) ID = (UInt_t)atoll(Row->GetField(t)); |
490 |
if (t== 1) ID_RUN_FRAG = (UInt_t)atoll(Row->GetField(t)); |
if (t== 1) ID_RUN_FRAG = (UInt_t)atoll(Row->GetField(t)); |
491 |
if (t== 2) ID_ROOT_L0 = (UInt_t)atoll(Row->GetField(t)); |
if (t== 2) ID_ROOT_L0 = (UInt_t)atoll(Row->GetField(t)); |
515 |
if (t==26) CAL_DSP_MASK = (UInt_t)atoll(Row->GetField(t)); |
if (t==26) CAL_DSP_MASK = (UInt_t)atoll(Row->GetField(t)); |
516 |
if (t==27) LAST_TIMESYNC = (UInt_t)atoll(Row->GetField(t)); |
if (t==27) LAST_TIMESYNC = (UInt_t)atoll(Row->GetField(t)); |
517 |
if (t==28) OBT_TIMESYNC = (UInt_t)atoll(Row->GetField(t)); |
if (t==28) OBT_TIMESYNC = (UInt_t)atoll(Row->GetField(t)); |
518 |
if (t==29) VALIDATION = (UInt_t)atoll(Row->GetField(t)); |
if (t==29) PHYSENDRUN_MASK_S3S2S12 = (UInt_t)atoll(Row->GetField(t)); |
519 |
|
if (t==30) PHYSENDRUN_MASK_S11CRC = (UInt_t)atoll(Row->GetField(t)); |
520 |
|
if (t==31) VALIDATION = (UInt_t)atoll(Row->GetField(t)); |
521 |
}; |
}; |
522 |
|
|
523 |
} |
} |
567 |
myquery << ",CAL_DSP_MASK"; |
myquery << ",CAL_DSP_MASK"; |
568 |
myquery << ",LAST_TIMESYNC"; |
myquery << ",LAST_TIMESYNC"; |
569 |
myquery << ",OBT_TIMESYNC"; |
myquery << ",OBT_TIMESYNC"; |
570 |
|
myquery << ",PHYSENDRUN_MASK_S3S2S12"; |
571 |
|
myquery << ",PHYSENDRUN_MASK_S11CRC"; |
572 |
myquery << ",VALIDATION"; |
myquery << ",VALIDATION"; |
573 |
myquery << ",INSERT_TIME"; |
myquery << ",INSERT_TIME"; |
574 |
myquery << ") SELECT * FROM "; |
myquery << ") SELECT * FROM "; |
757 |
myquery << ",CAL_DSP_MASK"; |
myquery << ",CAL_DSP_MASK"; |
758 |
myquery << ",LAST_TIMESYNC"; |
myquery << ",LAST_TIMESYNC"; |
759 |
myquery << ",OBT_TIMESYNC"; |
myquery << ",OBT_TIMESYNC"; |
760 |
|
myquery << ",PHYSENDRUN_MASK_S3S2S12"; |
761 |
|
myquery << ",PHYSENDRUN_MASK_S11CRC"; |
762 |
myquery << ",VALIDATION"; |
myquery << ",VALIDATION"; |
763 |
myquery << ",INSERT_TIME"; |
myquery << ",INSERT_TIME"; |
764 |
myquery << ") SELECT "; |
myquery << ") SELECT "; |
791 |
myquery << ",CAL_DSP_MASK"; |
myquery << ",CAL_DSP_MASK"; |
792 |
myquery << ",LAST_TIMESYNC"; |
myquery << ",LAST_TIMESYNC"; |
793 |
myquery << ",OBT_TIMESYNC"; |
myquery << ",OBT_TIMESYNC"; |
794 |
|
myquery << ",PHYSENDRUN_MASK_S3S2S12"; |
795 |
|
myquery << ",PHYSENDRUN_MASK_S11CRC"; |
796 |
myquery << ",VALIDATION"; |
myquery << ",VALIDATION"; |
797 |
myquery << ",INSERT_TIME"; |
myquery << ",INSERT_TIME"; |
798 |
myquery << " FROM GL_RUN_TRASH "; |
myquery << " FROM GL_RUN_TRASH "; |
858 |
myquery << ",TRK_CALIB_USED"; |
myquery << ",TRK_CALIB_USED"; |
859 |
myquery << ",CAL_DSP_MASK"; |
myquery << ",CAL_DSP_MASK"; |
860 |
myquery << ",BOOT_NUMBER"; |
myquery << ",BOOT_NUMBER"; |
861 |
|
myquery << ",PHYSENDRUN_MASK_S3S2S12"; |
862 |
|
myquery << ",PHYSENDRUN_MASK_S11CRC"; |
863 |
myquery << ",VALIDATION"; |
myquery << ",VALIDATION"; |
864 |
myquery << ") VALUES ('"; |
myquery << ") VALUES ('"; |
865 |
|
|
892 |
myquery << (UInt_t)TRK_CALIB_USED << "','"; |
myquery << (UInt_t)TRK_CALIB_USED << "','"; |
893 |
myquery << (UInt_t)CAL_DSP_MASK << "','"; |
myquery << (UInt_t)CAL_DSP_MASK << "','"; |
894 |
myquery << (UInt_t)BOOT_NUMBER << "','"; |
myquery << (UInt_t)BOOT_NUMBER << "','"; |
895 |
|
myquery << (UInt_t)PHYSENDRUN_MASK_S3S2S12 << "','"; |
896 |
|
myquery << (UInt_t)PHYSENDRUN_MASK_S11CRC << "','"; |
897 |
myquery << (UInt_t)VALIDATION << "');"; |
myquery << (UInt_t)VALIDATION << "');"; |
898 |
// |
// |
899 |
// printf("myquery is %s \n",myquery.str().c_str()); |
// printf("myquery is %s \n",myquery.str().c_str()); |
945 |
myquery << ",TRK_CALIB_USED"; |
myquery << ",TRK_CALIB_USED"; |
946 |
myquery << ",CAL_DSP_MASK"; |
myquery << ",CAL_DSP_MASK"; |
947 |
myquery << ",BOOT_NUMBER"; |
myquery << ",BOOT_NUMBER"; |
948 |
|
myquery << ",PHYSENDRUN_MASK_S3S2S12"; |
949 |
|
myquery << ",PHYSENDRUN_MASK_S11CRC"; |
950 |
myquery << ") VALUES ('"; |
myquery << ") VALUES ('"; |
951 |
myquery << (UInt_t)ID << "','"; |
myquery << (UInt_t)ID << "','"; |
952 |
myquery << (UInt_t)ID_ROOT_L0 << "','"; |
myquery << (UInt_t)ID_ROOT_L0 << "','"; |
974 |
myquery << (UInt_t)PKT_READY_COUNTER << "','"; |
myquery << (UInt_t)PKT_READY_COUNTER << "','"; |
975 |
myquery << (UInt_t)TRK_CALIB_USED << "','"; |
myquery << (UInt_t)TRK_CALIB_USED << "','"; |
976 |
myquery << (UInt_t)CAL_DSP_MASK << "','"; |
myquery << (UInt_t)CAL_DSP_MASK << "','"; |
977 |
myquery << (UInt_t)BOOT_NUMBER << "');"; |
myquery << (UInt_t)BOOT_NUMBER << "','"; |
978 |
|
myquery << (UInt_t)PHYSENDRUN_MASK_S3S2S12 << "','"; |
979 |
|
myquery << (UInt_t)PHYSENDRUN_MASK_S11CRC << "');"; |
980 |
// |
// |
981 |
// printf("myquery is %s \n",myquery.str().c_str()); |
// printf("myquery is %s \n",myquery.str().c_str()); |
982 |
// |
// |
1035 |
myquery << ",TRK_CALIB_USED"; |
myquery << ",TRK_CALIB_USED"; |
1036 |
myquery << ",CAL_DSP_MASK"; |
myquery << ",CAL_DSP_MASK"; |
1037 |
myquery << ",BOOT_NUMBER"; |
myquery << ",BOOT_NUMBER"; |
1038 |
|
myquery << ",PHYSENDRUN_MASK_S3S2S12"; |
1039 |
|
myquery << ",PHYSENDRUN_MASK_S11CRC"; |
1040 |
myquery << ",VALIDATION"; |
myquery << ",VALIDATION"; |
1041 |
myquery << " from GL_RUN where ID=" << run << ";"; |
myquery << " from GL_RUN where ID=" << run << ";"; |
1042 |
// |
// |
1083 |
if (t==26) TRK_CALIB_USED = (UInt_t)atoll(Row->GetField(t)); |
if (t==26) TRK_CALIB_USED = (UInt_t)atoll(Row->GetField(t)); |
1084 |
if (t==27) CAL_DSP_MASK = (UInt_t)atoll(Row->GetField(t)); |
if (t==27) CAL_DSP_MASK = (UInt_t)atoll(Row->GetField(t)); |
1085 |
if (t==28) BOOT_NUMBER = (UInt_t)atoll(Row->GetField(t)); |
if (t==28) BOOT_NUMBER = (UInt_t)atoll(Row->GetField(t)); |
1086 |
if (t==29) VALIDATION = (UInt_t)atoll(Row->GetField(t)); |
if (t==29) PHYSENDRUN_MASK_S3S2S12 = (UInt_t)atoll(Row->GetField(t)); |
1087 |
|
if (t==30) PHYSENDRUN_MASK_S11CRC = (UInt_t)atoll(Row->GetField(t)); |
1088 |
|
if (t==31) VALIDATION = (UInt_t)atoll(Row->GetField(t)); |
1089 |
}; |
}; |
1090 |
}; |
}; |
1091 |
// delete pResult; |
// delete pResult; |
1138 |
myquery << ",TRK_CALIB_USED"; |
myquery << ",TRK_CALIB_USED"; |
1139 |
myquery << ",CAL_DSP_MASK"; |
myquery << ",CAL_DSP_MASK"; |
1140 |
myquery << ",BOOT_NUMBER"; |
myquery << ",BOOT_NUMBER"; |
1141 |
|
myquery << ",PHYSENDRUN_MASK_S3S2S12"; |
1142 |
|
myquery << ",PHYSENDRUN_MASK_S11CRC"; |
1143 |
myquery << ",VALIDATION"; |
myquery << ",VALIDATION"; |
1144 |
myquery << " from GL_RUN_FRAGMENTS where " << where.Data() << ";"; |
myquery << " from GL_RUN_FRAGMENTS where " << where.Data() << ";"; |
1145 |
// |
// |
1182 |
if (t==26) TRK_CALIB_USED = (UInt_t)atoll(Row->GetField(t)); |
if (t==26) TRK_CALIB_USED = (UInt_t)atoll(Row->GetField(t)); |
1183 |
if (t==27) CAL_DSP_MASK = (UInt_t)atoll(Row->GetField(t)); |
if (t==27) CAL_DSP_MASK = (UInt_t)atoll(Row->GetField(t)); |
1184 |
if (t==28) BOOT_NUMBER = (UInt_t)atoll(Row->GetField(t)); |
if (t==28) BOOT_NUMBER = (UInt_t)atoll(Row->GetField(t)); |
1185 |
if (t==29) VALIDATION = (UInt_t)atoll(Row->GetField(t)); |
if (t==29) PHYSENDRUN_MASK_S3S2S12 = (UInt_t)atoll(Row->GetField(t)); |
1186 |
|
if (t==30) PHYSENDRUN_MASK_S11CRC = (UInt_t)atoll(Row->GetField(t)); |
1187 |
|
if (t==31) VALIDATION = (UInt_t)atoll(Row->GetField(t)); |
1188 |
}; |
}; |
1189 |
}; |
}; |
1190 |
// delete pResult; |
// delete pResult; |
1354 |
// |
// |
1355 |
// 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 |
1356 |
// |
// |
1357 |
if ( (time-myfromtime)>28500 ){ |
if ( (time-myfromtime)>28500 && myfromtime > 0 ){ |
1358 |
// |
// |
1359 |
myquery.str(""); |
myquery.str(""); |
1360 |
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; |