- Timestamp:
- 01/29/04 16:52:22 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2956 r2958 4 4 5 5 -*-*- END OF LINE -*-*- 6 2004/01/29: Thomas Bretz 7 8 * manalysis/MArrivalTime.h, manalysis/MCameraData.h, 9 manalysis/MCerPhotEvt.h, manalysis/MExtractSignalCam.h, 10 manalysis/MPedPhotCam.h, manalysis/MPedestalCam.h, 11 mcalib/MCalibrationCam.h, mcamera/MCameraDC.h, 12 mraw/MRawEvtData.h, mreflector/MRflEvtData.h: 13 - split derivement into MParContainer and MCamEvent 14 15 * manalysis/MExtractSignalCam.[h,cc]: 16 - removed obsolete MExtractSignal::ReInit 17 - added -> to fArray 18 19 * mbase/MParList.h: 20 - added a new bit kIsProcessing 21 22 * mbase/MTaskList.cc: 23 - fixed the handling of kDoNotReset and the bahaviour of 24 SetReadyToSave, such that it is possible to write all 25 headers 26 27 * mfileio/MWriteFile.cc: 28 - added ReInit which also calls CheckAndWrite 29 30 * mgui/MCamEvent.h: 31 - does not derive from MParContainer anymore 32 33 34 6 35 2004/01/29: Markus Gaug 7 36 -
trunk/MagicSoft/Mars/manalysis/MArrivalTime.h
r2935 r2958 2 2 #define MARS_MArrivalTime 3 3 4 #ifndef MARS_MParContainer 5 #include "MParContainer.h" 6 #endif 4 7 #ifndef MARS_MCamEvent 5 8 #include "MCamEvent.h" … … 15 18 class MRawEvtData; 16 19 17 class MArrivalTime : public M CamEvent20 class MArrivalTime : public MParContainer, public MCamEvent 18 21 { 19 22 private: -
trunk/MagicSoft/Mars/manalysis/MCameraData.h
r2781 r2958 7 7 #ifndef ROOT_TArrayC 8 8 #include <TArrayC.h> 9 #endif 10 #ifndef MARS_MParContainer 11 #include "MParContainer.h" 9 12 #endif 10 13 #ifndef MARS_MCamEvent … … 17 20 class MPedPhotCam; 18 21 19 class MCameraData : public M CamEvent22 class MCameraData : public MParContainer, public MCamEvent 20 23 { 21 24 private: -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h
r2502 r2958 18 18 class MCerPhotPix; 19 19 20 class MCerPhotEvt : public M CamEvent20 class MCerPhotEvt : public MParContainer, public MCamEvent 21 21 { 22 22 private: -
trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc
r2946 r2958 36 36 37 37 #include "MParList.h" 38 #include "MGeomCam.h"39 38 40 39 #include "MRawEvtData.h" … … 125 124 return kFALSE; 126 125 127 return kTRUE;128 }129 130 131 // --------------------------------------------------------------------------132 //133 // The ReInit searches for the following input containers:134 // - MRawRunHeader135 //136 Bool_t MExtractSignal::ReInit(MParList *pList )137 {138 MGeomCam *cam = (MGeomCam*)pList->FindObject(AddSerialNumber("MGeomCam"));139 if (!cam)140 {141 *fLog << err << GetDescriptor() << ": No MGeomCam found... aborting." << endl;142 return kFALSE;143 }144 145 126 return kTRUE; 146 127 } -
trunk/MagicSoft/Mars/manalysis/MExtractSignal.h
r2901 r2958 29 29 static const Byte_t fgLast; 30 30 31 MPedestalCam 32 MExtractedSignalCam 31 MPedestalCam *fPedestals; // Pedestals of all pixels in the camera 32 MExtractedSignalCam *fSignals; // Extracted signal of all pixels in the camera 33 33 34 MRawEvtData 35 MRawRunHeader 34 MRawEvtData *fRawEvt; // raw event data (time slices) 35 MRawRunHeader *fRunHeader; // RunHeader information 36 36 37 MArrivalTime 37 MArrivalTime *fArrivalTime; // Arrival Time of FADC sample 38 38 39 Byte_t fHiGainFirst;40 Byte_t fLoGainFirst;39 Byte_t fHiGainFirst; 40 Byte_t fLoGainFirst; 41 41 42 Byte_t fNumHiGainSamples;43 Byte_t fNumLoGainSamples;42 Byte_t fNumHiGainSamples; 43 Byte_t fNumLoGainSamples; 44 44 45 45 Float_t fSqrtHiGainSamples; … … 48 48 Byte_t fSaturationLimit; 49 49 50 Bool_t ReInit(MParList *pList);51 50 Int_t PreProcess(MParList *pList); 52 51 Int_t Process(); -
trunk/MagicSoft/Mars/manalysis/MExtractedSignalCam.h
r2914 r2958 1 1 #ifndef MARS_MExtractedSignalCam 2 2 #define MARS_MExtractedSignalCam 3 4 #ifndef MARS_MParContainer 5 #include "MParContainer.h" 6 #endif 3 7 4 8 #ifndef MARS_MCamEvent … … 9 13 class MExtractedSignalPix; 10 14 11 class MExtractedSignalCam : public M CamEvent15 class MExtractedSignalCam : public MParContainer, public MCamEvent 12 16 { 13 17 private: 14 TClonesArray *fArray; // FIXME: Change TClonesArray away from a pointer?18 TClonesArray *fArray; //-> FIXME: Change TClonesArray away from a pointer? 15 19 16 20 Byte_t fFirstUsedSliceHiGain; -
trunk/MagicSoft/Mars/manalysis/MPedPhotCam.h
r2630 r2958 2 2 #define MARS_MPedPhotCam 3 3 4 #ifndef MARS_MParContainer 5 #include "MParContainer.h" 6 #endif 4 7 #ifndef MARS_MCamEvent 5 8 #include "MCamEvent.h" … … 11 14 class MPedPhotPix; 12 15 13 class MPedPhotCam : public M CamEvent16 class MPedPhotCam : public MParContainer, public MCamEvent 14 17 { 15 18 private: -
trunk/MagicSoft/Mars/manalysis/MPedestalCam.h
r2951 r2958 2 2 #define MARS_MPedestalCam 3 3 4 #ifndef MARS_MParContainer 5 #include "MParContainer.h" 6 #endif 4 7 #ifndef MARS_MCamEvent 5 8 #include "MCamEvent.h" … … 11 14 class MPedestalPix; 12 15 13 class MPedestalCam : public M CamEvent16 class MPedestalCam : public MParContainer, public MCamEvent 14 17 { 15 18 private: … … 21 24 22 25 void Clear(Option_t *o=""); 23 void InitUseHists();24 26 25 27 void InitSize(const UInt_t i); 26 28 Int_t GetSize() const; 29 30 void InitUseHists(); 27 31 28 32 MPedestalPix &operator[](Int_t i); -
trunk/MagicSoft/Mars/mbase/MParList.h
r1965 r2958 36 36 37 37 public: 38 enum { kDoNotReset = BIT(17) };38 enum { kDoNotReset = BIT(17), kIsProcessing = BIT(18) }; 39 39 40 40 MParList(const char *name=NULL, const char *title=NULL); -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r2529 r2958 308 308 *fLog << all << "Reinit... " << flush; 309 309 310 if (!pList) 311 pList = fParList; 312 313 // 314 // Make sure, that the ReadyToSave flag is not reset from a tasklist 315 // running as a task in another tasklist. 316 // 317 const Bool_t noreset = pList->TestBit(MParList::kDoNotReset); 318 if (!noreset) 319 pList->SetBit(MParList::kDoNotReset); 320 310 321 // 311 322 // create the Iterator over the tasklist … … 314 325 315 326 MTask *task=NULL; 327 316 328 // 317 329 // loop over all tasks for reinitialization … … 321 333 *fLog << all << task->GetName() << "... " << flush; 322 334 323 if (!task->ReInit(pList ?pList:fParList))335 if (!task->ReInit(pList/*?pList:fParList*/)) 324 336 { 325 337 *fLog << err << "ERROR - ReInit of Task '" << task->GetDescriptor() << "' failed." << endl; … … 329 341 330 342 *fLog << all << endl; 343 344 // 345 // Reset the ReadyToSave flag. 346 // 347 if (!noreset) 348 { 349 pList->SetReadyToSave(kFALSE); 350 pList->ResetBit(MParList::kDoNotReset); 351 } 331 352 332 353 return kTRUE; … … 366 387 fParList = pList; 367 388 368 fTasksProcess.Clear(); 389 // 390 // Make sure, that the ReadyToSave flag is not reset from a tasklist 391 // running as a task in another tasklist. 392 // 393 const Bool_t noreset = fParList->TestBit(MParList::kDoNotReset); 394 if (!noreset) 395 fParList->SetBit(MParList::kDoNotReset); 369 396 370 397 // … … 406 433 *fLog << all << endl; 407 434 435 // 436 // Reset the ReadyToSave flag. 437 // 438 if (!noreset) 439 { 440 fParList->SetReadyToSave(kFALSE); 441 fParList->ResetBit(MParList::kDoNotReset); 442 } 443 444 // 445 // loop over all tasks to fill fTasksProcess 446 // 408 447 Next.Reset(); 409 410 // 411 // loop over all tasks for preproccesing 412 // 448 fTasksProcess.Clear(); 413 449 while ((task=(MTask*)Next())) 414 450 if (task->OverwritesProcess()) … … 441 477 // running as a task in another tasklist. 442 478 // 443 const Bool_t noreset = fParList->TestBit(MParList::k DoNotReset);479 const Bool_t noreset = fParList->TestBit(MParList::kIsProcessing); 444 480 if (!noreset) 445 481 { 446 fParList->Set ReadyToSave(kFALSE);482 fParList->SetBit(MParList::kIsProcessing); 447 483 fParList->Reset(); 448 fParList->SetBit(MParList::kDoNotReset);449 484 } 450 485 … … 514 549 515 550 if (!noreset) 516 fParList->ResetBit(MParList::kDoNotReset); 551 { 552 fParList->SetReadyToSave(kFALSE); 553 fParList->ResetBit(MParList::kIsProcessing); 554 } 517 555 518 556 return rc; … … 535 573 536 574 // 537 // Reset the ReadyToSave flag. 538 // Reset all containers. 539 // 540 // FIXME: To run a tasklist as a single task in another tasklist we 541 // have to make sure, that the Parameter list isn't reset. 542 // 543 fParList->SetReadyToSave(kFALSE); 544 fParList->Reset(); 575 // Make sure, that the ReadyToSave flag is not reset from a tasklist 576 // running as a task in another tasklist. 577 // 578 const Bool_t noreset = fParList->TestBit(MParList::kDoNotReset); 579 if (!noreset) 580 { 581 fParList->SetBit(MParList::kDoNotReset); 582 fParList->Reset(); 583 } 545 584 546 585 // … … 566 605 567 606 *fLog << all << endl; 607 608 // 609 // Reset the ReadyToSave flag. 610 // 611 if (!noreset) 612 { 613 fParList->SetReadyToSave(kFALSE); 614 fParList->ResetBit(MParList::kDoNotReset); 615 } 568 616 569 617 return kTRUE; -
trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h
r2956 r2958 2 2 #define MARS_MCalibrationCam 3 3 4 #ifndef MARS_MParContainer 5 #include "MParContainer.h" 6 #endif 4 7 #ifndef MARS_MCamEvent 5 8 #include "MCamEvent.h" … … 14 17 class MCalibrationPINDiode; 15 18 16 class MCalibrationCam : public M CamEvent19 class MCalibrationCam : public MParContainer, public MCamEvent 17 20 { 18 21 private: -
trunk/MagicSoft/Mars/mcamera/MCameraDC.h
r2632 r2958 2 2 #define MARS_MCameraDC 3 3 4 #ifndef MARS_MParContainer 5 #include "MParContainer.h" 6 #endif 4 7 #ifndef MARS_MCamEvent 5 8 #include "MCamEvent.h" … … 10 13 #endif 11 14 12 class MCameraDC : public M CamEvent15 class MCameraDC : public MParContainer, public MCamEvent 13 16 { 14 17 private: … … 30 33 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const 31 34 { 32 val = (*this)[idx];35 val = fArray[idx]; 33 36 return val>0; 34 37 } -
trunk/MagicSoft/Mars/mfileio/MWriteFile.cc
r2206 r2958 18 18 ! Author(s): Thomas Bretz, 6/2001 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 320 ! Copyright: MAGIC Software Development, 2000-2004 21 21 ! 22 22 ! … … 24 24 25 25 ///////////////////////////////////////////////////////////////////////////// 26 // //27 // MWriteFile //28 // //29 // This is a base class for writing tasks. If you want to implement //30 // writing out parameter containers in a new file format, this is a good //31 // starting point. //32 // The class defines a generalized interface between writing out data in //33 // an eventloop and your file format. //34 // //26 // 27 // MWriteFile 28 // 29 // This is a base class for writing tasks. If you want to implement 30 // writing out parameter containers in a new file format, this is a good 31 // starting point. 32 // The class defines a generalized interface between writing out data in 33 // an eventloop and your file format. 34 // 35 35 ///////////////////////////////////////////////////////////////////////////// 36 37 36 #include "MWriteFile.h" 38 37 … … 86 85 // -------------------------------------------------------------------------- 87 86 // 88 // Checks if the HasChanged flag of the output container is set. If it is set 89 // the container should be written to the output. 87 // Checks if the SetReadyToSave flag of the output container is set. If it 88 // is set the container should be written to the output. 89 // 90 Bool_t MWriteFile::ReInit(MParList *pList) 91 { 92 CheckAndWrite(); 93 return kTRUE; 94 } 95 96 // -------------------------------------------------------------------------- 97 // 98 // Checks if the SetReadyToSave flag of the output container is set. If it is 99 // set the container should be written to the output. 90 100 // 91 101 Int_t MWriteFile::Process() … … 97 107 // -------------------------------------------------------------------------- 98 108 // 99 // Checks if the HasChanged flag of the output container is set. If it is set100 // the container should be written to the output.109 // Checks if the SetReadyToSave flag of the output container is set. If it is 110 // set the container should be written to the output. 101 111 // 102 112 Int_t MWriteFile::PostProcess() … … 108 118 return kTRUE; 109 119 } 110 -
trunk/MagicSoft/Mars/mgui/MCamEvent.h
r2417 r2958 2 2 #define MARS_MCamEvent 3 3 4 #ifndef MARS_MParContainer5 #include "MParContainer.h"4 #ifndef ROOT_TROOT 5 #include <TROOT.h> 6 6 #endif 7 7 8 8 class MGeomCam; 9 9 10 class MCamEvent : public MParContainer10 class MCamEvent 11 11 { 12 12 public: -
trunk/MagicSoft/Mars/mraw/MRawEvtData.h
r2645 r2958 2 2 #define MARS_MRawEvtData 3 3 4 #ifndef MARS_MParContainer 5 #include "MParContainer.h" 6 #endif 4 7 #ifndef MARS_MCamEvent 5 8 #include "MCamEvent.h" … … 17 20 class MArrayB; 18 21 19 class MRawEvtData : public M CamEvent22 class MRawEvtData : public MParContainer, public MCamEvent 20 23 { 21 24 friend class MRawEvtPixelIter; … … 83 86 ; 84 87 85 ClassDef(MRawEvtData, 3) //Container to store the raw Event Data88 ClassDef(MRawEvtData, 4) //Container to store the raw Event Data 86 89 }; 87 90 -
trunk/MagicSoft/Mars/mreflector/MRflEvtData.h
r2229 r2958 1 1 #ifndef MARS_MRflEvtData 2 2 #define MARS_MRflEvtData 3 4 #ifndef MARS_MParContainer 5 #include "MParContainer.h" 6 #endif 3 7 4 8 #ifndef MARS_MCamEvent … … 12 16 class MRflSinglePhoton; 13 17 14 class MRflEvtData : public M CamEvent18 class MRflEvtData : public MParContainer, public MCamEvent 15 19 { 16 20 TClonesArray fList;
Note:
See TracChangeset
for help on using the changeset viewer.