Commit 4a22d3b6 authored by Jens Kroeger's avatar Jens Kroeger
Browse files

EventDefinitionM26: add histograms for clipboardEventStart

parent 60dd0866
......@@ -56,6 +56,12 @@ void EventDefinitionM26::initialize() {
timebetweenTLUEvents_ =
new TH1F("htimebetweenTrigger", "time between two triggers frames; time /us; #entries", 1000, -0.5, 995.5);
std::string title = "Corryvreckan event start times (placed on clipboard); Corryvreckan event start time [ms];# entries";
hClipboardEventStart = new TH1D("clipboardEventStart", title.c_str(), 3e6, 0, 3e3);
title = "Corryvreckan event start times (placed on clipboard); Corryvreckan event start time [s];# entries";
hClipboardEventStart_long = new TH1D("clipboardEventStart_long", title.c_str(), 3e6, 0, 3e3);
// open the input file with the eudaq reader
try {
readerDuration_ = eudaq::Factory<eudaq::FileReader>::MakeUnique(eudaq::str2hash("native"), duration_);
......@@ -171,6 +177,8 @@ StatusCode EventDefinitionM26::run(const std::shared_ptr<Clipboard>& clipboard)
LOG(DEBUG) << "Defining Corryvreckan event: " << Units::display(evtStart, {"us", "ns"}) << " - "
<< Units::display(evtEnd, {"us", "ns"}) << ", length "
<< Units::display(evtEnd - evtStart, {"us", "ns"});
hClipboardEventStart->Fill(static_cast<double>(Units::convert(evtStart, "us")));
hClipboardEventStart_long->Fill(static_cast<double>(Units::convert(evtStart, "s")));
} else {
LOG(WARNING) << "Current trigger time smaller than previous: " << time_trig << " vs " << time_prev_;
}
......
......@@ -66,6 +66,8 @@ namespace corryvreckan {
TH1F* timebetweenMimosaEvents_;
TH1F* timebetweenTLUEvents_;
TH1D* hClipboardEventStart;
TH1D* hClipboardEventStart_long;
unsigned triggerTLU_{999}, triggerM26_{999}; // not nice, find better solution here!!!
long double time_prev_{}, trig_prev_{}, time_trig_start_{}, time_trig_stop_{}, time_before_{}, time_after_{};
......
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