Last change
on this file since 2871 was 498, checked in by magicsol, 24 years ago |
*** empty log message ***
|
-
Property svn:executable
set to
*
|
File size:
1.6 KB
|
Line | |
---|
1 | #include "MRawEvtPixelIter.h"
|
---|
2 |
|
---|
3 | #include "MRawEvtData.h"
|
---|
4 |
|
---|
5 | #include "../MBase/MArrayS.h"
|
---|
6 | #include "../MBase/MArrayB.h"
|
---|
7 |
|
---|
8 | ClassImp(MRawEvtPixelIter)
|
---|
9 |
|
---|
10 | TObject *MRawEvtPixelIter::Next()
|
---|
11 | {
|
---|
12 | //
|
---|
13 | // if we are already at the last entry there is no 'next' entry anymore
|
---|
14 | //
|
---|
15 | if (fNumHiGainEntry==fData->fHiGainPixId->GetSize()-1)
|
---|
16 | return NULL;
|
---|
17 |
|
---|
18 | //
|
---|
19 | // if we are already at the last entry there is no 'next' entry anymore
|
---|
20 | //
|
---|
21 | if (fNumLoGainEntry != fData->fLoGainPixId->GetSize()-1)
|
---|
22 | if (*fHiGainId == *fLoGainId)
|
---|
23 | {
|
---|
24 | //
|
---|
25 | // if higainpixid and logainpixid of the actual pixel are
|
---|
26 | // identical then we have to move the pointer to the next
|
---|
27 | // entry in the lo gains
|
---|
28 | //
|
---|
29 | fNumLoGainEntry++;
|
---|
30 | fLoGainId++;
|
---|
31 | fLoGainPos += fData->GetNumLoGainSamples();
|
---|
32 | }
|
---|
33 |
|
---|
34 | //
|
---|
35 | // here we have to move the pointer to the next entry in the hi gains
|
---|
36 | //
|
---|
37 | fNumHiGainEntry++;
|
---|
38 | fHiGainId++;
|
---|
39 | fHiGainPos += fData->GetNumHiGainSamples();
|
---|
40 |
|
---|
41 | //
|
---|
42 | // return a pointer to the 'source' class if we succeed
|
---|
43 | //
|
---|
44 | return fData;
|
---|
45 | }
|
---|
46 |
|
---|
47 | void MRawEvtPixelIter::Reset()
|
---|
48 | {
|
---|
49 | //
|
---|
50 | // set counter to zero
|
---|
51 | //
|
---|
52 | fNumLoGainEntry = 0;
|
---|
53 | fNumHiGainEntry = 0;
|
---|
54 |
|
---|
55 | //
|
---|
56 | // set pointer to first entry of arrays
|
---|
57 | //
|
---|
58 | fHiGainId = (UShort_t*)fData->fHiGainPixId->GetArray();
|
---|
59 | fLoGainId = (UShort_t*)fData->fLoGainPixId->GetArray();
|
---|
60 | fHiGainPos = (Byte_t*)fData->fHiGainFadcSamples->GetArray();
|
---|
61 | fLoGainPos = (Byte_t*)fData->fLoGainFadcSamples->GetArray();
|
---|
62 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.