74{
76 dqstatus.
setRODBCID (ctx.eventID().bunch_crossing_id());
77
80
82
83 if (rawChannelContainer != nullptr) {
84 if (tileDigitsContainer != nullptr) {
87 for (const TileDigitsCollection* coll : *tileDigitsContainer) {
89
90 if (coll->size() > 0) {
91 int dsize = (*(coll->begin()))->NtimeSamples();
92 if (4 < dsize && dsize < 15) {
94 }
95 }
96
97 int frag = coll->identify();
99 int drawer = (frag & 0x3F);
100
101 std::vector < uint32_t >
data = coll->getFragChipHeaderWords();
102 unsigned int dataSize = std::min(16u, (
unsigned int)
data.size());
103 for (
unsigned int dmu = 0; dmu <
dataSize; ++dmu) {
104 if (data[dmu] == 0xFFFFFFFF)
106 }
107
108 data = coll->getFragChipHeaderWordsHigh();
110 for (
unsigned int dmu = 0; dmu <
dataSize; ++dmu) {
111 if (data[dmu] == 0xFFFFFFFF)
113 }
114 }
118 }
119
123 {
124 ATH_MSG_DEBUG(
"RawChannelContainer didn't come from BS - don't check DQ flags");
126 } else {
127 for (const TileRawChannelCollection *coll : *rawChannelContainer) {
128
129 int frag = coll->identify();
131 << " size=" << coll->size());
132
133 unsigned short existingDMUs = 0xFFFF;
134 if (frag > 0x2ff) {
135
136 existingDMUs = (frag == 0x30E || frag == 0x411) ? 0x3CFE : 0x3CFF;
137 }
138
139 unsigned short wrongBCID(0);
140 unsigned short fragBCID = coll->getFragBCID();
141 if (fragBCID & existingDMUs) {
142
143 int drawer = (frag & 0x3F);
145
148 if (badChannels->getChannelStatus(channel_id).isWrongBCID()) {
150 if (dmu == 1) {
151
152
153
154 wrongBCID = 0xFFFF & existingDMUs;
155 break;
156 }
157
158 wrongBCID |= (1U << dmu);
159 }
160 }
161
162 fragBCID &= ~wrongBCID;
163 }
164
165 dqstatus.
fillArrays(coll, tileDigitsContainer, 0, fragBCID);
166 dqstatus.
fillArrays(coll, tileDigitsContainer, 1, fragBCID);
167 }
169 ATH_MSG_DEBUG(
"all DQ elements are empty - don't check DQ flags");
171 } else {
173 }
174 }
175 } else if (tileDigitsContainer != nullptr) {
178 for (const TileDigitsCollection* coll : *tileDigitsContainer) {
180
181 if (coll->size() > 0) {
182 int dsize = (*(coll->begin()))->NtimeSamples();
183 if (4 < dsize && dsize < 15) {
184 isCalib |= coll->isCalibMode();
185 }
186 }
187 }
191 }
192
194 ATHRNG::RNGWrapper* wrapper =
m_athRNGSvc->getEngine (
this, this->
name());
199 const std::vector<std::vector<float>>& tripsProbs = badChannels->getTripsProbabilities();
202 const std::vector<float>& trips = tripsProbs.size() ? tripsProbs.at(partition - 1) : defaultTripsProbs;
203 dqstatus.
fillTrips(partition, trips, rndmVec, this->
msg());
204 }
205 }
206
208 return StatusCode::SUCCESS;
209}
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
static const unsigned int MAX_ROS
Number of ROSs.
static const unsigned int MAX_DRAWER
Number of drawers in ROS 1-4.
static const unsigned int MAX_CHAN
Number of channels in drawer.
void fillArrays(const TileRawChannelCollection *coll, const TileDigitsContainer *digitsCnt, int gain, unsigned short fragBCID)
parses DQ fragments and fill error arrays for event
bool nonZeroCounter() const
returns True if there are any errors in event
void setCalibMode(uint32_t calibMode)
void setFilled(bool filled)
sets flag that DQ status instance has been filled for this event
void setBiGain(bool biGain)
sets flag of gain mode of run
void fillTrips(unsigned int partition, const std::vector< float > &trips, double *rndmVec, MsgStream &msg)
void setIncompleteDigits(bool incomplete)
void setEmptyEvent(int partition, int drawer, int dmu, int gain, int isEmpty)
sets flag that DMU sent an empty event (0xFFFFFFFF)
bool isBiGain() const
returns gain mode of run
void setAllGood()
mark all channels/ADC's as DQ good
constexpr size_t dataSize(TDA::PayloadIterator start)
Size in bytes of the buffer that is needed to decode next fragment data content.