Belle II Software  release-08-01-10
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 
13 namespace 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 
41  ~PXDRawROIs();
42 
47  unsigned int getNrROIs() const
48  {
49  return m_2timesNrROIs / 2;
50  }
51 
56  int getDHHID(int j) const
57  {
58  if (j < 0 || j >= (int)m_2timesNrROIs / 2) return -1;
59  return (m_rois[2 * j] >> 4) & 0x3F; // & 0x3F0
60  }
61 
66  int getMinVid(int j) const
67  {
68  if (j < 0 || j >= (int)m_2timesNrROIs / 2) return -1;
69  return ((m_rois[2 * j] << 6) & 0x3C0) | ((m_rois[2 * j + 1] >> 26) & 0x3F) ;// & 0x00F , & 0xFC000000
70  }
71 
76  int getMaxVid(int j) const
77  {
78  if (j < 0 || j >= (int)m_2timesNrROIs / 2) return -1;
79  return (m_rois[2 * j + 1] >> 8) & 0x3FF; // & 0x0003FF00
80  }
81 
86  int getMinUid(int j) const
87  {
88  if (j < 0 || j >= (int)m_2timesNrROIs / 2) return -1;
89  return (m_rois[2 * j + 1] >> 18) & 0xFF; // & 0x03FC0000
90  }
91 
96  int getMaxUid(int j) const
97  {
98  if (j < 0 || j >= (int)m_2timesNrROIs / 2) return -1;
99  return (m_rois[2 * j + 1]) & 0xFF;
100  }
101 
106  int getType(int j) const
107  {
108  if (j < 0 || j >= (int)m_2timesNrROIs / 2) return -1;
109  return (m_rois[2 * j] >> 10) & 0x1; // & 0x400
110  }
111 
112  private:
113  unsigned int m_2timesNrROIs;
115  int* m_rois; //[m_2timesNrROIs] // DONT MODIFY THIS COMMENT AS NECESSARY FOR ROOT STREAMER
116 
118  ClassDef(PXDRawROIs, 3)
119  };
120 
121 
123 } //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:66
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:56
int getMaxVid(int j) const
Return MaxVid (Row 2) of ROI j.
Definition: PXDRawROIs.h:76
int getMinUid(int j) const
Return MinUid (Col 1) of ROI j.
Definition: PXDRawROIs.h:86
int * m_rois
Buffer of size 2*m_NrROIs ints.
Definition: PXDRawROIs.h:115
int getType(int j) const
Return Type (Datcon or HLT) of ROI j.
Definition: PXDRawROIs.h:106
unsigned int getNrROIs() const
Get the nr of ROIs.
Definition: PXDRawROIs.h:47
int getMaxUid(int j) const
Return MaxUid (Col 2) of ROI j.
Definition: PXDRawROIs.h:96
unsigned int m_2timesNrROIs
Number of ROIs times two (size of one ROI is 2*32bit)
Definition: PXDRawROIs.h:113
~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.