Changeset 9005
- Timestamp:
- 07/17/08 15:58:20 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9003 r9005 31 31 - use File-Id to order files 32 32 - added telescope number to all constructors 33 34 * automatic-exclusions.rc: 35 - moved as exclusions.rc to resources and updated contents 36 to new doeclusion.C 37 38 * ganymed.cc: 39 - updated Usage output 40 - added new option to change meximum file size 41 42 * merpp.cc: 43 - merpp also MCameraDC from cc-report 44 45 * datacenter/macros/fillsignal.C: 46 - replaces WARNING by ERROR if an error is returned 47 48 * datacenter/macros/writesequencefile.C: 49 - completely redone using new MSequenceSQL 50 51 * mcamera/MCameraDC.[h,cc]: 52 - added the Interprete member function 53 - made MReportCamera and MReportCurrents friends clases 54 - added fStatus 55 - increased class version accordingly 56 57 * mjobs/MJCalibration.cc, mjobs/MJPedestal.cc: 58 - tiny changes to output 59 60 * mreport/MReportCamera.[h,cc]: 61 - removed fStatusDC 62 - removed gkActiveLoadControlVersNum 63 - added interpretation of DC 64 - increased class version by one 65 66 * mreport/MReportCurrents.cc: 67 - moved interpretation of DCs to MCameraDC 68 69 * resources/sequences.rc: 70 - changed some comments 71 - added telescope number to rules 72 33 73 34 74 -
trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C
r8999 r9005 114 114 if (!cam) 115 115 { 116 cout << " WARNING- Reading of PedRMS;avg failed." << endl;116 cout << "ERROR - Reading of PedRMS;avg failed." << endl; 117 117 return 2; 118 118 } … … 122 122 if (!pul) 123 123 { 124 cout << " WARNING- Reading of PulsePos;avg failed." << endl;124 cout << "ERROR - Reading of PulsePos;avg failed." << endl; 125 125 return 2; 126 126 } … … 129 129 if (!difflo) 130 130 { 131 cout << " WARNING- Reading of DiffLo;avg failed." << endl;131 cout << "ERROR - Reading of DiffLo;avg failed." << endl; 132 132 return 2; 133 133 } … … 135 135 if (!diffhi) 136 136 { 137 cout << " WARNING- Reading of DiffHi;avg failed." << endl;137 cout << "ERROR - Reading of DiffHi;avg failed." << endl; 138 138 return 2; 139 139 } … … 144 144 if (sequence.IsNull()) 145 145 { 146 cout << " WARNING- Sequ# empty" << endl;146 cout << "ERROR - Sequ# empty" << endl; 147 147 cout << "Sequ# " << sequence << endl; 148 148 return 2; … … 161 161 if (!hilooff) 162 162 { 163 cout << " WARNING- Reading of HiLoOff failed." << endl;163 cout << "ERROR - Reading of HiLoOff failed." << endl; 164 164 return 2; 165 165 } … … 168 168 if (!hilocal) 169 169 { 170 cout << " WARNING- Reading of HiLoCal failed." << endl;170 cout << "ERROR - Reading of HiLoCal failed." << endl; 171 171 return 2; 172 172 } … … 191 191 if (meanrmsi<0 || meanrmso<0) 192 192 { 193 cout << " WARNING- MeanPedRMS inner or outer < 0 " << endl;193 cout << "ERROR - MeanPedRMS inner or outer < 0 " << endl; 194 194 cout << "MeanPedRMS inner " << meanrmsi << endl; 195 195 cout << "MeanPedRMS outer " << meanrmso << endl; … … 203 203 if (!cam) 204 204 { 205 cout << " WARNING- Reading of Interp'd;avg failed." << endl;205 cout << "ERROR - Reading of Interp'd;avg failed." << endl; 206 206 return 2; 207 207 } … … 212 212 if (meansigi<0 || meansigo<0) 213 213 { 214 cout << " WARNING- MeanInterp'd inner or outer < 0 " << endl;214 cout << "ERRROR - MeanInterp'd inner or outer < 0 " << endl; 215 215 cout << "MeanInterp'd inner " << meansigi << endl; 216 216 cout << "MeanInterp'd outer " << meansigo << endl; … … 225 225 if (pul->GetMean()<0 || pul->GetRMS()<0) 226 226 { 227 cout << " WARNING- PulsePos'd mean or rms < 0 " << endl;227 cout << "ERROR - PulsePos'd mean or rms < 0 " << endl; 228 228 cout << "PulsePos'd mean " << pul->GetMean() << endl; 229 229 cout << "PulsePos'd rms " << pul->GetRMS() << endl; … … 258 258 if (!cam) 259 259 { 260 cout << " WARNING- Reading of Unsuitable;avg failed." << endl;260 cout << "ERROR - Reading of Unsuitable;avg failed." << endl; 261 261 return 2; 262 262 } … … 375 375 376 376 377 return serv.Update("Calibration", vars, Form("fSequenceFirst=%d", seq)) ;377 return serv.Update("Calibration", vars, Form("fSequenceFirst=%d", seq)) ? 1 : 2; 378 378 } 379 379 -
trunk/MagicSoft/Mars/datacenter/macros/writesequencefile.C
r8052 r9005 41 41 // to the database is not working. 42 42 // 43 // 44 // This tool will work from Period017 (2004_05_17) on... 45 // 46 // For more details see MSequence and MSequenceSQL 47 // 43 48 ///////////////////////////////////////////////////////////////////////////// 44 #include <iostream> 45 #include <iomanip> 46 #include <fstream> 47 48 #include <TSQLRow.h> 49 #include <TSQLResult.h> 50 51 #include <TEnv.h> 52 #include <TMath.h> 53 #include <TRegexp.h> 54 55 #include "MAstro.h" 56 #include "MTime.h" 57 #include "MDirIter.h" 58 59 #include "MSQLMagic.h" 49 #include "MSequence.h" 60 50 61 51 using namespace std; 62 52 63 Bool_t GetRuns(MSQLServer &serv, ofstream &fout, TString query, TString name, UInt_t nevts=(UInt_t)-1)53 int writeseq(Int_t sequno, Int_t tel, TString sequpath="") 64 54 { 65 TSQLResult *res = serv.Query(query); 66 if (!res) 67 return kFALSE; 68 69 UInt_t cnt=0; 70 UInt_t evts=0; 71 72 fout << name << ":"; 73 TSQLRow *row=0; 74 while ((row = res->Next()) && evts<nevts) 75 { 76 fout << " " << (*row)[0]; 77 evts += atoi((*row)[1]); 78 cnt++; 79 } 80 fout << endl; 81 82 delete res; 83 84 if (cnt==0) 85 { 86 cout << "ERROR - No " << name << " belonging to this sequence found." << endl; 87 return kFALSE; 88 } 89 90 return kTRUE; 91 } 92 93 TString GetTime(const char *type) 94 { 95 return Form("if(TIME_TO_SEC(fRun%s)<12*60*60," 96 " TIME_TO_SEC(fRun%s)+24*60*60," 97 " TIME_TO_SEC(fRun%s))", type, type, type); 98 } 99 100 Int_t GetTimeC(MSQLServer &serv, const TString &str) 101 { 102 TSQLResult *res = serv.Query(str); 103 if (!res) 104 return -1; 105 106 TSQLRow *row=res->Next(); 107 if (!row) 108 { 109 delete res; 110 return -1; 111 } 112 113 Int_t rc = (*row)[0] ? atoi((*row)[0]) : -1; 114 delete res; 115 return rc; 116 } 117 118 Bool_t GetSequence(MSQLMagic &serv, TSQLRow &data, TString sequpath) 119 { 120 UShort_t y; 121 Byte_t m, d; 122 123 MTime time; 124 time.SetSqlDateTime(data[8]); 125 time.GetDateOfSunrise(y, m, d); 126 127 TString date = Form("%04d-%02d-%02d", y, (int)m, (int)d); 128 129 Int_t period = MAstro::GetMagicPeriod(time.GetMjd()); 130 131 TString str[6]; 132 str[0] = serv.QueryNameOfKey("Project", data[2]); 133 str[1] = serv.QueryNameOfKey("Source", data[3]); 134 str[2] = serv.QueryNameOfKey("L1TriggerTable", data[4]); 135 str[3] = serv.QueryNameOfKey("L2TriggerTable", data[5]); 136 str[4] = serv.QueryNameOfKey("HvSettings", data[6]); 137 str[5] = serv.QueryNameOfKey("LightConditions", data[7]); 138 139 if (str[0].IsNull() || str[1].IsNull() || str[2].IsNull() || str[3].IsNull() || str[4].IsNull() || str[5].IsNull()) 140 return kFALSE; 141 142 //create sequence file 143 TString fname(Form("%s/%04d/sequence%08d.txt", sequpath.Data(), atoi(data[0])/10000, atoi(data[0]))); 144 cout << "Creating " << fname << "..." << flush; 145 146 ofstream fout(fname); 147 if (!fout) 148 { 149 cout << "ERROR - Cannot open file." << endl; 150 return kFALSE; 151 } 152 153 //write information into file 154 fout << "Sequence: " << data[0] << endl; 155 fout << "Period: " << period << endl; 156 fout << "Night: " << date << endl; 157 fout << "LightConditions: " << str[5] << endl; 158 fout << endl; 159 fout << "Start: " << data[8] << endl; 160 fout << "LastRun: " << data[1] << endl; 161 fout << "Project: " << str[0] << endl; 162 fout << "Source: " << str[1] << endl; 163 fout << "ZdMin: " << data[10] << endl; 164 fout << "ZdMax: " << data[11] << endl; 165 fout << "L1TriggerTable: " << str[2] << endl; 166 fout << "L2TriggerTable: " << str[3] << endl; 167 fout << "HvSettings: " << str[4] << endl; 168 fout << "NumEvents: " << data[9] << endl; 169 fout << endl; 170 171 TString where(Form(" FROM RunData WHERE fSequenceFirst=%s AND fExcludedFDAKEY=1" 172 " AND fRunTypeKEY%%s", data[0])); 173 174 TString query1(Form("SELECT fRunNumber, fNumEvents %s", where.Data())); 175 TString query2(Form("SELECT %s %s", GetTime("Start").Data(), where.Data())); 176 TString query3(Form("SELECT %s %s", GetTime("Stop").Data(), where.Data())); 177 178 TString queryA(Form(query1.Data(), " BETWEEN 2 AND 4 ORDER BY fRunNumber")); 179 TString queryC(Form(query1.Data(), "=4 ORDER BY fRunNumber")); 180 TString queryD(Form(query1.Data(), "=2 ORDER BY fRunNumber")); 181 TString queryT(Form(query2.Data(), "=4 ORDER BY fRunNumber LIMIT 1")); 182 183 Int_t timec = GetTimeC(serv, queryT); 184 if (timec<0) 185 { 186 cout << "WARNING - Requesting start time of first calibration run failed." << endl; 187 queryT = Form(query3.Data(), "=4 ORDER BY fRunNumber LIMIT 1"); 188 timec = GetTimeC(serv, queryT); 189 if (timec<0) 190 { 191 cout << "ERROR - Neither start nor stop time of first calibration could be requested." << endl; 192 return kFALSE; 193 } 194 } 195 196 TString query4(Form("=3 ORDER BY ABS(%s-%d) ASC", GetTime("Stop").Data(), timec)); 197 TString queryP(Form(query1.Data(), query4.Data())); 198 199 //write runs into sequence file 200 if (!GetRuns(serv, fout, queryA, "Runs")) 201 return kFALSE; 202 203 fout << endl; 204 205 if (!GetRuns(serv, fout, queryC, "CalRuns")) 206 return kFALSE; 207 if (!GetRuns(serv, fout, queryP, "PedRuns", 1000)) 208 return kFALSE; 209 if (!GetRuns(serv, fout, queryD, "DatRuns")) 210 return kFALSE; 211 212 fout << endl; 213 214 cout << " done <Nevts=" << data[9] << ">" << endl; 215 216 return kTRUE; 217 } 218 219 // This tool will work from Period017 (2004_05_17) on... 220 int writesequencefile(Int_t sequno, TString sequpath) 221 { 222 TEnv env("sql.rc"); 223 224 MSQLMagic serv(env); 55 MSQLMagic serv("sql.rc"); 225 56 if (!serv.IsConnected()) 226 57 { … … 233 64 cout << endl; 234 65 cout << "Connected to " << serv.GetName() << endl; 66 cout << "Sequence: " << sequno << endl; 67 cout << "Telescope: " << tel << endl; 235 68 cout << endl; 236 69 237 //get sequence information from database 238 TString query(Form("SELECT fSequenceFirst, fSequenceLast, fProjectKEY, fSourceKEY," 239 " fL1TriggerTableKEY, fL2TriggerTableKEY, fHvSettingsKEY, " 240 " fLightConditionsKEY, fRunStart, fNumEvents, " 241 " fZenithDistanceMin, fZenithDistanceMax " 242 " FROM Sequences WHERE fSequenceFirst=%d", sequno)); 243 TSQLResult *res = serv.Query(query); 70 const MSequenceSQL s(serv, sequno, tel); 71 if (!s.IsValid()) 72 return 2; 244 73 245 TSQLRow *row = 0; 246 while ((row = res->Next())) 247 if (!GetSequence(serv, *row, sequpath)) 248 return 2; 74 if (sequpath.IsNull()) 75 { 76 s.Print(); 77 return 1; 78 } 249 79 250 delete res;80 const TString fname(Form("%s/%04d/sequence%08d.txt", sequpath.Data(), sequno/10000, sequno)); 251 81 252 cout << endl;82 cout << "File: " << fname << endl; 253 83 254 return 1;84 return s.WriteFile(fname) ? 1 : 2; 255 85 } -
trunk/MagicSoft/Mars/ganymed.cc
r8989 r9005 1 #include <T ROOT.h>1 #include <TTree.h> 2 2 #include <TClass.h> 3 3 #include <TSystem.h> … … 43 43 gLog << " ganymed [options] dataset.txt|number" << endl << endl; 44 44 gLog << " Arguments:" << endl; 45 gLog << " dataset.txt: ASCII file defining a collection of datasets/sequences"<< endl;46 gLog << " (for more details see MSequence/MDataSet)" << endl;47 gLog << " number: The dataset number (using file in the datacenter)" << endl;48 gLog << " For more details see MDataSet." << endl;45 gLog << " dataset.txt: File defining a collection of datasets/sequences" << endl; 46 gLog << " (for more details see MSequence/MDataSet)" << endl; 47 gLog << " number: The dataset number (using file in the datacenter)" << endl; 48 gLog << " For more details see MDataSet." << endl; 49 49 gLog << " Root Options:" << endl; 50 gLog << " -b Batch mode (no graphical output to screen)" << endl<<endl; 50 gLog << " -b Batch mode (no graphical output to screen)" << endl; 51 gLog << endl; 51 52 gLog << " Operation Mode:" << endl; 52 gLog << " -mc Monte Carlo dataset (no times)" << endl; 53 gLog << " --wobble Force wobble mode (overwrites dataset)" << endl; 54 gLog << " --no-wobble Force normal mode (overwrites dataset)" << endl << endl; 53 gLog << " -mc Monte Carlo dataset (no times)" << endl; 54 gLog << " --wobble Force wobble mode (overwrites dataset)" << endl; 55 gLog << " --no-wobble Force normal mode (overwrites dataset)" << endl; 56 gLog << endl; 55 57 gLog << " Options:" << endl; 56 58 gLog.Usage(); 57 gLog << " --debug-env=0 Disable debugging setting resources <default>" << endl; 58 gLog << " --debug-env[=1] Display untouched resources after program execution" << endl; 59 gLog << " --debug-env=2 Display untouched resources after eventloop setup" << endl; 60 gLog << " --debug-env=3 Debug setting resources from resource file and command line" << endl; 59 gLog << " --debug-env=0 Disable debugging setting resources <default>" << endl; 60 gLog << " --debug-env[=1] Display untouched resources after execution" << endl; 61 gLog << " --debug-env=2 Display untouched resources after eventloop setup" << endl; 62 gLog << " --debug-env=3 Debug setting resources from resource file and" << endl; 63 gLog << " command line" << endl; 61 64 gLog << " --debug-mem Debug memory usage" << endl << endl; 62 gLog << " --rc=Name:option Set or overwrite a resource of the resource file." << endl;63 gLog << " (Note, th at this option can be used multiple times."<< endl;65 gLog << " --rc=Name:option Set or overwrite a resource of the resource file." << endl; 66 gLog << " (Note, this option can be used multiple times)" << endl; 64 67 gLog << endl; 65 68 gLog << " -q Quit when job is finished" << endl; 66 69 gLog << " -f Force overwrite of existing files" << endl; 67 gLog << " --n=number Analysis number (required if not in dataset file)" << endl;68 gLog << " --dataset=number Choose a dataset from a collection of datasets in your file"<< endl;69 gLog << " (for more details see MDataSet)"<< endl;70 gLog << " --out=path Path to write all output to [def=local path]" << endl;71 gLog << " --ind=path Path to data/star files [default=datacenter path]" << endl;72 gLog << " --ins=path Path to sequence files [default=datacenter path]" << endl;73 gLog << " --outf=filename Filename for output file (eg. status display)" << endl;70 gLog << " --n=number Analysis number (required if not in dataset file)" << endl; 71 gLog << " --dataset=number Choose a dataset from a collection of datasets" << endl; 72 gLog << " in your file (for more details see MDataSet)" << endl; 73 gLog << " --out=path Path to write all output to [def=local path]" << endl; 74 gLog << " --ind=path Path to data/star files [default=datacenter path]" << endl; 75 gLog << " --ins=path Path to sequence files [default=datacenter path]" << endl; 76 gLog << " --outf=filename Filename for output file (eg. status display)" << endl; 74 77 gLog << " --sum[=filename] Enable writing of summary file (events after cut0)" << endl; 75 78 // gLog << " --res[=filename] Enable writing of result file (surviving events)" << endl; 76 gLog << " --skip-res Disable writing of result events" << endl;77 gLog << " --write-only Only write output files. No histograms filled." << endl;78 gLog << " --print-ds Print the informationinterpreted from the dataset file" << endl;79 gLog << " --print-files Print files taken from sequences ('+' found, '-' missing)" << endl;79 gLog << " --skip-res Disable writing of result events" << endl; 80 gLog << " --write-only Only write output files. No histograms filled." << endl; 81 gLog << " --print-ds Print dataset as interpreted from the dataset file" << endl; 82 gLog << " --print-files Print files from sequences, '+' found, '-' missing" << endl; 80 83 // gLog << " --full-display Show as many plots as possible" << endl; 81 gLog << " --config=ganymed.rc Resource file [default=ganymed.rc]" << endl; 82 gLog << endl; 83 gLog << " --version, -V Show startup message with version number" << endl; 84 gLog << " --config=ganymed.rc Resource file [default=ganymed.rc]" << endl; 85 gLog << endl; 86 gLog << " --max-file-size=number Sets the maximum size before root opens a new file" << endl; 87 gLog << " automatically. The number is given in kB (1000b)." << endl; 88 gLog << " Use this option with caution it can result in" << endl; 89 gLog << " extremely large files (especially summary files)," << endl; 90 gLog << " use (e.g. lower size) cuts instead to decrease" << endl; 91 gLog << " the file size. Root's default is 1.9GB." << endl; 92 gLog << endl; 93 gLog << " --version, -V Show startup message with version number" << endl; 84 94 gLog << " -?, -h, --help This help" << endl << endl; 85 95 gLog << "Background:" << endl; … … 89 99 gLog << " 1,070,000km. It has a magnetic field and probably has a molten iron" << endl; 90 100 gLog << " core. It takes Ganymed 7.15 days to orbit Jupiter. Its mass is" << endl; 91 gLog << " 1.5e23kg. It was independently discovered by Galileo and S.Marius in" << endl;101 gLog << " 1.5e23kg. It was independently discovered by Galileo and S.Marius in" << endl; 92 102 gLog << " 1610. Ganymed is the largest moon in the solar system; it is also" << endl; 93 103 gLog << " larger than the planets Mercury and Pluto." << endl << endl; … … 98 108 if (!MARS::CheckRootVer()) 99 109 return 0xff; 110 111 // FIXME: Record command line to file!!! 100 112 101 113 MLog::RedirectErrorHandler(MLog::kColor); … … 146 158 const TString kNameSummary = arg.GetStringAndRemove("--sum="); 147 159 const Bool_t kSkipResult = arg.HasOnlyAndRemove("--skip-res"); 160 148 161 // const Bool_t kWriteResult = arg.HasOnlyAndRemove("--res"); 149 162 // const TString kNameResult = arg.GetStringAndRemove("--res="); 163 164 TTree::SetMaxTreeSize((Long64_t)arg.GetIntAndRemove("--max-file-size=", TTree::GetMaxTreeSize()/1000)*1000); 150 165 151 166 if (kWobbleModeOn && kWobbleModeOff) -
trunk/MagicSoft/Mars/mcamera/MCameraDC.h
r7489 r9005 15 15 class MCameraDC : public MParContainer, public MCamEvent 16 16 { 17 friend class MReportCamera; 18 friend class MReportCurrents; 17 19 private: 18 TArrayF fArray; // [nA] Unsigned Int! 20 Byte_t fStatus; // CaCo monitored status of the High Voltage [0-9], Cam.HV.PS_state 21 22 TArrayF fArray; // [nA] Unsigned Int! 23 24 Int_t Interprete(TString &str, Int_t len=0); 19 25 20 26 public: 21 27 MCameraDC(Int_t size=577, const char *name=NULL, const char *title=NULL); 28 29 Byte_t GetStatus() const { return fStatus; } 22 30 23 31 void SetCurrent(Int_t i, Float_t val) { fArray[i] = (Int_t)val; } … … 43 51 } 44 52 45 ClassDef(MCameraDC, 1) // Storage Container for the Currents (PRELIMINARY)53 ClassDef(MCameraDC, 2) // Storage Container for the Currents (PRELIMINARY) 46 54 }; 47 55 -
trunk/MagicSoft/Mars/merpp.cc
r8961 r9005 359 359 write->AddContainer("MCameraActiveLoad", "Camera", required); 360 360 write->AddContainer("MCameraHV", "Camera", required); 361 write->AddContainer("MCameraDC", "Camera", required); 361 362 write->AddContainer("MCameraLV", "Camera", required); 362 363 write->AddContainer("MCameraLids", "Camera", required); -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r8999 r9005 1762 1762 } 1763 1763 1764 *fLog << all << GetDescriptor() << ": Done." << endl ;1764 *fLog << all << GetDescriptor() << ": Done." << endl << endl << endl; 1765 1765 1766 1766 return kTRUE; -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r8999 r9005 1210 1210 return rc; 1211 1211 1212 *fLog << all << GetDescriptor() << ": Done." << endl; 1213 *fLog << endl << endl; 1212 *fLog << all << GetDescriptor() << ": Done." << endl << endl << endl; 1214 1213 1215 1214 return kTRUE; -
trunk/MagicSoft/Mars/mreport/MReportCamera.cc
r8955 r9005 33 33 // there. 34 34 // 35 // Version 2: 36 // ---------- 37 // - fStstusDC 38 // 35 39 ////////////////////////////////////////////////////////////////////////////// 36 40 #include "MReportCamera.h" … … 43 47 #include "MCameraCalibration.h" 44 48 #include "MCameraCooling.h" 49 #include "MCameraDC.h" 45 50 #include "MCameraHV.h" 46 51 #include "MCameraLV.h" … … 53 58 54 59 using namespace std; 55 56 const Int_t MReportCamera::gkActiveLoadControlVersNum = 200504130;57 60 58 61 // -------------------------------------------------------------------------- … … 94 97 return kFALSE; 95 98 99 fDC = (MCameraDC*)plist.FindCreateObj("MCameraDC"); 100 if (!fDC) 101 return kFALSE; 102 96 103 fLV = (MCameraLV*)plist.FindCreateObj("MCameraLV"); 97 104 if (!fLV) … … 122 129 return kFALSE; 123 130 124 str.Remove(0, 577*4); // Remove DC currents 125 str=str.Strip(TString::kLeading); 126 return kTRUE; 131 return fDC->Interprete(str); 127 132 } 128 133 … … 548 553 fCalibration->fStatusLoVoltage = (Bool_t)clv; 549 554 fStatus = (Byte_t)stat; 550 f StatusDC= (Byte_t)dc;555 fDC->fStatus = (Byte_t)dc; 551 556 fActiveLoad->fStatus = 0xff; 552 557 553 558 Int_t len2=0; 554 if (ver > gkActiveLoadControlVersNum)559 if (ver > 200504130) 555 560 { 556 561 Short_t actl; … … 608 613 } 609 614 610 if (ver > gkActiveLoadControlVersNum)615 if (ver > 200504130) 611 616 { 612 617 if (!InterpreteActiveLoad(str)) -
trunk/MagicSoft/Mars/mreport/MReportCamera.h
r8955 r9005 9 9 class MCameraLids; 10 10 class MCameraHV; 11 class MCameraDC; 11 12 class MCameraLV; 12 13 class MCameraAUX; … … 18 19 { 19 20 private: 20 21 static const Int_t gkActiveLoadControlVersNum; //!22 23 21 Byte_t fStatus; // CaCo monitored status of the sentinel (0-9), Sentinel_state 24 Byte_t fStatusDC; // CaCo monitored status of the DC currents (0-9), Cam.DC_state25 22 26 23 MCameraCooling *fCooling; //! … … 28 25 MCameraAUX *fAUX; //! 29 26 MCameraHV *fHV; //! 27 MCameraDC *fDC; //! 30 28 MCameraLV *fLV; //! 31 29 MCameraActiveLoad *fActiveLoad; //! … … 56 54 57 55 Byte_t GetStatus() const { return fStatus; } 58 Byte_t GetStatusDC() const { return fStatusDC; }59 56 60 ClassDef(MReportCamera, 1) // Class for CAMERA-REPORT information57 ClassDef(MReportCamera, 2) // Class for CAMERA-REPORT information 61 58 }; 62 59 -
trunk/MagicSoft/Mars/mreport/MReportCurrents.cc
r8957 r9005 84 84 fStatus2 = (Byte_t)err2; 85 85 86 const char *pos = str.Data()+len; 87 const char *end = pos+577*4; 86 // FIXME: Set fDC->fStatus ??? 88 87 89 Int_t i=0; 90 while (pos<end) 91 { 92 Int_t c; 93 const Char_t hex[5] = { pos[0], pos[1], pos[2], pos[3], 0 }; 94 pos += 4; 95 96 const Int_t nn=sscanf(hex, "%4x", &c); 97 if (nn!=1) 98 { 99 *fLog << warn << "WARNING - Reading hexadecimal DC information." << endl; 100 return kCONTINUE; 101 } 102 103 (*fDC)[i++] = 0.001*c; 104 } 105 106 str.Remove(0, pos-str.Data()); // Remove DC currents 107 str=str.Strip(TString::kLeading); 108 109 return str.IsNull() ? kTRUE : kCONTINUE; 88 return fDC->Interprete(str, len); 110 89 } -
trunk/MagicSoft/Mars/resources/sequences.rc
r8327 r9005 1 #///////////////////////////////////////////////////////////////////////// 2 # 3 # This file is compiled from two sections. One defines which transitions 4 # are allowed to build a sequence (for example changing L1 Trigger 5 # Tables between Calibration and Pedestal runs). The other section 6 # defines a regular expression to define the allowed ordering 7 # of the P-, C- and D-runs. 8 # 9 # The sections a introduced by [Transition] and [Regexp]. For further 10 # details see below. 11 # 12 # If a section should be valid only for one telescope use: 13 # [Transition] # Valid for all telescope numbers 14 # [Transition 5] # Valid for telescope 5 15 # [Transition: 5] # Valid for telescope 5 16 # [Transition: 5 6] # Valid for telescopes 5 and 6 17 # 18 # 19 # File-Id: 20 # A file is uniquely identified by run-number and file-number. 21 # If you give just a number it is identical to run-number with 22 # file-number 0. To give a dedicated file-number you can use: 23 # run.file 24 # 25 #///////////////////////////////////////////////////////////////////////// 26 1 27 ########################################################################## 2 28 # 29 # Explanation [Transition] 30 # 3 31 # Rules to build blocks which will later be broken into sequences 4 32 # 5 33 # Syntax: 6 34 # 7 # [ keyname]35 # [Transition] 8 36 # rule1 9 37 # rule2 … … 12 40 # 13 41 # Colums of rule: 14 # 1 2 3 4 [5 [6]]42 # 0 [1 2 3 4 [5 [6]]] 15 43 # 44 # 0: Table/Column to which the transition is applied 16 45 # 1: Run type of previous run 17 46 # 2: Run type of run to be accepted 18 47 # 3: Key for previous run 19 48 # 4: key for run to be accepted 20 # 5: first runto apply this rule <default=0>21 # 6: last runto apply this rule <default=max>49 # 5: first file-id to apply this rule <default=0> 50 # 6: last file-id to apply this rule <default=max> 22 51 # 23 52 # Run Types: … … 31 60 # A single "*" is an abbreviation for the regexp ".*" . 32 61 # 33 # A "-" is an abbreviation for "to be ignored". For example: 34 # [Test] 35 # - 4 * 1200 1300 62 # As soon as any transition (column 0) is specified this transisiton 63 # is checked not to change within a sequence. 64 # 65 # A "-" is an abbreviation for transitions "to be ignored". For example: 66 # [Transition] 67 # Test - 4 * 1200 1300 36 68 # would mean: 37 # ignore all keys (*) of column test for all current runs38 # with run-type 4 if its run-number is between 1200 and 1300.69 # ignore all keys (*) of column test for all current files 70 # with run-type 4 if its file-id is between 1200.0 and 1300.0 39 71 # The (former) third column in this case is obsolete. 40 72 # 41 # Ignore project name for calibration runs between 20100 and 4510042 #43 73 # Each Transition which appears at least once is checked. 44 74 # 45 75 46 [Transition] 47 76 [Transition: 1] 77 78 # Ignore project name for calibration files between 20100 and 45100 48 79 Project - 4 * 20100 45100 49 80 HvSettings - 2 * 86094 86094 … … 76 107 77 108 # The Discriminator Thresholds do not influence the pedestal- and 78 # calibration-trigger and ne dd therefore not to be chacked for these runs.109 # calibration-trigger and need therefore not to be checked for these runs. 79 110 # This allows all kind of transitions from P/C to P/C and from C to D. 80 111 DiscriminatorThresholdTable [34] [34] * * … … 166 197 167 198 ######################################################################### 168 # The regexp section MUST be the last section. This allows 169 # regular expressions to start with a [ 170 171 [Regexp] 172 173 # Explanation: 199 # 200 # Explanation [Regexp] 174 201 # 175 202 # To build sequences a string with the run-types is evaluated. … … 185 212 # 186 213 # The syntax is 214 # [Regexp] 187 215 # regexp [firstrun [lastrun]] 188 216 # 217 [Regexp: 1] 189 218 190 219 # Allow almost everything but require at least one run of each run-type
Note:
See TracChangeset
for help on using the changeset viewer.