Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion DataFormats/Detectors/PHOS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ o2_add_library(DataFormatsPHOS
src/CalibParams.cxx
src/Pedestals.cxx
src/TriggerMap.cxx
src/EventHandler.cxx
PUBLIC_LINK_LIBRARIES O2::CommonDataFormat
O2::Headers
O2::CCDB
Expand All @@ -41,7 +42,9 @@ o2_target_root_dictionary(DataFormatsPHOS
include/DataFormatsPHOS/BadChannelsMap.h
include/DataFormatsPHOS/CalibParams.h
include/DataFormatsPHOS/Pedestals.h
include/DataFormatsPHOS/TriggerMap.h)
include/DataFormatsPHOS/TriggerMap.h
include/DataFormatsPHOS/EventData.h
include/DataFormatsPHOS/EventHandler.h)
o2_add_test(Cell
SOURCES test/testCell.cxx
COMPONENT_NAME DataFormats-PHOS
Expand Down
49 changes: 49 additions & 0 deletions DataFormats/Detectors/PHOS/include/DataFormatsPHOS/EventData.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#ifndef ALICEO2_PHOS_EVENTDATA_H_
#define ALICEO2_PHOS_EVENTDATA_H_

#include <gsl/span>
#include "CommonDataFormat/InteractionRecord.h"
#include "DataFormatsPHOS/Cell.h"
#include "DataFormatsPHOS/Cluster.h"

namespace o2
{

namespace phos
{

template <class InputType>
struct EventData {
InteractionRecord mInteractionRecord; ///< Interaction record for the trigger corresponding to this event
gsl::span<const Cluster> mClusters; ///< PHOS clusters
gsl::span<const InputType> mCells; ///< PHOS cells / digits
gsl::span<const int> mCellIndices; ///< Cell indices in cluster

/// \brief Reset event structure with empty interaction record and ranges
void reset()
{
mInteractionRecord.clear();
mClusters = gsl::span<const Cluster>();
mCells = gsl::span<const InputType>();
mCellIndices = gsl::span<const int>();
}

ClassDefNV(EventData, 1);
};

} // namespace phos

} // namespace o2

#endif // ALICEO2_PHOS_EVENTDATA_H_
Loading