Belle II Software development
ARICHCalibrationChecker.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/* Basf2 headers. */
12#include <framework/database/DBObjPtr.h>
13#include <framework/dataobjects/EventMetaData.h>
14#include <framework/datastore/StoreObjPtr.h>
15#include <framework/logging/Logger.h>
16
17/* C++ headers. */
18#include <string>
19
20namespace Belle2 {
30
31 public:
32
37
42
46 void setExperimentRun(int experiment, int run);
47
51 void setTestingPayload(const std::string& testingPayloadName)
52 {
53 m_testingPayloadName = testingPayloadName;
54 }
55
59 void setGlobalTag(const std::string& globalTagName)
60 {
61 m_GlobalTagName = globalTagName;
62 }
63
68 const std::string& channelMaskResultsFile)
69 {
70 m_channelMaskResultsFile = channelMaskResultsFile;
71 }
72
76 void checkChannelMask();
77
81 int getSector(int modID);
82
86 int getRing(int modID);
87
88 private:
89
93 void initializeDatabase();
94
98 void resetDatabase();
99
103 template<class T> void printPayloadInformation(DBObjPtr<T>& dbObject)
104 {
105 B2INFO("Analyzing the following payload:"
106 << LogVar("Global Tag", m_GlobalTagName.c_str())
107 << LogVar("Name", dbObject.getName())
108 << LogVar("Revision", dbObject.getRevision())
109 << LogVar("IoV", dbObject.getIoV()));
110 }
111
114
116 int m_run;
117
119 std::string m_testingPayloadName = "";
120
122 std::string m_GlobalTagName = "";
123
125 std::string m_channelMaskResultsFile = "channel_mask.root";
126
129
130 };
131
133}
134
void setTestingPayload(const std::string &testingPayloadName)
Set testing payload name.
void checkChannelMask()
Check channel mask.
void setGlobalTag(const std::string &globalTagName)
Set Global Tag name.
void resetDatabase()
Reset the database.
void initializeDatabase()
Initialize the database.
std::string m_channelMaskResultsFile
Output file for channel mask results.
int getRing(int modID)
Get HAPD ring number.
int getSector(int modID)
Get HAPD sector number.
void setExperimentRun(int experiment, int run)
Set experiment and run numbers.
std::string m_GlobalTagName
Global Tag name.
std::string m_testingPayloadName
Testing payload location.
void printPayloadInformation(DBObjPtr< T > &dbObject)
Print payload information.
StoreObjPtr< EventMetaData > m_EventMetaData
Event metadata.
void setChannelMaskResultsFile(const std::string &channelMaskResultsFile)
Set channel mask results file.
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
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.