| 1 |
//============================================================================ |
//============================================================================ |
| 2 |
// $Id: PacketUser.h,v 1.38 2008-06-10 08:49:18 messineo Exp $ |
// $Id: PacketUser.h,v 1.39 2008-09-05 14:33:48 messineo Exp $ |
| 3 |
// Description : |
// Description : |
| 4 |
//============================================================================ |
//============================================================================ |
| 5 |
#ifndef PACKETUSER_H_ |
#ifndef PACKETUSER_H_ |
| 68 |
unsigned long int timeOffset; |
unsigned long int timeOffset; |
| 69 |
//part of the ROOT filename used to retrieve timeOffset for special files |
//part of the ROOT filename used to retrieve timeOffset for special files |
| 70 |
char nnnn_mmm_ppp[80]; |
char nnnn_mmm_ppp[80]; |
| 71 |
//BOOT Number |
//boot number |
| 72 |
unsigned long int boot_number; |
unsigned long int boot_number; |
| 73 |
|
|
| 74 |
//number of packets with problems( in general CRC problems) detected in EventReader: |
//number of packets with problems( in general CRC problems) detected in EventReader: |
| 82 |
//the ID of the current ROOT file in table Table_ROOT_Good |
//the ID of the current ROOT file in table Table_ROOT_Good |
| 83 |
unsigned int my_id; |
unsigned int my_id; |
| 84 |
|
|
| 85 |
//number of good Calibration packets in the ROOT files |
//number of good Calibration packets in the ROOT files |
| 86 |
// int good_pkt_Calib;//maybe I will remove this in future |
// int good_pkt_Calib;//maybe I will use this in future |
| 87 |
|
|
| 88 |
//the table name in our DB for the ROOT files |
//the table name in our DB for the ROOT files |
| 89 |
char* Table_ROOT_Good; |
char* Table_ROOT_Good; |
| 126 |
|
|
| 127 |
///new part merging |
///new part merging |
| 128 |
|
|
| 129 |
//tipi di relazioni che il ROOT file puo' avere con un ROOT gia salvatto in DB |
//tipi di relazioni che il ROOT file puo' avere con un ROOT gia salvatto in DB |
| 130 |
|
//0 =AFTER se c'e' una sovrapposizione temporale parziale, inizia dopo l'inizio di quello associato e finisce dopo la sua fine |
| 131 |
|
//1 =BEFORE se c'e' una sovrapposizione temporale parziale, ossia finisce prima della fine di quello associato ma inizia prima |
| 132 |
|
//2 =SMALLER se c'e' una sovrapposizione temporale parziale: e' contenuto nel ROOT file associato |
| 133 |
|
//3 =BIGGER se c'e' una sovrapposizione temporale parziale: contiene il ROOT file associato |
| 134 |
enum type_Rel_ROOT{ |
enum type_Rel_ROOT{ |
| 135 |
AFTER, //se inizia dentro e finisce fuori |
AFTER, //se inizia dentro e finisce fuori |
| 136 |
BEFORE, //inizia prima ma finisce dentro |
BEFORE, //inizia prima ma finisce dentro |
| 138 |
BIGGER //se inizia prima e finisce dopo |
BIGGER //se inizia prima e finisce dopo |
| 139 |
}; |
}; |
| 140 |
|
|
| 141 |
/* |
|
|
0 =AFTER se c'e' una sovrapposizione temporale parziale, inizia dopo l'inizio di quello associato e finisce dopo la sua fine |
|
|
1 =BEFORE se c'e' una sovrapposizione temporale parziale, ossia finisce prima della fine di quello associato ma inizia prima |
|
|
2 =SMALLER se c'e' una sovrapposizione temporale parziale: e' contenuto nel ROOT file associato |
|
|
3 =BIGGER se c'e' una sovrapposizione temporale parziale: contiene il ROOT file associato |
|
|
*/ |
|
| 142 |
|
|
| 143 |
|
|
| 144 |
bool merge_ROOTfiles(); |
bool merge_ROOTfiles(); |
| 162 |
double bad_perc, |
double bad_perc, |
| 163 |
unsigned int ID_record, type_Rel_ROOT type_rel); |
unsigned int ID_record, type_Rel_ROOT type_rel); |
| 164 |
|
|
| 165 |
//unsigned int Return_IDN_merging(char* table_name, unsigned long int mtime_init, unsigned long int mtime_last, type_Rel_ROOT type_rel); |
//search in DB if there are ROOT files in the temporal range of interest and with the given relation |
| 166 |
TSQLResult* Select_merging(char* table_name, unsigned long int mtime_init, unsigned long int mtime_last, type_Rel_ROOT type_rel); |
TSQLResult* Select_merging(char* table_name, unsigned long int mtime_init, unsigned long int mtime_last, type_Rel_ROOT type_rel); |
| 167 |
|
|
| 168 |
//Lock the tableTobeLocked table or all the tables I know if par=NULL |
//Lock the tableTobeLocked table or all the tables I know if par=NULL |
| 169 |
int LockTables(char* tableTobeLocked); |
int LockTables(char* tableTobeLocked); |