9#include <top/modules/collectors/TOPOffsetCollectorModule.h>
10#include <framework/logging/Logger.h>
35 setDescription(
"A collector for eventT0 and fill pattern offset calibrations");
46 m_names[Const::SVD] =
"svdOffset";
47 m_names[Const::CDC] =
"cdcOffset";
49 registerObject<TH1F>(x.second,
new TH1F(x.second.c_str(),
"Event T0 difference w.r.t TOP; #Delta T_{0} [ns]",
54 registerObject<TH1F>(
"fillPattern",
new TH1F(
"fillPattern",
"Fill pattern from DB; bucket number",
55 RFBuckets, 0, RFBuckets));
56 registerObject<TH1F>(
"recBuckets",
new TH1F(
"recBuckets",
"Reconstructed buckets; bucket number",
57 RFBuckets, 0, RFBuckets));
66 auto h = getObjectPtr<TH1F>(
"fillPattern");
68 for (
int i = 0; i < RFBuckets; i++) {
77 const auto& detector = x.first;
78 if (
m_eventT0->hasTemporaryEventT0(detector)) {
79 auto eventT0s =
m_eventT0->getTemporaryEventT0s(detector);
80 if (eventT0s.empty())
continue;
81 if (detector == Const::CDC and eventT0s.back().algorithm !=
"chi2")
continue;
82 double t0 = eventT0s.back().eventT0;
83 auto h = getObjectPtr<TH1F>(x.second);
88 auto h = getObjectPtr<TH1F>(
"recBuckets");
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
std::map< Const::EDetector, std::string > m_names
histogram names
StoreObjPtr< TOPRecBunch > m_recBunch
reconstructed bunch
StoreObjPtr< EventT0 > m_eventT0
event T0
DBObjPtr< BunchStructure > m_bunchStructure
fill pattern
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
virtual void collect() final
Replacement for event().
TOPOffsetCollectorModule()
Constructor.
virtual void prepare() final
Replacement for initialize().
Abstract base class for different kinds of events.