|
34 | 34 | using namespace o2::framework; |
35 | 35 | using SubSpecificationType = o2::framework::DataAllocator::SubSpecificationType; |
36 | 36 |
|
37 | | - |
38 | 37 | namespace o2 |
39 | 38 | { |
40 | 39 | namespace hmpid |
@@ -102,34 +101,32 @@ class HMPIDDPLDigitizerTask : public o2::base::BaseDPLDigitizer |
102 | 101 | // try to start new readout cycle by setting the trigger time |
103 | 102 | auto triggeraccepted = mDigitizer.setTriggerTime(irecords[collID].getTimeNS()); |
104 | 103 | if (triggeraccepted) { |
105 | | - flushDigitsAndLabels(); // flush previous readout cycle |
106 | | - } |
107 | | - auto withinactivetime = mDigitizer.setEventTime(irecords[collID].getTimeNS()); |
108 | | - if (withinactivetime) { |
109 | | - // for each collision, loop over the constituents event and source IDs |
110 | | - // (background signal merging is basically taking place here) |
111 | | - for (auto& part : eventParts[collID]) { |
112 | | - mDigitizer.setEventID(part.entryID); |
113 | | - mDigitizer.setSrcID(part.sourceID); |
114 | | - |
115 | | - // get the hits for this event and this source |
116 | | - std::vector<o2::hmpid::HitType> hits; |
117 | | - context->retrieveHits(mSimChains, "HMPHit", part.sourceID, part.entryID, &hits); |
118 | | - LOG(info) << "For collision " << collID << " eventID " << part.entryID << " found HMP " << hits.size() << " hits "; |
119 | | - |
120 | | - mDigitizer.setLabelContainer(&mLabels); |
121 | | - mLabels.clear(); |
122 | | - mDigits.clear(); |
123 | | - |
124 | | - mDigitizer.process(hits, mDigits); |
| 104 | + auto withinactivetime = mDigitizer.setEventTime(irecords[collID].getTimeNS()); |
| 105 | + if (withinactivetime) { |
| 106 | + // for each collision, loop over the constituents event and source IDs |
| 107 | + // (background signal merging is basically taking place here) |
| 108 | + for (auto& part : eventParts[collID]) { |
| 109 | + mDigitizer.setEventID(part.entryID); |
| 110 | + mDigitizer.setSrcID(part.sourceID); |
| 111 | + |
| 112 | + // get the hits for this event and this source |
| 113 | + std::vector<o2::hmpid::HitType> hits; |
| 114 | + context->retrieveHits(mSimChains, "HMPHit", part.sourceID, part.entryID, &hits); |
| 115 | + LOG(info) << "For collision " << collID << " eventID " << part.entryID << " found HMP " << hits.size() << " hits "; |
| 116 | + |
| 117 | + mDigitizer.setLabelContainer(&mLabels); |
| 118 | + mLabels.clear(); |
| 119 | + mDigits.clear(); |
| 120 | + |
| 121 | + mDigitizer.process(hits, mDigits); |
| 122 | + } |
| 123 | + |
| 124 | + flushDigitsAndLabels(); // flush previous readout cycle |
| 125 | + } else { |
| 126 | + LOG(info) << "COLLISION " << collID << "FALLS WITHIN A DEAD TIME"; |
125 | 127 | } |
126 | | - |
127 | | - } else { |
128 | | - LOG(info) << "COLLISION " << collID << "FALLS WITHIN A DEAD TIME"; |
129 | 128 | } |
130 | 129 | } |
131 | | - // final flushing step; getting everything not yet written out |
132 | | - flushDigitsAndLabels(); |
133 | 130 |
|
134 | 131 | // send out to next stage |
135 | 132 | pc.outputs().snapshot(Output{"HMP", "DIGITS", 0}, digitsAccum); |
|
0 commit comments