23#include <unordered_map>
33#ifndef ALICEO2_EMCAL_RECOCONTAINER_H
34#define ALICEO2_EMCAL_RECOCONTAINER_H
91 const
char*
what() const noexcept final {
return mMessage.data(); }
95 std::size_t
getIndex()
const {
return mIndex; }
103 std::string mMessage;
134 const gsl::span<const RecCellInfo>
getCells()
const {
return mCells; }
138 const gsl::span<const RecCellInfo>
getLEDMons()
const {
return mLEDMons; }
178 setCellCommon(tower, energy,
time, celltype,
false, hwaddress, ddlID, doMergeHGLG);
195 setCellCommon(tower, energy,
time, celltype,
true, hwaddress, ddlID, doMergeHGLG);
206 void setFastOR(uint16_t fastORAbsID, uint8_t starttime,
const gsl::span<const uint16_t> timesamples);
221 void setCellCommon(
int tower,
double energy,
double time,
ChannelType_t celltype,
bool isLEDmon,
int hwaddress,
int ddlID,
bool doMergeHGLG);
225 bool isCellSaturated(
double energy)
const;
231 uint64_t mTriggerBits = 0;
232 std::vector<RecCellInfo> mCells;
233 std::vector<RecCellInfo> mLEDMons;
234 std::array<TRUDataHandler, TriggerMappingV2::ALLTRUS> mTRUData;
235 std::unordered_map<uint16_t, FastORTimeSeries> mL0FastORs;
272 const
char*
what() const noexcept final
274 return mMessage.data();
283 std::string mMessage;
315 std::unordered_map<o2::InteractionRecord, EventContainer> mEvents;
347 const
char*
what() const noexcept final {
return "Access to invalid element in reco container"; }
365 bool hasNext()
const {
return mCurrentEvent < mOrderedInteractions.size(); }
373 std::vector<o2::InteractionRecord> mOrderedInteractions;
374 std::size_t mCurrentEvent = 0;
EMCAL compressed cell information.
Handler for access of TRU data with invalid TRU index.
void printStream(std::ostream &stream) const
Print error message on stream.
std::size_t getIndex() const
Get the TRU index raising the exception.
~TRUIndexException() noexcept final=default
Destructor.
const char * what() const noexcept final
Get the error message of the exception.
Containter of cells for a given event.
const std::unordered_map< uint16_t, FastORTimeSeries > & getTimeSeriesContainer() const
Access to container with FastOR time series.
void setTriggerBits(uint64_t triggerbits)
Set trigger bits of the interaction.
void setCell(int tower, double energy, double time, ChannelType_t celltype, int hwaddress, int ddlID, bool doMergeHGLG)
Add cell information to the event container.
int getNumberOfLEDMONs() const
Get the number of LEDMONs in the event.
void setFastOR(uint16_t fastORAbsID, uint8_t starttime, const gsl::span< const uint16_t > timesamples)
Add bunch of time series to the container.
void sortCells(bool isLEDmon)
Sort Cells / LEDMONs in container according to tower / module ID.
uint64_t getTriggerBits() const
Get trigger bits of the interaction.
~EventContainer()=default
Destructor.
const TRUDataHandler & readTRUData(std::size_t truIndex) const
Read-only access TRU data of a given TRU.
const gsl::span< const RecCellInfo > getCells() const
Get cells in container.
const o2::InteractionRecord & getInteractionRecord() const
Get interaction record of the event.
const gsl::span< const RecCellInfo > getLEDMons() const
Get LEDMONs in container.
int getNumberOfCells() const
Get the number of cells in the event.
EventContainer()=default
Constructor.
void setInteractionRecord(const o2::InteractionRecord ¤tIR)
Set interaction record.
TRUDataHandler & getTRUData(std::size_t truIndex)
Read and write access TRU data of a given TRU.
void setLEDMONCell(int tower, double energy, double time, ChannelType_t celltype, int hwaddress, int ddlID, bool doMergeHGLG)
Add LEDMON information to the event container.
Handling of access to objects beyond container boundary.
const char * what() const noexcept final
Create error message.
InvalidAccessException()=default
Constructor.
~InvalidAccessException() noexcept final=default
Destructor.
Iterator over reco containers.
RecoContainerReader(RecoContainer &&container)=delete
~RecoContainerReader()=default
Destructor.
EventContainer & nextEvent()
Get the next event in container.
bool hasNext() const
Check whehter there are more events in the container.
std::size_t getNumberOfEvents() const
Get the number of events in the container.
Handling of access to trigger interaction record not present in container.
InteractionNotFoundException(const o2::InteractionRecord ¤tIR)
Constructor.
const char * what() const noexcept final
Get error message of the exception.
const o2::InteractionRecord & getInteractionRecord() const
Get interaction record raising the exception.
~InteractionNotFoundException() noexcept final=default
Destructor.
Handler for cells/LEDMONS/Trigger data in timeframes.
std::size_t getNumberOfEvents() const
Get number of events in container.
~RecoContainer()=default
Destructor.
EventContainer & getEventContainer(const o2::InteractionRecord ¤tIR)
Get container for trigger.
void reset()
Clear container.
RecoContainer()=default
Constructor.
std::vector< o2::InteractionRecord > getOrderedInteractions() const
Get sorted vector interaction records of triggers in container.
Helper class to handle decoded TRU data during the reconstruction.
ChannelType_t
Type of a raw data channel.
std::string to_string(gsl::span< T, Size > span)
uint16_t bc
bunch crossing ID of interaction
Container class for cell information for merging.
int mHWAddressLG
HW address of LG (for monitoring)
bool mHGOutOfRange
Cell has only HG digits which are out of range.
int mDDLID
DDL of the channel (for monitoring)
bool mIsLGnoHG
Cell has only LG digits.
o2::emcal::Cell mCellData
Cell information.
int mHWAddressHG
HW address of HG (for monitoring)