15 using namespace GlobalSim::IOBitwise;
18 ISvcLocator *pSvcLocator):
33 <<
" on " <<
"$DATAPATH");
34 return StatusCode::FAILURE;
41 return StatusCode::FAILURE;
46 return StatusCode::FAILURE;
53 <<
" on " <<
"$DATAPATH");
54 return StatusCode::FAILURE;
60 ATH_MSG_FATAL(
"Failure to initialise TIP word stream " << fn );
61 return StatusCode::FAILURE;
65 return StatusCode::SUCCESS;
73 auto padded_line = std::string();
74 auto tobs = std::make_unique<GlobalSim::IOBitwise::eEmTOBContainer>();
78 auto line =
trim(padded_line);
82 return StatusCode::FAILURE;
85 if(line ==
"EOE") {
break;}
87 if (line.starts_with(
"//")){
continue;}
94 CHECK(h_write_tobs.record(std::move(tobs)));
98 CHECK(h_write_TIPword.record(std::move(twp)));
100 return StatusCode::SUCCESS;
105 auto line = std::string();
106 using TIP = std::bitset<ITIPwriterAlgTool::s_nbits_TIP>;
108 auto twp = std::make_unique<TIP>(std::stoul(
trim(std::move(line))));
118 std::stringstream
ss(trimmed_line);
119 std::string
et,
eta,
phi, RHad, WsTot, REta, seed, UpNotDown, SeedIsMax;
127 std::bitset<s_eta_width>(
eta),
128 std::bitset<s_phi_width>(
phi));
141 std::bitset(std::bitset<s_RHad_width>(RHad)),
142 std::bitset(std::bitset<s_REta_width>(REta)),
143 std::bitset(std::bitset<s_WsTot_width>(WsTot)),
144 std::bitset(std::bitset<s_Seed_width>(seed)),
145 std::bitset(std::bitset<s_UpNotDown_width>(UpNotDown)),
146 std::bitset(std::bitset<s_SeedIsMax_width>(SeedIsMax)));
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define CHECK(...)
Evaluate an expression and check for errors.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
static constexpr std::size_t s_eta_width
Size of the eta bitset.
static constexpr std::size_t s_et_width
Size of the eT bitset.
static constexpr std::size_t s_phi_width
Size of the phi bitset.
eEmMultTestBench(const std::string &name, ISvcLocator *pSvcLocator)
SG::WriteHandleKey< GlobalSim::IOBitwise::eEmTOBContainer > m_eEmTOBContainer_WriteKey
Gaudi::Property< std::string > m_TIPword_fileName
GlobalSim::IOBitwise::eEmTOB * make_tob(const std::string &s) const
virtual StatusCode initialize() override
Gaudi::Property< std::string > m_tobs_fileName
SG::WriteHandleKey< TIPword > m_TIPword_WriteKey
std::unique_ptr< std::ifstream > m_TIPword_stream
std::unique_ptr< TIPword > TIPword_from_file() const
std::ifstream m_tob_stream
virtual StatusCode execute() override
static constexpr std::size_t s_SeedIsMax_width
Count: Size of Seed supercell is a local maxima bit.
static constexpr std::size_t s_REta_width
Count: Size of R0 thresholds satisfied bitset.
static constexpr std::size_t s_RHad_width
Count: Size of hadronic thresholds satisfied bitset.
static constexpr std::size_t s_WsTot_width
Count: Size of WsTot algorithm thresholds satisfied bitset.
static constexpr std::size_t s_UpNotDown_width
Count: Size of UpnotDown bit.
static constexpr std::size_t s_Seed_width
Count: Size of Seed eta position in the TOB bitset.
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
AlgTool that to test whether expected the TIP values generated by data supplied by eEmMultTestBench c...
std::string trim(std::string s)
Extra patterns decribing particle interation process.