ATLAS Offline Software
AFP_LinkNumTranslator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef AFP_BYTESTREAM2RAWCNV_AFP_LINKNUMTRANSLATOR_H
5 #define AFP_BYTESTREAM2RAWCNV_AFP_LINKNUMTRANSLATOR_H
6 
7 // Package includes
9 
10 // Framework includes
15 
16 // STL includes
17 #include <string>
18 
23 class AFP_LinkNumTranslator : public extends<AthAlgTool, IAFP_LinkNumTranslator> {
24 public:
25  AFP_LinkNumTranslator(const std::string& type, const std::string& name, const IInterface* parent);
26  virtual ~AFP_LinkNumTranslator() override;
27 
28  virtual StatusCode initialize() override;
29  virtual StatusCode finalize() override;
30 
31  // same enumeration as for Run2
32  enum LinkNums : unsigned int { kNS0=0, kNS1=1, kNS2=2, kNS3=3, kFS0=8, kFS1=9, kFS2=10, kFS3=11, kFS5=12, kFS4=13, kUnknown=99};
33 
34  unsigned int translate(unsigned int origlink) const override;
35 
36 private:
37  Gaudi::Property<bool> m_useDB {this, "UseDB", false, "whether to use COOL DB (true) or hard-coded values (false) to obtain link numbers"};
38  Gaudi::Property<int> m_forceRunConfig {this, "ForceRunConfig", 0, "force run configuration for link translation regardless of actual run number; set to 2 for Run-2, set to 3 for Run-3; set 0 to disable"};
39 
40  // Using DB is not implemented yet
41  // TODO: change based on reality
42  // SG::ReadCondHandleKey<CondAttrListCollection> m_readDBKey_AF { this, "ReadDbKey_AF", "/AFP/Config/SideA/Far/Planes", "DB folder from which to read link numbers, side A, Far" };
43  // SG::ReadCondHandleKey<CondAttrListCollection> m_readDBKey_AN { this, "ReadDbKey_AN", "/AFP/Config/SideA/Near/Planes", "DB folder from which to read link numbers, side A, Near" };
44  // SG::ReadCondHandleKey<CondAttrListCollection> m_readDBKey_CF { this, "ReadDbKey_CF", "/AFP/Config/SideC/Far/Planes", "DB folder from which to read link numbers, side C, Far" };
45  // SG::ReadCondHandleKey<CondAttrListCollection> m_readDBKey_CN { this, "ReadDbKey_CN", "/AFP/Config/SideC/Near/Planes", "DB folder from which to read link numbers, side C, Near" };
46 };
47 
48 #endif // AFP_BYTESTREAM2RAWCNV_AFP_LINKNUMTRANSLATOR_H
AFP_LinkNumTranslator::kNS0
@ kNS0
Definition: AFP_LinkNumTranslator.h:32
AFP_LinkNumTranslator::kNS3
@ kNS3
Definition: AFP_LinkNumTranslator.h:32
AFP_LinkNumTranslator::m_forceRunConfig
Gaudi::Property< int > m_forceRunConfig
Definition: AFP_LinkNumTranslator.h:38
CondAttrListCollection.h
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
AFP_LinkNumTranslator::kNS2
@ kNS2
Definition: AFP_LinkNumTranslator.h:32
AFP_LinkNumTranslator::AFP_LinkNumTranslator
AFP_LinkNumTranslator(const std::string &type, const std::string &name, const IInterface *parent)
Definition: AFP_LinkNumTranslator.cxx:7
AFP_LinkNumTranslator::finalize
virtual StatusCode finalize() override
Definition: AFP_LinkNumTranslator.cxx:40
AthenaAttributeList.h
ReadCondHandle.h
AFP_LinkNumTranslator::kFS2
@ kFS2
Definition: AFP_LinkNumTranslator.h:32
AFP_LinkNumTranslator::kFS5
@ kFS5
Definition: AFP_LinkNumTranslator.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AFP_LinkNumTranslator::kFS3
@ kFS3
Definition: AFP_LinkNumTranslator.h:32
AFP_LinkNumTranslator::m_useDB
Gaudi::Property< bool > m_useDB
Definition: AFP_LinkNumTranslator.h:37
AthAlgTool.h
AFP_LinkNumTranslator::kFS1
@ kFS1
Definition: AFP_LinkNumTranslator.h:32
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AFP_LinkNumTranslator::kFS4
@ kFS4
Definition: AFP_LinkNumTranslator.h:32
AFP_LinkNumTranslator::kNS1
@ kNS1
Definition: AFP_LinkNumTranslator.h:32
AFP_LinkNumTranslator::~AFP_LinkNumTranslator
virtual ~AFP_LinkNumTranslator() override
Definition: AFP_LinkNumTranslator.cxx:12
IAFP_LinkNumTranslator.h
AFP_LinkNumTranslator::kFS0
@ kFS0
Definition: AFP_LinkNumTranslator.h:32
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AFP_LinkNumTranslator::LinkNums
LinkNums
Definition: AFP_LinkNumTranslator.h:32
AFP_LinkNumTranslator::initialize
virtual StatusCode initialize() override
Definition: AFP_LinkNumTranslator.cxx:16
AFP_LinkNumTranslator::kUnknown
@ kUnknown
Definition: AFP_LinkNumTranslator.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AFP_LinkNumTranslator::translate
unsigned int translate(unsigned int origlink) const override
Definition: AFP_LinkNumTranslator.cxx:45
AFP_LinkNumTranslator
Definition: AFP_LinkNumTranslator.h:23