ATLAS Offline Software
TileCondProxyFile.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TILECONDITIONS_TILECONDPROXYFILE_H
6 #define TILECONDITIONS_TILECONDPROXYFILE_H
7 
8 
9 // Tile includes
11 
12 // Athena includes
14 
15 
16 
17 #include <string>
18 #include <vector>
19 #include <tuple>
20 #include <memory>
21 
27 template<typename T>
28 class TileCondProxyFile: public AthAlgTool, virtual public ITileCondProxy<T> {
29  public:
30 
31  TileCondProxyFile(const std::string& type, const std::string& name, const IInterface* parent);
32  virtual ~TileCondProxyFile() {};
33 
34  virtual StatusCode initialize() override;
35  virtual StatusCode finalize() override;
36 
42  virtual StatusCode fillCalibData(TileCalibData<T>& calibData, EventIDRange& eventRange) const override;
43 
44  private:
45 
46  typedef typename T::DefType::value_type DataVec;
47  typedef std::tuple<unsigned int, unsigned int, unsigned int> DataKey;
48  typedef std::map<DataKey, DataVec> DataMap;
49 
51  std::unique_ptr<const T> createCalibDrawer(unsigned int drawerIdx, unsigned int nChannels
52  , unsigned int objVers, const DataMap& dataMap) const;
53 
55  std::string m_source;
56 
57 };
58 
59 #endif // TILECONDITIONS_TILECONDPROXYFILE_H
RPDUtils::nChannels
unsigned constexpr int nChannels
Definition: RPDUtils.h:23
TileCalibData
Templated condition object to keep TileCalibDrawers.
Definition: TileCalibData.h:26
TileCondProxyFile::~TileCondProxyFile
virtual ~TileCondProxyFile()
Definition: TileCondProxyFile.h:32
TileCondProxyFile::initialize
virtual StatusCode initialize() override
TileCondProxyFile::DataKey
std::tuple< unsigned int, unsigned int, unsigned int > DataKey
Definition: TileCondProxyFile.h:47
TileCondProxyFile::m_source
std::string m_source
Source = COOL folder.
Definition: TileCondProxyFile.h:55
LArHistMerge_trf.dataMap
dataMap
Definition: LArHistMerge_trf.py:218
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TileCondProxyFile::createCalibDrawer
std::unique_ptr< const T > createCalibDrawer(unsigned int drawerIdx, unsigned int nChannels, unsigned int objVers, const DataMap &dataMap) const
Creates a calibDrawer of type T.
AthAlgTool.h
TileCondProxyFile
The tool to get Tile conditions data from file.
Definition: TileCondProxyFile.h:28
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TileCondProxyFile::DataMap
std::map< DataKey, DataVec > DataMap
Definition: TileCondProxyFile.h:48
TileCondProxyFile::DataVec
T::DefType::value_type DataVec
Definition: TileCondProxyFile.h:46
ITileCondProxy.h
TileCondProxyFile::fillCalibData
virtual StatusCode fillCalibData(TileCalibData< T > &calibData, EventIDRange &eventRange) const override
Fill TileCalibData with Tile conditions data from file.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ITileCondProxy
An abstract interface to get Tile conditions data from source (file, DB)
Definition: ITileCondProxy.h:19
TileCondProxyFile::TileCondProxyFile
TileCondProxyFile(const std::string &type, const std::string &name, const IInterface *parent)
AthAlgTool
Definition: AthAlgTool.h:26
TileCondProxyFile::finalize
virtual StatusCode finalize() override