73{
75 dqstatus.
setRODBCID (ctx.eventID().bunch_crossing_id());
76
79
81
82 if (rawChannelContainer != nullptr) {
83 if (tileDigitsContainer != nullptr) {
86 for (const TileDigitsCollection* coll : *tileDigitsContainer) {
88
89 if (coll->size() > 0) {
90 int dsize = (*(coll->begin()))->NtimeSamples();
91 if (4 < dsize && dsize < 15) {
93 }
94 }
95
96 int frag = coll->identify();
98 int drawer = (frag & 0x3F);
99
100 std::vector < uint32_t >
data = coll->getFragChipHeaderWords();
101 unsigned int dataSize = std::min(16u, (
unsigned int)
data.size());
102 for (
unsigned int dmu = 0; dmu <
dataSize; ++dmu) {
103 if (
data[dmu] == 0xFFFFFFFF)
105 }
106
107 data = coll->getFragChipHeaderWordsHigh();
109 for (
unsigned int dmu = 0; dmu <
dataSize; ++dmu) {
110 if (
data[dmu] == 0xFFFFFFFF)
112 }
113 }
117 }
118
122 {
123 ATH_MSG_DEBUG(
"RawChannelContainer didn't come from BS - don't check DQ flags");
125 } else {
126 for (const TileRawChannelCollection *coll : *rawChannelContainer) {
127
128 int frag = coll->identify();
130 << " size=" << coll->size());
131
132 unsigned short existingDMUs = 0xFFFF;
133 if (frag > 0x2ff) {
134
135 existingDMUs = (frag == 0x30E || frag == 0x411) ? 0x3CFE : 0x3CFF;
136 }
137
138 unsigned short wrongBCID(0);
139 unsigned short fragBCID = coll->getFragBCID();
140 if (fragBCID & existingDMUs) {
141
142 int drawer = (frag & 0x3F);
144
147 if (badChannels->getChannelStatus(channel_id).isWrongBCID()) {
149 if (dmu == 1) {
150
151
152
153 wrongBCID = 0xFFFF & existingDMUs;
154 break;
155 }
156
157 wrongBCID |= (1U << dmu);
158 }
159 }
160
161 fragBCID &= ~wrongBCID;
162 }
163
164 dqstatus.
fillArrays(coll, tileDigitsContainer, 0, fragBCID);
165 dqstatus.
fillArrays(coll, tileDigitsContainer, 1, fragBCID);
166 }
168 ATH_MSG_DEBUG(
"all DQ elements are empty - don't check DQ flags");
170 } else {
172 }
173 }
174 } else if (tileDigitsContainer != nullptr) {
177 for (const TileDigitsCollection* coll : *tileDigitsContainer) {
179
180 if (coll->size() > 0) {
181 int dsize = (*(coll->begin()))->NtimeSamples();
182 if (4 < dsize && dsize < 15) {
183 isCalib |= coll->isCalibMode();
184 }
185 }
186 }
190 }
191
193 ATHRNG::RNGWrapper* wrapper =
m_athRNGSvc->getEngine (
this, this->
name());
198 const std::vector<std::vector<float>>& tripsProbs = badChannels->getTripsProbabilities();
201 const std::vector<float>& trips = tripsProbs.size() ? tripsProbs.at(partition - 1) : defaultTripsProbs;
202 dqstatus.
fillTrips(partition, trips, rndmVec, this->
msg());
203 }
204 }
205
207 return StatusCode::SUCCESS;
208}
char data[hepevt_bytes_allocation_ATLAS]
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
size_t dataSize(TDA::PayloadIterator start)
Size in bytes of the buffer that is needed to decode next fragment data content.