ATLAS Offline Software
Loading...
Searching...
No Matches
RDBParamRecords.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Helper class to simplify parameter reading
6
7#include "RDBParamRecords.h"
8#include "RDBParamReader.h"
9
13
15 : m_rdbParAcc(rdbParAcc),
16 m_RecSet(std::move(initRecSet))
17{
18}
19
25
26
30
32 const std::string& tag,
33 const std::string& tag2node)
34{
35 if(m_RecSet->size() == 0) {
36 m_RecSet = m_rdbParAcc->_getRecordsetPtr(node, tag, tag2node);
37 }
38 return *this;
39}
40
42 const std::string& name,
43 unsigned int index) const
44{
45 outval = (*m_RecSet)[index]->getInt(name);
46 return *this;
47}
48
50 const std::string& name,
51 unsigned int index) const
52{
53 outval = (unsigned int)(*m_RecSet)[index]->getInt(name);
54 return *this;
55}
56
58 const std::string& name,
59 const double units,
60 unsigned int index) const
61{
62 outval = (*m_RecSet)[index]->getDouble(name)*units;
63 return *this;
64}
65
67 const std::string& name,
68 unsigned int index) const
69{
70 outval = (*m_RecSet)[index]->getString(name);
71 return *this;
72}
Definition of the abstract IRDBAccessSvc interface.
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition of the abstract IRDBRecord interface.
Definition of the abstract IRDBRecordset interface.
Helper class to simplify parameter reading Fully independent from other parts of package.
RDBParamRecords(RDBParamReader *rdbParAcc, IRDBRecordset_ptr initRecSet)
IRDBRecordset_ptr m_RecSet
self_t & fallback_to(const std::string &node, const std::string &tag, const std::string &tag2node="")
const self_t & param(unsigned int &outval, const std::string &name, unsigned int index=0) const
RDBParamRecords self_t
RDBParamReader * m_rdbParAcc
Definition node.h:24
Definition index.py:1
STL namespace.