Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
816ebc03
Commit
816ebc03
authored
May 06, 2019
by
Jens Kroeger
Browse files
Pixel object: renamed generic value to raw
parent
0b491372
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/objects/Pixel.cpp
View file @
816ebc03
...
...
@@ -3,6 +3,6 @@
using
namespace
corryvreckan
;
void
Pixel
::
print
(
std
::
ostream
&
out
)
const
{
out
<<
"Pixel "
<<
this
->
column
()
<<
", "
<<
this
->
row
()
<<
", "
<<
this
->
value
()
<<
", "
<<
this
->
timestamp
()
out
<<
"Pixel "
<<
this
->
column
()
<<
", "
<<
this
->
row
()
<<
", "
<<
this
->
raw
()
<<
", "
<<
this
->
timestamp
()
<<
", is Binary"
<<
(
m_isBinary
==
true
?
"true"
:
"false"
);
}
src/objects/Pixel.hpp
View file @
816ebc03
...
...
@@ -13,24 +13,23 @@ namespace corryvreckan {
public:
// Constructors and destructors
Pixel
()
=
default
;
Pixel
(
std
::
string
detectorID
,
int
row
,
int
col
,
int
value
)
:
Pixel
(
detectorID
,
row
,
col
,
value
,
0.
)
{}
Pixel
(
std
::
string
detectorID
,
int
row
,
int
col
,
int
value
,
double
timestamp
)
:
Pixel
(
detectorID
,
row
,
col
,
value
,
timestamp
,
false
)
{}
Pixel
(
std
::
string
detectorID
,
int
row
,
int
col
,
int
value
,
double
timestamp
,
bool
binary
)
:
Object
(
detectorID
,
timestamp
),
m_row
(
row
),
m_column
(
col
),
m_value
(
value
),
m_charge
(
value
),
m_isBinary
(
binary
)
{
}
Pixel
(
std
::
string
detectorID
,
int
row
,
int
col
,
int
raw
)
:
Pixel
(
detectorID
,
row
,
col
,
raw
,
0.
)
{}
Pixel
(
std
::
string
detectorID
,
int
row
,
int
col
,
int
raw
,
double
timestamp
)
:
Pixel
(
detectorID
,
row
,
col
,
raw
,
timestamp
,
false
)
{}
Pixel
(
std
::
string
detectorID
,
int
row
,
int
col
,
int
raw
,
double
timestamp
,
bool
binary
)
:
Object
(
detectorID
,
timestamp
),
m_row
(
row
),
m_column
(
col
),
m_raw
(
raw
),
m_charge
(
raw
),
m_isBinary
(
binary
)
{}
int
row
()
const
{
return
m_row
;
}
int
column
()
const
{
return
m_column
;
}
std
::
pair
<
int
,
int
>
coordinates
()
{
return
std
::
make_pair
(
m_column
,
m_row
);
}
//
value
is a generic pixel value which can be ToT, ADC, ..., depending on the detector
//
raw
is a generic pixel value which can be ToT, ADC, ..., depending on the detector
// if isBinary==true, the value will always be 1
int
value
()
const
{
return
(
m_isBinary
==
true
?
1
:
m_
value
);
}
int
raw
()
const
{
return
(
m_isBinary
==
true
?
1
:
m_
raw
);
}
double
charge
()
const
{
return
m_charge
;
}
void
setCharge
(
double
charge
)
{
m_charge
=
charge
;
}
void
set
Value
(
int
value
)
{
m_value
=
value
;
}
void
set
Raw
(
int
raw
)
{
m_raw
=
raw
;
}
void
setBinary
(
bool
binary
)
{
m_isBinary
=
binary
;
}
/**
...
...
@@ -48,7 +47,7 @@ namespace corryvreckan {
// Member variables
int
m_row
;
int
m_column
;
int
m_
value
;
int
m_
raw
;
double
m_charge
;
bool
m_isBinary
;
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment