Changeset 2899
- Timestamp:
- 01/23/04 20:02:02 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2896 r2899 10 10 * mcalib/MCalibrate.cc, manalysis/MExtractSignal.cc 11 11 - Added support (using AddSerialNumber) for stereo MC files. 12 13 12 14 13 15 2004/01/23: Thomas Bretz … … 40 42 * mhist/MHCamera.[h,cc]: 41 43 - removed obsolete member function SetPix 44 45 * mbase/MStatusDisplay.[h,cc]: 46 - added EventInfo member function 47 - implemented preliminary redirection of GetObjectInfo to 48 StatusLine2 -> An own status line for this is missing 49 50 * manalysis/MExtractSignal.[h,cc]: 51 - implemented StreamPrimitive 52 - changed deafults to be static const data members 53 54 * manalysis/MGeomApply.[h,cc]: 55 - implemented StreamPrimitive 42 56 43 57 -
trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc
r2896 r2899 16 16 ! 17 17 ! 18 ! Author(s): Markus Gaug 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 118 ! Author(s): Markus Gaug, 09/2003 <mailto:markus@ifae.es> 19 ! 20 ! Copyright: MAGIC Software Development, 2000-2004 21 21 ! 22 22 ! … … 24 24 25 25 ////////////////////////////////////////////////////////////////////////////// 26 // //27 // MExtractSignal //28 // //26 // 27 // MExtractSignal 28 // 29 29 ////////////////////////////////////////////////////////////////////////////// 30 31 30 #include "MExtractSignal.h" 31 32 #include <fstream> 33 34 #include "MLog.h" 35 #include "MLogManip.h" 36 37 #include "MParList.h" 38 #include "MGeomCam.h" 39 40 #include "MRawEvtData.h" 41 #include "MRawEvtPixelIter.h" 42 43 #include "MPedestalCam.h" 44 #include "MPedestalPix.h" 32 45 33 46 #include "MExtractedSignalCam.h" 34 47 #include "MExtractedSignalPix.h" 35 48 36 #include "MPedestalCam.h"37 #include "MPedestalPix.h"38 39 #include "MGeomCam.h"40 41 #include "MLog.h"42 #include "MLogManip.h"43 44 #include "MParList.h"45 46 #include "MRawEvtData.h"47 #include "MRawEvtPixelIter.h"48 49 #include "TMath.h"50 51 49 ClassImp(MExtractSignal); 52 50 53 51 using namespace std; 52 53 const Byte_t MExtractSignal::fgSaturationLimit = 254; 54 const Byte_t MExtractSignal::fgFirst = 3; 55 const Byte_t MExtractSignal::fgLast = 10; 56 54 57 // -------------------------------------------------------------------------- 55 58 // … … 57 60 // 58 61 MExtractSignal::MExtractSignal(const char *name, const char *title) 59 : fSaturationLimit( 254)62 : fSaturationLimit(fgSaturationLimit) 60 63 { 61 64 … … 240 243 return kTRUE; 241 244 } 245 246 // -------------------------------------------------------------------------- 247 // 248 // Implementation of SavePrimitive. Used to write the call to a constructor 249 // to a macro. In the original root implementation it is used to write 250 // gui elements to a macro-file. 251 // 252 void MExtractSignal::StreamPrimitive(ofstream &out) const 253 { 254 out << " " << ClassName() << " " << GetUniqueName() << "(\""; 255 out << "\"" << fName << "\", \"" << fTitle << "\");" << endl; 256 257 if (fSaturationLimit!=fgSaturationLimit) 258 { 259 out << " " << GetUniqueName() << ".SetSaturationLimit("; 260 out << (int)fSaturationLimit << ");" << endl; 261 } 262 263 const Bool_t arg4 = fNumLoGainSamples+fLoGainFirst-1 != fgLast; 264 const Bool_t arg3 = arg4 || fLoGainFirst != fgFirst; 265 const Bool_t arg2 = arg3 || fNumHiGainSamples+fHiGainFirst-1 != fgLast; 266 const Bool_t arg1 = arg2 || fHiGainFirst != fgFirst; 267 268 if (!arg1) 269 return; 270 271 out << " " << GetUniqueName() << ".SetRange("; 272 out << (int)fLoGainFirst; 273 if (arg2) 274 { 275 out << ", " << (int)(fNumHiGainSamples+fHiGainFirst-1); 276 if (arg3) 277 { 278 out << ", " << (int)fLoGainFirst; 279 if (arg4) 280 out << ", " << (int)(fNumLoGainSamples+fLoGainFirst-1); 281 } 282 } 283 out << ");" << endl; 284 } -
trunk/MagicSoft/Mars/manalysis/MExtractSignal.h
r2797 r2899 24 24 { 25 25 private: 26 static const Byte_t fgSaturationLimit; 27 static const Byte_t fgFirst; 28 static const Byte_t fgLast; 26 29 27 MPedestalCam *fPedestals; // Pedestals of all pixels in the camera28 MExtractedSignalCam *fSignals; // Extracted signal of all pixels in the camera30 MPedestalCam *fPedestals; // Pedestals of all pixels in the camera 31 MExtractedSignalCam *fSignals; // Extracted signal of all pixels in the camera 29 32 30 MRawEvtData *fRawEvt; // raw event data (time slices)31 MRawRunHeader *fRunHeader; // RunHeader information33 MRawEvtData *fRawEvt; // raw event data (time slices) 34 MRawRunHeader *fRunHeader; // RunHeader information 32 35 33 Byte_t fHiGainFirst;34 Byte_t fLoGainFirst;36 Byte_t fHiGainFirst; 37 Byte_t fLoGainFirst; 35 38 36 Byte_t fNumHiGainSamples;37 Byte_t fNumLoGainSamples;39 Byte_t fNumHiGainSamples; 40 Byte_t fNumLoGainSamples; 38 41 39 Float_t fSqrtHiGainSamples;40 Float_t fSqrtLoGainSamples;42 Float_t fSqrtHiGainSamples; 43 Float_t fSqrtLoGainSamples; 41 44 42 Byte_t fSaturationLimit;45 Byte_t fSaturationLimit; 43 46 44 Bool_t ReInit(MParList *pList); 45 Int_t PreProcess(MParList *pList); 46 Int_t Process(); 47 47 Bool_t ReInit(MParList *pList); 48 Int_t PreProcess(MParList *pList); 49 Int_t Process(); 50 void StreamPrimitive(ofstream &out) const; 51 48 52 public: 53 MExtractSignal(const char *name=NULL, const char *title=NULL); 49 54 50 MExtractSignal(const char *name=NULL, const char *title=NULL); 55 void SetRange(Byte_t hifirst=fgFirst, Byte_t hilast=fgLast, Byte_t lofirst=fgFirst, Byte_t lolast=fgLast); 56 void SetSaturationLimit(Byte_t lim) { fSaturationLimit = lim; } 51 57 52 void SetRange(Byte_t hifirst=3, Byte_t hilast=10, Byte_t lofirst=3, Byte_t lolast=10); 53 void SetSaturationLimit(Byte_t lim) { fSaturationLimit = lim; } 54 55 ClassDef(MExtractSignal, 0) // Task to fill the Extracted Signal Containers from raw data 58 ClassDef(MExtractSignal, 0) // Task to fill the Extracted Signal Containers from raw data 56 59 }; 57 60 -
trunk/MagicSoft/Mars/manalysis/MGeomApply.cc
r2749 r2899 18 18 ! Author(s): Thomas Bretz, 09/2003 <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 ! … … 49 49 ////////////////////////////////////////////////////////////////////////////// 50 50 #include "MGeomApply.h" 51 52 #include <fstream> 51 53 52 54 #include "MLog.h" … … 134 136 return kTRUE; 135 137 } 138 139 // -------------------------------------------------------------------------- 140 // 141 // Implementation of SavePrimitive. Used to write the call to a constructor 142 // to a macro. In the original root implementation it is used to write 143 // gui elements to a macro-file. 144 // 145 void MGeomApply::StreamPrimitive(ofstream &out) const 146 { 147 out << " " << ClassName() << " " << GetUniqueName() << "(\""; 148 out << "\"" << fName << "\", \"" << fTitle << "\");" << endl; 149 150 if (fGeomName.IsNull()) 151 return; 152 153 out << " " << GetUniqueName() << ".SetGeometry(\""; 154 out << fGeomName << "\");" << endl; 155 } -
trunk/MagicSoft/Mars/manalysis/MGeomApply.h
r2438 r2899 7 7 8 8 class MParList; 9 class MGeomCam;10 9 11 10 class MGeomApply : public MTask 12 11 { 13 12 private: 14 const MGeomCam *fGeom; 15 TString fGeomName; 13 TString fGeomName; // Name of geometry class 16 14 17 15 Int_t PreProcess(MParList *plist); 18 16 Bool_t ReInit(MParList *pList); 17 void StreamPrimitive(ofstream &out) const; 19 18 20 19 public: -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
r2898 r2899 16 16 ! 17 17 ! 18 ! Author(s): Thomas Bretz, 4/2003 <mailto:tbretz@astro -uni-wuerzburg.de>18 ! Author(s): Thomas Bretz, 4/2003 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2003 20 ! Copyright: MAGIC Software Development, 2003-2004 21 21 ! 22 22 !
Note:
See TracChangeset
for help on using the changeset viewer.