Changeset 7777 for trunk/MagicSoft/Mars/datacenter/macros
- Timestamp:
- 07/05/06 11:41:13 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/macros
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/macros/checkfileavail.C
r7528 r7777 77 77 } 78 78 79 TSQLRow *row=0; 80 while ((row = res->Next())) 81 { 82 // TString entry=(*row)[0]; 83 // if (entry=="1970-01-01 00:00:00") 84 // return ""; 85 return (*row)[0]; 86 } 79 TString rc = (*row)[0]; 87 80 88 return ""; 81 delete res; 82 83 return rc; 89 84 } 90 85 … … 138 133 cout << "run#: " << runno << endl; 139 134 //if one value returns "" (i.e. column is NULL), 0 is returned 140 if (GetStatus(serv, rc, runno, "RunProcessStatus", "fCCFileAvail") ==""141 || GetStatus(serv, rc, runno, "RunProcessStatus", "fCaCoFileAvail") ==""142 || GetStatus(serv, rc, runno, "RunProcessStatus", "fCaCoFileFound") ==""143 || GetStatus(serv, rc, runno, "RunProcessStatus", "fTimingCorrection") ==""135 if (GetStatus(serv, rc, runno, "RunProcessStatus", "fCCFileAvail").IsNull() 136 || GetStatus(serv, rc, runno, "RunProcessStatus", "fCaCoFileAvail").IsNull() 137 || GetStatus(serv, rc, runno, "RunProcessStatus", "fCaCoFileFound").IsNull() 138 || GetStatus(serv, rc, runno, "RunProcessStatus", "fTimingCorrection").IsNull() 144 139 // || GetStatus(serv, rc, runno, "RunProcessStatus", "fTimingCorrection")=="1970-01-01 00:00:00" 145 || GetStatus(serv, rc, runno, "RunProcessStatus", "fRawFileAvail") =="")140 || GetStatus(serv, rc, runno, "RunProcessStatus", "fRawFileAvail").IsNull()) 146 141 return 2; 147 142 } -
trunk/MagicSoft/Mars/datacenter/macros/checkstardone.C
r7528 r7777 74 74 } 75 75 76 TSQLRow *row=0; 77 while ((row = res->Next())) 78 return (*row)[0]; 76 TString rc = (*row)[0]; 79 77 80 return ""; 78 delete res; 79 80 return rc; 81 81 } 82 82 … … 100 100 101 101 //check if fStar not NULL for sequence 102 if (GetStatus(serv, rc, datasetno, "SequenceProcessStatus", "fStar") =="")102 if (GetStatus(serv, rc, datasetno, "SequenceProcessStatus", "fStar").IsNull()) 103 103 return 2; 104 104 -
trunk/MagicSoft/Mars/datacenter/macros/doexclusions.C
r7528 r7777 174 174 //get importance of exclusion-reason from database 175 175 TString query(Form("SELECT fExcludedFDAImportance from ExcludedFDA where fExcludedFDAKEY=%s ", key.Data())); 176 TSQLResult *res = serv.Query(query);177 if (!res )176 TSQLResult *res2 = serv.Query(query); 177 if (!res2) 178 178 { 179 179 cout << "Error - could not get importance." << endl; … … 181 181 } 182 182 183 TSQLRow *row2=res ->Next();183 TSQLRow *row2=res2->Next(); 184 184 Int_t newimp=atoi((*row2)[0]); 185 delete res ;185 delete res2; 186 186 187 187 //get current importance from database … … 210 210 cout << query << endl; 211 211 212 res = serv.Query(query);213 if (!res )212 res2 = serv.Query(query); 213 if (!res2) 214 214 { 215 215 cout << "Error - no runs to exclude" << endl; … … 219 219 //compare new and old importance 220 220 //change or keep the exclusion-reason accordingly 221 while ((row2 = res ->Next()))221 while ((row2 = res2->Next())) 222 222 { 223 223 if (TString((*row2)[1]).IsNull() || atoi((*row2)[1])>newimp) … … 227 227 key.Data(), (*row2)[0])); 228 228 cout << "QU: " << query << endl; 229 TSQLResult *res = serv.Query(query);230 if (!res )229 TSQLResult *res3 = serv.Query(query); 230 if (!res3) 231 231 { 232 232 cout << "Error - could not insert exclusion" << endl; 233 233 return 2; 234 234 } 235 delete res ;235 delete res3; 236 236 continue; 237 237 } … … 239 239 cout << "run#: " << (*row2)[0] << " reason for exclusion is still the same" << endl; 240 240 } 241 delete res ;241 delete res2; 242 242 } 243 243 delete res; -
trunk/MagicSoft/Mars/datacenter/macros/filldotraw.C
r7635 r7777 94 94 } 95 95 96 return atoi((*row)[0]); 96 Int_t rc = atoi((*row)[0]); 97 98 delete res; 99 100 return rc; 97 101 } 98 102 … … 168 172 return 2; 169 173 } 170 174 delete res; 171 175 return 1; 172 176 } -
trunk/MagicSoft/Mars/datacenter/macros/fillganymed.C
r7528 r7777 212 212 return 2; 213 213 } 214 delete res; 214 215 return 1; 215 216 } -
trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C
r7528 r7777 235 235 return 2; 236 236 } 237 237 delete res; 238 238 return 1; 239 239 } -
trunk/MagicSoft/Mars/datacenter/macros/fillstar.C
r7759 r7777 337 337 return 2; 338 338 } 339 delete res; 339 340 340 341 return 1; -
trunk/MagicSoft/Mars/datacenter/macros/setupdb.C
r7761 r7777 140 140 fields += ", "; 141 141 } 142 143 delete res; 142 144 143 145 return fields;
Note:
See TracChangeset
for help on using the changeset viewer.