Project
Loading...
Searching...
No Matches
PixelChipRecord.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_FOCAL_PIXELCHIPRECORD_H
12#define ALICEO2_FOCAL_PIXELCHIPRECORD_H
13
14#include <cstdint>
15#include <iosfwd>
16#include "Rtypes.h"
18
19namespace o2::focal
20{
22{
24
25 public:
26 PixelChipRecord() = default;
27 PixelChipRecord(int layerID, int feeID, int laneID, int chipID, uint32_t statusCode, int firsthit, int nhits) : mLayerID(layerID), mLaneID(laneID), mChipID(chipID), mFeeID(feeID), mStatusCode(statusCode), mHitIndexRange(firsthit, nhits) {}
28 ~PixelChipRecord() = default;
29
30 void setLayerID(int layerID) { mLayerID = layerID; }
31 void setLaneID(int laneID) { mLaneID = laneID; }
32 void setChipID(int chipID) { mChipID = chipID; }
33 void setFeeID(int feeID) { mFeeID = feeID; }
34 void setStatusCode(uint16_t statusCode) { mStatusCode = statusCode; }
35 void setIndexFirstHit(int firsthit) { mHitIndexRange.setFirstEntry(firsthit); }
36 void setNumberOfHits(int nhits) { mHitIndexRange.setEntries(nhits); }
37
38 int getLayerID() const { return mLayerID; }
39 int getLaneID() const { return mLaneID; }
40 int getChipID() const { return mChipID; }
41 int getFeeID() const { return mFeeID; }
42 uint16_t getStatusCode() const { return mStatusCode; }
43 int getFirstHit() const { return mHitIndexRange.getFirstEntry(); }
44 int getNumberOfHits() const { return mHitIndexRange.getEntries(); }
45
46 void printStream(std::ostream& stream) const;
47
48 private:
49 int mLayerID = -1;
50 int mLaneID = -1;
51 int mChipID = -1;
52 int mFeeID = -1;
53 uint16_t mStatusCode = 0;
54 DataRange mHitIndexRange;
55
56 ClassDefNV(PixelChipRecord, 1);
57};
58
59std::ostream& operator<<(std::ostream& stream, const PixelChipRecord& trg);
60
61}; // namespace o2::focal
62
63#endif
Class to refer to the 1st entry and N elements of some group in the continuous container.
uint16_t getStatusCode() const
void setLayerID(int layerID)
void setNumberOfHits(int nhits)
void setStatusCode(uint16_t statusCode)
void setIndexFirstHit(int firsthit)
PixelChipRecord(int layerID, int feeID, int laneID, int chipID, uint32_t statusCode, int firsthit, int nhits)
void printStream(std::ostream &stream) const
GLuint GLuint stream
Definition glcorearb.h:1806
std::ostream & operator<<(std::ostream &in, const IndexExceptionEvent &error)