Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
59e385b3
Commit
59e385b3
authored
Aug 25, 2019
by
Simon Spannagel
Browse files
Change Objects->ObjectVector, SpidrSignals->SpidrSignalVector
parent
88548c8e
Pipeline
#1057946
passed with stages
in 13 minutes and 21 seconds
Changes
11
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/core/clipboard/Clipboard.cpp
View file @
59e385b3
...
...
@@ -47,9 +47,9 @@ void Clipboard::clear() {
// Loop over all stored collections of this type
for
(
auto
set
=
collections
.
cbegin
();
set
!=
collections
.
cend
();)
{
std
::
shared_ptr
<
Object
s
>
collection
=
std
::
static_pointer_cast
<
Object
s
>
(
set
->
second
);
std
::
shared_ptr
<
Object
Vector
>
collection
=
std
::
static_pointer_cast
<
Object
Vector
>
(
set
->
second
);
// Loop over all objects and delete them
for
(
Object
s
::
iterator
it
=
collection
->
begin
();
it
!=
collection
->
end
();
++
it
)
{
for
(
Object
Vector
::
iterator
it
=
collection
->
begin
();
it
!=
collection
->
end
();
++
it
)
{
delete
(
*
it
);
}
set
=
collections
.
erase
(
set
);
...
...
@@ -68,7 +68,7 @@ std::vector<std::string> Clipboard::list_collections() const {
std
::
string
line
(
corryvreckan
::
demangle
(
block
.
first
.
name
()));
line
+=
": "
;
for
(
const
auto
&
set
:
block
.
second
)
{
std
::
shared_ptr
<
Object
s
>
collection
=
std
::
static_pointer_cast
<
Object
s
>
(
set
.
second
);
std
::
shared_ptr
<
Object
Vector
>
collection
=
std
::
static_pointer_cast
<
Object
Vector
>
(
set
.
second
);
line
+=
set
.
first
+
" ("
+
collection
->
size
()
+
") "
;
}
line
+=
"
\n
"
;
...
...
src/modules/AnalysisPowerPulsing/AnalysisPowerPulsing.cpp
View file @
59e385b3
...
...
@@ -57,7 +57,7 @@ StatusCode AnalysisPowerPulsing::run(std::shared_ptr<Clipboard> clipboard) {
/*
// Now update the power pulsing with any new signals
SpidrSignal
s
* spidrData = (SpidrSignals*)clipboard->get(m_DUT, "SpidrSignals");
SpidrSignal* spidrData = (SpidrSignals*)clipboard->get(m_DUT, "SpidrSignals");
// If there are new signals
if(spidrData != NULL) {
// Loop over all signals registered
...
...
src/modules/AnalysisTelescope/AnalysisTelescope.cpp
View file @
59e385b3
...
...
@@ -55,7 +55,7 @@ void AnalysisTelescope::initialise() {
}
ROOT
::
Math
::
XYZPoint
AnalysisTelescope
::
closestApproach
(
ROOT
::
Math
::
XYZPoint
position
,
std
::
shared_ptr
<
MCParticle
s
>
particles
)
{
std
::
shared_ptr
<
MCParticle
Vector
>
particles
)
{
// Find the closest MC particle
double
smallestDistance
(
DBL_MAX
);
ROOT
::
Math
::
XYZPoint
particlePosition
;
...
...
src/modules/AnalysisTelescope/AnalysisTelescope.h
View file @
59e385b3
...
...
@@ -21,7 +21,7 @@ namespace corryvreckan {
StatusCode
run
(
std
::
shared_ptr
<
Clipboard
>
clipboard
);
private:
ROOT
::
Math
::
XYZPoint
closestApproach
(
ROOT
::
Math
::
XYZPoint
position
,
std
::
shared_ptr
<
MCParticle
s
>
particles
);
ROOT
::
Math
::
XYZPoint
closestApproach
(
ROOT
::
Math
::
XYZPoint
position
,
std
::
shared_ptr
<
MCParticle
Vector
>
particles
);
// Histograms for each of the devices
std
::
map
<
std
::
string
,
TH1F
*>
telescopeMCresidualsLocalX
;
...
...
src/modules/EventLoaderTimepix3/EventLoaderTimepix3.cpp
View file @
59e385b3
...
...
@@ -229,7 +229,7 @@ StatusCode EventLoaderTimepix3::run(std::shared_ptr<Clipboard> clipboard) {
// Make a new container for the data
auto
deviceData
=
std
::
make_shared
<
PixelVector
>
();
auto
spidrData
=
std
::
make_shared
<
SpidrSignal
s
>
();
auto
spidrData
=
std
::
make_shared
<
SpidrSignal
Vector
>
();
// Load the next chunk of data
bool
data
=
loadData
(
clipboard
,
deviceData
,
spidrData
);
...
...
@@ -319,7 +319,7 @@ void EventLoaderTimepix3::loadCalibration(std::string path, char delim, std::vec
// Function to load data for a given device, into the relevant container
bool
EventLoaderTimepix3
::
loadData
(
std
::
shared_ptr
<
Clipboard
>
clipboard
,
std
::
shared_ptr
<
PixelVector
>&
devicedata
,
std
::
shared_ptr
<
SpidrSignal
s
>&
spidrData
)
{
std
::
shared_ptr
<
SpidrSignal
Vector
>&
spidrData
)
{
std
::
string
detectorID
=
m_detector
->
name
();
auto
event
=
clipboard
->
get_event
();
...
...
src/modules/EventLoaderTimepix3/EventLoaderTimepix3.h
View file @
59e385b3
...
...
@@ -39,7 +39,8 @@ namespace corryvreckan {
TH2F
*
pixelTOAParameterT
;
TH1F
*
timeshiftPlot
;
bool
loadData
(
std
::
shared_ptr
<
Clipboard
>
clipboard
,
std
::
shared_ptr
<
PixelVector
>&
,
std
::
shared_ptr
<
SpidrSignals
>&
);
bool
loadData
(
std
::
shared_ptr
<
Clipboard
>
clipboard
,
std
::
shared_ptr
<
PixelVector
>&
,
std
::
shared_ptr
<
SpidrSignalVector
>&
);
void
loadCalibration
(
std
::
string
path
,
char
delim
,
std
::
vector
<
std
::
vector
<
float
>>&
dat
);
void
maskPixels
(
std
::
string
);
...
...
src/modules/FileWriter/FileWriter.cpp
View file @
59e385b3
...
...
@@ -95,7 +95,7 @@ StatusCode FileWriter::run(std::shared_ptr<Clipboard> clipboard) {
detector_name
=
detector_block
.
first
;
}
auto
objects
=
std
::
static_pointer_cast
<
Object
s
>
(
detector_block
.
second
);
auto
objects
=
std
::
static_pointer_cast
<
Object
Vector
>
(
detector_block
.
second
);
LOG
(
TRACE
)
<<
" - "
<<
detector_name
<<
": "
<<
objects
->
size
();
// Create a new branch of the correct type if this object has not been received before
...
...
src/modules/TextWriter/TextWriter.cpp
View file @
59e385b3
...
...
@@ -82,7 +82,7 @@ StatusCode TextWriter::run(std::shared_ptr<Clipboard> clipboard) {
*
output_file_
<<
"--- "
<<
detector_name
<<
" ---"
<<
std
::
endl
;
auto
objects
=
std
::
static_pointer_cast
<
Object
s
>
(
detector_block
.
second
);
auto
objects
=
std
::
static_pointer_cast
<
Object
Vector
>
(
detector_block
.
second
);
for
(
auto
&
object
:
*
objects
)
{
*
output_file_
<<
*
object
<<
std
::
endl
;
}
...
...
src/objects/MCParticle.hpp
View file @
59e385b3
...
...
@@ -37,7 +37,7 @@ namespace corryvreckan {
};
// Vector type declaration
using
MCParticle
s
=
std
::
vector
<
MCParticle
*>
;
using
MCParticle
Vector
=
std
::
vector
<
MCParticle
*>
;
}
// namespace corryvreckan
#endif // MCPARTICLE_H
src/objects/Object.hpp
View file @
59e385b3
...
...
@@ -98,7 +98,7 @@ namespace corryvreckan {
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
corryvreckan
::
Object
&
obj
);
// Vector type declaration
using
Object
s
=
std
::
vector
<
Object
*>
;
using
Object
Vector
=
std
::
vector
<
Object
*>
;
}
// namespace corryvreckan
#endif // CORRYVRECKAN_OBJECT_H
src/objects/SpidrSignal.hpp
View file @
59e385b3
...
...
@@ -26,7 +26,7 @@ namespace corryvreckan {
};
// Vector type declaration
using
SpidrSignal
s
=
std
::
vector
<
SpidrSignal
*>
;
using
SpidrSignal
Vector
=
std
::
vector
<
SpidrSignal
*>
;
}
// namespace corryvreckan
#endif // SPIDRSIGNAL_H
Write
Preview
Markdown
is supported
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