Belle II Software
release-05-01-25
PXDRawROIs.cc
1
/**************************************************************************
2
* BASF2 (Belle Analysis Framework 2) *
3
* Copyright(C) 2013 Belle II Collaboration *
4
* *
5
* Author: The Belle II Collaboration *
6
* Contributors: Bjoern Spruck *
7
* *
8
* This software is provided "as is" without any warranty. *
9
**************************************************************************/
10
11
#include <pxd/dataobjects/PXDRawROIs.h>
12
#include <boost/spirit/home/support/detail/endian.hpp>
13
14
using namespace
std;
15
using namespace
Belle2
;
16
17
PXDRawROIs::PXDRawROIs(
unsigned
int
nrroi,
unsigned
int
* data):
18
m_2timesNrROIs(2 * nrroi), m_rois(NULL)
19
{
20
m_rois
=
new
int
[
m_2timesNrROIs
];
21
boost::spirit::endian::ubig32_t* d = (boost::spirit::endian::ubig32_t*)data;
22
for
(
unsigned
int
i = 0; i <
m_2timesNrROIs
; i++) {
23
m_rois
[i] = d[i];
// We have to do 32bit endian swap, TODO VERIFY this!
24
}
25
}
26
27
PXDRawROIs::~PXDRawROIs
()
28
{
29
if
(
m_rois
)
30
delete
[]
m_rois
;
31
}
Belle2::PXDRawROIs::m_rois
int * m_rois
Buffer of size 2*m_NrROIs ints.
Definition:
PXDRawROIs.h:126
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
Belle2::PXDRawROIs::~PXDRawROIs
~PXDRawROIs()
Destructor.
Definition:
PXDRawROIs.cc:27
Belle2::PXDRawROIs::m_2timesNrROIs
unsigned int m_2timesNrROIs
Number of ROIs times two (size of one ROI is 2*32bit)
Definition:
PXDRawROIs.h:124
pxd
dataobjects
src
PXDRawROIs.cc
Generated on Fri Nov 5 2021 03:56:06 for Belle II Software by
1.8.17