Belle II Software  release-05-01-25
SVDLocalCalibrationsImporter.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Laura Zani *
7  * *
8  * This software is provided "as is" without any warranty. *
9  * WARNING: Do not try to fry it with water. Use only olive oil. *
10  **************************************************************************/
11 
12 #pragma once
13 
14 #include <TObject.h>
15 
16 namespace Belle2 {
27  class SVDLocalCalibrationsImporter {
28 
29  public:
30 
37  {
38  }
39 
44  SVDLocalCalibrationsImporter(int fexp, int frun, int lexp, int lrun):
45  m_firstExperiment(fexp), m_firstRun(frun),
46  m_lastExperiment(lexp), m_lastRun(lrun)
47  {
48  }
49 
50 
55  {}
61  void importSVDChannelMapping(const std::string& fileName = std::string("svd/data/svd_mapping.xml"));
62 
63 
64 
71  void importSVDNoiseCalibrationsFromXML(const std::string& xmlFileName, bool errorTollerant = false);
72 
79  void importSVDPedestalCalibrationsFromXML(const std::string& xmlFileName, bool errorTollerant = false);
80 
87  void importSVDCalAmpCalibrationsFromXML(const std::string& xmlFileName, bool errorTollerant = false);
88 
89 
96  void importSVDHotStripsCalibrationsFromXML(const std::string& xmlFileName, bool errorTollerant = false);
97 
98 
105  void importSVDFADCMaskedStripsFromXML(const std::string& xmlFileName, bool errorTollerant = false);
106 
107 
118  template< class SVDcalibration >
119  void importSVDCalibrationsFromXML(const std::string& condDbname,
120  const std::string& xmlFileName,
121  const std::string& xmlTag,
122  typename SVDcalibration::t_perSideContainer::calibrationType defaultValue,
123  bool errorTollerant);
124 
125 
126  private:
127 
132  int m_firstExperiment;
133  int m_firstRun;
134  int m_lastExperiment;
135  int m_lastRun;
137  };
138 
140 } // Belle2 namespace
Belle2::SVDLocalCalibrationsImporter::SVDLocalCalibrationsImporter
SVDLocalCalibrationsImporter()
Default constructor.
Definition: SVDLocalCalibrationsImporter.h:43
Belle2::SVDLocalCalibrationsImporter::importSVDNoiseCalibrationsFromXML
void importSVDNoiseCalibrationsFromXML(const std::string &xmlFileName, bool errorTollerant=false)
This method import to the database the strip noise from the pedestal local runs.
Belle2::SVDLocalCalibrationsImporter::m_firstRun
int m_firstRun
First run.
Definition: SVDLocalCalibrationsImporter.h:142
Belle2::SVDLocalCalibrationsImporter::importSVDChannelMapping
void importSVDChannelMapping(const std::string &fileName=std::string("svd/data/svd_mapping.xml"))
This method import to the database the channel mapping which is always required to properly fulfilled...
Belle2::SVDLocalCalibrationsImporter::importSVDCalibrationsFromXML
void importSVDCalibrationsFromXML(const std::string &condDbname, const std::string &xmlFileName, const std::string &xmlTag, typename SVDcalibration::t_perSideContainer::calibrationType defaultValue, bool errorTollerant)
This method import to the database the strip noise from the noise local runs.
Belle2::SVDLocalCalibrationsImporter::~SVDLocalCalibrationsImporter
virtual ~SVDLocalCalibrationsImporter()
Destructor.
Definition: SVDLocalCalibrationsImporter.h:63
Belle2::SVDLocalCalibrationsImporter::importSVDFADCMaskedStripsFromXML
void importSVDFADCMaskedStripsFromXML(const std::string &xmlFileName, bool errorTollerant=false)
This method import to the database the list of strips masked at FADC level.
Belle2::SVDLocalCalibrationsImporter::importSVDCalAmpCalibrationsFromXML
void importSVDCalAmpCalibrationsFromXML(const std::string &xmlFileName, bool errorTollerant=false)
This method import to the database the strip pulse width, time and gain from the injection local runs...
Belle2::SVDLocalCalibrationsImporter::importSVDHotStripsCalibrationsFromXML
void importSVDHotStripsCalibrationsFromXML(const std::string &xmlFileName, bool errorTollerant=false)
This method import to the database the list of hot strips flagged online and written in the local run...
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SVDLocalCalibrationsImporter::m_lastExperiment
int m_lastExperiment
Last experiment.
Definition: SVDLocalCalibrationsImporter.h:143
Belle2::SVDLocalCalibrationsImporter::m_firstExperiment
int m_firstExperiment
The interval of validity coordinates are defined as private members.
Definition: SVDLocalCalibrationsImporter.h:141
Belle2::SVDLocalCalibrationsImporter::m_lastRun
int m_lastRun
Last run.
Definition: SVDLocalCalibrationsImporter.h:144
Belle2::SVDLocalCalibrationsImporter::importSVDPedestalCalibrationsFromXML
void importSVDPedestalCalibrationsFromXML(const std::string &xmlFileName, bool errorTollerant=false)
This method import to the database the strip pedestal from the pedestal local runs.