Changeset 7400 for trunk/MagicSoft/Mars/datacenter/macros
- Timestamp:
- 11/14/05 14:34:24 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/macros/insertsequence.C
r7370 r7400 84 84 if (dummy) 85 85 { 86 cout << query << endl;86 cout << "Q:" << query << endl; 87 87 return 0; 88 88 } … … 90 90 res=serv.Query(query); 91 91 if (!res) 92 { 93 cout << "Error in query " << query << endl; 92 94 return -1; 95 } 93 96 94 97 delete res; … … 122 125 cout << endl; 123 126 124 TString sequnum=filename; 125 sequnum=sequnum.Remove(0,30); 126 sequnum=sequnum.Remove(8); 127 TString sequnum; 128 sequnum=sequ.GetValue("Sequence", ""); 127 129 Int_t seq=atoi(sequnum.Data()); 128 130 … … 135 137 return 0; 136 138 } 139 140 TString sourcename = sequ.GetValue("Source", ""); 141 Int_t sourcekey = QueryNameKEY(serv, dummy, "Source", sourcename.Data()); 137 142 138 143 TString query="SELECT max(fRunNumber), min(fRunStart), "; … … 143 148 144 149 cout << "runs: " << runs << endl; 145 cout << "q : " << query << endl;150 cout << "q1: " << query << endl; 146 151 147 152 TSQLResult *res = serv.Query(query); … … 166 171 query +=Form("fL2TriggerTableKEY FROM RunData WHERE fRunNumber=%d", seq); 167 172 168 cout << "q : " << query << endl;173 cout << "q2: " << query << endl; 169 174 170 175 res = serv.Query(query); … … 185 190 delete res; 186 191 187 cout << "seq: " << seq << endl; 188 cout << " lastrun " << lastrun << endl; 189 cout << " startime " << starttime << endl; 190 cout << " uptime " << uptime << endl; 191 cout << " zdmin " << zdmin << endl; 192 cout << " zdmax " << zdmax << endl; 193 cout << " azmin " << azmin << endl; 194 cout << " azmax " << azmax << endl; 195 cout << " numevts " << numevts << endl; 196 cout << " keys:" << endl; 197 cout << " project " << project << endl; 198 cout << " source " << source << endl; 199 cout << " hv " << hv << endl; 200 cout << " delay " << delay << endl; 201 cout << " dt " << dt << endl; 202 cout << " testflag " << testflag << endl; 203 cout << " lightcond " << lightcond << endl; 204 cout << " l1tt " << l1tt << endl; 205 cout << " l2tt " << l2tt << endl; 192 cout << "seq: " << seq << endl; 193 cout << " lastrun " << lastrun << endl; 194 cout << " startime " << starttime << endl; 195 cout << " uptime " << uptime << endl; 196 cout << " zdmin " << zdmin << endl; 197 cout << " zdmax " << zdmax << endl; 198 cout << " azmin " << azmin << endl; 199 cout << " azmax " << azmax << endl; 200 cout << " numevts " << numevts << endl; 201 cout << " keys:" << endl; 202 cout << " project " << project << endl; 203 cout << " source1 " << source << " (from db -> run " << seq << ") " << endl; 204 cout << " source2 " << sourcekey << " (from sequ file) " << endl; 205 if (!(atoi(source.Data())==sourcekey)) 206 { 207 cout << "new source name: " << sourcename << " -> inserting..." << endl; 208 sourcekey = QueryNameKEY(serv, dummy, "Source", sourcename.Data(), kFALSE); 209 source=Form("%d",sourcekey); 210 } 211 cout << " source " << source << endl; 212 cout << " hv " << hv << endl; 213 cout << " delay " << delay << endl; 214 cout << " dt " << dt << endl; 215 cout << " testflag " << testflag << endl; 216 cout << " lightcond " << lightcond << endl; 217 cout << " l1tt " << l1tt << endl; 218 cout << " l2tt " << l2tt << endl; 206 219 207 220 TString query1="INSERT Sequences SET fManuallyChangedKEY=2, ";
Note:
See TracChangeset
for help on using the changeset viewer.