--- chewbacca/YodaProfiler/src/GLTables.cpp 2008/09/23 07:20:33 1.1 +++ chewbacca/YodaProfiler/src/GLTables.cpp 2008/09/29 12:41:58 1.3 @@ -168,6 +168,8 @@ TRK_CALIB_USED = 0; CAL_DSP_MASK = 0; BOOT_NUMBER = 0; + PHYSENDRUN_MASK_S3S2S12 = 0; + PHYSENDRUN_MASK_S11CRC = 0; VALIDATION = 0; } @@ -203,6 +205,8 @@ TRK_CALIB_USED = 0; CAL_DSP_MASK = 0; BOOT_NUMBER = 0; + PHYSENDRUN_MASK_S3S2S12 = 0; + PHYSENDRUN_MASK_S11CRC = 0; VALIDATION = 0; } @@ -368,6 +372,15 @@ COMPILATIONTIMESTAMP = value; }; +void GL_RUN:: SetPHYSENDRUN_MASK_S3S2S12(UInt_t value){ + PHYSENDRUN_MASK_S3S2S12 = value; +}; + +void GL_RUN:: SetPHYSENDRUN_MASK_S11CRC(UInt_t value){ + PHYSENDRUN_MASK_S11CRC = value; +}; + + void GL_RUN:: SetFAV_WRK_SCHEDULE(UInt_t value){ FAV_WRK_SCHEDULE = value; }; @@ -435,7 +448,7 @@ RM_ACQ_AFTER_CALIB = runh->RM_ACQ_AFTER_CALIB; RM_ACQ_SETTING_MODE = runh->RM_ACQ_SETTING_MODE; TRK_CALIB_USED = runh->TRK_CALIB_USED; - CAL_DSP_MASK = runh->CAL_DSP_MASK; + CAL_DSP_MASK = runh->CAL_DSP_MASK; }; void GL_RUN::Set_GL_RUNT0(){ @@ -465,7 +478,7 @@ }; void GL_RUN::Set_GL_RUN(TSQLRow *Row){ - for( Int_t t = 0; t < 30; t++){ + for( Int_t t = 0; t < 32; t++){ if (t== 0) ID = (UInt_t)atoll(Row->GetField(t)); if (t== 1) ID_RUN_FRAG = (UInt_t)atoll(Row->GetField(t)); if (t== 2) ID_ROOT_L0 = (UInt_t)atoll(Row->GetField(t)); @@ -495,7 +508,9 @@ if (t==26) CAL_DSP_MASK = (UInt_t)atoll(Row->GetField(t)); if (t==27) LAST_TIMESYNC = (UInt_t)atoll(Row->GetField(t)); if (t==28) OBT_TIMESYNC = (UInt_t)atoll(Row->GetField(t)); - if (t==29) VALIDATION = (UInt_t)atoll(Row->GetField(t)); + if (t==29) PHYSENDRUN_MASK_S3S2S12 = (UInt_t)atoll(Row->GetField(t)); + if (t==30) PHYSENDRUN_MASK_S11CRC = (UInt_t)atoll(Row->GetField(t)); + if (t==31) VALIDATION = (UInt_t)atoll(Row->GetField(t)); }; } @@ -545,6 +560,8 @@ myquery << ",CAL_DSP_MASK"; myquery << ",LAST_TIMESYNC"; myquery << ",OBT_TIMESYNC"; + myquery << ",PHYSENDRUN_MASK_S3S2S12"; + myquery << ",PHYSENDRUN_MASK_S11CRC"; myquery << ",VALIDATION"; myquery << ",INSERT_TIME"; myquery << ") SELECT * FROM "; @@ -733,6 +750,8 @@ myquery << ",CAL_DSP_MASK"; myquery << ",LAST_TIMESYNC"; myquery << ",OBT_TIMESYNC"; + myquery << ",PHYSENDRUN_MASK_S3S2S12"; + myquery << ",PHYSENDRUN_MASK_S11CRC"; myquery << ",VALIDATION"; myquery << ",INSERT_TIME"; myquery << ") SELECT "; @@ -765,6 +784,8 @@ myquery << ",CAL_DSP_MASK"; myquery << ",LAST_TIMESYNC"; myquery << ",OBT_TIMESYNC"; + myquery << ",PHYSENDRUN_MASK_S3S2S12"; + myquery << ",PHYSENDRUN_MASK_S11CRC"; myquery << ",VALIDATION"; myquery << ",INSERT_TIME"; myquery << " FROM GL_RUN_TRASH "; @@ -830,6 +851,8 @@ myquery << ",TRK_CALIB_USED"; myquery << ",CAL_DSP_MASK"; myquery << ",BOOT_NUMBER"; + myquery << ",PHYSENDRUN_MASK_S3S2S12"; + myquery << ",PHYSENDRUN_MASK_S11CRC"; myquery << ",VALIDATION"; myquery << ") VALUES ('"; @@ -862,6 +885,8 @@ myquery << (UInt_t)TRK_CALIB_USED << "','"; myquery << (UInt_t)CAL_DSP_MASK << "','"; myquery << (UInt_t)BOOT_NUMBER << "','"; + myquery << (UInt_t)PHYSENDRUN_MASK_S3S2S12 << "','"; + myquery << (UInt_t)PHYSENDRUN_MASK_S11CRC << "','"; myquery << (UInt_t)VALIDATION << "');"; // // printf("myquery is %s \n",myquery.str().c_str()); @@ -913,6 +938,8 @@ myquery << ",TRK_CALIB_USED"; myquery << ",CAL_DSP_MASK"; myquery << ",BOOT_NUMBER"; + myquery << ",PHYSENDRUN_MASK_S3S2S12"; + myquery << ",PHYSENDRUN_MASK_S11CRC"; myquery << ") VALUES ('"; myquery << (UInt_t)ID << "','"; myquery << (UInt_t)ID_ROOT_L0 << "','"; @@ -940,7 +967,9 @@ myquery << (UInt_t)PKT_READY_COUNTER << "','"; myquery << (UInt_t)TRK_CALIB_USED << "','"; myquery << (UInt_t)CAL_DSP_MASK << "','"; - myquery << (UInt_t)BOOT_NUMBER << "');"; + myquery << (UInt_t)BOOT_NUMBER << "','"; + myquery << (UInt_t)PHYSENDRUN_MASK_S3S2S12 << "','"; + myquery << (UInt_t)PHYSENDRUN_MASK_S11CRC << "');"; // // printf("myquery is %s \n",myquery.str().c_str()); // @@ -999,6 +1028,8 @@ myquery << ",TRK_CALIB_USED"; myquery << ",CAL_DSP_MASK"; myquery << ",BOOT_NUMBER"; + myquery << ",PHYSENDRUN_MASK_S3S2S12"; + myquery << ",PHYSENDRUN_MASK_S11CRC"; myquery << ",VALIDATION"; myquery << " from GL_RUN where ID=" << run << ";"; // @@ -1045,7 +1076,9 @@ if (t==26) TRK_CALIB_USED = (UInt_t)atoll(Row->GetField(t)); if (t==27) CAL_DSP_MASK = (UInt_t)atoll(Row->GetField(t)); if (t==28) BOOT_NUMBER = (UInt_t)atoll(Row->GetField(t)); - if (t==29) VALIDATION = (UInt_t)atoll(Row->GetField(t)); + if (t==29) PHYSENDRUN_MASK_S3S2S12 = (UInt_t)atoll(Row->GetField(t)); + if (t==30) PHYSENDRUN_MASK_S11CRC = (UInt_t)atoll(Row->GetField(t)); + if (t==31) VALIDATION = (UInt_t)atoll(Row->GetField(t)); }; }; // delete pResult; @@ -1098,6 +1131,8 @@ myquery << ",TRK_CALIB_USED"; myquery << ",CAL_DSP_MASK"; myquery << ",BOOT_NUMBER"; + myquery << ",PHYSENDRUN_MASK_S3S2S12"; + myquery << ",PHYSENDRUN_MASK_S11CRC"; myquery << ",VALIDATION"; myquery << " from GL_RUN_FRAGMENTS where " << where.Data() << ";"; // @@ -1140,7 +1175,9 @@ if (t==26) TRK_CALIB_USED = (UInt_t)atoll(Row->GetField(t)); if (t==27) CAL_DSP_MASK = (UInt_t)atoll(Row->GetField(t)); if (t==28) BOOT_NUMBER = (UInt_t)atoll(Row->GetField(t)); - if (t==29) VALIDATION = (UInt_t)atoll(Row->GetField(t)); + if (t==29) PHYSENDRUN_MASK_S3S2S12 = (UInt_t)atoll(Row->GetField(t)); + if (t==30) PHYSENDRUN_MASK_S11CRC = (UInt_t)atoll(Row->GetField(t)); + if (t==31) VALIDATION = (UInt_t)atoll(Row->GetField(t)); }; }; // delete pResult; @@ -1310,7 +1347,7 @@ // // if the selected calibration is too old (more than 5 orbits old) try to take the closest not corrupted one // - if ( (time-myfromtime)>28500 ){ + if ( (time-myfromtime)>28500 && myfromtime > 0 ){ // myquery.str(""); myquery << "select ID_ROOT_L0, FROM_TIME, TO_TIME, EV_ROOT from GL_CALO_CALIB where SECTION=" << section;