16 using namespace GlobalSim::IOBitwise;
19 ISvcLocator *pSvcLocator):
34 <<
" on " <<
"$DATAPATH");
35 return StatusCode::FAILURE;
42 return StatusCode::FAILURE;
47 return StatusCode::FAILURE;
54 <<
" on " <<
"$DATAPATH");
55 return StatusCode::FAILURE;
61 ATH_MSG_FATAL(
"Failure to initialise TIP word stream " << fn );
62 return StatusCode::FAILURE;
66 return StatusCode::SUCCESS;
74 auto padded_line = std::string();
75 auto tobs = std::make_unique<GlobalSim::IOBitwise::IeEmTOBContainer>();
79 auto line =
trim(padded_line);
83 return StatusCode::FAILURE;
86 if(line ==
"EOE") {
break;}
88 if (line.starts_with(
"//")){
continue;}
95 CHECK(h_write_tobs.record(std::move(tobs)));
99 CHECK(h_write_TIPword.record(std::move(twp)));
101 return StatusCode::SUCCESS;
106 auto line = std::string();
107 using TIP = std::bitset<ITIPwriterAlgTool::s_nbits_TIP>;
109 auto twp = std::make_unique<TIP>(std::stoul(
trim(std::move(line))));
119 std::stringstream
ss(trimmed_line);
120 std::string
et,
eta,
phi, RHad, WsTot, REta, seed, UpNotDown, SeedIsMax;
128 std::bitset<s_eta_width>(
eta),
129 std::bitset<s_phi_width>(
phi));
142 std::bitset(std::bitset<s_RHad_width>(RHad)),
143 std::bitset(std::bitset<s_REta_width>(REta)),
144 std::bitset(std::bitset<s_WsTot_width>(WsTot)),
145 std::bitset(std::bitset<s_Seed_width>(seed)),
146 std::bitset(std::bitset<s_UpNotDown_width>(UpNotDown)),
147 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_phi_width
Size of the phi bitset.
static constexpr std::size_t s_et_width
Size of the eT bitset.
Class to hold common (eta/eta/phi) TOB bits.
Class to hold eFexROI TOB bits.
Class to hold eFexROI TOB bits.
static constexpr std::size_t s_RHad_width
Count: Size of hadronic thresholds satisfied bitset.
static constexpr std::size_t s_UpNotDown_width
Count: Size of UpnotDown bit.
static constexpr std::size_t s_WsTot_width
Count: Size of WsTot algorithm thresholds satisfied bitset.
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_Seed_width
Count: Size of Seed eta position in the TOB bitset.
eEmMultTestBench(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< std::string > m_TIPword_fileName
virtual StatusCode initialize() override
Gaudi::Property< std::string > m_tobs_fileName
GlobalSim::IOBitwise::IeEmTOB * make_tob(const std::string &s) const
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
SG::WriteHandleKey< GlobalSim::IOBitwise::IeEmTOBContainer > m_eEmTOBContainer_WriteKey
virtual StatusCode execute() override
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.