|
Last change
on this file since 703 was 698, checked in by tbretz, 25 years ago |
|
*** empty log message ***
|
-
Property svn:executable
set to
*
|
|
File size:
1.5 KB
|
| Line | |
|---|
| 1 | #include "MFillHFadc.h"
|
|---|
| 2 |
|
|---|
| 3 | #include "MLog.h"
|
|---|
| 4 | #include "MLogManip.h"
|
|---|
| 5 | #include "MParList.h"
|
|---|
| 6 | #include "MHFadcCam.h"
|
|---|
| 7 | #include "MRawEvtData.h"
|
|---|
| 8 | #include "MRawEvtPixelIter.h"
|
|---|
| 9 |
|
|---|
| 10 | ClassImp(MFillHFadc)
|
|---|
| 11 |
|
|---|
| 12 | MFillHFadc::MFillHFadc (const char *name, const char *title) : fRawEvtData(NULL)
|
|---|
| 13 | {
|
|---|
| 14 | *fName = name ? name : "MFillHFadc";
|
|---|
| 15 | *fTitle = title ? title : "Task to fill the adc spectra with raw data";
|
|---|
| 16 | }
|
|---|
| 17 |
|
|---|
| 18 | Bool_t MFillHFadc::PreProcess (MParList *pList)
|
|---|
| 19 | {
|
|---|
| 20 | // connect the raw data with this task
|
|---|
| 21 |
|
|---|
| 22 | fHistos = (MHFadcCam*)pList->FindCreateObj("MHFadcCam");
|
|---|
| 23 | if (!fHistos)
|
|---|
| 24 | return kFALSE;
|
|---|
| 25 |
|
|---|
| 26 | fRawEvtData = (MRawEvtData*)pList->FindCreateObj("MRawEvtData");
|
|---|
| 27 | if (!fRawEvtData)
|
|---|
| 28 | {
|
|---|
| 29 | *fLog << dbginf << " Error: MRawEvtData not found... exit." << endl;
|
|---|
| 30 | return kFALSE ;
|
|---|
| 31 | }
|
|---|
| 32 |
|
|---|
| 33 | return kTRUE ;
|
|---|
| 34 |
|
|---|
| 35 | }
|
|---|
| 36 |
|
|---|
| 37 | Bool_t MFillHFadc::Process()
|
|---|
| 38 | {
|
|---|
| 39 | // loop over the pixels and fill the values in the histograms
|
|---|
| 40 |
|
|---|
| 41 | MRawEvtPixelIter pixel(fRawEvtData);
|
|---|
| 42 |
|
|---|
| 43 | const Int_t nhisamples = fRawEvtData->GetNumHiGainSamples() ;
|
|---|
| 44 | const Int_t nlosamples = fRawEvtData->GetNumLoGainSamples() ;
|
|---|
| 45 |
|
|---|
| 46 | // cout << "HighSamples " << iHighSamples ;
|
|---|
| 47 |
|
|---|
| 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 | }
|
|---|
| 55 |
|
|---|
| 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 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.