Project
Loading...
Searching...
No Matches
EvIndex.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
15
16#ifndef ALICEO2_EVINDEX_H
17#define ALICEO2_EVINDEX_H
18
19#include <Rtypes.h>
20
21namespace o2
22{
23namespace dataformats
24{
25// Composed Label to encode object origin in the tree or other segmented input
26
27template <typename E = int, typename I = int>
29{
30 public:
31 EvIndex(E ev, I idx) { set(ev, idx); }
32 EvIndex(const EvIndex<E, I>& src) = default;
33 EvIndex() = default;
34 ~EvIndex() = default;
35 void set(E ev, I idx)
36 {
37 mEvent = ev;
38 mIndex = idx;
39 }
40 E getEvent() const { return mEvent; }
41 I getIndex() const { return mIndex; }
42 void setEvent(E ev) { mEvent = ev; }
43 void setIndex(I ind) { mIndex = ind; }
44 void shiftEvent(E inc) { mEvent += inc; }
45 void shiftIndex(I inc) { mIndex += inc; }
46
47 private:
48 E mEvent{};
49 I mIndex{};
50
51 ClassDefNV(EvIndex, 1);
52};
53} // namespace dataformats
54} // namespace o2
55
56#endif
EvIndex(E ev, I idx)
Definition EvIndex.h:31
void set(E ev, I idx)
Definition EvIndex.h:35
void shiftIndex(I inc)
Definition EvIndex.h:45
EvIndex(const EvIndex< E, I > &src)=default
void shiftEvent(E inc)
Definition EvIndex.h:44
void setIndex(I ind)
Definition EvIndex.h:43
GLenum src
Definition glcorearb.h:1767
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...