Changeset 5728 for trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc
- Timestamp:
- 01/07/05 19:41:50 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc
r5725 r5728 71 71 // -------------------------------------------------------------------------- 72 72 // 73 // return kTRUE the lo gains exist for the actual pixel, else return kFALSE 74 // 75 #include <iostream> 76 Bool_t MRawEvtPixelIter::HasLoGain() const 77 { 78 // We have no lo-gain at all 79 if (!fLoGainId) 80 return kFALSE; 81 82 // This is to make the first call of this function in Next() 83 // work properly! NEVER call this function before Next() 84 if (fNumLoGainEntry==0) 85 return kTRUE; 86 87 // cout << fNumLoGainEntry << " " << flush; 88 // cout << fData->fLoGainPixId->GetSize() << " " << flush; 89 90 if (fNumLoGainEntry>fData->fLoGainPixId->GetSize()) 91 return kFALSE; 92 93 /* 94 cout << fNumLoGainEntry << " " << flush; 95 cout << fData->fLoGainPixId->GetSize() << " " << flush; 96 cout << fData->fLoGainPixId->GetArray() << " " << flush; 97 cout << fLoGainId << endl; 98 */ 99 // cout << (int)(fLoGainId-fData->fLoGainPixId->GetArray()) << " " << flush; 100 // cout << (int)(fHiGainId-fData->fHiGainPixId->GetArray()) << " " << flush; 101 102 Bool_t rc = *fHiGainId!=*fLoGainId; 103 104 // cout << "done." << endl; 105 106 107 if (rc) 108 return kFALSE; 109 /* 110 // We have no lo-gain at all 111 if (!fLoGainId) 112 return kFALSE; 113 114 // This is to make the first call of this function in Next() 115 // work properly! NEVER call this function before Next() 116 if (fNumLoGainEntry==0) 117 return kTRUE; 118 119 // Make sure, that we don't exceed the last entry in the array! 120 if (fNumLoGainEntry==fData->fLoGainPixId->GetSize()) 121 return kFALSE; 122 123 // Check whether the current position in lo-gain fits the hi-gain 124 return *fHiGainId!=*fLoGainId; 125 */ 126 return kTRUE; 127 } 128 129 // -------------------------------------------------------------------------- 130 // 73 131 // It steps to the next pixel. If there is no next pixel NULL is returned. 74 132 // If a next pixel where found, a pointer to the primary given (constructor) … … 86 144 // if we are already at the last entry there is no 'next' entry anymore 87 145 // 88 if (fNumLoGainEntry != fData->fLoGainPixId->GetSize()) 89 if (HasLoGain()) 90 { 91 // 92 // if higainpixid and logainpixid of the actual pixel are 93 // identical then we have to move the pointer to the next 94 // entry in the lo gains 95 // 96 fNumLoGainEntry++; 97 fLoGainId++; 98 fLoGainPos += fNumLoGainSamples; 99 } 146 if (HasLoGain()) 147 { 148 // 149 // if higainpixid and logainpixid of the actual pixel are 150 // identical then we have to move the pointer to the next 151 // entry in the lo gains 152 // 153 fNumLoGainEntry++; 154 fLoGainId++; 155 fLoGainPos += fNumLoGainSamples; 156 } 100 157 101 158 //
Note:
See TracChangeset
for help on using the changeset viewer.