- Timestamp:
- 03/30/01 12:01:58 (24 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r710 r711 4 4 5 5 * mdatacheck/MH*, mdatacheck/MFillH* moved to mhist 6 7 * mraw/MrawEvtPixelIter: IsLoGain -> HasLoGain 6 8 7 9 -
trunk/MagicSoft/Mars/mhist/MFillHFadc.cc
r710 r711 1 //////////////////////////////////////////////////////////////////////// 2 // 3 // MFillHFadc 4 // 5 // This task fill the n time slices from all pixels 6 // (stored in a MRawEvtData container) into histograms. 7 // This histograms (one per pixel) are stored in MHFadcCam, MHFadcPix 8 // 9 //////////////////////////////////////////////////////////////////////// 10 1 11 #include "MFillHFadc.h" 2 12 … … 10 20 ClassImp(MFillHFadc) 11 21 12 22 MFillHFadc::MFillHFadc (const char *name, const char *title) : fRawEvtData(NULL) 13 23 { 14 24 *fName = name ? name : "MFillHFadc"; … … 18 28 Bool_t MFillHFadc::PreProcess (MParList *pList) 19 29 { 20 // connect the raw data with this task 21 22 fHistos = (MHFadcCam*)pList->FindCreateObj("MHFadcCam"); 23 if (!fHistos) 24 return kFALSE; 30 // 31 // The PrProcess function checks for the existance of all necessary 32 // parameter containers 33 // 25 34 26 fRawEvtData = (MRawEvtData*)pList->FindCreateObj("MRawEvtData"); 27 if (!fRawEvtData) 28 { 29 *fLog << dbginf << " Error: MRawEvtData not found... exit." << endl; 30 return kFALSE ; 31 } 35 // 36 // check if all necessary input containers are existing 37 // 38 fRawEvtData = (MRawEvtData*)pList->FindCreateObj("MRawEvtData"); 39 if (!fRawEvtData) 40 { 41 *fLog << dbginf << " Error: MRawEvtData not found... exit." << endl; 42 return kFALSE; 43 } 32 44 33 return kTRUE ; 45 // 46 // check if the output containers are existing, if not craete them 47 // 48 fHistos = (MHFadcCam*)pList->FindCreateObj("MHFadcCam"); 49 if (!fHistos) 50 return kFALSE; 34 51 52 return kTRUE; 35 53 } 36 54 37 55 Bool_t MFillHFadc::Process() 38 56 { 39 // loop over the pixels and fill the values in the histograms 57 // 58 // This process function loops over all pixels in an MRawEvtData 59 // event and fills the values into histograms 60 // 61 62 // loop over the pixels and fill the values in the histograms 40 63 41 MRawEvtPixelIter pixel(fRawEvtData);64 MRawEvtPixelIter pixel(fRawEvtData); 42 65 43 const Int_t nhisamples = fRawEvtData->GetNumHiGainSamples() ;44 const Int_t nlosamples = fRawEvtData->GetNumLoGainSamples() ;66 const Int_t nhisamples = fRawEvtData->GetNumHiGainSamples() ; 67 const Int_t nlosamples = fRawEvtData->GetNumLoGainSamples() ; 45 68 46 // cout << "HighSamples " << iHighSamples ;69 // cout << "HighSamples " << iHighSamples ; 47 70 48 while ( pixel.Next() ) 49 { 50 for (Int_t i=0 ; i<nhisamples ; i++ ) 51 { 52 fHistos->FillHi ( pixel.GetPixelId(), 53 pixel.GetHiGainFadcSamples()[i] ); 54 } 71 while ( pixel.Next() ) 72 { 73 const UInt_t id = pixel.GetPixelId(); 55 74 56 for (Int_t i=0 ; i<nlosamples ; i++ ) 57 { 58 fHistos->FillLo ( pixel.GetPixelId(), 59 pixel.GetLoGainFadcSamples()[i] ); 60 } 61 } 62 63 return kTRUE; 64 65 } 75 for (Int_t i=0; i<nhisamples; i++) 76 fHistos->FillHi(id, pixel.GetHiGainFadcSamples()[i]); 77 78 if (!pixel.HasLoGain()) 79 continue; 80 81 for (Int_t i=0; i<nlosamples; i++) 82 fHistos->FillLo(id, pixel.GetLoGainFadcSamples()[i]); 83 } 84 85 return kTRUE; 86 87 } -
trunk/MagicSoft/Mars/mhist/MFillHFadc.h
r710 r711 16 16 class MFillHFadc : public MTask { 17 17 private: 18 MRawEvtData *fRawEvtData; 19 20 MHFadcCam *fHistos ; 18 MRawEvtData *fRawEvtData; // The raw event data from which the spektrum is created 19 MHFadcCam *fHistos ; // The histogram container into which holds the spektrum 21 20 22 21 public: -
trunk/MagicSoft/Mars/mhist/MFillHHillas.cc
r710 r711 1 //////////////////////////////////////////////////////////////////////// 2 // 3 // MFillHHillas 4 // 5 // This task fills the hillas parameter from MHillas into 6 // histograms (MHHillas) 7 // 8 //////////////////////////////////////////////////////////////////////// 1 9 #include "MFillHHillas.h" 2 10 -
trunk/MagicSoft/Mars/mhist/MFillHStarMap.cc
r710 r711 1 //////////////////////////////////////////////////////////////////////// 2 // 3 // MFillHStarMap 4 // 5 // This task fills a star map (a 2D histogram, MHStarMap) 6 // from the calculated hillas parameter (MHillas). 7 // The algorithm for this can be found in MHStarMap::Fill 8 // 9 //////////////////////////////////////////////////////////////////////// 1 10 #include "MFillHStarMap.h" 2 11 … … 33 42 Bool_t MFillHStarMap::Process() 34 43 { 35 // if (fabs(fEvt->GetAlpha())>60)36 // return kCONTINUE;37 38 44 fHistos->Fill(fEvt); 39 45 -
trunk/MagicSoft/Mars/mhist/MHFadcCam.cc
r710 r711 3 3 // MHFadcCam 4 4 // 5 // This class contains a list of all ADC spektra histograms5 // This class contains a list of MHFadcPix. 6 6 // 7 7 /////////////////////////////////////////////////////////////////////// -
trunk/MagicSoft/Mars/mhist/MHFadcPix.cc
r710 r711 1 1 /////////////////////////////////////////////////////////////////////// 2 2 // 3 // MH istosAdc3 // MHFadcPix 4 4 // 5 // This class contains a list of all ADC spektra histograms 5 // This container stores a hostogram to display an Fadc Spekrtum. 6 // The spektrum of all the values measured by the Fadcs. 6 7 // 7 8 /////////////////////////////////////////////////////////////////////// … … 12 13 13 14 ClassImp(MHFadcPix) 15 16 MHFadcPix::MHFadcPix(UInt_t pixid) 17 { 18 // 19 // Creates the histograms for lo and hi gain of one pixel 20 // 21 // FIXME! Set the right axis titles and ... and ... 22 // 23 Char_t tmp1[40]="hi"; 24 Char_t tmp2[40]="hi gain Pixel"; 25 26 if (pixid) 27 { 28 sprintf(tmp1, "%s%d", tmp1, pixid); 29 sprintf(tmp2, "%s %d", tmp2, pixid); 30 } 31 fHistHi = new TH1F(tmp1, tmp2, 256, 0, 255); 32 33 34 Char_t tmp3[40]="lo"; 35 Char_t tmp4[40]="lo gain Pixel"; 36 37 if (pixid) 38 { 39 sprintf(tmp3, "%s%d", tmp3, pixid); 40 sprintf(tmp4, "%s %d", tmp4, pixid); 41 } 42 fHistLo = new TH1F(tmp3, tmp4, 256, 0, 255); 43 } 44 45 MHFadcPix::~MHFadcPix() 46 { 47 delete fHistHi; 48 delete fHistLo; 49 } 14 50 15 51 void MHFadcPix::Draw(Option_t *) -
trunk/MagicSoft/Mars/mhist/MHFadcPix.h
r710 r711 17 17 18 18 public: 19 MHFadcPix(UInt_t pixid) 20 { 21 Char_t tmp1[40]; 22 Char_t tmp2[40]; 19 MHFadcPix(UInt_t pixid=0); 20 ~MHFadcPix(); 23 21 24 sprintf(tmp1, "high%d", pixid);25 sprintf(tmp2, "high gain Pixel %d", pixid);26 27 fHistHi = new TH1F(tmp1, tmp2, 256, 0, 255);28 29 sprintf(tmp1, "low %d", pixid);30 sprintf(tmp2, "low gain Pixel %d", pixid);31 32 fHistLo = new TH1F(tmp1, tmp2, 256, 0, 255);33 }34 ~MHFadcPix()35 {36 delete fHistHi;37 delete fHistLo;38 }39 22 TH1F *GetHistHi() { return fHistHi; } 40 23 TH1F *GetHistLo() { return fHistLo; }
Note:
See TracChangeset
for help on using the changeset viewer.