Project
Loading...
Searching...
No Matches
MpArea.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
16#ifndef O2_MID_MPAREA_H
17#define O2_MID_MPAREA_H
18
19#include <array>
20
21namespace o2
22{
23namespace mid
24{
25class MpArea
26{
27 public:
28 MpArea(double x1 = 0., double y1 = 0., double x2 = 0., double y2 = 0.);
29 // virtual ~MpArea() = default;
30
31 double getCenterX() const;
32 double getCenterY() const;
33 double getHalfSizeX() const;
34 double getHalfSizeY() const;
35 bool isValid() const;
36
38 void setXmin(double val) { mPositions[0] = val; }
40 void setXmax(double val) { mPositions[2] = val; }
42 void setYmin(double val) { mPositions[1] = val; }
44 void setYmax(double val) { mPositions[3] = val; }
45
47 double getXmin() const { return mPositions[0]; }
49 double getXmax() const { return mPositions[2]; }
51 double getYmin() const { return mPositions[1]; }
53 double getYmax() const { return mPositions[3]; }
54
55 private:
56 std::array<double, 4> mPositions;
57};
58} // namespace mid
59} // namespace o2
60#endif /* O2_MID_MPAREA_H */
void setXmax(double val)
Set x max.
Definition MpArea.h:40
bool isValid() const
Definition MpArea.cxx:61
double getXmax() const
Get x max.
Definition MpArea.h:49
double getHalfSizeX() const
Definition MpArea.cxx:47
double getCenterY() const
Definition MpArea.cxx:40
double getYmin() const
Get y min.
Definition MpArea.h:51
void setXmin(double val)
Set x min.
Definition MpArea.h:38
void setYmin(double val)
Set y min.
Definition MpArea.h:42
double getHalfSizeY() const
Definition MpArea.cxx:54
double getYmax() const
Get y max.
Definition MpArea.h:53
double getCenterX() const
Definition MpArea.cxx:33
void setYmax(double val)
Set y max.
Definition MpArea.h:44
double getXmin() const
Get x min.
Definition MpArea.h:47
GLuint GLfloat GLfloat GLfloat GLfloat y1
Definition glcorearb.h:5034
GLuint GLfloat GLfloat GLfloat x1
Definition glcorearb.h:5034
GLuint GLfloat * val
Definition glcorearb.h:1582
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...