ATLAS Offline Software
eEmMultTestBench.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GLOBALSIM_EMMULTTESTBENCH_H
6 #define GLOBALSIM_EMMULTTESTBENCH_H
7 
8 /*
9  * Create and write out a FIFO (vector) of eEMTObs to the event store/
10  * This simulates the action of the APP FIFOs, which feed TOBs to the
11  * APU Algorithhms
12  *
13  */
14 
16 
17 #include "../GlobalSimComponents/ITIPwriterAlgTool.h"
18 #include "../IO/IeEmTOBContainer.h"
19 
20 #include <string>
21 #include <memory>
22 #include <fstream>
23 
24 namespace GlobalSim {
25  namespace IOBitwise {
26  class IeEmTOB;
27  }
28 }
29 
30 namespace GlobalSim {
31 
32 
42 
43  public:
44 
45  eEmMultTestBench(const std::string& name, ISvcLocator *pSvcLocator);
46 
47  virtual StatusCode initialize () override;
48  virtual StatusCode execute () override;
49 
50  private:
51 
54  this,
55  "eEmTOBs",
56  "eEmTOBs",
57  "Key for GlobalSim eEmTOB container"};
58 
59 
62  this,
63  "TIPwordWriteKey",
64  "ExpectedTIPwords",
65  "key to write out expectations for the TIP word"
66  };
67 
68  Gaudi::Property<std::string>
70  "tobs_fileName",
71  {"GlobalSimulation/eEmMultTest_tobs.txt"},
72  "name of file with Global Sim eEmTOB data"};
73 
74  Gaudi::Property<std::string>
76  "TIPwords_fileName",
77  {"GlobalSimulation/eEmMultTest_TIPwords.txt"},
78  "name of file with expected TIP words"};
79 
80 
81  std::unique_ptr<TIPword> TIPword_from_file() const;
82 
83  std::ifstream m_tob_stream;
84  std::unique_ptr<std::ifstream> m_TIPword_stream{nullptr};
85 
86 
87  GlobalSim::IOBitwise::IeEmTOB* make_tob(const std::string& s) const;
88 
89  };
90 
91 }
92 #endif
GlobalSim::eEmMultTestBench::execute
virtual StatusCode execute() override
Definition: eEmMultTestBench.cxx:70
GlobalSim::eEmMultTestBench::m_tobs_fileName
Gaudi::Property< std::string > m_tobs_fileName
Definition: eEmMultTestBench.h:69
GlobalSim::eEmMultTestBench::m_eEmTOBContainer_WriteKey
SG::WriteHandleKey< GlobalSim::IOBitwise::IeEmTOBContainer > m_eEmTOBContainer_WriteKey
Definition: eEmMultTestBench.h:53
AthAlgorithm.h
GlobalSim
AlgTool that to test whether expected the TIP values generated by data supplied by eEmMultTestBench c...
Definition: CommonSelector.cxx:8
GlobalSim::eEmMultTestBench::m_TIPword_fileName
Gaudi::Property< std::string > m_TIPword_fileName
Definition: eEmMultTestBench.h:75
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
GlobalSim::eEmMultTestBench::initialize
virtual StatusCode initialize() override
Definition: eEmMultTestBench.cxx:23
AthAlgorithm
Definition: AthAlgorithm.h:47
GlobalSim::eEmMultTestBench::m_tob_stream
std::ifstream m_tob_stream
Definition: eEmMultTestBench.h:83
GlobalSim::eEmMultTestBench
Algorithm to count create inputs and expectations to test the eEmMultAlgTool class.
Definition: eEmMultTestBench.h:41
GlobalSim::eEmMultTestBench::make_tob
GlobalSim::IOBitwise::IeEmTOB * make_tob(const std::string &s) const
Definition: eEmMultTestBench.cxx:116
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
GlobalSim::eEmMultTestBench::m_TIPword_stream
std::unique_ptr< std::ifstream > m_TIPword_stream
Definition: eEmMultTestBench.h:84
GlobalSim::eEmMultTestBench::m_TIPword_WriteKey
SG::WriteHandleKey< TIPword > m_TIPword_WriteKey
Definition: eEmMultTestBench.h:61
GlobalSim::IOBitwise::IeEmTOB
Class to hold eFexROI TOB bits.
Definition: IeEmTOB.h:29
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
GlobalSim::eEmMultTestBench::eEmMultTestBench
eEmMultTestBench(const std::string &name, ISvcLocator *pSvcLocator)
Definition: eEmMultTestBench.cxx:18
GlobalSim::eEmMultTestBench::TIPword_from_file
std::unique_ptr< TIPword > TIPword_from_file() const
Definition: eEmMultTestBench.cxx:104