110 ATH_CHECK( rawChannelContainer.isValid() );
115 float referenceTimes[Tile::MAX_ROS - 1][Tile::MAX_DRAWER][Tile::MAX_CHAN] = {{{0}}};
117 float referenceEnergies[Tile::MAX_ROS - 1][Tile::MAX_DRAWER][Tile::MAX_CHAN] = {{{0}}};
120 if (rawChannelCollection->empty() )
continue;
122 HWIdentifier adc_id = rawChannelCollection->front()->adc_HWID();
126 int partition = ros - 1;
130 int fragId = rawChannelCollection->identify();
137 adc_id = rawChannel->adc_HWID();
141 if (
m_cabling->isDisconnected(ros, drawer, channel)) {
146 if (checkDQ && !(dqStatus->
isAdcDQgood(ros, drawer, channel, adc))) {
156 if (badChannels->getAdcStatus(adc_id).isBad()) {
171 float amplitude = rawChannel->amplitude();
173 amplitude = emScale->calibrateChannel(drawerIdx, channel, adc, amplitude, rawChannelUnit,
m_finalRawChannelUnit);
176 float time = rawChannel->uncorrTime();
178 referenceEnergies[partition][drawer][channel] = amplitude;
179 referenceTimes[partition][drawer][channel] = time;
184 std::vector<float> timeDiffs[Tile::MAX_ROS - 1];
185 std::vector<float> energyDiffs[Tile::MAX_ROS - 1];
186 std::vector<float> offlineEnergies[Tile::MAX_ROS - 1];
187 std::vector<float> offlineTimes[Tile::MAX_ROS - 1];
189 std::vector<float> dspTimes[Tile::MAX_ROS - 1];
190 std::vector<float> dspTimesChannels[Tile::MAX_ROS - 1];
191 std::vector<float> dspTimesDrawers[Tile::MAX_ROS - 1];
198 if (rawChannelCollection->empty() )
continue;
200 HWIdentifier adc_id = rawChannelCollection->front()->adc_HWID();
204 int partition = ros - 1;
207 adc_id = rawChannel->adc_HWID();
211 float offlineEnergy = referenceEnergies[partition][drawer][channel];
213 offlineEnergies[partition].push_back(offlineEnergy);
215 float offlineTime = referenceTimes[partition][drawer][channel];
216 offlineTimes[partition].push_back(offlineTime);
218 float dspEnergy = rawChannel->amplitude();
219 float dspTime = rawChannel->uncorrTime();
220 dspTimes[partition].push_back(dspTime);
221 dspTimesDrawers[partition].push_back(drawer);
222 dspTimesChannels[partition].push_back(channel);
225 dspEnergy = emScale->calibrateChannel(drawerIdx, channel, adc, dspEnergy, dspRawChannelUnit,
m_finalRawChannelUnit);
228 float energyDiff = (dspEnergy - offlineEnergy) / offlineEnergy;
229 energyDiffs[partition].push_back(energyDiff);
231 float timeDiff = dspTime - offlineTime;
232 timeDiffs[partition].push_back(timeDiff);
235 <<
", energy " << dspEnergy <<
"/" << offlineEnergy
236 <<
", time " << dspTime <<
"/" << offlineTime);
244 for (
unsigned int partition = 0; partition < Tile::MAX_ROS - 1; ++partition) {
245 if (!energyDiffs[partition].
empty()) {
249 for (
int l1TriggerIdx : l1TriggersIndices) {
256 if (!timeDiffs[partition].
empty()) {
260 for (
int l1TriggerIdx : l1TriggersIndices) {
266 if (!timeDiffs[partition].
empty()) {
270 for (
int l1TriggerIdx : l1TriggersIndices) {
277 if (!dspTimes[partition].
empty()) {
281 for (
int l1TriggerIdx : l1TriggersIndices) {
290 int allTileRodFragsSize = 0;
291 std::vector<int> roses;
292 std::vector<int> fragments;
293 std::vector<int> fragmentSizes;
295 std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> robFragments;
299 uint32_t rodSourceId = robFragment->rod_source_id();
300 unsigned int ros = (rodSourceId & 0x0F0000) >> 16;
301 unsigned int fragment = rodSourceId & 0x0000FF;
302 int rodFragmentSize = robFragment->rod_fragment_size_word();
304 allTileRodFragsSize += rodFragmentSize;
305 if (ros > 0 && ros < Tile::MAX_ROS && fragment <
m_nROBs) {
306 roses.push_back(ros);
307 fragments.push_back(fragment);
308 fragmentSizes.push_back(rodFragmentSize);
309 ATH_MSG_VERBOSE(
"ROS = " << ros <<
", ROD fragment = " << fragment <<
", size = " << rodFragmentSize);
313 ATH_MSG_DEBUG(
"All Tile ROD fragemsts size: " << allTileRodFragsSize <<
" in LB " << eventInfo->
lumiBlock());
317 for (
int l1TriggerIdx : l1TriggersIndices) {
321 if (!fragmentSizes.empty()) {
325 for (
int l1TriggerIdx : l1TriggersIndices) {
332 fill(
"TileRODMonExecuteTime", timer);
334 return StatusCode::SUCCESS;