- Timestamp:
- 02/25/06 18:31:03 (19 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/macros
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/macros/buildsequenceentries.C
r7460 r7528 72 72 // has to be removed from the database 73 73 // 74 // If nothing failes 1 is returned. In the case of an error 0 is returned. 74 // If nothing failes 1 is returned. In the case of an error 2 and if 75 // there's no connection to the database 0 is returned. 75 76 // This is needed for the scripts that execute the macro. 76 77 // … … 813 814 TSQLResult *res = serv.Query(query); 814 815 if (!res) 815 return 0;816 return 2; 816 817 817 818 //build blocks of runs, which have the same values … … 875 876 res = serv.Query(query); 876 877 if (!res) 877 return 0;878 return 2; 878 879 879 880 cout << "old sequences: " << flush; … … 911 912 cout << "sequ: " << obj->GetName() << " deleting... " << endl; 912 913 if (!DeleteSequence(serv, datapath, sequpath, atoi(obj->GetName()), dummy)) 913 return 0;914 } 915 916 return rc ? 1 : 0;914 return 2; 915 } 916 917 return rc ? 1 : 2; 917 918 } 918 919 … … 936 937 TSQLResult *res = serv.Query(query); 937 938 if (!res) 938 return 0;939 return 2; 939 940 940 941 //execute buildsequenceentries for all dates -
trunk/MagicSoft/Mars/datacenter/macros/checkfileavail.C
r7503 r7528 38 38 // from there the runnumbers 39 39 // 40 // the macro returns 0, if a file is missing, and 1 if all files are there 40 // the macro returns 0, if there's no connection to the database, 2, if a 41 // file is missing, and 1 if all files are there 41 42 // the return value is checked by the script, that executes the macro 42 43 // -
trunk/MagicSoft/Mars/datacenter/macros/checkstardone.C
r7503 r7528 36 36 // .x checkstardone.C+("sequencenumber") 37 37 // 38 // the macro returns 0, if for the sequence star is not done, and 1 if star39 // has been done38 // the macro returns 0, if there's no connection to the database, 2, if a 39 // file is missing, and 1 if all files are there 40 40 // the return value is checked by the script, that executes the macro 41 41 // -
trunk/MagicSoft/Mars/datacenter/macros/doexclusions.C
r7486 r7528 53 53 // condition in this example), the line is commented out 54 54 // 55 // Returns 2 in case of failure, 1 in case of success and 0 if the connection 56 // to the database is not working. 57 // 55 58 ///////////////////////////////////////////////////////////////////////////// 56 59 #include <iostream> … … 136 139 if (startrun<0 || stoprun<0) 137 140 { 138 cout << "wrong format of date" << endl; 139 return 0; 140 } 141 cout << "wrong format of runno" << endl; 142 return 2; 143 } 144 //if no run for date is available, GetRunNumber() returns 0 141 145 if (startrun==0 || stoprun==0) 142 146 return 1; … … 153 157 if (!res) 154 158 { 155 cout << "Error - could not do any automatic excludes " << endl;156 return 0;159 cout << "Error - could not do any automatic excludes." << endl; 160 return 2; 157 161 } 158 162 … … 173 177 if (!res) 174 178 { 175 cout << "Error " << endl;176 return 0;179 cout << "Error - could not get importance." << endl; 180 return 2; 177 181 } 178 182 … … 210 214 { 211 215 cout << "Error - no runs to exclude" << endl; 212 return 0;216 return 2; 213 217 } 214 218 … … 227 231 { 228 232 cout << "Error - could not insert exclusion" << endl; 229 return 0;233 return 2; 230 234 } 231 235 delete res; -
trunk/MagicSoft/Mars/datacenter/macros/fillcalib.C
r7460 r7528 55 55 // file called sql.rc and the resource file is found. 56 56 // 57 // Returns 0 in case of failure and 1 in case of success. 57 // Returns 2 in case of failure, 1 in case of success and 0 if the connection 58 // to the database is not working. 58 59 // 59 60 ///////////////////////////////////////////////////////////////////////////// … … 115 116 { 116 117 cout << "ERROR - Could not find file " << fname << endl; 117 return 0;118 return 2; 118 119 } 119 120 … … 121 122 { 122 123 cout << "ERROR - Reading of MBadPixelsCam failed." << endl; 123 return 0;124 return 2; 124 125 } 125 126 … … 147 148 148 149 if (unsin<0 || unsout<0 || unrin<0 || unrout<0 || isoin<0 || isoout<0 || clumax<0) 149 return 0; 150 { 151 cout << "ERROR - one of the pixel values < 0." << endl; 152 return 2; 153 } 150 154 151 155 // MHCamera hist(geom); … … 158 162 MStatusArray arr; 159 163 if (arr.Read()<=0) 160 return 0; 164 { 165 cout << "ERROR - could not read MStatusArray." << endl; 166 return 2; 167 } 161 168 162 169 TH1 *h; … … 167 174 { 168 175 cout << "WARNING - Could not find histogram HRelTimeHiGainArea0." << endl; 169 return 0;176 return 2; 170 177 } 171 178 … … 183 190 { 184 191 cout << "WARNING - Could not find histogram HRelTimeHiGainArea1." << endl; 185 return 0;192 return 2; 186 193 } 187 194 … … 199 206 { 200 207 cout << "WARNING - Could not find MHCamera TotalConv." << endl; 201 return 0;208 return 2; 202 209 } 203 210 … … 221 228 { 222 229 cout << "WARNING - Could get sequence# from filename: " << fname << endl; 223 return 0;230 return 2; 224 231 } 225 232 … … 289 296 290 297 if (dummy) 291 return 0;298 return 1; 292 299 293 300 TSQLResult *res = serv.Query(query); … … 295 302 { 296 303 cout << "ERROR - Query failed: " << query << endl; 297 return 0;304 return 2; 298 305 } 299 306 delete res; -
trunk/MagicSoft/Mars/datacenter/macros/filldotraw.C
r7460 r7528 51 51 // file called sql.rc and the resource file is found. 52 52 // 53 // Returns 0 in case of failure and 1 in case of success. 53 // Returns 2 in case of failure, 1 in case of success and 0 if the connection 54 // to the database is not working. 54 55 // 55 56 ///////////////////////////////////////////////////////////////////////////// … … 153 154 const Int_t key = MagicNumber(serv, h); 154 155 if (key<0) 155 return 0;156 return 2; 156 157 157 158 TString query(Form("UPDATE RunData SET fMagicNumberKEY=%d, fFormatVersion=%d WHERE fRunNumber=%d", … … 162 163 { 163 164 cout << "ERROR - Query failed: " << query << endl; 164 return 0;165 return 2; 165 166 } 166 167 … … 215 216 { 216 217 cout << "ERROR - Query failed: " << query << endl; 217 return 0;218 return 2; 218 219 } 219 220 … … 247 248 { 248 249 cout << "ERROR - there's are " << count << " files. " << endl; 249 return 0;250 return 2; 250 251 } 251 252 -
trunk/MagicSoft/Mars/datacenter/macros/fillganymed.C
r7486 r7528 48 48 // file called sql.rc and the resource file is found. 49 49 // 50 // Returns 0 in case of failure and 1 in case of success. 50 // Returns 2 in case of failure, 1 in case of success and 0 if the connection 51 // to the database is not working. 51 52 // 52 53 ///////////////////////////////////////////////////////////////////////////// … … 107 108 { 108 109 cout << "ERROR - Could not find file " << fname << endl; 109 return 0;110 return 2; 110 111 } 111 112 … … 117 118 { 118 119 cout << "WARNING - Reading of MAlphaFitter failed." << endl; 119 return 0;120 return 2; 120 121 } 121 122 … … 133 134 { 134 135 cout << "ERROR - Reading of MStatusDisplay failed." << endl; 135 return 0;136 return 2; 136 137 } 137 138 … … 140 141 { 141 142 cout << "WARNING - Reading of Theta failed." << endl; 142 return kFALSE;143 return 2; 143 144 } 144 145 … … 151 152 { 152 153 cout << "WARNING - Could get dataset# from filename: " << fname << endl; 153 return 0;154 return 2; 154 155 } 155 156 … … 203 204 cout << "q: " << query << endl; 204 205 if (dummy) 205 return 0;206 return 1; 206 207 207 208 TSQLResult *res = serv.Query(query); … … 209 210 { 210 211 cout << "ERROR - Query failed: " << query << endl; 211 return 0;212 return 2; 212 213 } 213 214 return 1; -
trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C
r7460 r7528 52 52 // file called sql.rc and the resource file is found. 53 53 // 54 // Returns 0 in case of failure and 1 in case of success. 54 // Returns 2 in case of failure, 1 in case of success and 0 if the connection 55 // to the database is not working. 55 56 // 56 57 ///////////////////////////////////////////////////////////////////////////// … … 79 80 { 80 81 cout << "ERROR - Could not find file " << fname << endl; 81 return 0;82 return 2; 82 83 } 83 84 … … 100 101 { 101 102 cout << "ERROR - Reading of MStatusDisplay failed." << endl; 102 return 0;103 return 2; 103 104 } 104 105 … … 107 108 { 108 109 cout << "WARNING - Reading of PedRMS;avg failed." << endl; 109 return 0;110 return 2; 110 111 } 111 112 … … 114 115 { 115 116 cout << "WARNING - Reading of PulsePos;avg failed." << endl; 116 return 0;117 return 2; 117 118 } 118 119 … … 133 134 cout << "MeanPedRMS inner " << meanrmsi << endl; 134 135 cout << "MeanPedRMS outer " << meanrmso << endl; 135 return 0;136 return 2; 136 137 } 137 138 … … 143 144 { 144 145 cout << "WARNING - Reading of Interp'd;avg failed." << endl; 145 return 0;146 return 2; 146 147 } 147 148 … … 154 155 cout << "MeanInterp'd inner " << meansigi << endl; 155 156 cout << "MeanInterp'd outer " << meansigo << endl; 156 return 0;157 return 2; 157 158 } 158 159 … … 168 169 cout << "PulsePos'd mean " << meanpul << endl; 169 170 cout << "PulsePos'd rms " << rmspul << endl; 170 return 0;171 return 2; 171 172 } 172 173 … … 180 181 cout << "WARNING - Sequ# empty" << endl; 181 182 cout << "Sequ# " << sequence << endl; 182 return 0;183 return 2; 183 184 } 184 185 … … 226 227 227 228 if (dummy) 228 return 0;229 return 1; 229 230 230 231 TSQLResult *res = serv.Query(query); … … 232 233 { 233 234 cout << "ERROR - Query failed: " << query << endl; 234 return 0;235 return 2; 235 236 } 236 237 -
trunk/MagicSoft/Mars/datacenter/macros/fillsinope.C
r7486 r7528 54 54 // file called sql.rc and the resource file is found. 55 55 // 56 // Returns 0 in case of failure and 1 in case of success. 56 // Returns 2 in case of failure, 1 in case of success and 0 if the connection 57 // to the database is not working. 57 58 // 58 59 ///////////////////////////////////////////////////////////////////////////// … … 136 137 { 137 138 cout << "ERROR - Query failed: " << query << endl; 138 return kFALSE;139 return 2; 139 140 } 140 141 delete res; … … 168 169 { 169 170 cout << "ERROR - Query failed: " << query << endl; 170 return 0;171 return 2; 171 172 } 172 173 … … 186 187 { 187 188 cout << "ERROR - Query failed: " << query << endl; 188 return 0;189 return 2; 189 190 } 190 191 } … … 201 202 //process dat-file 202 203 rc=Process(serv, fname, runno, kFALSE, dummy); 203 if (rc== 0)204 if (rc==2) 204 205 return rc; 205 206 -
trunk/MagicSoft/Mars/datacenter/macros/fillstar.C
r7460 r7528 52 52 // file called sql.rc and the resource file is found. 53 53 // 54 // Returns 0 in case of failure and 1 in case of success. 54 // Returns 2 in case of failure, 1 in case of success and 0 if the connection 55 // to the database is not working. 55 56 // 56 57 ///////////////////////////////////////////////////////////////////////////// … … 113 114 { 114 115 cout << "ERROR - Could not find file " << fname << endl; 115 return 0;116 return 2; 116 117 } 117 118 … … 121 122 { 122 123 cout << "ERROR - Reading of MStatusDisplay failed." << endl; 123 return 0;124 return 2; 124 125 } 125 126 … … 128 129 { 129 130 cout << "WARNING - Reading of MHHillas failed." << endl; 130 return 0;131 return 2; 131 132 } 132 133 … … 135 136 { 136 137 cout << "WARNING - Reading of MHMuon failed." << endl; 137 return 0;138 return 2; 138 139 } 139 140 … … 165 166 { 166 167 cout << "WARNING - Reading of Islands failed." << endl; 167 return 0;168 return 2; 168 169 } 169 170 … … 176 177 { 177 178 cout << "WARNING - Reading of EffOnTheta failed." << endl; 178 return 0;179 return 2; 179 180 } 180 181 … … 189 190 { 190 191 cout << "WARNING - Reading of ProjDeltaT failed." << endl; 191 return 0;192 return 2; 192 193 } 193 194 … … 199 200 { 200 201 cout << "WARNING - Reading of Humidity failed." << endl; 201 return 0;202 return 2; 202 203 } 203 204 … … 210 211 { 211 212 cout << "WARNING - Could get sequence# from filename: " << fname << endl; 212 return 0;213 return 2; 213 214 } 214 215 … … 268 269 269 270 if (dummy) 270 return 0;271 return 1; 271 272 272 273 TSQLResult *res = serv.Query(query); … … 274 275 { 275 276 cout << "ERROR - Query failed: " << query << endl; 276 return 0;277 return 2; 277 278 } 278 279 -
trunk/MagicSoft/Mars/datacenter/macros/resetcolumn.C
r7460 r7528 46 46 // file called sql.rc and the resource file is found. 47 47 // 48 // Returns 0 in case of failure and 1 in case of success. 48 // Returns 2 in case of failure, 1 in case of success and 0 if the connection 49 // to the database is not working. 49 50 // 50 51 ///////////////////////////////////////////////////////////////////////////// … … 121 122 TSQLResult *res = serv.Query(query); 122 123 if (!res) 123 return 0;124 return 2; 124 125 125 126 delete res; -
trunk/MagicSoft/Mars/datacenter/macros/writesequencefile.C
r7460 r7528 38 38 // file called sql.rc and the resource file is found. 39 39 // 40 // Returns 0 in case of failure and 1 in case of success. 40 // Returns 2 in case of failure, 1 in case of success and 0 if the connection 41 // to the database is not working. 41 42 // 42 43 ///////////////////////////////////////////////////////////////////////////// … … 349 350 while ((row = res->Next())) 350 351 if (!GetSequence(serv, *row, sequpath)) 351 return 0;352 return 2; 352 353 353 354 delete res;
Note:
See TracChangeset
for help on using the changeset viewer.