- Timestamp:
- 12/05/03 11:34:19 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 added
- 2 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2603 r2604 4 4 5 5 -*-*- END OF LINE -*-*- 6 2003/12/05: Thomas Bretz 7 8 * mpointing/*: 9 - added 10 11 * Makefile: 12 - added mpointing 13 14 * NEWS: 15 - updated 16 17 * mbase/MTime.[h,cc]: 18 - complere rewrite of the data members 19 - ClassDef=3 20 21 * mfileio/MCT1ReadPreProc.cc, mfileio/MReadCurrents.cc, 22 mfileio/MReadReports.cc, mhist/MHPixVsTime.cc, 23 mhist/MHVsTime.cc, mmain/MOnlineDump.cc, 24 mmontecarlo/MMcTimeGenerate.cc, mreport/MReport.cc 25 26 - adapted to new MTime 27 28 * mfileio/MReadReports.[h,cc]: 29 - added the possibility to enable Auto Scheme 30 - delete the TChains when removed 31 32 * mfileio/MWriteRootFile.[h,cc]: 33 - automaticalle create title for Trees 34 - added a 'Must-Have' flag for the added containers 35 36 * mreport/MReportCamera.h: 37 - added //! to all pointers 38 39 * mtools/MAstro.[h,cc]: 40 - added calculations from and to MJD 41 - moved to mbase 42 43 * mfileio/Makefile, mfileio/FileIOLinkDef.h: 44 - removed MReadCurrent 45 46 47 6 48 2003/12/04: Markus Gaug 7 49 8 * manalysis/MCalibration* 9 - implemented some of Thomas Bretz suggestions to make the code nicer 10 - implemented the possibility to have cosmics in the calibration data 11 and remove it 50 * manalysis/MCalibration* 51 - implemented some of Thomas Bretz suggestions to make the code 52 nicer 53 - implemented the possibility to have cosmics in the calibration 54 data and remove it 12 55 - implemented the conversion factors for the blind pixel method 13 56 14 * mhist/MHCalibration* 15 - implemented some of Thomas Bretz suggestions to make the code nicer 16 - implemented the possibility to have cosmics in the calibration data 17 and still fit it 18 19 * macros/calibration.C 57 * mhist/MHCalibration* 58 - implemented some of Thomas Bretz suggestions to make the code 59 nicer 60 - implemented the possibility to have cosmics in the calibration 61 data and still fit it 62 63 * macros/calibration.C 20 64 - MStatusDisplay of calibration histograms a little bit more readable 65 66 21 67 22 68 2003/12/03: Abelardo Moralejo … … 26 72 time, instead of fmcevt2). 27 73 74 75 28 76 2003/12/02: Abelardo Moralejo 29 77 … … 31 79 - changed names of variables (removed underscores). Use new 32 80 function MTask::AddSerialNumber (see below). 81 82 33 83 34 84 2003/12/02: Thomas Bretz -
trunk/MagicSoft/Mars/mbase/BaseLinkDef.h
r2494 r2604 17 17 18 18 #pragma link C++ class MIter+; 19 #pragma link C++ class MAstro+; 19 20 #pragma link C++ class MDirIter+; 20 21 -
trunk/MagicSoft/Mars/mbase/Makefile
r2506 r2604 21 21 22 22 INCLUDES = -I. -I../mfileio -I../mfilter 23 # mfileio: MRead (MEvtLoop)24 # mfilter: MF (MContinue)23 # mfileio: MRead (MEvtLoop) 24 # mfilter: MF (MContinue) 25 25 26 26 # @code … … 36 36 MLog.cc \ 37 37 MArgs.cc \ 38 MAstro.cc \ 38 39 MParContainer.cc \ 39 40 MParList.cc \ -
trunk/MagicSoft/Mars/mfileio/FileIOLinkDef.h
r2556 r2604 10 10 #pragma link C++ class MReadReports+; 11 11 #pragma link C++ class MReadMarsFile+; 12 #pragma link C++ class MReadCurrents+;13 12 #pragma link C++ class MReadRflFile+; 14 13 -
trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc
r2461 r2604 905 905 // int isecs_since_midday; // seconds passed since midday before sunset (JD of run start) 906 906 // int isecfrac_200ns; // fractional part of isecs_since_midday 907 fTime->SetCT1Time(event.isecfrac_200ns, event.isecs_since_midday); 908 fTime->SetDuration((Int_t)fRawRunHeader->GetMJD()); 907 fTime->SetCT1Time((UInt_t)fRawRunHeader->GetMJD(), event.isecfrac_200ns, event.isecs_since_midday); 909 908 fTime->SetReadyToSave(); 910 909 -
trunk/MagicSoft/Mars/mfileio/MReadCurrents.cc
r2377 r2604 223 223 Int_t h, m, s, ms; 224 224 *fIn >> h >> m >> s >> ms; 225 fTime->Set Time(h, m, s, ms*1000000);225 fTime->Set(0, 0, 0, h, m, s, ms); 226 226 227 227 for (int i=0; i<fNumPixel; i++) -
trunk/MagicSoft/Mars/mfileio/MReadReports.cc
r2590 r2604 82 82 // Call SetOwner for fTrees and fChains 83 83 // 84 MReadReports::MReadReports() 84 MReadReports::MReadReports() : fEnableAutoScheme(kFALSE) 85 85 { 86 86 fName = "MRead"; … … 140 140 t->SetTitle(time?time:""); 141 141 142 if (!fEnableAutoScheme) 143 t->DisableAutoScheme(); 144 142 145 //FIXME! 143 146 //t->DisableAutoScheme(); … … 257 260 MTime &t = **GetTime(c); 258 261 259 if (t.GetHour()<12)260 t.SetTime((Byte_t)(t.GetHour()+24), t.GetMin(), t.GetSec(), t.GetNanoSec());261 262 262 if (i==0) 263 263 tmin = t; … … 276 276 277 277 // FIXME: Use Stream ID and call CallProcess() ? 278 if (((MTask*)fTrees->GetList()->At(nmin))->CallProcess()) 278 Bool_t rc = ((MTask*)fTrees->GetList()->At(nmin))->CallProcess(); 279 if (rc) 279 280 { 280 /*281 *fLog << dbg << ((MReadTree*)fTrees->At(nmin))->GetTreeName() << " " << flush;282 283 if (tmin.GetHour()>=24)284 tmin.SetTime((Byte_t)(tmin.GetHour()-24), tmin.GetMin(), tmin.GetSec(), tmin.GetNanoSec());285 tmin.Print();286 */287 288 281 fList->SetStreamId(fTrees->GetList()->At(nmin)->GetName()); 289 282 return kTRUE; … … 292 285 delete *GetTime(chain); 293 286 delete GetTime(chain); 294 // FIXME: Is it really deleted? 295 fChains->Remove(chain); 287 delete fChains->Remove(chain); 296 288 } 297 289 -
trunk/MagicSoft/Mars/mfileio/MReadReports.h
r2590 r2604 24 24 MTask *fList; // pointer to the task list to set the stream id 25 25 26 Bool_t fEnableAutoScheme; 27 26 28 MTime** GetTime(TChain *c) const; 27 29 … … 42 44 void PrintStatistics(const Int_t lvl=0, Bool_t title=kFALSE) const; 43 45 46 void EnableAutoScheme(Bool_t e=kTRUE) { fEnableAutoScheme = e; } 47 44 48 ClassDef(MReadReports, 0) // Reads events and reports from a root file ordered in time 45 49 }; -
trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc
r2556 r2604 192 192 // is the name of the tree. 193 193 // 194 void MWriteRootFile::AddContainer(const char *cname, const char *tname, const char *ttitle)194 void MWriteRootFile::AddContainer(const char *cname, const char *tname, Bool_t must) 195 195 { 196 196 // … … 198 198 // add the entry to the list. 199 199 // 200 MRootFileBranch *entry = new MRootFileBranch(cname, tname, ttitle);200 MRootFileBranch *entry = new MRootFileBranch(cname, tname, must); 201 201 fBranches.AddLast(entry); 202 202 … … 216 216 // 217 217 void MWriteRootFile::AddContainer(MParContainer *cont, const char *tname, 218 const char *ttitle)218 Bool_t must) 219 219 { 220 220 // … … 222 222 // add the entry to the list. 223 223 // 224 MRootFileBranch *entry = new MRootFileBranch(cont, tname, ttitle);224 MRootFileBranch *entry = new MRootFileBranch(cont, tname, must); 225 225 fBranches.AddLast(entry); 226 226 } … … 264 264 // No corresponding container is found 265 265 // 266 *fLog << err << "Cannot find parameter container '" << cname << "'." << endl; 267 return kFALSE; 266 if (entry->MustHave()) 267 { 268 *fLog << err << "Cannot find parameter container '" << cname << "'." << endl; 269 return kFALSE; 270 } 271 272 *fLog << inf << "Unnecessary parameter container '" << cname << "' not found..." << endl; 273 delete fBranches.Remove(entry); 274 continue; 268 275 } 276 269 277 // 270 278 // The container is found. Put the pointer into the entry. … … 276 284 // Get container name, tree name and tree title of this entry. 277 285 // 278 const char *cname 279 const char *tname 280 const char *ttitle = entry->GetTitle();286 const char *cname = cont->GetName(); 287 const char *tname = entry->GetName(); 288 const TString ttitle(Form("Tree containing %s", cont->GetDescriptor())); 281 289 282 290 // … … 301 309 fOut->cd(); 302 310 303 tree = new TTree(tname, ttitle ? ttitle : tname);311 tree = new TTree(tname, ttitle); 304 312 fTrees.AddLast(tree); 305 313 … … 494 502 495 503 out << ", \"" << entry->GetName() << "\""; 496 if ( (TString)entry->GetTitle()!="")497 out << ", \"" << entry->GetTitle() << "\"";504 if (!entry->MustHave()) 505 out << ", kFALSE"; 498 506 499 507 out <<");" << endl; -
trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h
r2470 r2604 22 22 TString fContName; 23 23 24 void Init(const char *name, const char *title) 24 Bool_t fMust; 25 26 void Init(const char *name, Bool_t must) 25 27 { 26 28 SetName(name?name:""); 27 SetTitle(title?title:"");29 fMust = must; 28 30 } 29 31 30 32 public: 31 MRootFileBranch() : fTree(NULL), fBranch(NULL), fContainer(NULL) 33 MRootFileBranch() : fTree(NULL), fBranch(NULL), fContainer(NULL), fMust(0) 32 34 { 33 Init(NULL, NULL);35 Init(NULL, kFALSE); 34 36 fContName = ""; 35 37 } 36 38 37 MRootFileBranch(const char *cname, const char *tname=NULL, const char *ttitle=NULL)38 : fTree(NULL), fBranch(NULL), fContainer(NULL) 39 MRootFileBranch(const char *cname, const char *tname=NULL, Bool_t must=kFALSE) 40 : fTree(NULL), fBranch(NULL), fContainer(NULL), fMust(0) 39 41 { 40 Init(tname, ttitle);42 Init(tname, must); 41 43 fContName = cname; 42 44 } 43 45 44 MRootFileBranch(MParContainer *cont, const char *tname=NULL, const char *ttitle=NULL)45 : fTree(NULL), fBranch(NULL), fContName("") 46 MRootFileBranch(MParContainer *cont, const char *tname=NULL, Bool_t must=kFALSE) 47 : fTree(NULL), fBranch(NULL), fContName(""), fMust(0) 46 48 { 47 Init(tname, ttitle);49 Init(tname, must); 48 50 fContainer = cont; 49 51 } … … 54 56 TBranch *GetBranch() const { return fBranch; } 55 57 const char *GetContName() const { return fContName; } 58 Bool_t MustHave() const { return fMust; } 56 59 57 60 void SetContainer(MParContainer *cont) { fContainer = cont; } … … 98 101 99 102 100 void AddContainer(const char *cname, 101 const char *tname=NULL, const char *ttitle=NULL); 102 void AddContainer(MParContainer *cont, 103 const char *tname=NULL, const char *ttitle=NULL); 103 void AddContainer(const char *cname, const char *tname=NULL, Bool_t must=kTRUE); 104 void AddContainer(MParContainer *cont, const char *tname=NULL, Bool_t must=kTRUE); 104 105 105 106 -
trunk/MagicSoft/Mars/mfileio/Makefile
r2556 r2604 36 36 MReadTree.cc \ 37 37 MReadReports.cc \ 38 MReadCurrents.cc \39 38 MReadMarsFile.cc \ 40 39 MReadRflFile.cc \ -
trunk/MagicSoft/Mars/mhist/MHPixVsTime.cc
r2572 r2604 150 150 Double_t t = 0; 151 151 if (fUseEventTime) 152 t = (*fTime);152 t = fTime->GetTime(); 153 153 else 154 154 t = fHeader ? fHeader->GetDAQEvtNumber() : fGraph.GetN(); -
trunk/MagicSoft/Mars/mhist/MHVsTime.cc
r2571 r2604 165 165 return kFALSE; 166 166 } 167 const Double_t T = (*tm);///3600; 168 t = T>12*3600?T-24*3600:T; 167 t = tm->GetTime(); 169 168 } 170 169 -
trunk/MagicSoft/Mars/mmain/MOnlineDump.cc
r2578 r2604 40 40 if (*fEvtTime==0) 41 41 { 42 fEvtTime-> SetTime((ULong_t)gSystem->Now());42 fEvtTime->Now(); 43 43 set = kTRUE; 44 44 } … … 54 54 55 55 if (set) 56 fEvtTime-> SetTime((ULong_t)0);56 fEvtTime->Reset(); 57 57 } 58 58 -
trunk/MagicSoft/Mars/mmontecarlo/MMcTimeGenerate.cc
r2462 r2604 84 84 while (dt < fDeadTime); 85 85 86 fTime->SetTime(*fTime+dt/1e4); // [0.1ms] 86 #warning SetTime not valid anymore! 87 // fTime->SetTime(*fTime+dt/1e4); // [0.1ms] 87 88 88 89 return kTRUE; -
trunk/MagicSoft/Mars/mreport/MReport.cc
r2591 r2604 56 56 { 57 57 int len, state; 58 int hor, min, sec, ms;58 int yea, mon, day, hor, min, sec, ms; 59 59 60 60 int n = sscanf(str.Data(), 61 61 fHasReportTime ? 62 " %d % *d %*d %*d %d %d %d %d "62 " %d %d %d %d %d %d %d %d " 63 63 "%*d %*d %*d %*d %*d %*d %*d %*d %n" : 64 64 " %d %*d %*d %*d %d %d %d %d ", 65 &state, & hor, &min, &sec, &ms, &len);66 if (n!= 5)65 &state, &yea, &mon, &day, &hor, &min, &sec, &ms, &len); 66 if (n!=8) 67 67 { 68 68 *fLog << err << "ERROR - Cannot interprete Body of " << fIdentifier << endl; … … 72 72 fState=state; 73 73 if (fTime) 74 fTime->SetTime(hor, min, sec, ms*1000000); 74 if (!fTime->Set(yea, mon, day, hor, min, sec, ms)) 75 { 76 *fLog << err << "ERROR - Event has invalid time: "; 77 *fLog << Form("%d.%d.%d %02s:%02d:%02d.%03d", day, mon, yea, hor, min, sec, ms); 78 *fLog << "... abort." << endl; 79 return kFALSE; 80 } 75 81 76 82 str.Remove(0, len); -
trunk/MagicSoft/Mars/mreport/MReportCamera.h
r2592 r2604 19 19 Byte_t fStatusDC; // CaCo monitored status of the DC currents (0-9), Cam.DC_state 20 20 21 MCameraCooling *fCooling; 22 MCameraLids *fLids; 23 MCameraAUX *fAUX; 24 MCameraHV *fHV; 25 MCameraLV *fLV; 26 MCameraCalibration *fCalibration; 21 MCameraCooling *fCooling; //! 22 MCameraLids *fLids; //! 23 MCameraAUX *fAUX; //! 24 MCameraHV *fHV; //! 25 MCameraLV *fLV; //! 26 MCameraCalibration *fCalibration; //! 27 27 28 28 Bool_t SetupReading(MParList &plist); -
trunk/MagicSoft/Mars/mtools/Makefile
r2553 r2604 34 34 MagicDomino.cc \ 35 35 MagicCivilization.cc \ 36 MAstro.cc \37 36 MineSweeper.cc 38 37 -
trunk/MagicSoft/Mars/mtools/ToolsLinkDef.h
r2553 r2604 5 5 #pragma link off all functions; 6 6 7 #pragma link C++ class MAstro+;8 7 #pragma link C++ class MChisqEval+; 9 8 #pragma link C++ class MineSweeper+;
Note:
See TracChangeset
for help on using the changeset viewer.