

 WOW! using the new software features 


 Welcome to the PAMELA YodaProfiler, version v6r00 

 1 => Initialize and open SQL connection 
 => using database to process the file 

 DB INFORMATIONS:
 SQL: MySQL Version: MySQL 4.1.20 Host srv-g2-01.ts.infn.it Port 3306 

 chewbacca: query is SELECT ROOT_ID_N,PKT_NUMBER_INIT,PKT_NUMBER_FINAL,PKT_OBT_INIT,PKT_OBT_FINAL from ROOT_TABLE_MERGING where ID_N=4; 
 chewbacca: query is SELECT FOLDER_NAME,FILE_NAME,OBT_TIME_SYNC,LAST_TIME_SYNC_INFO,TIME_OFFSET,BOOT_NUMBER from ROOT_TABLE where ID_N=4; 
 chewbacca: filename is /gpfs/wizard/flight/src/nergal//yoda_07909_005_002_3.root 
 look for up 0 13956844 13956849 nevent 256283 (nevent-1-it) 256282 
 - look for up 0 13956844 13956849 nevent 256283 (nevent-1-it) 256282 
 - up , tjump was 50000 it was 0 
 look for up 0 13956844 13956849 nevent 256283 (nevent-1-it) 256282 
 - look for up 0 13956844 13956849 nevent 256283 (nevent-1-it) 256282 
 - up , tjump was 5000 it was 0 
 look for up 0 13956844 13956849 nevent 256283 (nevent-1-it) 256282 
 - look for up 0 13956844 13956849 nevent 256283 (nevent-1-it) 256282 
 - up , tjump was 1000 it was 0 
 look for up 0 13956844 13956849 nevent 256283 (nevent-1-it) 256282 
 - look for up 0 13956844 13956849 nevent 256283 (nevent-1-it) 256282 
 - up , tjump was 100 it was 0 
 look for up 0 13956844 13956849 nevent 256283 (nevent-1-it) 256282 
 - look for up 0 13956844 13956849 nevent 256283 (nevent-1-it) 256282 
 - up , tjump was 10 it was 0 
 look for up 0 13956844 13956849 nevent 256283 (nevent-1-it) 256282 
 - look for up 1 13956844 13956849 nevent 256283 (nevent-1-it) 256281 
 - up , tjump was 1 it was 1 
look for down 0 13700268 13700263 
 down , tjump was 50000 it was 0 
look for down 0 13700268 13700263 
 down , tjump was 5000 it was 0 
look for down 0 13700268 13700263 
 down , tjump was 1000 it was 0 
look for down 0 13700268 13700263 
 down , tjump was 100 it was 0 
look for down 0 13700268 13700263 
 down , tjump was 10 it was 0 
look for down 0 13700268 13700263 
 down , tjump was 1 it was 1 
 Chewbacca: chminentry 0 chmaxentry 256282 nevent 256283 
 RRRRRRR 13700266 13700263 13956849 2922220129 2922220356 2933443235 
 ++++ RH 1 
 RRRRRRR 13700983 13700263 13956849 2922220129 2922240637 2933443235 
 ++++ RH 2 
 RRRRRRR 13724628 13700263 13956849 2922220129 2923141402 2933443235 
 ++++ RH 3 
 RRRRRRR 13731149 13700263 13956849 2922220129 2923423620 2933443235 
 ++++ RH 4 
 RRRRRRR 13749250 13700263 13956849 2922220129 2924324373 2933443235 
 ++++ RH 5 
 RRRRRRR 13766070 13700263 13956849 2922220129 2924988669 2933443235 
 ++++ RH 6 
 RRRRRRR 13790228 13700263 13956849 2922220129 2925889009 2933443235 
 ++++ RH 7 
 RRRRRRR 13802199 13700263 13956849 2922220129 2926371782 2933443235 
 ++++ RH 8 
 RRRRRRR 13815531 13700263 13956849 2922220129 2927179746 2933443235 
 ++++ RH 9 
 RRRRRRR 13816428 13700263 13956849 2922220129 2927279989 2933443235 
 ++++ RH 10 
 RRRRRRR 13830939 13700263 13956849 2922220129 2927904692 2933443235 
 ++++ RH 11 
 RRRRRRR 13854644 13700263 13956849 2922220129 2928805010 2933443235 
 ++++ RH 12 
 RRRRRRR 13860665 13700263 13956849 2922220129 2929066951 2933443235 
 ++++ RH 13 
 RRRRRRR 13878954 13700263 13956849 2922220129 2929967271 2933443235 
 ++++ RH 14 
 RRRRRRR 13898698 13700263 13956849 2922220129 2930712047 2933443235 
 ++++ RH 15 
 RRRRRRR 13922913 13700263 13956849 2922220129 2931612386 2933443235 
 ++++ RH 16 
 RRRRRRR 13934823 13700263 13956849 2922220129 2932095463 2933443235 
 ++++ RH 17 
 RRRRRRR 13946131 13700263 13956849 2922220129 2932816220 2933443235 
 ++++ RH 18 
 RRRRRRR 13946999 13700263 13956849 2922220129 2932916649 2933443235 
 ++++ RH 19 
 TTTTTTT 13700979 13700263 13956849 2922220129 2922240413 2933443235 
 ++++ RT 1 
 TTTTTTT 13724622 13700263 13956849 2922220129 2923140673 2933443235 
 ++++ RT 2 
 TTTTTTT 13731145 13700263 13956849 2922220129 2923423132 2933443235 
 ++++ RT 3 
 TTTTTTT 13749245 13700263 13956849 2922220129 2924323645 2933443235 
 ++++ RT 4 
 TTTTTTT 13766066 13700263 13956849 2922220129 2924988286 2933443235 
 ++++ RT 5 
 TTTTTTT 13790224 13700263 13956849 2922220129 2925888706 2933443235 
 ++++ RT 6 
 TTTTTTT 13802195 13700263 13956849 2922220129 2926371520 2933443235 
 ++++ RT 7 
 TTTTTTT 13815445 13700263 13956849 2922220129 2927084812 2933443235 
 ++++ RT 8 
 TTTTTTT 13816425 13700263 13956849 2922220129 2927279771 2933443235 
 ++++ RT 9 
 TTTTTTT 13830935 13700263 13956849 2922220129 2927904416 2933443235 
 ++++ RT 10 
 TTTTTTT 13854640 13700263 13956849 2922220129 2928804707 2933443235 
 ++++ RT 11 
 TTTTTTT 13860661 13700263 13956849 2922220129 2929066713 2933443235 
 ++++ RT 12 
 TTTTTTT 13878950 13700263 13956849 2922220129 2929966968 2933443235 
 ++++ RT 13 
 TTTTTTT 13898693 13700263 13956849 2922220129 2930711759 2933443235 
 ++++ RT 14 
 TTTTTTT 13922909 13700263 13956849 2922220129 2931612080 2933443235 
 ++++ RT 15 
 TTTTTTT 13934819 13700263 13956849 2922220129 2932095203 2933443235 
 ++++ RT 16 
 TTTTTTT 13946045 13700263 13956849 2922220129 2932720848 2933443235 
 ++++ RT 17 
 TTTTTTT 13946995 13700263 13956849 2922220129 2932916342 2933443235 
 ++++ RT 18 
 TTTTTTT 13956846 13700263 13956849 2922220129 2933443235 2933443235 
 ++++ RT 19 
 NUMBER OF RH 19 RT 19 IN THE INTERVAL, NUMBER OF TOTAL RH 19 RT 19 
 First entries are: OBT 2922220129 pkt_num 13700263 
 Last entries are: OBT 2933443235 pkt_num 13956849 entry 256282
 Upper limits are: OBT 2933443235 pkt_num 13956849 upper entry 256282 
 3 => Insert an entry in GL_TIMESYNC 
 select * from GL_RESURS_OFFSET where OFFSET_DATE=FROM_UNIXTIME(1191877200) limit 1; 
 Query the GL_TIMESYNC table to fill it:
 INSERT INTO GL_TIMESYNC (ID_RAW,TYPE,OBT0,TIMESYNC,ID_RESURS_OFFSET) VALUES ('0','777','2910943000','2986177','12'); 
 found a timesync t0 is 1191877200 
 4 => Update a single GL_RAW record with its BOOT_NUMBER 
 5 => Insert unpacked ROOT file in GL_ROOT 
 query is  SELECT ID FROM GL_TIMESYNC where TIMESYNC=2986177 AND OBT0=2910943000 limit 1; 
 query is INSERT INTO GL_ROOT (ID_RAW, ID_TIMESYNC,PATH, NAME) VALUES ('0', '1', '$PAM_L0', 'yoda_07909_005_002_3.root') 
 query is SELECT ID FROM GL_ROOT WHERE PATH='$PAM_L0' and NAME='yoda_07909_005_002_3.root'; 
 The ID of the ROOT file is 1 
 6 => Scan physics and store runs in the GL_RUN table
 Loop in runtrailers, evbeft is 10630 upperentry 256282 cod->getetc 10631 
 Could be a good run, we have a runheader followed by a runtrailer 2 4294967295 0
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 13724628 2923141402 2922240413 
 oh no! the distance between runheader and runtrailer seems wrong: check 13725340 pktt 13700979 
 try to recover run(s) without runheader and runtrailer between runheader and runtrailer
 Check first is 40 
 Check last is 24 
 There are no-physics packets inside the run, try to separate runs 
 Standard case, evbefh is 34265 chminentry 0 cod->getetc 34266 
 Piece of run at the beginning of the file WITH NO RUNTRAILER evbefh = 34265 
 Check first is 17 firstev is 0
 Check last is 40 lastev is 34265
 There are no-phyics packets inside the run!
 Never seen this case, try to handle it anyway, it was throw -95
 Run between 0 and 709 entries
 check if run has been inserted: query is 
  SELECT ID,NEVENTS,TRK_CALIB_USED,PKT_COUNTER FROM GL_RUN WHERE  BOOT_NUMBER=0 AND ( (RUNHEADER_TIME>=1194874644 AND  RUNTRAILER_TIME<=1194874684 AND ( RUNHEADER_OBT>=2922220371 OR  RUNHEADER_PKT>=13700268) AND ( RUNTRAILER_OBT<=2922240363 OR  RUNTRAILER_PKT<=13700977) ) OR  (RUNHEADER_TIME<=1194874654 AND  RUNTRAILER_TIME>=1194874674 AND ( RUNHEADER_OBT<=2922220371 OR  RUNHEADER_PKT<=13700268) AND ( RUNTRAILER_OBT>=2922240363 OR  RUNTRAILER_PKT>=13700977) OR  (RUNHEADER_TIME=1194874654 AND  RUNTRAILER_TIME=1194874674 AND NEVENTS>100) OR (RUNHEADER_TIME=1194874654 AND  RUNTRAILER_TIME>1194874674 AND NEVENTS>100) OR (RUNHEADER_TIME<1194874654 AND  RUNTRAILER_TIME=1194874674 AND NEVENTS>100) )); 
 The run is new 
 -> fill the DB 
 Run between 710 and 24344 entries
 check if run has been inserted: query is 
  SELECT ID,NEVENTS,TRK_CALIB_USED,PKT_COUNTER FROM GL_RUN WHERE  BOOT_NUMBER=0 AND ( (RUNHEADER_TIME>=1194874664 AND  RUNTRAILER_TIME<=1194875584 AND ( RUNHEADER_OBT>=2922240667 OR  RUNHEADER_PKT>=13700985) AND ( RUNTRAILER_OBT<=2923140668 OR  RUNTRAILER_PKT<=13724620) ) OR  (RUNHEADER_TIME<=1194874674 AND  RUNTRAILER_TIME>=1194875574 AND ( RUNHEADER_OBT<=2922240667 OR  RUNHEADER_PKT<=13700985) AND ( RUNTRAILER_OBT>=2923140668 OR  RUNTRAILER_PKT>=13724620) OR  (RUNHEADER_TIME=1194874674 AND  RUNTRAILER_TIME=1194875574 AND NEVENTS>100) OR (RUNHEADER_TIME=1194874674 AND  RUNTRAILER_TIME>1194875574 AND NEVENTS>100) OR (RUNHEADER_TIME<1194874674 AND  RUNTRAILER_TIME=1194875574 AND NEVENTS>100) )); 
 The run is new 
 -> fill the DB 
 Run between 24345 and 30858 entries
 check if run has been inserted: query is 
  SELECT ID,NEVENTS,TRK_CALIB_USED,PKT_COUNTER FROM GL_RUN WHERE  BOOT_NUMBER=0 AND ( (RUNHEADER_TIME>=1194875565 AND  RUNTRAILER_TIME<=1194875867 AND ( RUNHEADER_OBT>=2923141470 OR  RUNHEADER_PKT>=13724630) AND ( RUNTRAILER_OBT<=2923423086 OR  RUNTRAILER_PKT<=13731143) ) OR  (RUNHEADER_TIME<=1194875575 AND  RUNTRAILER_TIME>=1194875857 AND ( RUNHEADER_OBT<=2923141470 OR  RUNHEADER_PKT<=13724630) AND ( RUNTRAILER_OBT>=2923423086 OR  RUNTRAILER_PKT>=13731143) OR  (RUNHEADER_TIME=1194875575 AND  RUNTRAILER_TIME=1194875857 AND NEVENTS>100) OR (RUNHEADER_TIME=1194875575 AND  RUNTRAILER_TIME>1194875857 AND NEVENTS>100) OR (RUNHEADER_TIME<1194875575 AND  RUNTRAILER_TIME=1194875857 AND NEVENTS>100) )); 
 The run is new 
 -> fill the DB 
 Run between 30859 and 34265 entries
 check if run has been inserted: query is 
  SELECT ID,NEVENTS,TRK_CALIB_USED,PKT_COUNTER FROM GL_RUN WHERE  BOOT_NUMBER=0 AND ( (RUNHEADER_TIME>=1194875847 AND  RUNTRAILER_TIME<=1194875987 AND ( RUNHEADER_OBT>=2923423645 OR  RUNHEADER_PKT>=13731151) AND ( RUNTRAILER_OBT<=2923543541 OR  RUNTRAILER_PKT<=13734557) ) OR  (RUNHEADER_TIME<=1194875857 AND  RUNTRAILER_TIME>=1194875977 AND ( RUNHEADER_OBT<=2923423645 OR  RUNHEADER_PKT<=13731151) AND ( RUNTRAILER_OBT>=2923543541 OR  RUNTRAILER_PKT>=13734557) OR  (RUNHEADER_TIME=1194875857 AND  RUNTRAILER_TIME=1194875977 AND NEVENTS>100) OR (RUNHEADER_TIME=1194875857 AND  RUNTRAILER_TIME>1194875977 AND NEVENTS>100) OR (RUNHEADER_TIME<1194875857 AND  RUNTRAILER_TIME=1194875977 AND NEVENTS>100) )); 
 The run is new 
 -> fill the DB 
The run is not consistent, it contains non-physics packets! The run has been handled 
The run is good, is it the other piece in the GL_RUN_FRAGMENTS table?
 check if run has been inserted: query is 
  SELECT ID FROM GL_RUN_FRAGMENTS WHERE  BOOT_NUMBER=0 AND ( (RUNHEADER_TIME>=1194874644 AND  RUNTRAILER_TIME<=1194875867 AND ( RUNHEADER_OBT>=2922220371 OR  RUNHEADER_PKT>=13700268) AND ( RUNTRAILER_OBT<=2923423086 OR  RUNTRAILER_PKT<=13731143) ) OR  (RUNHEADER_TIME<=1194874654 AND  RUNTRAILER_TIME>=1194875857 AND ( RUNHEADER_OBT<=2922220371 OR  RUNHEADER_PKT<=13700268) AND ( RUNTRAILER_OBT>=2923423086 OR  RUNTRAILER_PKT>=13731143) )); 
 The run is new 
 -> fill the GL_RUNFRAGMENTS table 
 not found, check if we have already processed the file 
  check if run has been inserted: query is 
  SELECT ID FROM GL_RUN WHERE  BOOT_NUMBER=0 AND ( (RUNHEADER_TIME>=1194874644 AND  RUNTRAILER_TIME<=1194875867 AND ( RUNHEADER_OBT>=2922220371 OR  RUNHEADER_PKT>=13700268) AND ( RUNTRAILER_OBT<=2923423086 OR  RUNTRAILER_PKT<=13731143) ) OR  (RUNHEADER_TIME<=1194874654 AND  RUNTRAILER_TIME>=1194875857 AND ( RUNHEADER_OBT<=2922220371 OR  RUNHEADER_PKT<=13700268) AND ( RUNTRAILER_OBT>=2923423086 OR  RUNTRAILER_PKT>=13731143) )); 
 The run is already present in the GL_RUN table 

 ERROR (-70)  PEDANTIC: RUN ALREADY INSERTED 

 13 => Free objects and close SQL connection 
 Total number of queries through GLTABLES: 10 

 Finished, exiting...

