Belle II Software development
PXDRawROIs.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <framework/datastore/RelationsObject.h>
12
13namespace Belle2 {
25 class PXDRawROIs : public RelationsObject {
26 public:
27
30 m_2timesNrROIs(0), m_rois(NULL) {};
31
32
37 PXDRawROIs(unsigned int nrroi, unsigned int* data);
38
42
46 unsigned int getNrROIs() const
47 {
48 return m_2timesNrROIs / 2;
49 }
50
55 int getDHHID(int j) const
56 {
57 if (j < 0 || j >= (int)m_2timesNrROIs / 2) return -1;
58 return (m_rois[2 * j] >> 4) & 0x3F; // & 0x3F0
59 }
60
65 int getMinVid(int j) const
66 {
67 if (j < 0 || j >= (int)m_2timesNrROIs / 2) return -1;
68 return ((m_rois[2 * j] << 6) & 0x3C0) | ((m_rois[2 * j + 1] >> 26) & 0x3F) ;// & 0x00F , & 0xFC000000
69 }
70
75 int getMaxVid(int j) const
76 {
77 if (j < 0 || j >= (int)m_2timesNrROIs / 2) return -1;
78 return (m_rois[2 * j + 1] >> 8) & 0x3FF; // & 0x0003FF00
79 }
80
85 int getMinUid(int j) const
86 {
87 if (j < 0 || j >= (int)m_2timesNrROIs / 2) return -1;
88 return (m_rois[2 * j + 1] >> 18) & 0xFF; // & 0x03FC0000
89 }
90
95 int getMaxUid(int j) const
96 {
97 if (j < 0 || j >= (int)m_2timesNrROIs / 2) return -1;
98 return (m_rois[2 * j + 1]) & 0xFF;
99 }
100
105 int getType(int j) const
106 {
107 if (j < 0 || j >= (int)m_2timesNrROIs / 2) return -1;
108 return (m_rois[2 * j] >> 10) & 0x1; // & 0x400
109 }
110
111 private:
112 unsigned int m_2timesNrROIs;
114 int* m_rois; //[m_2timesNrROIs] // DONT MODIFY THIS COMMENT AS NECESSARY FOR ROOT STREAMER
115
118 };
119
120
122} //Belle2 namespace
The PXD Raw ROIs class This class stores information about the ROIs processed by ONSEN and makes them...
Definition: PXDRawROIs.h:25
int getMinVid(int j) const
Return MinVid (Row 1) of ROI j.
Definition: PXDRawROIs.h:65
PXDRawROIs()
Default constructor for the ROOT IO.
Definition: PXDRawROIs.h:29
int getDHHID(int j) const
Return DHH ID of ROI j.
Definition: PXDRawROIs.h:55
int getMaxVid(int j) const
Return MaxVid (Row 2) of ROI j.
Definition: PXDRawROIs.h:75
int getMinUid(int j) const
Return MinUid (Col 1) of ROI j.
Definition: PXDRawROIs.h:85
int * m_rois
Buffer of size 2*m_NrROIs ints.
Definition: PXDRawROIs.h:114
int getType(int j) const
Return Type (Datcon or HLT) of ROI j.
Definition: PXDRawROIs.h:105
unsigned int getNrROIs() const
Get the nr of ROIs.
Definition: PXDRawROIs.h:46
int getMaxUid(int j) const
Return MaxUid (Col 2) of ROI j.
Definition: PXDRawROIs.h:95
unsigned int m_2timesNrROIs
Number of ROIs times two (size of one ROI is 2*32bit)
Definition: PXDRawROIs.h:112
~PXDRawROIs()
Destructor.
Definition: PXDRawROIs.cc:25
Defines interface for accessing relations of objects in StoreArray.
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Abstract base class for different kinds of events.