ATLAS Offline Software
Loading...
Searching...
No Matches
TileSamplingFractionCondAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TILECONDITIONS_TILESAMPLINGFRACTIONCONDALG_H
6#define TILECONDITIONS_TILESAMPLINGFRACTIONCONDALG_H
7
8#include "./TileCondAlg.h"
11
16class TileSamplingFractionCondAlg: public TileCondAlg<TileSamplingFraction, TileCalibDrawerFlt> {
17
18 public:
19
21
22 protected:
23
27 virtual StatusCode checkData(const TileCalibData<TileCalibDrawerFlt>& calibData) const override {
28
29 if (m_g4Version > 0) {
30 // G4 version used to calculate Tile sampling fraction is stored in AUX01 calib drawer in DB
31 float g4Version = calibData.getCalibDrawer(1)->getData(0, 0, 0);
32 if (m_g4Version != g4Version) {
33 ATH_MSG_ERROR("Geant4 simulation version (" << m_g4Version / 100
34 << ") is not compatible with version used to calculate Tile SF (" << g4Version / 100 << ")");
35 return StatusCode::FAILURE;
36 }
37 }
38 return StatusCode::SUCCESS;
39 };
40
41 private:
42
46 Gaudi::Property<float> m_g4Version{this, "G4Version", -1,
47 "G4 simulation version to check compatibility with version used to calculate Tile SF (DB), (-1 => not check)"};
48};
49
50
51#endif // TILECONDITIONS_TILESAMPLINGFRACTIONCONDALG_H
#define ATH_MSG_ERROR(x)
Templated condition object to keep TileCalibDrawers.
const T * getCalibDrawer(unsigned int drawerIdx) const
Return TileCalibDrawer of type T.
Generic class for storing a number of floats (Flt) for each channel or ADC.
Condition algorithm to prepare Tile conditions object and put it into conditions store.
Definition TileCondAlg.h:21
Gaudi::Property< float > m_g4Version
Geant4 simulation version to check compatibility with version used to calculate SF (DB)
virtual StatusCode checkData(const TileCalibData< TileCalibDrawerFlt > &calibData) const override
Check compatibility of Geant4 version from input file with version used to calculate SF (DB)
Condition object to keep and provide Tile Calorimeter sampling fraction and number of photoelectrons.