Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
12 std::bitset<72>& bit_tob)
const{
14 auto bs = std::bitset<4>();
16 std::size_t
ind{
s.size()*4};
20 [](
unsigned char c){return std::tolower(c);});
22 for(
const char&
c :
s) {
23 bs = (
c >=
'a') ? (
c -
'a' + 10) : (
c-
'0');
24 for (
int j = 3; j != -1; --j) {
25 bit_tob[--
ind] = bs[j];
27 if (
ind == 0) {
break;}
30 return StatusCode::SUCCESS;
34 ISvcLocator *pSvcLocator):
60 return StatusCode::SUCCESS;
71 ATH_MSG_ERROR(
"Attempting to read from an exhausted FIFO vector");
72 return StatusCode::FAILURE;
80 auto expectations = std::make_unique<eEmSortSelectCountExpectations>(
87 CHECK(h_write_exp.record(std::move(expectations)));
91 return StatusCode::SUCCESS;
104 return StatusCode::FAILURE;
113 auto fifo = std::make_unique<GepAlgoHypothesisFIFO>();
117 fifo->push_back(ports_in);
124 return StatusCode::SUCCESS;
130 const char*
t =
" \t\n\r\f\v";
133 auto l_rtrim = [&
t](std::string&
s){
134 s.erase(
s.find_last_not_of(
t) + 1);
139 auto l_ltrim = [&
t] (std::string&
s){
140 s.erase(0,
s.find_first_not_of(
t));
144 auto rs = l_rtrim(
s);
156 return StatusCode::FAILURE;
163 <<
" != no of expected mults "
165 return StatusCode::FAILURE;
172 <<
" != no of expected tobs "
175 return StatusCode::FAILURE;
179 return StatusCode::SUCCESS;
188 std::stringstream
ss;
190 return StatusCode::FAILURE;
193 auto padded_line = std::string();
194 auto fifo = std::make_unique<GepAlgoHypothesisFIFO>();
196 while (std::getline(tob_stream, padded_line)) {
200 if (std::all_of(std::cbegin(
line),
202 [](
const auto&
c) {
return c ==
'0';})){
210 fifo->push_back(ports_in);
215 auto top_ind = (ports_in.m_I_eEmTobs)->
size()-1;
216 if ((ports_in.m_I_eEmTobs)->test(top_ind)) {
218 fifo = std::make_unique<GepAlgoHypothesisFIFO>();
223 return StatusCode::SUCCESS;
232 return StatusCode::SUCCESS;
240 return StatusCode::SUCCESS;
246 const std::string&
fn) {
249 std::ifstream in_stream(
fn);
251 std::stringstream
ss;
253 return StatusCode::FAILURE;
256 auto padded_line = std::string();
258 while (std::getline(in_stream, padded_line)) {
263 return StatusCode::SUCCESS;
StatusCode init_expected_mults_from_file()
HypoTestBenchAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< std::string > m_expectedMults_FileName
StatusCode init_expected_from_file(std::vector< std::string > &, const std::string &)
Gaudi::Property< std::vector< std::string > > m_testVecs_in
virtual StatusCode initialize() override
std::vector< std::unique_ptr< GepAlgoHypothesisFIFO > > m_fifos
Gaudi::Property< std::string > m_expTobs_in
StatusCode init_expected_tobs_from_file()
AlgTool to obtain a selection of eFex RoIs read in from the event store.
::StatusCode StatusCode
StatusCode definition for legacy code.
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Gaudi::Property< int > m_testRepeat
std::string trim(std::string s)
#define CHECK(...)
Evaluate an expression and check for errors.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
StatusCode init_tests_from_file()
std::vector< std::string > m_expected_tobs
SG::WriteHandleKey< GepAlgoHypothesisFIFO > m_hypothesisFIFO_WriteKey
Gaudi::Property< std::string > m_testsFileName
std::vector< std::string > m_testVecs
virtual StatusCode execute() override
SG::WriteHandleKey< eEmSortSelectCountExpectations > m_eEmSortSelectCountExpectations_WriteKey
std::vector< std::string > m_expected_mults
StatusCode init_from_file()
Gaudi::Property< std::string > m_expectedTobs_FileName
StatusCode hexTOB2bitsetTOB(std::string, std::bitset< 72 > &) const
Gaudi::Property< std::string > m_expMults_in