Commit 2d4df04a authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Rename EventLoaderTimepix1

parent b42a1351
......@@ -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
......
#include "Timepix1EventLoader.h"
#include "EventLoaderTimepix1.h"
#include <dirent.h>
#include "objects/Pixel.h"
using namespace corryvreckan;
using namespace std;
Timepix1EventLoader::Timepix1EventLoader(Configuration config, std::vector<std::shared_ptr<Detector>> detectors)
EventLoaderTimepix1::EventLoaderTimepix1(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 Timepix1EventLoader::sortByTime(string filename1, string filename2) {
bool EventLoaderTimepix1::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 Timepix1EventLoader::initialise() {
void EventLoaderTimepix1::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 Timepix1EventLoader::run(Clipboard* clipboard) {
StatusCode EventLoaderTimepix1::run(Clipboard* clipboard) {
LOG_PROGRESS(INFO, "tpx_loader") << "\rRunning over event " << m_eventNumber;
......@@ -191,7 +191,7 @@ StatusCode Timepix1EventLoader::run(Clipboard* clipboard) {
return Success;
}
void Timepix1EventLoader::processHeader(string header, string& device, long long int& time) {
void EventLoaderTimepix1::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 Timepix1EventLoader::finalise() {
void EventLoaderTimepix1::finalise() {
LOG(DEBUG) << "Analysed " << m_eventNumber << " events";
}
#ifndef Timepix1EventLoader_H
#define Timepix1EventLoader_H 1
#ifndef EventLoaderTimepix1_H
#define EventLoaderTimepix1_H 1
#include <fstream>
#include <iostream>
......@@ -10,12 +10,12 @@
namespace corryvreckan {
/** @ingroup Modules
*/
class Timepix1EventLoader : public Module {
class EventLoaderTimepix1 : public Module {
public:
// Constructors and destructors
Timepix1EventLoader(Configuration config, std::vector<std::shared_ptr<Detector>> detectors);
~Timepix1EventLoader() {}
EventLoaderTimepix1(Configuration config, std::vector<std::shared_ptr<Detector>> detectors);
~EventLoaderTimepix1() {}
// Functions
void initialise();
......@@ -38,4 +38,4 @@ namespace corryvreckan {
std::string m_prevHeader;
};
} // namespace corryvreckan
#endif // Timepix1EventLoader_H
#endif // EventLoaderTimepix1_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment