Changeset 8236
- Timestamp:
- 12/14/06 16:14:35 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/magicdefs.php
r8235 r8236 442 442 "fObjectName" => $fromtable . ".fObjectKEY", 443 443 "fStatusName" => $fromtable . ".fStatusKEY", 444 "fBandName" => $fromtable . ".fBandKEY", 445 "fTelescopeName" => $fromtable . ".fTelescopeKEY", 444 446 ); 445 447 … … 589 591 "fObjectName" => "Object.fObjectName", 590 592 "fStatusName" => "Status.fStatusName", 593 "fBandName" => "Band.fBandName", 594 "fTelescopeName" => "Telescope.fTelescopeName", 591 595 ); 592 596 -
trunk/MagicSoft/Mars/datacenter/macros/filloptical.C
r8215 r8236 89 89 TString query; 90 90 TString select; 91 Int_t statuskey; 92 Int_t objectkey; 93 Int_t fitsfilekey; 91 TString telescope; 92 TString telname; 93 TString ccd; 94 TString filterband; 95 TString filter; 96 TString band; 94 97 Double_t ra=0; 95 98 Double_t dec=0; … … 99 102 TVector3 v; 100 103 104 cout << fname << endl; 105 106 if (fname(TRegexp("20[0-9][0-9]_[0-1][0-9]_[0-3][0-9]_.*_R[_]?[12]?[.]instr", kFALSE)).IsNull()) 107 { 108 cout << "Found not valid file: " << fname << endl; 109 return 2; 110 } 111 101 112 while (1) 102 113 { … … 106 117 break; 107 118 108 if (line =="KVA_Celestron_ST8 KVA_Celestron_R" || line.IsNull())119 if (line.IsNull()) 109 120 continue; 110 121 111 122 TObjArray *arr = line.Tokenize(" "); 123 124 if (line=="KVA_Celestron_ST8 KVA_Celestron_R" || 125 line=="Tuorla_ST1001E Tuorla_R") 126 { 127 if (arr->GetEntries()!=2) 128 { 129 cout << "WARNING: Telescopeline with less or more than 2 arguments found " << endl; 130 return 2; 131 } 132 telescope=(*arr)[0]->GetName(); 133 telname=telescope(0,telescope.First('_')); 134 ccd=telescope(telescope.Last('_')+1, telescope.Length()); 135 filterband=(*arr)[1]->GetName(); 136 filter=filterband(0,filterband.Last('_')); 137 band=filterband(filterband.Last('_')+1, filterband.Length()); 138 continue; 139 } 140 112 141 if (!line(regexp).IsNull()) 113 142 { … … 131 160 { 132 161 cout << "WARNING: Objectline with less or more than 8 arguments found " << endl; 162 cout << line << endl; 133 163 return 2; 134 164 } … … 195 225 cout << " status : " << status << endl << endl; 196 226 */ 197 statuskey = serv.QueryKeyOfName("Status", status.Data()); 198 objectkey = serv.QueryKeyOfName("Object", object.Data()); 199 fitsfilekey = serv.QueryKeyOfName("FitsFile", fitsfile.Data()); 227 Int_t statuskey = serv.QueryKeyOfName("Status", status.Data()); 228 Int_t objectkey = serv.QueryKeyOfName("Object", object.Data()); 229 Int_t fitsfilekey = serv.QueryKeyOfName("FitsFile", fitsfile.Data()); 230 Int_t telkey = serv.QueryKeyOfName("Telescope", telname.Data()); 231 Int_t ccdkey = serv.QueryKeyOfName("CCD", ccd.Data()); 232 Int_t bandkey = serv.QueryKeyOfName("Band", band.Data()); 233 Int_t filterkey = serv.QueryKeyOfName("Filter", filter.Data()); 234 200 235 query=Form("fTimeStamp='%s', fExposure=%s, fFitsFileKEY=%d, " 201 236 "fObjectKEY=%d, fSkyLevel=%s, fFWHM=%s, " 202 237 "fApertureRadius=%s, fInstrumentalMag=%s, " 203 "fInstrumentalMagErr=%s, fStatusKEY=%d, fZenithDistance=", 238 "fInstrumentalMagErr=%s, fStatusKEY=%d, fCCDKEY=%d, " 239 "fFilterKEY=%d, fTelescopeKEY=%d, fBandKEY=%d, " 240 "fZenithDistance=", 204 241 timestamp.Data(), exposure.Data(), fitsfilekey, 205 242 objectkey, skylevel.Data(), fwhm.Data(), 206 243 aperturer.Data(), mag.Data(), magerr.Data(), 207 statuskey );244 statuskey, ccdkey, filterkey, telkey, bandkey); 208 245 209 246 if (ra==0 || dec==0) … … 219 256 } 220 257 221 cout << fname(TRegexp("20[0-9][0-9]_[0-1][0-9]_[0-3][0-9]_ KVA_C_R.*[.]instr", kFALSE))258 cout << fname(TRegexp("20[0-9][0-9]_[0-1][0-9]_[0-3][0-9]_.*_R[_]?[12]?[.]instr", kFALSE)) 222 259 << ": " << setw(2) << numexp << " exposures, " << setw(2) << numstars << " stars" << endl; 223 260 … … 254 291 return process(serv, path); 255 292 256 //fill entries for each runbookfile257 MDirIter Next(path, "2 *_KVA_C_R*.instr", -1);293 //fill entries for each optical data file 294 MDirIter Next(path, "20[0-9][0-9]_[0-1][0-9]_[0-3][0-9]_*_R[_]?[12]?[.]instr", -1); 258 295 while (1) 259 296 {
Note:
See TracChangeset
for help on using the changeset viewer.