10 ATH_MSG_DEBUG(
"Initializing JfexSimMonitorAlgorithm algorithm with name: "<<
name());
67 return StatusCode::SUCCESS;
76 if(larBadChan.isValid()) {
77 timeSince = ctx.eventID().time_stamp() - larBadChan.getRange().start().time_stamp();
78 timeUntil = larBadChan.getRange().stop().time_stamp() - ctx.eventID().time_stamp();
94 return StatusCode::SUCCESS;
100 const EventContext& ctx,
bool simReadyFlag)
const {
102 if(!tobs1Cont.isValid()) {
106 if(!tobs2Cont.isValid()) {
110 bool mismatches = (tobs1Cont->size()!=tobs2Cont->size());
119 for(
const auto tob1 : *tobs1Cont) {
121 auto word1 = tob1->tobWord();
122 auto jfex1 = tob1->jFexNumber();
123 auto fpga1 = tob1->fpgaNumber();
125 for (
const auto tob2 : *tobs2Cont) {
126 if(
word1==0 || (
word1 == tob2->tobWord() && jfex1 == tob2->jFexNumber() && fpga1 == tob2->fpgaNumber())) {
135 fill(
"mismatches",eventType,Signature,tobMismatched);
137 if(tobs2Cont.isValid() && tobs1Cont->size() < tobs2Cont->size()) {
140 for(
unsigned int i=0;
i<(tobs2Cont->size()-tobs1Cont->size());
i++) {
141 fill(
"mismatches",eventType,Signature,tobMismatched);
152 auto itr = m_firstEvents.find(
lbn);
153 if(itr==m_firstEvents.end()) {
155 itr = m_firstEvents.find(
lbn);
157 lbnString = itr->second;
159 std::vector<float> detas{};std::vector<float> setas{};
160 std::vector<float> dphis{};std::vector<float> sphis{};
161 std::vector<unsigned int> dword0s{};std::vector<unsigned int> sword0s{};
171 std::cout <<
"LBN: " << std::string(lbnString) <<
" EventNumber: " << ULong64_t(evtNumber) <<
" signature: " <<
label << std::endl;
172 std::cout <<
" data : " << std::hex;
173 for (
const auto w: dword0s) std::cout <<
w <<
" ";
174 std::cout << std::endl <<
" sim : ";
175 for (
const auto w: sword0s) std::cout <<
w <<
" ";
176 std::cout << std::endl << std::dec;
178 fill(
"mismatches",
lbn,lbnString,evtNumber,dtobEtas,dtobPhis,dtobWord0s,stobEtas,stobPhis,stobWord0s,Signature,eventType,IsDataTowers,IsEmulatedTowers,simReady);
186 etas.clear();phis.clear();word0s.clear();
189 etas.reserve(tobs->size());
190 phis.reserve(tobs->size());
191 word0s.reserve(tobs->size());
192 std::vector<SortableTob> sortedTobs;
193 sortedTobs.reserve(tobs->size());
194 for(
const auto& tob : *tobs) {
195 sortedTobs.emplace_back(
SortableTob{tob->tobWord(),0.,0.});
197 std::sort(sortedTobs.begin(),sortedTobs.end(),[](
const SortableTob& lhs,
const SortableTob& rhs) { return lhs.word0<rhs.word0; });
198 for(
const auto& tob : sortedTobs) {
199 etas.push_back(tob.eta);
200 phis.push_back(tob.phi);
201 word0s.push_back(tob.word0);
206 etas.clear();phis.clear();word0s.clear();
209 etas.reserve(tobs->size());
210 phis.reserve(tobs->size());
211 word0s.reserve(tobs->size());
212 std::vector<SortableTob> sortedTobs;
213 sortedTobs.reserve(tobs->size());
214 for(
const auto tob : *tobs) {
215 sortedTobs.emplace_back(SortableTob{tob->tobWord(),0.,0.});
217 std::sort(sortedTobs.begin(),sortedTobs.end(),[](
const SortableTob& lhs,
const SortableTob& rhs) { return lhs.word0<rhs.word0; });
218 for(
const auto& tob : sortedTobs) {
219 etas.push_back(tob.eta);
220 phis.push_back(tob.phi);
221 word0s.push_back(tob.word0);