60{
61
62 static std::atomic_int DecodeErrCount = 0;
63
64 if(vecRobs.empty())
65 return StatusCode::SUCCESS;
66
67
68 std::unique_ptr<InDetTimeCollection> LVL1Collection;
69 std::unique_ptr<InDetTimeCollection> BCCollection;
70 std::vector<const ROBFragment*>::const_iterator rob_it = vecRobs.begin();
71
72
74
75 LVL1Collection = std::make_unique<InDetTimeCollection>();
76 LVL1Collection->reserve(vecRobs.size());
77
78 BCCollection = std::make_unique<InDetTimeCollection>();
79 BCCollection->reserve(vecRobs.size());
80 }
81
82
83 for(; rob_it!=vecRobs.end(); ++rob_it)
84 {
85
86 uint32_t robid = (*rob_it)->rod_source_id();
87
89
90
91
92
93 unsigned int lvl1id = (*rob_it)->rod_lvl1_id();
94 LVL1Collection->emplace_back(robid, lvl1id);
95
96 unsigned int bcid = (*rob_it)->rod_bc_id();
97 BCCollection->emplace_back(robid, bcid);
98
99#ifdef TRT_BSC_DEBUG
100 ATH_MSG_DEBUG(
"Stored LVL1ID " << lvl1id <<
" and BCID " << bcid <<
" in InDetTimeCollections" );
101#endif
102 }
104 if ( sc == StatusCode::FAILURE )
105 {
106 if (DecodeErrCount < 100) {
108 DecodeErrCount++;
109 } else if (100 == DecodeErrCount) {
111 "Too many Problem with TRT Decoding messages. Turning message "
112 "off.");
113 DecodeErrCount++;
114 }
115
116 }
117 }
118
119
120
121
123
124 SG::WriteHandle<InDetTimeCollection> lvl1id(
m_lvl1idkey,ctx);
125 ATH_CHECK(lvl1id.record(std::move(LVL1Collection)));
126
129 }
130
131 return StatusCode::SUCCESS;
132}
#define ATH_CHECK
Evaluate an expression and check for errors.
::StatusCode StatusCode
StatusCode definition for legacy code.
setEventNumber setTimeStamp bcid