Changeset 2711 for trunk/MagicSoft/Mars
- Timestamp:
- 12/18/03 15:48:42 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2710 r2711 14 14 * manalysis/MExetractedSignalPix.h: 15 15 - added missing const-qualifier IsLoGainUsed 16 17 * mreport/MReportFileRead.[h,cc]: 18 - added support for line counter 16 19 17 20 * mreport/MReportRun.[h,cc]: -
trunk/MagicSoft/Mars/Makefile.rules
r2617 r2711 50 50 rmbin: 51 51 @echo " Removing binary files..." 52 @rm -f $(PROGRAMS) lib/$(SOLIB) so_locations52 @rm -f $(PROGRAMS) $(SOLIB) so_locations 53 53 54 54 rmbak: -
trunk/MagicSoft/Mars/mbase/MAGIC.h
r2688 r2711 16 16 // 17 17 #ifndef __CINT__ 18 #if ROOT_VERSION_CODE < ROOT_VERSION(3,0 2,00)19 #error Your root version is too old to compile Mars, use root>=3.0 218 #if ROOT_VERSION_CODE < ROOT_VERSION(3,05,06) 19 #error Your root version is too old to compile Mars, use root>=3.05/06 20 20 #endif 21 21 #endif -
trunk/MagicSoft/Mars/merpp.cc
r2710 r2711 120 120 const Int_t kRunNumber = arg.HasOption("--run=") ? arg.GetIntAndRemove("--run=") : -1; 121 121 122 if ( !kTimeStart)123 cout << "No start time!"<< endl;124 if ( !kTimeStop)125 cout << "No stop time!"<< endl;122 if (kTimeStart) 123 gLog << inf << "Start Time: " << kTimeStart << endl; 124 if (kTimeStop) 125 gLog << inf << "Stop Time: " << kTimeStop << endl; 126 126 127 127 // … … 270 270 { 271 271 r->AddToList("MReportCC"); 272 r->AddToList("MReportDAQ");272 //r->AddToList("MReportDAQ"); 273 273 r->AddToList("MReportDrive"); 274 274 r->AddToList("MReportCamera"); … … 277 277 { 278 278 r->AddToList("MReportRun"); 279 filter = new MFDataMember("MReportRun.fRunNumber", '=', kRunNumber-0.5); 280 filter->SetInverted(); 279 filter = new MFDataMember("MReportRun.fRunNumber", '=', kRunNumber); 281 280 w->SetFilter(filter); 282 281 } -
trunk/MagicSoft/Mars/mreport/MReportCC.cc
r2687 r2711 43 43 using namespace std; 44 44 45 MReportCC::MReportCC() : MReport("CC-REPORT" )45 MReportCC::MReportCC() : MReport("CC-REPORT", kFALSE) 46 46 { 47 47 fName = "MReportCC"; … … 57 57 58 58 Int_t len; 59 Float_t zd, az, dec, ra;60 59 const Int_t n=sscanf(str.Data(), 61 60 "%*f %*f %*f %*f %f %f %f %f %*f %*f %n", … … 67 66 return kFALSE; 68 67 } 68 /* 69 69 str.Remove(0, len); 70 71 *fLog << dbg << str << endl; 70 72 71 73 if (str!=(TString)"OVER") … … 74 76 return kFALSE; 75 77 } 76 78 */ 77 79 return kTRUE; 78 80 } -
trunk/MagicSoft/Mars/mreport/MReportFileRead.cc
r2678 r2711 207 207 // file versions 208 208 // 209 Bool_t MReportFileRead::CheckFileHeader() const 210 { 209 Int_t MReportFileRead::CheckFileHeader() const 210 { 211 Int_t line = 0; 212 211 213 TString str; 212 214 str.ReadLine(*fIn); // Read to EOF or newline … … 215 217 *fLog << err << "ERROR - First line doesn't match '" << gsReportHeader <<"' "; 216 218 *fLog << "in file '" << fFileName << "'"<<endl; 217 return kFALSE; 218 } 219 return line; 220 } 221 line++; 219 222 220 223 str.ReadLine(*fIn); // Read to EOF or newline … … 223 226 *fLog << err << "ERROR - Version prefix '" << gsVersionPrefix <<"' "; 224 227 *fLog << "not found in second line of file '" << fFileName << "'"<<endl; 225 return kFALSE; 226 } 228 return line; 229 } 230 line++; 227 231 228 232 str.Remove(0, gsVersionPrefix.Length()); … … 234 238 *fLog << err << "ERROR - Version string '" << str <<"' doesn't "; 235 239 *fLog << "match regular expression." << endl; 236 return kFALSE;240 return line; 237 241 } 238 242 239 243 *fLog << dbg << "Report File version: <" << ver << ">" << endl; 240 244 241 return kTRUE;245 return line; 242 246 } 243 247 … … 252 256 //if (!time) 253 257 // return kFALSE; 258 fNumLine = 0; 254 259 255 260 TIter Next(fList); … … 275 280 return kTRUE; 276 281 277 return CheckFileHeader(); 282 const Int_t n = CheckFileHeader(); 283 fNumLine += n; 284 return n==2; 278 285 } 279 286 … … 298 305 } 299 306 307 fNumLine++; 308 300 309 const Int_t pos = str.First(' '); 301 310 if (pos<=0) … … 310 319 if (rc==kFALSE) 311 320 { 312 *fLog << err << "ERROR - Interpretation of '" << rep->GetName() << "' failed ." << endl;321 *fLog << err << "ERROR - Interpretation of '" << rep->GetName() << "' failed (Line #" << fNumLine << ")" << endl; 313 322 return kFALSE; 314 323 } -
trunk/MagicSoft/Mars/mreport/MReportFileRead.h
r2678 r2711 34 34 MTime fStop; // Time range which should be read from file 35 35 36 ULong_t fNumLine; // line counter 37 36 38 enum { kHasNoHeader = BIT(14) }; 37 39 … … 40 42 Int_t PostProcess(); 41 43 42 Bool_t CheckFileHeader() const;44 Int_t CheckFileHeader() const; 43 45 MReport *GetReport(const TString &str) const; 44 46 MReport *GetReport(MReportHelp *help) const; -
trunk/MagicSoft/Mars/mreport/MReportRun.cc
r2708 r2711 50 50 Bool_t MReportRun::InterpreteBody(TString &str) 51 51 { 52 // Remove the 30 tokens of the subsystem status53 // table 12.1 p5954 for (int i=0; i<30; i++)55 str.Remove(0, str.First(' ')+1);56 57 52 Int_t len; 58 53 const Int_t n=sscanf(str.Data(), "%d %n", &fRunNumber, &len); … … 69 64 str.Remove(0, 6); 70 65 str = str.Strip(TString::kBoth); 71 fSourceName = str(0, str.First(' ')+1); 66 Ssiz_t pos = str.First(' '); 67 if (pos<0) 68 pos = str.Length(); 69 fSourceName = str(0, pos+1); 72 70 73 71 return kTRUE; -
trunk/MagicSoft/Mars/mtools/MTFillMatrix.cc
r2695 r2711 134 134 return kFALSE; 135 135 } 136 if (fname.IsNull()) 137 { 138 *fLog << "ERROR - Unable to write matrix, file name empty." << endl; 139 return kFALSE; 140 } 136 141 137 142 TFile file(fname, "RECREATE", m->GetTitle()); … … 245 250 MEvtLoop evtloop(fName); 246 251 evtloop.SetParList(&plist); 252 evtloop.SetDisplay(fDisplay); 253 evtloop.SetLogStream(fLog); 247 254 if (!evtloop.Eventloop()) 248 255 {
Note:
See TracChangeset
for help on using the changeset viewer.