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
2d4df04a
Commit
2d4df04a
authored
Nov 05, 2018
by
Simon Spannagel
Browse files
Rename EventLoaderTimepix1
parent
b42a1351
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/modules/
Timepix1
EventLoader/CMakeLists.txt
→
src/modules/EventLoader
Timepix1
/CMakeLists.txt
View file @
2d4df04a
...
...
@@ -3,8 +3,7 @@ CORRYVRECKAN_GLOBAL_MODULE(MODULE_NAME)
# Add source files to library
CORRYVRECKAN_MODULE_SOURCES
(
${
MODULE_NAME
}
Timepix1EventLoader.cpp
# ADD SOURCE FILES HERE...
EventLoaderTimepix1.cpp
)
# Provide standard install target
...
...
src/modules/
Timepix1
EventLoader
/
Timepix1EventLoader.cpp
→
src/modules/EventLoaderTimepix1
/
EventLoader
Timepix1
.cpp
View file @
2d4df04a
#include "
Timepix1
EventLoader.h"
#include "EventLoader
Timepix1
.h"
#include <dirent.h>
#include "objects/Pixel.h"
using
namespace
corryvreckan
;
using
namespace
std
;
Timepix1
EventLoader
::
Timepix1EventLoader
(
Configuration
config
,
std
::
vector
<
std
::
shared_ptr
<
Detector
>>
detectors
)
EventLoaderTimepix1
::
EventLoader
Timepix1
(
Configuration
config
,
std
::
vector
<
std
::
shared_ptr
<
Detector
>>
detectors
)
:
Module
(
std
::
move
(
config
),
std
::
move
(
detectors
))
{}
/*
...
...
@@ -13,7 +13,7 @@ Timepix1EventLoader::Timepix1EventLoader(Configuration config, std::vector<std::
clipboard
*/
bool
Timepix1
EventLoader
::
sortByTime
(
string
filename1
,
string
filename2
)
{
bool
EventLoader
Timepix1
::
sortByTime
(
string
filename1
,
string
filename2
)
{
// double filetime1 = stod(filename1.substr(filename1.length()-13,9));
// double filetime2 = stod(filename2.substr(filename2.length()-13,9));
...
...
@@ -31,7 +31,7 @@ bool Timepix1EventLoader::sortByTime(string filename1, string filename2) {
return
(
filetime1
<
filetime2
);
}
void
Timepix1
EventLoader
::
initialise
()
{
void
EventLoader
Timepix1
::
initialise
()
{
// Take input directory from global parameters
m_inputDirectory
=
m_config
.
get
<
std
::
string
>
(
"inputDirectory"
);
...
...
@@ -75,7 +75,7 @@ void Timepix1EventLoader::initialise() {
}
// In each event, load one frame of data from all devices
StatusCode
Timepix1
EventLoader
::
run
(
Clipboard
*
clipboard
)
{
StatusCode
EventLoader
Timepix1
::
run
(
Clipboard
*
clipboard
)
{
LOG_PROGRESS
(
INFO
,
"tpx_loader"
)
<<
"
\r
Running over event "
<<
m_eventNumber
;
...
...
@@ -191,7 +191,7 @@ StatusCode Timepix1EventLoader::run(Clipboard* clipboard) {
return
Success
;
}
void
Timepix1
EventLoader
::
processHeader
(
string
header
,
string
&
device
,
long
long
int
&
time
)
{
void
EventLoader
Timepix1
::
processHeader
(
string
header
,
string
&
device
,
long
long
int
&
time
)
{
// time = stod(header.substr(header.find("Start time : ")+13,13));
string
timestring
=
header
.
substr
(
header
.
find
(
"Start time : "
)
+
13
,
13
);
...
...
@@ -202,7 +202,7 @@ void Timepix1EventLoader::processHeader(string header, string& device, long long
header
.
substr
(
header
.
find
(
"ChipboardID : "
)
+
14
,
header
.
find
(
" # DACs"
)
-
(
header
.
find
(
"ChipboardID : "
)
+
14
));
}
void
Timepix1
EventLoader
::
finalise
()
{
void
EventLoader
Timepix1
::
finalise
()
{
LOG
(
DEBUG
)
<<
"Analysed "
<<
m_eventNumber
<<
" events"
;
}
src/modules/
Timepix1
EventLoader
/
Timepix1EventLoader.h
→
src/modules/EventLoaderTimepix1
/
EventLoader
Timepix1
.h
View file @
2d4df04a
#ifndef
Timepix1
EventLoader_H
#define
Timepix1
EventLoader_H 1
#ifndef EventLoader
Timepix1
_H
#define EventLoader
Timepix1
_H 1
#include <fstream>
#include <iostream>
...
...
@@ -10,12 +10,12 @@
namespace
corryvreckan
{
/** @ingroup Modules
*/
class
Timepix1
EventLoader
:
public
Module
{
class
EventLoader
Timepix1
:
public
Module
{
public:
// Constructors and destructors
Timepix1
EventLoader
(
Configuration
config
,
std
::
vector
<
std
::
shared_ptr
<
Detector
>>
detectors
);
~
Timepix1
EventLoader
()
{}
EventLoader
Timepix1
(
Configuration
config
,
std
::
vector
<
std
::
shared_ptr
<
Detector
>>
detectors
);
~
EventLoader
Timepix1
()
{}
// Functions
void
initialise
();
...
...
@@ -38,4 +38,4 @@ namespace corryvreckan {
std
::
string
m_prevHeader
;
};
}
// namespace corryvreckan
#endif //
Timepix1
EventLoader_H
#endif // EventLoader
Timepix1
_H
src/modules/
Timepix1
EventLoader/README.md
→
src/modules/EventLoader
Timepix1
/README.md
View file @
2d4df04a
File moved
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