128 RawToCellConverterSpec(
int subspecification,
bool hasDecodingErrors,
bool hasTriggerReconstruction, std::shared_ptr<CalibLoader> calibhandler) :
framework::
Task(), mSubspecification(subspecification), mCreateRawDataErrors(hasDecodingErrors), mDoTriggerReconstruction(hasTriggerReconstruction), mCalibHandler(calibhandler){};
157 mMaxErrorMessages = maxMessages;
185 class ModuleIndexException :
public std::exception
190 enum class ModuleType_t {
201 ModuleIndexException(
int moduleIndex,
int column,
int row,
int columnshifted,
int rowshifted);
205 ModuleIndexException(
int moduleIndex);
208 ~ModuleIndexException() noexcept final = default;
212 const
char* what() const noexcept final {
return "Invalid cell / LEDMON index"; }
216 ModuleType_t getModuleType()
const {
return mModuleType; }
220 int getIndex()
const {
return mIndex; }
224 int getColumn()
const {
return mColumn; }
228 int getRow()
const {
return mRow; }
232 int getColumnShifted()
const {
return mColumnShifted; }
236 int getRowShifted()
const {
return mRowShifted; }
239 ModuleType_t mModuleType;
243 int mColumnShifted = -1;
244 int mRowShifted = -1;
249 struct CellTimeCorrection {
258 double getCorrectedTime(
double rawtime)
const {
return rawtime - mTimeShift - 25. * mBcMod4; }
263 struct LocalPosition {
264 uint16_t mSupermoduleID;
270 using TRUContainer = std::vector<o2::emcal::CompressedTRU>;
271 using PatchContainer = std::vector<o2::emcal::CompressedTriggerPatch>;
280 bool isLostTimeframe(framework::ProcessingContext& ctx)
const;
283 void updateCalibrationObjects();
293 int bookEventCells(
const gsl::span<const o2::emcal::RecCellInfo>&
cells,
bool isLELDMON);
301 void sendData(framework::ProcessingContext& ctx)
const;
309 int getCellAbsID(
int supermoduleID,
int column,
int row);
316 int geLEDMONAbsID(
int supermoduleID,
int module);
349 std::tuple<TRUContainer, PatchContainer> buildL0Patches(
const EventContainer& currentevent)
const;
355 std::vector<o2::emcal::CompressedL0TimeSum> buildL0Timesums(
const o2::emcal::EventContainer& currentevent, uint8_t l0time)
const;
364 std::tuple<uint16_t, uint8_t> reconstructTriggerPatch(
const gsl::span<const FastORTimeSeries*> fastors)
const;
375 void handleAddressError(
const Mapper::AddressNotFoundException& error,
int ddlID,
int hwaddress);
406 void handleDDLError(
const MappingHandler::DDLInvalid& error,
int feeID);
419 void handleGeometryError(
const ModuleIndexException& error,
int supermoduleID,
int cellID,
int hwaddress,
ChannelType_t chantype);
449 void handlePageError(
const RawDecodingError& error);
458 void handleMinorPageError(
const RawReaderMemory::MinorError& error);
469 void handleFastORErrors(
const FastORIndexException& error,
unsigned int linkID,
unsigned int indexTRU);
480 void handleFastORStartTimeErrors(
const FastOrStartTimeInvalidException& e,
unsigned int linkID,
unsigned int indexTRU);
491 void handlePatchError(
const TRUDataHandler::PatchIndexException& error,
unsigned int linkID,
unsigned int indexTRU);
502 void handleTRUIndexError(
const TRUIndexException& error,
unsigned int linkID,
unsigned int hwaddress);
505 int mNoiseThreshold = 0;
506 int mNumErrorMessages = 0;
507 int mErrorMessagesSuppressed = 0;
508 int mMaxErrorMessages = 100;
509 bool mMergeLGHG =
true;
510 bool mActiveLinkCheck =
true;
511 bool mPrintTrailer =
false;
512 bool mDisablePedestalEvaluation =
false;
513 bool mCreateRawDataErrors =
false;
514 bool mDoTriggerReconstruction =
false;
515 std::chrono::time_point<std::chrono::system_clock> mReferenceTime;
516 Geometry* mGeometry =
nullptr;
517 RecoContainer mCellHandler;
518 std::shared_ptr<CalibLoader> mCalibHandler;
519 std::unique_ptr<MappingHandler> mMapper =
nullptr;
520 std::unique_ptr<TriggerMappingV2> mTriggerMapping;
521 std::unique_ptr<CaloRawFitter> mRawFitter;
522 std::vector<Cell> mOutputCells;
523 std::vector<TriggerRecord> mOutputTriggerRecords;
524 std::vector<ErrorTypeFEE> mOutputDecoderErrors;
525 std::vector<CompressedTRU> mOutputTRUs;
526 std::vector<TriggerRecord> mOutputTRUTriggerRecords;
527 std::vector<CompressedTriggerPatch> mOutputPatches;
528 std::vector<TriggerRecord> mOutputPatchTriggerRecords;
529 std::vector<CompressedL0TimeSum> mOutputTimesums;
530 std::vector<TriggerRecord> mOutputTimesumTriggerRecords;