Commit d75caf16 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

EventLoaderTimepix3: make DETECTOR_MODULE, TYPE="Timepix3". This breaks the...

EventLoaderTimepix3: make DETECTOR_MODULE, TYPE="Timepix3". This breaks the current skipping mechanism
parent b15d59cc
# Define module and return the generated name as MODULE_NAME # Define module and return the generated name as MODULE_NAME
CORRYVRECKAN_GLOBAL_MODULE(MODULE_NAME) CORRYVRECKAN_DETECTOR_MODULE(MODULE_NAME)
CORRYVRECKAN_DETECTOR_TYPE(${MODULE_NAME} "Timepix3")
# Add source files to library # Add source files to library
CORRYVRECKAN_MODULE_SOURCES(${MODULE_NAME} CORRYVRECKAN_MODULE_SOURCES(${MODULE_NAME}
......
...@@ -16,13 +16,15 @@ namespace corryvreckan { ...@@ -16,13 +16,15 @@ namespace corryvreckan {
public: public:
// Constructors and destructors // Constructors and destructors
EventLoaderTimepix3(Configuration config, std::vector<std::shared_ptr<Detector>> detectors); EventLoaderTimepix3(Configuration config, std::shared_ptr<Detector> detector);
~EventLoaderTimepix3() {} ~EventLoaderTimepix3() {}
// Standard algorithm functions // Standard algorithm functions
void initialise(); void initialise();
StatusCode run(Clipboard* clipboard); StatusCode run(Clipboard* clipboard);
void finalise();
private:
std::shared_ptr<Detector> m_detector;
// ROOT graphs // ROOT graphs
TH1F* pixelToT_beforecalibration; TH1F* pixelToT_beforecalibration;
...@@ -36,10 +38,9 @@ namespace corryvreckan { ...@@ -36,10 +38,9 @@ namespace corryvreckan {
TH2F* pixelTOAParameterT; TH2F* pixelTOAParameterT;
TH1F* timeshiftPlot; TH1F* timeshiftPlot;
private: bool loadData(Clipboard* clipboard, Pixels*, SpidrSignals*);
bool loadData(Clipboard* clipboard, std::shared_ptr<Detector> detector, Pixels*, SpidrSignals*);
void loadCalibration(std::string path, char delim, std::vector<std::vector<float>>& dat); void loadCalibration(std::string path, char delim, std::vector<std::vector<float>>& dat);
void maskPixels(std::shared_ptr<Detector>, std::string); void maskPixels(std::string);
// configuration paramaters: // configuration paramaters:
double m_triggerLatency; double m_triggerLatency;
...@@ -57,20 +58,20 @@ namespace corryvreckan { ...@@ -57,20 +58,20 @@ namespace corryvreckan {
std::vector<std::vector<float>> vtoa; std::vector<std::vector<float>> vtoa;
// Member variables // Member variables
std::map<std::string, std::vector<std::unique_ptr<std::ifstream>>> m_files; std::vector<std::unique_ptr<std::ifstream>> m_files;
std::map<std::string, std::vector<std::unique_ptr<std::ifstream>>::iterator> m_file_iterator; std::vector<std::unique_ptr<std::ifstream>>::iterator m_file_iterator;
std::map<std::string, unsigned long long int> m_syncTime; unsigned long long int m_syncTime;
std::map<std::string, bool> m_clearedHeader; bool m_clearedHeader;
std::map<std::string, long long int> m_syncTimeTDC; long long int m_syncTimeTDC;
std::map<std::string, int> m_TDCoverflowCounter; int m_TDCoverflowCounter;
long long int m_currentEvent; long long int m_currentEvent;
unsigned long long int m_prevTime; unsigned long long int m_prevTime;
bool m_shutterOpen; bool m_shutterOpen;
std::map<std::string, Pixels*> bufferedData; Pixels* bufferedData;
std::map<std::string, SpidrSignals*> bufferedSignals; SpidrSignals* bufferedSignals;
}; };
} // namespace corryvreckan } // namespace corryvreckan
#endif // TIMEPIX3EVENTLOADER_H #endif // TIMEPIX3EVENTLOADER_H
Supports Markdown
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