Belle II Software
development
PXDRawROIs.cc
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
#include <pxd/dataobjects/PXDRawROIs.h>
10
#include <boost/endian/arithmetic.hpp>
11
12
using namespace
std
;
13
using namespace
Belle2
;
14
15
PXDRawROIs::PXDRawROIs
(
unsigned
int
nrroi,
unsigned
int
* data):
16
m_2timesNrROIs
(2 * nrroi),
m_rois
(NULL)
17
{
18
m_rois
=
new
int
[
m_2timesNrROIs
];
19
auto
* d = (boost::endian::big_uint32_t*)data;
20
for
(
unsigned
int
i = 0; i <
m_2timesNrROIs
; i++) {
21
m_rois
[i] = d[i];
// We have to do 32bit endian swap, TODO VERIFY this!
22
}
23
}
24
25
PXDRawROIs::~PXDRawROIs
()
26
{
27
if
(
m_rois
)
28
delete
[]
m_rois
;
29
}
Belle2::PXDRawROIs::PXDRawROIs
PXDRawROIs()
Default constructor for the ROOT IO.
Definition
PXDRawROIs.h:29
Belle2::PXDRawROIs::m_rois
int * m_rois
Buffer of size 2*m_NrROIs ints.
Definition
PXDRawROIs.h:114
Belle2::PXDRawROIs::m_2timesNrROIs
unsigned int m_2timesNrROIs
Number of ROIs times two (size of one ROI is 2*32bit)
Definition
PXDRawROIs.h:112
Belle2::PXDRawROIs::~PXDRawROIs
~PXDRawROIs()
Destructor.
Definition
PXDRawROIs.cc:25
Belle2
Abstract base class for different kinds of events.
Definition
MillepedeAlgorithm.h:17
std
STL namespace.
pxd
dataobjects
src
PXDRawROIs.cc
Generated on Mon Sep 1 2025 02:54:44 for Belle II Software by
1.13.2