- Timestamp:
- 01/31/05 16:04:49 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r6141 r6150 20 20 21 21 -*-*- END OF LINE -*-*- 22 23 2005/01/31 Markus Gaug 24 25 * mjobs/MJob.[h,cc] 26 * mjobs/MJCalibrateSignal.[h,cc] 27 * mjobs/MJCalibration.[h,cc] 28 - move file type enum to base class 29 30 * mjobs/MJCalibrateSignal.[h,cc] 31 - allow also for direct setting of an MRunIter (not used in callisto). 32 22 33 23 34 2005/01/31 Abelardo Moralejo -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r6084 r6150 44 44 45 45 #include "MDirIter.h" 46 #include "MRunIter.h" 46 47 #include "MParList.h" 47 48 #include "MTaskList.h" … … 116 117 // 117 118 MJCalibrateSignal::MJCalibrateSignal(const char *name, const char *title) 118 : f DataFlag(0), fIsInterlaced(kTRUE), fIsRelTimesUpdate(kFALSE), fIsHiLoCalibration(kFALSE)119 : fRuns(0), fIsInterlaced(kTRUE), fIsRelTimesUpdate(kFALSE), fIsHiLoCalibration(kFALSE) 119 120 { 120 121 fName = name ? name : "MJCalibrateSignal"; … … 213 214 if (!fSequence.IsValid()) 214 215 { 215 *fLog << err << "ERROR - Sequence invalid!" << endl; 216 return kFALSE; 216 if (!fRuns) 217 { 218 *fLog << err << "ERROR - Sequence invalid and no runs chosen!" << endl; 219 return kFALSE; 220 } 221 222 if (fRuns->GetNumRuns() != fRuns->GetNumEntries()) 223 { 224 *fLog << err << "Number of files found doesn't match number of runs... abort." 225 << fRuns->GetNumRuns() << " vs. " << fRuns->GetNumEntries() << endl; 226 return kFALSE; 227 } 228 *fLog << "Calibrate data from "; 229 *fLog << "Runs " << fRuns->GetRunsAsString() << endl; 230 *fLog << endl; 217 231 } 218 232 … … 339 353 plist.AddToList(&tlist); 340 354 341 /*342 TString name = iter.Next();343 Byte_t filetype = MRawFileRead::IsFileValid(name);344 if (!filetype)345 filetype = MReadMarsFile::IsFileValid(name)+1;346 if (filetype<1||filetype>3)347 {348 gLog << err << "ERROR - FileType #" << (int)filetype << " of first file " << name << " unknown..." << endl;349 return kFALSE;350 } */351 352 355 MReadReports readreal; 353 356 readreal.AddTree("Events", "MTime.", kTRUE); … … 362 365 MRawFileRead rawread(NULL); 363 366 if (IsRawData()) 364 rawread.AddFiles( iter);367 rawread.AddFiles(fSequence.IsValid() ? iter : *fRuns); 365 368 else 366 readreal.AddFiles( iter);369 readreal.AddFiles(fSequence.IsValid() ? iter : *fRuns); 367 370 368 371 MPointingPosInterpolate pextr; -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h
r6047 r6150 8 8 class TEnv; 9 9 class TList; 10 10 class MRunIter; 11 11 class MTask; 12 12 class MParList; … … 21 21 private: 22 22 23 enum DataType_t { 24 kIsRawData, 25 kIsRootData, 26 kIsMC 27 }; 23 MRunIter *fRuns; // Data files 28 24 29 Byte_t fDataFlag; // Bit-field to store the data type30 25 Bool_t fIsInterlaced; // Distinguish interlaced from other calibration 31 26 Bool_t fIsRelTimesUpdate; // Choose to update relative times from interlaced … … 40 35 MExtractor* &ext1, MExtractor* &ext2, TString &geom) const; 41 36 42 Bool_t IsRawData() const { return TESTBIT(fDataFlag,kIsRawData); }43 Bool_t IsRootData() const { return TESTBIT(fDataFlag,kIsRootData); }44 Bool_t IsMC() const { return TESTBIT(fDataFlag,kIsMC); }45 46 void SetRawData ( const Bool_t b=kTRUE ) { b ? SETBIT(fDataFlag,kIsRawData) : CLRBIT(fDataFlag,kIsRawData); }47 void SetRootData( const Bool_t b=kTRUE ) { b ? SETBIT(fDataFlag,kIsRootData) : CLRBIT(fDataFlag,kIsRootData); }48 void SetMC ( const Bool_t b=kTRUE ) { b ? SETBIT(fDataFlag,kIsMC) : CLRBIT(fDataFlag,kIsMC); }49 50 37 public: 51 38 MJCalibrateSignal(const char *name=NULL, const char *title=NULL); … … 57 44 void SetHiLoCalibration( const Bool_t b=kTRUE ) { fIsHiLoCalibration = b; } 58 45 46 void SetInput ( MRunIter *iter ) { fRuns = iter; } 47 59 48 ClassDef(MJCalibrateSignal, 0) // Tool to create a pedestal file (MPedestalCam) 60 49 }; -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r6137 r6150 1428 1428 SetGeometry(GetEnv("Geometry", fGeometry)); 1429 1429 1430 SetRootData(); 1431 1432 if (HasEnv("MC")) 1433 { 1434 fDataFlag = 0; 1435 SetMC(); 1436 } 1437 1438 if (HasEnv("RawData") || IsDataCheck()) 1439 { 1440 fDataFlag = 0; 1441 SetRawData(); 1442 } 1443 1430 1444 fReferenceFile = GetEnv("ReferenceFile",fReferenceFile.Data()); 1431 1445 … … 1628 1642 if (fSequence.IsValid()) 1629 1643 { 1630 const Int_t n0 = fSequence.SetupCalRuns(iter, fPathData, "C", Is DataCheck());1644 const Int_t n0 = fSequence.SetupCalRuns(iter, fPathData, "C", IsRawData()); 1631 1645 const Int_t n1 = fSequence.GetNumCalRuns(); 1632 1646 if (n0==0) … … 1688 1702 MRawFileRead rawread(NULL); 1689 1703 1690 if (Is DataCheck())1704 if (IsRawData()) 1691 1705 { 1692 1706 rawread.AddFiles(fSequence.IsValid() ? iter : *fRuns); … … 1852 1866 if (!evtloop.Eventloop()) 1853 1867 { 1868 // DisplayResult(plist); 1869 // WriteResult(plist); 1854 1870 *fLog << err << GetDescriptor() << ": Failed." << endl; 1855 1871 return kFALSE; -
trunk/MagicSoft/Mars/mjobs/MJob.cc
r6078 r6150 52 52 // Default constructor. 53 53 // 54 // Sets fRuns to 0, fExtractor to NULL, fDataCheck to kFALSE 55 // 56 MJob::MJob(const char *name, const char *title) : fEnv(0), fOverwrite(kFALSE), fMaxEvents(0) 54 // Sets fDataFlag to 0 55 // 56 MJob::MJob(const char *name, const char *title) : fEnv(0), fDataFlag(0), fOverwrite(kFALSE), fMaxEvents(0) 57 57 58 { 58 59 fName = name ? name : "MJob"; -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilterPeakSearch.cc
r6149 r6150 79 79 const Byte_t MExtractTimeAndChargeDigitalFilterPeakSearch::fgHiGainFirst = 0; 80 80 const Byte_t MExtractTimeAndChargeDigitalFilterPeakSearch::fgHiGainLast = 20; 81 const Byte_t MExtractTimeAndChargeDigitalFilterPeakSearch::fgLoGainFirst = 3;81 const Byte_t MExtractTimeAndChargeDigitalFilterPeakSearch::fgLoGainFirst = 1; 82 82 const Byte_t MExtractTimeAndChargeDigitalFilterPeakSearch::fgLoGainLast = 14; 83 const Byte_t MExtractTimeAndChargeDigitalFilterPeakSearch::fgOffsetLeftFromPeak = 2;83 const Byte_t MExtractTimeAndChargeDigitalFilterPeakSearch::fgOffsetLeftFromPeak = 1; 84 84 const Byte_t MExtractTimeAndChargeDigitalFilterPeakSearch::fgOffsetRightFromPeak = 3; 85 85 const Byte_t MExtractTimeAndChargeDigitalFilterPeakSearch::fgPeakSearchWindowSize = 2;
Note:
See TracChangeset
for help on using the changeset viewer.