Last change
on this file since 9223 was 462, checked in by harald, 24 years ago |
Import the files for the datacheck section in this subdir.
|
File size:
1.6 KB
|
Line | |
---|
1 | #include "MFillAdcSpect.h"
|
---|
2 |
|
---|
3 | //ClassImp(MFillAdcSpect)
|
---|
4 |
|
---|
5 | MFillAdcSpect::MFillAdcSpect (const char *name, const char *title)
|
---|
6 | {
|
---|
7 | *fName = name ? name : "MFillAdcSpect";
|
---|
8 | *fTitle = title ? title : "Task to fill the adc spectra with raw data";
|
---|
9 |
|
---|
10 |
|
---|
11 |
|
---|
12 | fRawEvtData = NULL ;
|
---|
13 | fPixelIter = NULL ;
|
---|
14 | }
|
---|
15 |
|
---|
16 |
|
---|
17 |
|
---|
18 | Bool_t MFillAdcSpect::PreProcess (MParList *pList)
|
---|
19 | {
|
---|
20 | // connect the raw data with this task
|
---|
21 |
|
---|
22 | fRawEvtData = (MRawEvtData*)pList->FindObject("MRawEvtData");
|
---|
23 |
|
---|
24 | if (!fRawEvtData)
|
---|
25 | {
|
---|
26 | cout << "MRawFileRead::PreProcess - WARNING: MRawEvtData not found... creating." << endl;
|
---|
27 | exit(123) ;
|
---|
28 | }
|
---|
29 |
|
---|
30 | fPixelIter = new MRawEvtPixelIter( fRawEvtData );
|
---|
31 |
|
---|
32 | fHistos = (MHistosAdc*)pList->FindObject("MHistosAdc");
|
---|
33 |
|
---|
34 | if (!fHistos)
|
---|
35 | {
|
---|
36 | cout << "MRawFileRead::PreProcess - WARNING: MHistosAdc not found... exit..." << endl;
|
---|
37 | return kFALSE ;
|
---|
38 | }
|
---|
39 |
|
---|
40 |
|
---|
41 | return kTRUE ;
|
---|
42 |
|
---|
43 | }
|
---|
44 |
|
---|
45 |
|
---|
46 | Bool_t MFillAdcSpect::Process()
|
---|
47 | {
|
---|
48 | // loop over the pixels and fill the values in the histograms
|
---|
49 |
|
---|
50 | fPixelIter->Reset() ;
|
---|
51 |
|
---|
52 | Int_t iHighSamples = fRawEvtData->GetNumHiGainSamples() ;
|
---|
53 | Int_t iLowSamples = fRawEvtData->GetNumLoGainSamples() ;
|
---|
54 |
|
---|
55 | // cout << "HighSamples " << iHighSamples ;
|
---|
56 |
|
---|
57 | while ( fPixelIter->Next() )
|
---|
58 | {
|
---|
59 | for (Int_t i=0 ; i< iHighSamples ; i++ )
|
---|
60 | {
|
---|
61 | fHistos->FillAdcHistHigh ( fPixelIter->GetPixelId(),
|
---|
62 | fPixelIter->GetHiGainFadcSamples()[i] );
|
---|
63 | }
|
---|
64 |
|
---|
65 | for (Int_t i=0 ; i< iLowSamples ; i++ )
|
---|
66 | {
|
---|
67 | fHistos->FillAdcHistLow ( fPixelIter->GetPixelId(),
|
---|
68 | fPixelIter->GetLoGainFadcSamples()[i] );
|
---|
69 | }
|
---|
70 | }
|
---|
71 |
|
---|
72 | return kTRUE;
|
---|
73 |
|
---|
74 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.