21 |
|
|
22 |
#include <GLTables.h> |
#include <GLTables.h> |
23 |
|
|
24 |
#include <cTle.h> |
#include <sgp4.h> |
25 |
|
|
26 |
using namespace pamela; |
using namespace pamela; |
27 |
|
|
57 |
UInt_t id; |
UInt_t id; |
58 |
UInt_t idroot; |
UInt_t idroot; |
59 |
UInt_t pktfirst; |
UInt_t pktfirst; |
60 |
ULong64_t obtfirst; |
UInt_t obtfirst; |
61 |
ULong64_t upperobt; |
Long64_t upperobt; |
62 |
UInt_t upperpkt; |
Long64_t upperpkt; |
63 |
UInt_t upperentry; |
UInt_t upperentry; |
64 |
Int_t rtev; |
Int_t rtev; |
65 |
Int_t rhev; |
Int_t rhev; |
86 |
Bool_t INSERT_RAW; |
Bool_t INSERT_RAW; |
87 |
Bool_t INSERT_ROOT; |
Bool_t INSERT_ROOT; |
88 |
Bool_t VALIDATE; |
Bool_t VALIDATE; |
89 |
|
Bool_t NOFRAG; |
90 |
|
Bool_t AUTOBOOT; |
91 |
|
|
92 |
TDatime *clean_time; |
TDatime *clean_time; |
93 |
|
|
152 |
void FillClass(Bool_t mishead, Bool_t mistrail, UInt_t firstev, UInt_t lastev); |
void FillClass(Bool_t mishead, Bool_t mistrail, UInt_t firstev, UInt_t lastev); |
153 |
void HandleTRK_CALIB(Bool_t pk1, Bool_t pk2); |
void HandleTRK_CALIB(Bool_t pk1, Bool_t pk2); |
154 |
// |
// |
155 |
|
void RemoveCALIBS(); |
156 |
|
void ValidationOFF(); |
157 |
|
void ReArrangeRUNS(); |
158 |
|
void RemoveRUNS(); |
159 |
|
void RemoveFILES(); |
160 |
|
// |
161 |
Bool_t IsDebug(){return(debug);}; |
Bool_t IsDebug(){return(debug);}; |
162 |
Bool_t IsRunAlreadyInserted(); |
Bool_t IsRunAlreadyInserted(); |
163 |
Bool_t IsRunConsistent(Bool_t mishead, Bool_t mistrail, UInt_t &firstev, UInt_t &lastev); |
Bool_t IsRunConsistent(Bool_t mishead, Bool_t mistrail, UInt_t &firstev, UInt_t &lastev); |
164 |
|
Bool_t AutoBoot(){return(AUTOBOOT);}; |
165 |
// |
// |
166 |
Bool_t MissingTRK_CALIB(UInt_t t1,UInt_t t2); |
Bool_t MissingTRK_CALIB(UInt_t t1,UInt_t t2); |
167 |
// |
// |
168 |
UInt_t PKT(UInt_t pkt_num); |
Long64_t PKT(UInt_t pkt_num); |
169 |
// |
// |
170 |
ULong64_t OBT(UInt_t obt); |
Long64_t OBT(UInt_t obt); |
171 |
// |
// |
172 |
UInt_t AssignRunID(); |
UInt_t AssignRunID(); |
173 |
|
|
177 |
|
|
178 |
public: |
public: |
179 |
// |
// |
180 |
PamelaDBOperations(TString host, TString user, TString password, TString filerawname, TString filerootname, UInt_t boot, UInt_t tsync, UInt_t obt0, Bool_t debug, TString tlefilename); // constructor |
PamelaDBOperations(TString host, TString user, TString password, TString filerawname, TString filerootname, UInt_t boot, UInt_t tsync, UInt_t obt0, Bool_t debug, TString tlefilename,UInt_t dwinput); // constructor |
181 |
// |
// |
182 |
void Close(); // destructor |
void Close(); // destructor |
183 |
// |
// |
197 |
void SetNOBOOT(Bool_t noboot); |
void SetNOBOOT(Bool_t noboot); |
198 |
void SetOlderThan(Long64_t oldthan); |
void SetOlderThan(Long64_t oldthan); |
199 |
void SetTLEPath(TString str); |
void SetTLEPath(TString str); |
200 |
void SetOrbitNo(); |
void SetOrbitNo(UInt_t dwinput); |
201 |
|
void SetNoFrag(Bool_t nf); |
202 |
|
void SetAutoBoot(Bool_t nf); |
203 |
// |
// |
204 |
Bool_t SetID_RAW(); |
Bool_t SetID_RAW(); |
205 |
// |
// |
225 |
TString GetRootName(){return(filerootname);}; |
TString GetRootName(){return(filerootname);}; |
226 |
TString GetRawName(){return(filerawname);}; |
TString GetRawName(){return(filerawname);}; |
227 |
|
|
228 |
const char* GetCleanTime(){return clean_time->AsSQLString();}; |
const char* GetCleanTime(){return clean_time->AsSQLString();}; |
229 |
// |
// |
230 |
// Functions |
// Functions |
231 |
// |
// |
238 |
Int_t insertTRK_CALIB(); |
Int_t insertTRK_CALIB(); |
239 |
Int_t insertS4_CALIB(); |
Int_t insertS4_CALIB(); |
240 |
Int_t CleanGL_RUN_FRAGMENTS(); |
Int_t CleanGL_RUN_FRAGMENTS(); |
241 |
|
Int_t CleanGL_RUN_FRAGMENTS(TString fcleanfile); |
242 |
Int_t ValidateRuns(); |
Int_t ValidateRuns(); |
243 |
|
Int_t ValidateRuns(TString valfile); |
244 |
Int_t assignVALIDATION(UInt_t ,Bool_t ); |
Int_t assignVALIDATION(UInt_t ,Bool_t ); |
245 |
|
Int_t removeFile(TString rootfilename); |
246 |
// |
// |
247 |
// void OpenFile(); |
// void OpenFile(); |
248 |
void CheckValidate(Long64_t olderthan); |
void CheckValidate(Long64_t olderthan); |
250 |
void CheckFile(); |
void CheckFile(); |
251 |
// |
// |
252 |
|
|
253 |
|
Bool_t NoFrag(){return(NOFRAG);}; |
254 |
Bool_t InsertRoot(){return(INSERT_ROOT);}; |
Bool_t InsertRoot(){return(INSERT_ROOT);}; |
255 |
Bool_t InsertRaw(){return(INSERT_RAW);}; |
Bool_t InsertRaw(){return(INSERT_RAW);}; |
256 |
Bool_t Validate(){return(VALIDATE);}; |
Bool_t Validate(){return(VALIDATE);}; |
257 |
|
|
258 |
// Functions for TLE |
// Functions for TLE |
259 |
Int_t populateTLE(); |
Int_t populateTLE(); |
260 |
|
|
261 |
|
UInt_t ValidateTrkCalib( CalibTrk1Event* calibtrk , EventHeader* h); |
262 |
|
UInt_t ValidateTrkCalib( CalibTrk2Event* calibtrk , EventHeader* h){return ValidateTrkCalib((CalibTrk1Event*)calibtrk,h); }; |
263 |
|
|
264 |
|
UInt_t Check(); |
265 |
|
|
266 |
}; |
}; |
267 |
#endif /* PAMELA_DB_OPERATIONS_H */ |
#endif /* PAMELA_DB_OPERATIONS_H */ |