--- chewbacca/YodaProfiler/docs/PAMELAProductionDB.sql	2009/03/19 11:01:33	1.16
+++ chewbacca/YodaProfiler/docs/PAMELAProductionDB.sql	2010/01/29 17:15:59	1.28
@@ -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',
+  `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,
@@ -79,6 +79,23 @@
 INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','15442_504_001_cln1.pam','2008-12-15 21:00:00',NULL);
 INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','15445_002_001_cln1.pam','2008-12-15 21:00:00',NULL);
 INSERT INTO GL_RESURS_OFFSET VALUES(0,'15430','','2009-03-16 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','16760_002_001_cln1.pam','2009-03-16 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'16740','','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18156_072_001_cln1.pam','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18157_072_001_cln1.pam','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18157_073_001_cln1.pam','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18160_122_001_cln1.pam','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18160_123_001_cln1.pam','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18160_132_001_cln1.pam','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18160_133_001_cln1.pam','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18160_152_001_cln1.pam','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'0','18160_153_001_cln1.pam','2009-06-10 21:00:00',NULL);
+INSERT INTO GL_RESURS_OFFSET VALUES(0,'18150','','2009-09-09 21:00:00',NULL);
+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);
+
+
 
 
 CREATE TABLE `GL_TIMESYNC` (
@@ -407,7 +424,8 @@
 insert into GL_PARAM values(0,"$PAM_CALIB/cal-param/","FCaloADC2MIP.dat",1,1,101,"Calorimeter ADC to MIP from ground data",NULL);
 insert into GL_PARAM values(0,"$PAM_CALIB/cal-param/","FCaloADC2MIPfc.dat",2,4294967295,101,"Calorimeter ADC to MIP from flight, relativistic particles",NULL);
 insert into GL_PARAM values(0,"$PAM_CALIB/cal-param/","calo_adc2mip_special0.dat",1,1172976488,110,"Calorimeter ADC to MIP from flight, special cases",NULL);
-insert into GL_PARAM values(0,"$PAM_CALIB/cal-param/","calo_adc2mip_special1.dat",1172976488,4294967295,110,"Calorimeter ADC to MIP from flight, special cases",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/cal-param/","calo_adc2mip_special1.dat",1172976488,1190000000,110,"Calorimeter ADC to MIP from flight, special cases",NULL);
+insert into GL_PARAM values(0,"$PAM_CALIB/cal-param/","calo_adc2mip_special2.dat",1190000000,4294967295,110,"Calorimeter ADC to MIP from flight, special cases",NULL);
 insert into GL_PARAM values(0,"$PAM_CALIB/cal-param/","FCaloAlign.dat",1,1,102,"Calorimeter alignement",NULL);
 insert into GL_PARAM values(0,"$PAM_CALIB/cal-param/","FCaloAlign-flight.dat",1,1,102,"Calorimeter alignement with flight data",NULL);
 insert into GL_PARAM values(0,"$PAM_CALIB/cal-param/","FCaloAlign-flightEMS.dat",1,1,102,"Calorimeter alignement with flight data EM showers",NULL);
@@ -464,7 +482,34 @@
 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/","ToFCalibParam.txt",1,4294967295,202," GP ToF parameters ",NULL);
-insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","adcmonitor.100k.cut.dat",1,4294967295,203," ToF dE/dx II order correction 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,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,4294967295,203," ToF dE/dx II order correction parameters based on He",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/","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);
+insert into GL_PARAM values(0,"$PAM_CALIB/tof-param/","desaturation_beta.txt",1,4294967295,208," ToF desaturation on beta parameter file ",NULL);
+insert into GL_PARAM values(0,"","",1182100001,1183030000,210," A connector ",NULL);
+insert into GL_PARAM values(0,"","",1174665001,1175000000,211," B connector ",NULL);
+insert into GL_PARAM values(0,"","",1206100001,1206375600,212," C connector ",NULL);
+insert into GL_PARAM values(0,"","",1153660001,1154375000,213," D connector ",NULL);
+insert into GL_PARAM values(0,"","",1168490001,1168940000,213," D connector ",NULL);
+insert into GL_PARAM values(0,"","",1185090001,1185212000,213," D connector ",NULL);
+insert into GL_PARAM values(0,"","",1191100001,1191940000,213," D connector ",NULL);
+insert into GL_PARAM values(0,"","",1176800001,1178330000,214," E connector ",NULL);
+insert into GL_PARAM values(0,"","",1217989201,1218547800,214," E connector ",NULL);
+insert into GL_PARAM values(0,"","",1225789201,1226566800,214," E connector ",NULL);
+insert into GL_PARAM values(0,"","",1229400901,1229700000,214," E connector ",NULL);
+insert into GL_PARAM values(0,"","",1230318001,1230415200,214," E connector ",NULL);
+insert into GL_PARAM values(0,"","",1168940001,1169580000,215," F connector ",NULL);
+insert into GL_PARAM values(0,"","",1155850001,1156280000,217," H connector ",NULL);
+insert into GL_PARAM values(0,"","",1176120001,1176800000,217," H connector ",NULL);
+insert into GL_PARAM values(0,"","",1178330001,1181322000,217," H connector ",NULL);
+insert into GL_PARAM values(0,"","",1184000001,1184570000,217," H connector ",NULL);
+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);
 
@@ -725,6 +770,8 @@
   `INPUT_NAME` varchar(255) default './nnnnmmm.pam' COMMENT 'It is the filename of the input file',  
   `TIME_IS_ESTIMATED` tinyint(1) unsigned NOT NULL default '0' COMMENT 'No timesync was found for this entry, we use a timesync from the same download',
   `INSERT_TIME` timestamp default CURRENT_TIMESTAMP, 
+  `INSERTED_BY` varchar(4) NOT NULL default 'NONE' COMMENT 'The owner of the file',
+  `ON_DISK` varchar(3) NOT NULL default 'YES' COMMENT 'The file is on disk (no deleted)',
  PRIMARY KEY  (`ID_N`)
 ) 
 ;
@@ -751,6 +798,8 @@
   `INPUT_NAME` varchar(255) default './nnnnmmm.pam' COMMENT 'It is the filename of the input file',  
   `TIME_IS_ESTIMATED` tinyint(1) unsigned NOT NULL default '0' COMMENT 'No timesync was found for this entry, we use a timesync from the same download',
   `INSERT_TIME` timestamp default CURRENT_TIMESTAMP, 
+  `INSERTED_BY` varchar(4) NOT NULL default 'NONE' COMMENT 'The owner of the file',
+  `ON_DISK` varchar(3) NOT NULL default 'YES' COMMENT 'The file is on disk (no deleted)',
   PRIMARY KEY  (`ID_N`)
 ) 
 ;
@@ -764,15 +813,12 @@
 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','08592_004_003','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);
@@ -780,21 +826,44 @@
 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','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','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_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);
 
 drop table if exists dbname.ROOT_TABLE_MERGING ;
 CREATE TABLE `dbname`.`ROOT_TABLE_MERGING` (
