Project
Loading...
Searching...
No Matches
Cluster.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11#ifndef ALICEO2_EMCAL_CLUSTER_H_
12#define ALICEO2_EMCAL_CLUSTER_H_
13
16
17#include <iosfwd>
18
19namespace o2::emcal
20{
21
26class Cluster : public o2::dataformats::TimeStamp<Float16_t>
27{
29
30 public:
31 Cluster() = default;
32 Cluster(Float_t time, int firstcell, int ncells);
33 ~Cluster() noexcept = default;
34
35 [[nodiscard]] Int_t getNCells() const { return mCellIndices.getEntries(); }
36 [[nodiscard]] Int_t getCellIndexFirst() const { return mCellIndices.getFirstEntry(); }
37 [[nodiscard]] CellIndexRange getCellIndexRange() const { return mCellIndices; }
38
39 void setCellIndices(int firstcell, int ncells)
40 {
41 mCellIndices.setFirstEntry(firstcell);
42 mCellIndices.setEntries(ncells);
43 }
44 void setCellIndexFirst(int firstcell) { mCellIndices.setFirstEntry(firstcell); }
45 void setNCells(int ncells) { mCellIndices.setEntries(ncells); }
46
47 void PrintStream(std::ostream& stream) const;
48
49 private:
50 CellIndexRange mCellIndices;
51 ClassDefNV(Cluster, 1);
52};
53
54std::ostream& operator<<(std::ostream& stream, const o2::emcal::Cluster& cluster);
55
56} // namespace o2::emcal
57
58#endif
int16_t time
Definition RawEventData.h:4
Class to refer to the 1st entry and N elements of some group in the continuous container.
EMCAL Cluster.
Definition Cluster.h:27
void setCellIndexFirst(int firstcell)
Definition Cluster.h:44
CellIndexRange getCellIndexRange() const
Definition Cluster.h:37
void setCellIndices(int firstcell, int ncells)
Definition Cluster.h:39
~Cluster() noexcept=default
void PrintStream(std::ostream &stream) const
Definition Cluster.cxx:24
Int_t getNCells() const
Definition Cluster.h:35
void setNCells(int ncells)
Definition Cluster.h:45
Int_t getCellIndexFirst() const
Definition Cluster.h:36
GLuint GLuint stream
Definition glcorearb.h:1806
std::ostream & operator<<(std::ostream &stream, const Cell &cell)
Stream operator for EMCAL cell.
Definition Cell.cxx:366