Belle II Software development
KLMCalibrationChecker.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11/* KLM headers. */
12#include <klm/dataobjects/KLMElementNumbers.h>
13
14/* Basf2 headers. */
15#include <framework/database/DBObjPtr.h>
16#include <framework/dataobjects/EventMetaData.h>
17#include <framework/datastore/StoreObjPtr.h>
18#include <framework/logging/Logger.h>
19
20/* C++ headers. */
21#include <string>
22
23namespace Belle2 {
28
33
34 public:
35
40
45
49 void setExperimentRun(int experiment, int run);
50
54 void setTestingPayload(const std::string& testingPayloadName)
55 {
56 m_testingPayloadName = testingPayloadName;
57 }
58
62 void setGlobalTag(const std::string& globalTagName)
63 {
64 m_GlobalTagName = globalTagName;
65 }
66
70 void setAlignmentResultsFile(const std::string& alignmentResultsFile)
71 {
72 m_AlignmentResultsFile = alignmentResultsFile;
73 }
74
79 const std::string& stripEfficiencyResultsFile)
80 {
81 m_StripEfficiencyResultsFile = stripEfficiencyResultsFile;
82 }
83
88 const std::string& timeCableDelayResultsFile)
89 {
90 m_TimeCableDelayResultsFile = timeCableDelayResultsFile;
91 }
92
97 const std::string& timeConstantsResultsFile)
98 {
99 m_TimeConstantsResultsFile = timeConstantsResultsFile;
100 }
101
106 const std::string& eventT0HitResolutionResultsFile)
107 {
108 m_EventT0HitResolutionResultsFile = eventT0HitResolutionResultsFile;
109 }
110
111
115 void checkAlignment();
116
121
126
130 void checkTimeCableDelay();
131
135 void checkTimeConstants();
136
141
142
143 private:
144
148 void initializeDatabase();
149
153 void resetDatabase();
154
158 template<class T> void printPayloadInformation(DBObjPtr<T>& dbObject)
159 {
160 B2INFO("Analyzing the following payload:"
161 << LogVar("Global Tag", m_GlobalTagName.c_str())
162 << LogVar("Name", dbObject.getName())
163 << LogVar("Revision", dbObject.getRevision())
164 << LogVar("IoV", dbObject.getIoV()));
165 }
166
169
171 int m_run;
172
174 std::string m_testingPayloadName = "";
175
177 std::string m_GlobalTagName = "";
178
180 std::string m_AlignmentResultsFile = "alignment.root";
181
183 std::string m_StripEfficiencyResultsFile = "strip_efficiency.root";
184
186 std::string m_TimeCableDelayResultsFile = "timeCableDelay.root";
187
189 std::string m_TimeConstantsResultsFile = "timeConstants.root";
190
192 std::string m_EventT0HitResolutionResultsFile = "eventT0HitResolution.root";
193
196
199
200 };
201
203}
204
const std::string & getName() const
Return name under which the object is saved in the DBStore.
IntervalOfValidity getIoV() const
Return current IoV of the object.
unsigned int getRevision() const
Return current revision of the object.
Class for accessing objects in the database.
Definition DBObjPtr.h:21
void setTestingPayload(const std::string &testingPayloadName)
Set testing payload name.
void checkTimeCableDelay()
Check time cable delay.
void setGlobalTag(const std::string &globalTagName)
Set Global Tag name.
void checkTimeConstants()
Check time constants.
void checkStripEfficiency()
Check strip efficiency.
void resetDatabase()
Reset the database.
void initializeDatabase()
Initialize the database.
void setTimeConstantsResultsFile(const std::string &timeConstantsResultsFile)
Set time constants result file.
void setExperimentRun(int experiment, int run)
Set experiment and run numbers.
void checkAlignment()
Check alignment.
void setTimeCableDelayResultsFile(const std::string &timeCableDelayResultsFile)
Set time cable delay results file.
const KLMElementNumbers * m_ElementNumbers
Element numbers.
std::string m_GlobalTagName
Global Tag name.
std::string m_EventT0HitResolutionResultsFile
Output file for EventT0 hit resolution results.
void setStripEfficiencyResultsFile(const std::string &stripEfficiencyResultsFile)
Set strip efficiency results file.
std::string m_AlignmentResultsFile
Output file for alignment results.
void setEventT0HitResolutionResultsFile(const std::string &eventT0HitResolutionResultsFile)
Set EventT0 hit resolution results file.
std::string m_testingPayloadName
Testing payload location.
void checkEventT0HitResolution()
Check EventT0 hit resolution.
std::string m_TimeCableDelayResultsFile
Output file for time cable delay results.
std::string m_StripEfficiencyResultsFile
Output file for alignment results.
std::string m_TimeConstantsResultsFile
Output file for time constants results.
void createStripEfficiencyHistograms()
Create strip efficiency histograms.
void printPayloadInformation(DBObjPtr< T > &dbObject)
Print payload information.
void setAlignmentResultsFile(const std::string &alignmentResultsFile)
Set alignment results file.
StoreObjPtr< EventMetaData > m_EventMetaData
Event metadata.
Type-safe access to single objects in the data store.
Definition StoreObjPtr.h:96
Class to store variables with their name which were sent to the logging service.
Abstract base class for different kinds of events.