Belle II Software development
SVDPedestalCalibrations.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#include <vxd/dataobjects/VxdID.h>
12#include <svd/dbobjects/SVDCalibrationsBase.h>
13#include <svd/dbobjects/SVDCalibrationsVector.h>
14#include <framework/database/DBObjPtr.h>
15
16#include <string>
17
18namespace Belle2 {
31 public:
32 static std::string name;
38 {
39 m_aDBObjPtr.addCallback([ this ](const std::string&) -> void {
40 B2DEBUG(20, "SVDPedestalCalibrations: from now on we are using " <<
41 this->m_aDBObjPtr -> get_uniqueID()); });
42 }
43
44
54 inline float getPedestal(const VxdID& sensorID, const bool& isU, const unsigned short& strip) const
55 {
56 return m_aDBObjPtr->get(sensorID.getLayerNumber(), sensorID.getLadderNumber(),
57 sensorID.getSensorNumber(), m_aDBObjPtr->sideIndex(isU),
58 strip);
59 }
60
61 /* inline void setPedestal(const VxdID& sensorID, const bool& isU , const unsigned short& strip, float stripPedestal)
62 {
63 m_aDBObjPtr->set(sensorID.getLayerNumber(), sensorID.getLadderNumber(),
64 sensorID.getSensorNumber(), m_aDBObjPtr->sideIndex(isU),
65 strip, stripPedestal);
66 }
67 */
68
70 TString getUniqueID() { return m_aDBObjPtr->get_uniqueID(); }
71
73 bool isValid() { return m_aDBObjPtr.isValid(); }
74
75 private:
79 };
81}
82
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
base class for calibrations classes
This class defines the dbobject and the method to access SVD calibrations from the noise local runs.
SVDPedestalCalibrations()
Constructor, no input argument is required.
SVDCalibrationsBase< SVDCalibrationsVector< float > > t_payload
typedef of the SVDPedestalCalibrations payload of all SVD strips
static std::string name
name of the SVDPedestalCalibrations payload
float getPedestal(const VxdID &sensorID, const bool &isU, const unsigned short &strip) const
This is the method for getting the pedestal.
TString getUniqueID()
returns the unique ID of the payload
DBObjPtr< t_payload > m_aDBObjPtr
SVDPedestalCalibrations payload.
bool isValid()
returns true if the m_aDBObtPtr is valid in the requested IoV
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
baseType getSensorNumber() const
Get the sensor id.
Definition: VxdID.h:100
baseType getLadderNumber() const
Get the ladder id.
Definition: VxdID.h:98
baseType getLayerNumber() const
Get the layer id.
Definition: VxdID.h:96
Abstract base class for different kinds of events.