Belle II Software  release-05-02-19
ARICHCalibrationChecker.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2020 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Luka Santelj *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 /* Belle 2 headers. */
14 #include <framework/database/DBObjPtr.h>
15 #include <framework/dataobjects/EventMetaData.h>
16 #include <framework/datastore/StoreObjPtr.h>
17 #include <framework/logging/Logger.h>
18 
19 /* C++ headers. */
20 #include <string>
21 
22 namespace Belle2 {
31  class ARICHCalibrationChecker {
32 
33  public:
34 
39 
44 
48  void setExperimentRun(int experiment, int run);
49 
53  void setTestingPayload(const std::string& testingPayloadName)
54  {
55  m_testingPayloadName = testingPayloadName;
56  }
57 
61  void setGlobalTag(const std::string& globalTagName)
62  {
63  m_GlobalTagName = globalTagName;
64  }
65 
70  const std::string& channelMaskResultsFile)
71  {
72  m_channelMaskResultsFile = channelMaskResultsFile;
73  }
74 
78  void checkChannelMask();
79 
83  int getSector(int modID);
84 
88  int getRing(int modID);
89 
90  private:
91 
95  void initializeDatabase();
96 
100  void resetDatabase();
101 
105  template<class T> void printPayloadInformation(DBObjPtr<T>& dbObject)
106  {
107  B2INFO("Analyzing the following payload:"
108  << LogVar("Global Tag", m_GlobalTagName.c_str())
109  << LogVar("Name", dbObject.getName())
110  << LogVar("Revision", dbObject.getRevision())
111  << LogVar("IoV", dbObject.getIoV()));
112  }
113 
115  int m_experiment;
116 
118  int m_run;
119 
121  std::string m_testingPayloadName = "";
122 
124  std::string m_GlobalTagName = "";
125 
127  std::string m_channelMaskResultsFile = "channel_mask.root";
128 
131 
132  };
133 
135 }
136 
Belle2::ARICHCalibrationChecker::m_run
int m_run
Run number.
Definition: ARICHCalibrationChecker.h:126
Belle2::DBAccessorBase::getRevision
unsigned int getRevision() const
Return current revision of the object.
Definition: DBAccessorBase.h:139
Belle2::ARICHCalibrationChecker::m_GlobalTagName
std::string m_GlobalTagName
Global Tag name.
Definition: ARICHCalibrationChecker.h:132
Belle2::ARICHCalibrationChecker::setExperimentRun
void setExperimentRun(int experiment, int run)
Set experiment and run numbers.
Definition: ARICHCalibrationChecker.cc:43
Belle2::ARICHCalibrationChecker::m_EventMetaData
StoreObjPtr< EventMetaData > m_EventMetaData
Event metadata.
Definition: ARICHCalibrationChecker.h:138
Belle2::DBAccessorBase::getIoV
IntervalOfValidity getIoV() const
Return current IoV of the object.
Definition: DBAccessorBase.h:142
Belle2::ARICHCalibrationChecker::m_testingPayloadName
std::string m_testingPayloadName
Testing payload location.
Definition: ARICHCalibrationChecker.h:129
Belle2::DBObjPtr
Class for accessing objects in the database.
Definition: DBObjPtr.h:31
Belle2::ARICHCalibrationChecker::resetDatabase
void resetDatabase()
Reset the database.
Definition: ARICHCalibrationChecker.cc:75
Belle2::ARICHCalibrationChecker::setGlobalTag
void setGlobalTag(const std::string &globalTagName)
Set Global Tag name.
Definition: ARICHCalibrationChecker.h:69
Belle2::ARICHCalibrationChecker::setTestingPayload
void setTestingPayload(const std::string &testingPayloadName)
Set testing payload name.
Definition: ARICHCalibrationChecker.h:61
Belle2::ARICHCalibrationChecker::checkChannelMask
void checkChannelMask()
Check channel mask.
Definition: ARICHCalibrationChecker.cc:107
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
LogVar
Class to store variables with their name which were sent to the logging service.
Definition: LogVariableStream.h:24
Belle2::ARICHCalibrationChecker::~ARICHCalibrationChecker
~ARICHCalibrationChecker()
Destructor.
Definition: ARICHCalibrationChecker.cc:39
Belle2::ARICHCalibrationChecker::initializeDatabase
void initializeDatabase()
Initialize the database.
Definition: ARICHCalibrationChecker.cc:53
Belle2::ARICHCalibrationChecker::setChannelMaskResultsFile
void setChannelMaskResultsFile(const std::string &channelMaskResultsFile)
Set channel mask results file.
Definition: ARICHCalibrationChecker.h:77
Belle2::ARICHCalibrationChecker::getSector
int getSector(int modID)
Get HAPD sector number.
Definition: ARICHCalibrationChecker.cc:95
Belle2::ARICHCalibrationChecker::m_experiment
int m_experiment
Experiment number.
Definition: ARICHCalibrationChecker.h:123
Belle2::ARICHCalibrationChecker::ARICHCalibrationChecker
ARICHCalibrationChecker()
Constructor.
Definition: ARICHCalibrationChecker.cc:33
Belle2::ARICHCalibrationChecker::printPayloadInformation
void printPayloadInformation(DBObjPtr< T > &dbObject)
Print payload information.
Definition: ARICHCalibrationChecker.h:113
Belle2::DBAccessorBase::getName
const std::string & getName() const
Return name under which the object is saved in the DBStore.
Definition: DBAccessorBase.h:69
Belle2::ARICHCalibrationChecker::m_channelMaskResultsFile
std::string m_channelMaskResultsFile
Output file for channel mask results.
Definition: ARICHCalibrationChecker.h:135
Belle2::ARICHCalibrationChecker::getRing
int getRing(int modID)
Get HAPD ring number.
Definition: ARICHCalibrationChecker.cc:83