| 77 |
char *outDir = ""; |
char *outDir = ""; |
| 78 |
|
|
| 79 |
char * nome_output="chewbacca"; |
char * nome_output="chewbacca"; |
| 80 |
bool multiFile = 0; |
bool multiFile = 0; |
| 81 |
unsigned long int step_pkt_number=0; |
unsigned long int step_pkt_number=0; |
| 82 |
unsigned long int step_pkt_obt=0; |
unsigned long int step_pkt_obt=0; |
| 83 |
LogUtil* mainLogUtil = NULL; |
LogUtil* mainLogUtil = NULL; |
| 96 |
|
|
| 97 |
//TODO: now it is unused |
//TODO: now it is unused |
| 98 |
unsigned long int delta_Time=0;//in seconds |
unsigned long int delta_Time=0;//in seconds |
| 99 |
|
#define TAGVALUELEN 4 |
| 100 |
|
char tag_value[TAGVALUELEN]; |
| 101 |
} |
} |
| 102 |
|
|
| 103 |
// main: |
// main: |
| 178 |
cout << "\t -session_number Value of the session number. If 0 this is retrieved from the input file name. [default = 0]\n"; |
cout << "\t -session_number Value of the session number. If 0 this is retrieved from the input file name. [default = 0]\n"; |
| 179 |
cout << "\t -time_Offset Value of the timeOffset. If 0 this is retrieved using the orbital number. [default = 0]\n"; |
cout << "\t -time_Offset Value of the timeOffset. If 0 this is retrieved using the orbital number. [default = 0]\n"; |
| 180 |
cout << "\t -tryMerge if you want to try to Merge ROOT files\n"; |
cout << "\t -tryMerge if you want to try to Merge ROOT files\n"; |
| 181 |
//marco_new_01 |
//marco_new_01 |
| 182 |
cout << "\t -single_connection if you want to open only one connection to DB.\n"; |
cout << "\t -single_connection if you want to open only one connection to DB.\n"; |
| 183 |
// cout << "\t -delta_Time set the allowed difference (seconds) in the Real Time between two root file. [default = 0]\n"; |
cout << "\t -tag if you want add the 'The owner of the file' - the tag lenght is 4 char\n"; |
| 184 |
|
// cout << "\t -delta_Time set the allowed difference (seconds) in the Real Time between two root file. [default = 0]\n"; |
| 185 |
//cout << "\t -multi generate multiple root files \n"; |
//cout << "\t -multi generate multiple root files \n"; |
| 186 |
exit(1); |
exit(1); |
| 187 |
} |
} |
| 490 |
db_pwd = argv[i]; |
db_pwd = argv[i]; |
| 491 |
continue; |
continue; |
| 492 |
} |
} |
| 493 |
|
if (!strcmp(argv[i], "-tag")){ |
| 494 |
|
if (++i >= argc){ |
| 495 |
|
cerr << "-tag needs arguments. \n"; |
| 496 |
|
cout << "Try '-help' for more information. \n"; |
| 497 |
|
exit(1); |
| 498 |
|
} |
| 499 |
|
int len=strlen(argv[i])>TAGVALUELEN?TAGVALUELEN:strlen(argv[i]); |
| 500 |
|
strncpy(tag_value,argv[i],len); |
| 501 |
|
tag_value[len]=0; |
| 502 |
|
continue; |
| 503 |
|
} |
| 504 |
|
|
| 505 |
//TODO: check that multiFile is always 0 |
//TODO: check that multiFile is always 0 |
| 506 |
// if (!strcmp(argv[i], "-multi")){multiFile = 1; cout<<"debug: multi= "<<multiFile<<endl;} |
// if (!strcmp(argv[i], "-multi")){multiFile = 1; cout<<"debug: multi= "<<multiFile<<endl;} |
| 507 |
} |
} |
| 828 |
if(do_vrl_check){isCadreGood=false;} |
if(do_vrl_check){isCadreGood=false;} |
| 829 |
break; |
break; |
| 830 |
} |
} |
| 831 |
|
skip_cadre = false; |
| 832 |
//check of the VRL header e setta route number |
//check of the VRL header e setta route number |
| 833 |
if(!VRL_Header_Check(ccHeader_VRL,LENGTH_HEADER_VRL)) |
if(!VRL_Header_Check(ccHeader_VRL,LENGTH_HEADER_VRL)) |
| 834 |
{ |
{ |
| 930 |
mainLogUtil->logAll(msg); |
mainLogUtil->logAll(msg); |
| 931 |
} |
} |
| 932 |
// is_new_route will be reset to false in PacketUser after the packet is used and stored |
// is_new_route will be reset to false in PacketUser after the packet is used and stored |
| 933 |
|
|
| 934 |
|
|
| 935 |
//main processing of the data, searching for Pamela Packets |
//main processing of the data, searching for Pamela Packets |
| 936 |
for(int i=0; i<LENGTH_DATA_CADRE; i++) |
for(int i=0; i<LENGTH_DATA_CADRE; i++) |
| 937 |
{ |
{ |
| 938 |
StateManager::getInstance().getCurrentState()->readInput(ccData[i]); |
StateManager::getInstance().getCurrentState()->readInput(ccData[i]); |
| 939 |
iByte_tot++; |
iByte_tot++; |
| 940 |
if(exitdbg==true){cout<<"**** DBG EXIT FOR****"<<endl; break;} |
if(exitdbg==true){cout<<"**** DBG EXIT FOR****"<<endl; break;} |
| 941 |
} |
} |
| 942 |
} |
} |
| 943 |
else{ |
else{ |
| 944 |
iByte_tot+=LENGTH_DATA_CADRE; |
iByte_tot+=LENGTH_DATA_CADRE; |