Skip to content
Snippets Groups Projects

Streamline MuonRawToCoord

Merged Gerhard Raven requested to merge update-muonrawtocoord into master
1 unresolved thread
  • do not use Error(...) but instead throw exception
  • put all code in .cpp file
  • push some code into freestanding function instead of member function

this should simplify the migration to Gaudi::Algorithm from GaudiAlgorithm

Edited by Marco Cattaneo

Merge request reports

Pipeline #678205 passed

Pipeline passed for 437e2c07 on update-muonrawtocoord

Merged by Marco CattaneoMarco Cattaneo 6 years ago (Feb 3, 2019 10:50am UTC)

Loading

Pipeline #687627 passed

Pipeline passed for 65d133a3 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
102 auto preamble_size = 2*((rawdata[0]+3)/2);
103 if (rawdata.size()<preamble_size) OOPS( MuonRaw::ErrorCode::PADDING_TOO_LONG );
104 rawdata = rawdata.subspan( preamble_size );
105 for (int i=0;i<4;++i) {
106 if (UNLIKELY( rawdata.empty())) OOPS( MuonRaw::ErrorCode::BANK_TOO_SHORT );
107 if (UNLIKELY( rawdata.size() < 1 + rawdata[0] )) OOPS( MuonRaw::ErrorCode::TOO_MANY_HITS );
108 for (unsigned int pp : rawdata.subspan(1,rawdata[0])) {
109 unsigned int add = (pp&0x0FFF);
110 unsigned int tdc_value = ((pp&0xF000)>>12);
111 std::optional<LHCb::MuonTileID> tile = make_tile(add);
112 if (UNLIKELY(!tile.has_value())) continue;
113 *out++ = { std::move(*tile), tdc_value };
114 }
115 rawdata = rawdata.subspan(1+rawdata[0]);
116 }
117 assert(rawdata.empty());
  • I am sorry I haven't proceed with this. I plan to resume working on it from tomorrow afternoon.

  • Please register or sign in to reply
    Loading