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
14#include <array>
15#include <iosfwd>
16#include <string>
17#include <vector>
20
21namespace o2
22{
23
24namespace emcal
25{
26
31class Cluster : public o2::dataformats::TimeStamp<Float16_t>
32{
34
35 public:
36 Cluster() = default;
37 Cluster(Float_t time, int firstcell, int ncells);
38 ~Cluster() noexcept = default;
39
40 Int_t getNCells() const { return mCellIndices.getEntries(); }
41 Int_t getCellIndexFirst() const { return mCellIndices.getFirstEntry(); }
42 CellIndexRange getCellIndexRange() const { return mCellIndices; }
43
44 void setCellIndices(int firstcell, int ncells)
45 {
46 mCellIndices.setFirstEntry(firstcell);
47 mCellIndices.setEntries(ncells);
48 }
49 void setCellIndexFirst(int firstcell) { mCellIndices.setFirstEntry(firstcell); }
50 void setNCells(int ncells) { mCellIndices.setEntries(ncells); }
51
52 void PrintStream(std::ostream& stream) const;
53
54 private:
55 CellIndexRange mCellIndices;
56 ClassDefNV(Cluster, 1);
57};
58
59std::ostream& operator<<(std::ostream& stream, const o2::emcal::Cluster& cluster);
60
61} // namespace emcal
62
63} // namespace o2
64
65#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:32
void setCellIndexFirst(int firstcell)
Definition Cluster.h:49
CellIndexRange getCellIndexRange() const
Definition Cluster.h:42
void setCellIndices(int firstcell, int ncells)
Definition Cluster.h:44
~Cluster() noexcept=default
void PrintStream(std::ostream &stream) const
Definition Cluster.cxx:23
Int_t getNCells() const
Definition Cluster.h:40
void setNCells(int ncells)
Definition Cluster.h:50
Int_t getCellIndexFirst() const
Definition Cluster.h:41
GLuint GLuint stream
Definition glcorearb.h:1806
std::ostream & operator<<(std::ostream &stream, const Cell &cell)
Stream operator for EMCAL cell.
Definition Cell.cxx:355
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...