--- chewbacca/YodaProfiler/docs/PAMELAProductionDB.sql	2009/12/24 10:31:16	1.22
+++ chewbacca/YodaProfiler/docs/PAMELAProductionDB.sql	2012/05/23 13:55:17	1.41
@@ -39,7 +39,7 @@
 
 CREATE TABLE `GL_RESURS_OFFSET` (
   `ID` int(10) unsigned NOT NULL auto_increment,
-  `FROM_ORBIT` int(10) unsigned NOT NULL default '0' COMMENT 'SELECT YEAR(OFFSET_DATE),MONTH(OFFSET_DATE),DAY(OFFSET_DATE),HOUR(OFFSET_DATE),MINUTE(OFFSET_DATE),SECOND(OFFSET_DATE),ID FROM GL_RESURS_OFFSET WHERE FROM_ORBIT< "  << dworbit << " AND SPECIAL_FILE="" order by FROM_ORBIT desc limit 1;',
+  `FROM_ORBIT` int(10) unsigned NOT NULL default '0' COMMENT 'if dwlimit = dworbit the file takes the OLD resurs 0 -- SELECT YEAR(OFFSET_DATE),MONTH(OFFSET_DATE),DAY(OFFSET_DATE),HOUR(OFFSET_DATE),MINUTE(OFFSET_DATE),SECOND(OFFSET_DATE),ID FROM GL_RESURS_OFFSET WHERE FROM_ORBIT< "  << dworbit << " AND SPECIAL_FILE="" order by FROM_ORBIT desc limit 1;',
   `SPECIAL_FILE` varchar(255) NOT NULL default '',
   `OFFSET_DATE` timestamp default '0000-00-00 00:00:00',
   `INSERT_TIME` timestamp NOT NULL default CURRENT_TIMESTAMP,
@@ -94,10 +94,155 @@
 INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','19526_072_001_cln1.pam','2009-09-09 21:00:00',NULL);
 INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','19539_073_001_cln1.pam','2009-09-09 21:00:00',NULL);
 INSERT INTO GL_RESURS_OFFSET VALUES(0,'19525','','2009-12-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','20829_072_001_cln1.pam','2009-12-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','20829_073_001_cln1.pam','2009-12-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','20829_074_001_cln1.pam','2009-12-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','20829_075_001_cln1.pam','2009-12-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','20829_075_002_cln1.pam','2009-12-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'20820','','2010-03-03 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'23600','','2010-08-28 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'24760','','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26089_002_001_cln1.pam','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26089_003_001_cln1.pam','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26089_074_001_cln1.pam','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26089_075_001_cln1.pam','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_026_001_cln1.pam','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26100_002_001_cln1.pam','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26104_074_001_cln1.pam','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'26080','','2011-02-13 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'27410','','2011-05-12 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','27409_071_001_cln1.pam','2011-02-13 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','27436_004_001_cln1.pam','2011-02-13 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','27436_005_001_cln1.pam','2011-02-13 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','27436_006_001_cln1.pam','2011-02-13 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'28990','','2011-08-24 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','30328_001_001_cln1.pam','2011-11-22 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','30329_001_001_cln1.pam','2011-11-22 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','30329_002_001_cln1.pam','2011-11-22 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','30329_003_001_cln1.pam','2011-11-22 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','30329_004_001_cln1.pam','2011-11-22 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','30329_005_001_cln1.pam','2011-11-22 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'30330','','2011-11-22 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','31654_001_001_cln1.pam','2012-02-19 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'31660','','2012-02-19 21:00:00',NULL);
 
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'32950','','2012-05-15 21:00:00',NULL);
 
 
 
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','04584_002_001','2007-01-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','04584_002_002','2007-01-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','04584_003_002','2007-01-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','04584_003_001','2007-01-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','04586_002_001','2007-01-08 21:00:00',NULL); 
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','04586_002_002','2007-01-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','04586_003_001','2007-01-08 21:00:00',NULL);
+
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','08591_002_001','2007-10-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','08591_003_002','2007-10-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','08591_003_001','2007-10-08 21:00:00',NULL); 
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','08592_004_002','2007-10-08 21:00:00',NULL); 
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','08592_004_003','2007-10-08 21:00:00',NULL); 
+
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','11310_001_002','2008-03-20 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','11310_001_003','2008-03-20 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','11310_002_001','2008-03-20 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','11310_002_002','2008-03-20 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','11310_003_001','2008-03-20 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','11310_003_002','2008-03-20 21:00:00',NULL);
+
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','14033_201_001','2008-12-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','14034_001_001','2008-12-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','14044_001_001','2008-12-15 21:00:00',NULL);
+
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','15441_002_001','2008-12-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','15441_002_002','2008-12-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','15441_003_001','2008-12-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','15442_002_001','2008-12-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','15442_003_001','2008-12-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','15442_003_002','2008-12-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','15442_504_001','2008-12-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','15442_504_002','2008-12-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','15445_002_001','2008-12-15 21:00:00',NULL);
+
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','16760_002_001','2009-03-16 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','16760_002_002','2009-03-16 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','16760_002_003','2009-03-16 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','16760_002_004','2009-03-16 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','16760_002_005','2009-03-16 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','16760_002_006','2009-03-16 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','16760_002_007','2009-03-16 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','16760_002_008','2009-03-16 21:00:00',NULL);
+
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18156_072_001','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18156_072_002','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18157_072_001','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18157_072_002','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18157_073_001','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18157_073_002','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18160_032_001','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18160_032_002','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18160_033_001','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18160_033_002','2009-06-10 21:00:00',NULL);
+
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','19526_072_001','2009-09-09 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','19526_072_002','2009-09-09 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','19539_073_001','2009-09-09 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','19539_073_002','2009-09-09 21:00:00',NULL);
+
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','20829_072_001','2009-12-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','20829_072_002','2009-12-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','20829_073_001','2009-12-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','20829_073_002','2009-12-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','20829_074_002','2009-12-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','20829_075_001','2009-12-08 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_025_001','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_025_002','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_025_003','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_025_004','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_025_005','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_025_006','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_025_007','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_025_008','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_025_009','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_025_010','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_025_011','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_025_012','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_025_013','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_026_001','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_026_002','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_026_003','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_026_004','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_026_005','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_026_006','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26099_026_007','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26100_002_001','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26100_002_002','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26104_074_001','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26104_074_002','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26089_075_002','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26089_075_001','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26089_074_002','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26089_074_001','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26089_003_001','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','26089_002_002','2010-11-15 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','27436_006_001','2011-02-13 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','27436_005_002','2011-02-13 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','27436_004_001','2011-02-13 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','27409_071_001','2011-05-12 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','30328_001_001','2011-11-22 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','30328_001_002','2011-11-22 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','30329_001_001','2011-11-22 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','30329_001_002','2011-11-22 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','30329_002_001','2011-11-22 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','30329_002_002','2011-11-22 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','30329_003_001','2011-11-22 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','30329_003_002','2011-11-22 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','30329_004_001','2011-11-22 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','30329_004_002','2011-11-22 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','30329_005_001','2011-11-22 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','31654_001_001','2012-02-19 21:00:00',NULL);
+
 CREATE TABLE `GL_TIMESYNC` (
   `ID` int(10) unsigned NOT NULL auto_increment,
   `ID_RAW` int(10) unsigned NOT NULL default '0',
@@ -446,7 +591,8 @@
 insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_2.rz",1153660001,1154375000,201," 07-23 - 07-31   HV_D problems           B       B       july            Parameters_jul24-31.txt",NULL);
 insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_3.rz",1154375001,1155850000,201," 07-31 - 08-17   -                       C       C       standard",NULL);
 insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_4.rz",1155850001,1156280000,201," 08-17 - 08-22   HV_H&HV_N problems      D       D       august          Parameters_aug18-22.txt",NULL);
-insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_5.rz",1156280001,1165400000,201," 08-22 - 12-06                           E       E       standard",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_5.rz",1156280001,1158700000,201," 08-22 - 09-18  S115B failure	          E       E       standard",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_5B.rz",1158700001,1165400000,201," 09-18 - 12-06                           5B       5B       standard",NULL);
 insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_6.rz",1165400001,1168490000,201," 12-06 - 01-11   December Tracker off/on F       F       standard",NULL);
 insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_7.rz",1168490001,1168940000,201," 01-11 - 01-16   HV_D problems           G       G       january         calper02.txt",NULL);
 insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_8.rz",1168940001,1169580000,201," 01-16 - 01-23   HV_F & HV_M problems    G       G       january         calper03.txt",NULL);
@@ -480,11 +626,49 @@
 insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_36.rz",1229470001,1229730000,201," 12-17 - 12-19   HV_E problems (?)       36      36      calper_36",NULL);
 insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_37.rz",1229730001,1230318000,201," 12-19 - 12-26   good                    37      37      calper_37",NULL);
 insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_38.rz",1230318001,1230410000,201," 12-26 - 12-27   HV_H problems           38      38      calper_38",NULL);
-insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_39.rz",1230410001,4294967295,201," > 12-27         good                    39      39      calper_39",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_39.rz",1230410001,1230768000,201," 12-27 - 12-31   good                    39      39      calper_39",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_41.rz",1230768001,1232496000,201," 09-01-01 09-01-20         good",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_42.rz",1232496001,1235347200,201," 09-01-21 09-02-22         good",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_43.rz",1235347201,1238544000,201," 09-02-23 09-03-31         good",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_44.rz",1238544001,1241136000,201," 09-04-01 09-04-30         good",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_45.rz",1241136001,1243814400,201," 09-05-01 09-05-31         good",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_46.rz",1243814401,1246406400,201," 09-06-01 09-06-30         good",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_47.rz",1246406401,1249084800,201," 09-07-01 09-07-31         good",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_48.rz",1249084801,1251763200,201," 09-08-01 09-08-31         good",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_49.rz",1251763201,1254355200,201," 09-09-01 09-09-30         good",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_50.rz",1254355201,1257033600,201," 09-10-01 09-10-31         good",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_51.rz",1257033601,1259625600,201," 09-11-01 09-11-30         good",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_52.rz",1259625601,1262304000,201," 09-12-01 09-12-31         good",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","tofcalib_53.rz",1262304001,4294967295,201," >10-01-01        good",NULL);
 insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","ToFCalibParam.txt",1,4294967295,202," GP ToF parameters ",NULL);
 insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","adcmonitor.100k.cut.dat",1,1,203," ToF dE/dx II order correction parameters ",NULL);
-insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","dedxmonitor.C.5d.8th.all.dat",1,4294967295,203," ToF dE/dx II order correction parameters ",NULL);
-insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","attenuation.txt",1,4294967295,204," ToF attenuation parameter file ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","dedxmonitor.C.5d.8th.all.dat",1,1,203," ToF dE/dx II order correction parameters ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","dedxmonitor.He.8th.all.dat",1,1,203," ToF dE/dx II order correction parameters based on He",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","dedxmonitor.He.9th.all.dat",1,1,203," ToF dE/dx II order correction parameters based on He 9th data reduction",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","calibfile_tofdedx_x10thred.txt",1,4294967295,203," ToF dE/dx II order correction parameters - Rita",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_1.dat",1,1150848001,204," ToF attenuation parameter file period 1 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_2.dat",1150848000,1154995201,204," ToF attenuation parameter file period 2 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_3.dat",1154995200,1158019201,204," ToF attenuation parameter file period 3 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_4.dat",1158019200,1161216001,204," ToF attenuation parameter file period 4 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_5.dat",1161216000,1164499201,204," ToF attenuation parameter file period 5 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_6.dat",1164499200,1167955201,204," ToF attenuation parameter file period 6 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_7.dat",1167955200,1171670401,204," ToF attenuation parameter file period 7 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_8.dat",1171670400,1175472001,204," ToF attenuation parameter file period 8 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_9.dat",1175472000,1179446401,204," ToF attenuation parameter file period 9 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_10.dat",1179446400,1184284801,204," ToF attenuation parameter file period 10 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_11.dat",1184284800,1188691201,204," ToF attenuation parameter file period 11 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_12.dat",1188691200,1193356801,204," ToF attenuation parameter file period 12 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_13.dat",1193356800,1198195201,204," ToF attenuation parameter file period 13 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_14.dat",1198195200,1203292801,204," ToF attenuation parameter file period 14 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_15.dat",1203292800,1208822401,204," ToF attenuation parameter file period 15 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_16.dat",1208822400,1214524801,204," ToF attenuation parameter file period 16 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_17.dat",1214524800,1220659201,204," ToF attenuation parameter file period 17 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_18.dat",1220659200,1228953601,204," ToF attenuation parameter file period 18 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_19.dat",1228953600,1237593601,204," ToF attenuation parameter file period 19 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_20.dat",1237593600,1244592001,204," ToF attenuation parameter file period 20 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_21.dat",1244592000,1252108801,204," ToF attenuation parameter file period 21 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","atten_period_22.dat",1252108800,4294967295,204," ToF attenuation parameter file period 22 ",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","attenuation.txt",1,1,204," ToF attenuation parameter file ",NULL);
 insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","desaturation_position.txt",1,4294967295,205," ToF desaturation on position parameter file ",NULL);
 insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","BetheBloch.txt",1,4294967295,206," ToF BetheBloch parameter file ",NULL);
 insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","BetheBloch_betagt1.txt",1,4294967295,207," ToF Bethe-Bloch parameter file for beta gt1 ",NULL);
@@ -509,8 +693,14 @@
 insert into GL_PARAM values(0,"","",1196230001,1196280000,217," H connector ",NULL);
 insert into GL_PARAM values(0,"","",1168940001,1169580000,220," M connector ",NULL);
 insert into GL_PARAM values(0,"","",1155850001,1156280000,221," N connector ",NULL);
-insert into GL_PARAM values(0,"$PAM_CALIB/orb-param/","igrf05.dat",0,0,301,"igrf 2005",NULL);
-insert into GL_PARAM values(0,"$PAM_CALIB/orb-param/","igrf05s.dat",0,0,302,"igrf 2010",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/orb-param/","igrf00.dat",1,1104537600,301,"igrf 2000",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/orb-param/","igrf05.dat",1104537601,1264400000,301,"igrf 2005",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/orb-param/","igrf10.dat",1264400001,4294967295,301,"igrf 2010",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/orb-param/","igrf00.dat",1,946684800,302,"igrf 2000 for interpolations",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/orb-param/","igrf05.dat",946684801,1104537600,302,"igrf 2005 for interpolations",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/orb-param/","igrf10.dat",1104537601,1264400000,302,"igrf 2010 for interpolations",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/orb-param/","igrf10s.dat",1264400001,4294967295,302,"igrf 2015 estimated",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/orb-param/","SortQuat.txt",0,0,303,"Quaternion from Resurs",NULL);
 
 CREATE TABLE `GL_TLE` (
   `ID` int(10) NOT NULL auto_increment,
@@ -803,68 +993,6 @@
 ) 
 ;
 
-
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','04584_002_001','2007-01-08 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','04584_002_002','2007-01-08 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','04584_003_002','2007-01-08 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','04584_003_001','2007-01-08 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','04586_002_001','2007-01-08 21:00:00',NULL); 
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','04586_002_002','2007-01-08 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','04586_003_001','2007-01-08 21:00:00',NULL);
-
-
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','08591_002_001','2007-10-08 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','08591_003_002','2007-10-08 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','08591_003_001','2007-10-08 21:00:00',NULL); 
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','08592_004_001','2007-10-08 21:00:00',NULL); 
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','08592_004_002','2007-10-08 21:00:00',NULL); 
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','08592_004_005','2007-10-08 21:00:00',NULL); 
-
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','11309_001_002','2008-03-20 21:00:00',NULL); 
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','11310_001_002','2008-03-20 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','11310_001_003','2008-03-20 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','11310_002_001','2008-03-20 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','11310_002_002','2008-03-20 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','11310_003_001','2008-03-20 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','11310_003_002','2008-03-20 21:00:00',NULL);
-
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','12874_002_001','2008-06-19 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','12875_003_001','2008-06-19 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','12875_202_003','2008-06-19 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','12875_202_004','2008-06-19 21:00:00',NULL);
-
-
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','14034_001_001','2008-12-15 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','14033_201_001','2008-12-15 21:00:00',NULL);
-
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','14044_001_001','2008-12-15 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','14044_001_002','2008-12-15 21:00:00',NULL); 
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','14045_001_003','2008-09-18 21:00:00',NULL); 
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','14045_001_004','2008-09-18 21:00:00',NULL); 
-
-
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','15441_002_001','2008-12-15 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','15441_003_001','2008-12-15 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','15442_002_001','2008-12-15 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','15442_003_001','2008-12-15 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','15442_504_001','2008-12-15 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','15445_002_001','2008-12-15 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','16760_002_001','2009-03-16 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18156_072_001','2009-06-10 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18157_072_001','2009-06-10 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18157_073_001','2009-06-10 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18160_122_001','2009-06-10 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18160_123_001','2009-06-10 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18160_132_001','2009-06-10 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18160_133_001','2009-06-10 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18160_152_001','2009-06-10 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18160_153_001','2009-06-10 21:00:00',NULL);
-
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','19526_072_001','2009-09-09 21:00:00',NULL);
-INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','19539_073_001','2009-09-09 21:00:00',NULL);
-
-
-
 drop table if exists dbname.ROOT_TABLE_MERGING ;
 CREATE TABLE `dbname`.`ROOT_TABLE_MERGING` (
   `ID_N` int unsigned NOT NULL auto_increment COMMENT 'It is the internal table ID',
