19 ISvcLocator* pSvcLocator) :
33 (
" " <<
helper.propertyName()
34 <<
" = " <<
helper.type());
36 if (
helper.retrieve().isFailure() ) {
38 (
helper.propertyName() <<
": Failed to retrieve tool "
40 return StatusCode::FAILURE;
43 (
helper.propertyName() <<
": Retrieved tool "
61 return StatusCode::SUCCESS;
69 if(!(
sc == StatusCode::SUCCESS)){
return sc;}
80 const std::string& collectorName,
87 std::unique_ptr<ITrigJetHypoInfoCollector> debugInfoCollector(
nullptr);
92 if (debugInfoCollector){
93 std::stringstream ss0;
94 ss0 <<
"n jets " << jv.size() <<
'\n';
95 debugInfoCollector->
collect(
"JetHypoExerciserCompareAlg", ss0.str());
98 std::stringstream ss1;
100 for(
const auto& j : jv){
101 ss1 <<
"e: " << j->e() <<
" et " << j->et() <<
" eta " << j->eta()
104 debugInfoCollector->
collect(
"JetHypoExerciserCompareAlg", ss1.str());
108 pass =
helper->pass(jv, jetCollector, debugInfoCollector);
110 std::stringstream
ss;
111 ss <<
"========= ncall: "<<
m_ncall <<
"==========\n";
112 if(debugInfoCollector){
113 std::stringstream ss1;
115 for(
const auto& j : jetCollector.
hypoJets()){
116 ss1 <<
"e: " << j->e() <<
" et " << j->et() <<
" eta " << j->eta()
119 debugInfoCollector->
collect(
"JetHypoExerciserCompareAlg", ss1.str());
120 debugInfoCollector->
collect(
"JetHypoExerciserCompareAlg collectedJets",
131 return StatusCode::SUCCESS;
147 std::string collectorName =
name() +
"debugInfoCollector0";
158 std::stringstream
ss;
159 ss <<
timer.elapsed_to_update()
160 <<
" tool0 " << std::boolalpha << pass0 <<
'\n';
168 collectorName =
name() +
"debugInfoCollector1";
180 std::stringstream
ss;
181 ss <<
timer.elapsed_to_update()
182 <<
" tool1 "<< std::boolalpha <<
pass1 <<
'\n';
191 std::string spass0 = (pass0 ?
"True":
"False");
192 std::string spass1 = (
pass1 ?
"True":
"False");
196 <<
"pass 0 "<< spass0 <<
" pass 1 " << spass1);
204 ATH_MSG_INFO (
"hypo helper tools agree on result which is: " << spass0);
209 std::size_t njets = collected0.size();
211 if (njets == collected1.size()) {
212 std::sort(collected0.begin(), collected0.end());
213 std::sort(collected1.begin(), collected1.end());
216 for (std::size_t
i = 0;
i < njets;
i++) {
217 ATH_MSG_INFO(
" jet 0 : " <<
static_cast<const void*
>(collected0.at(
i).get()) <<
218 " jet 1 : " <<
static_cast<const void*
>(collected1.at(
i).get()));
220 if (collected0.at(
i) != collected1.at(
i)) {
233 ATH_MSG_INFO(
" no of jets 0 : " << collected0.size() <<
" "
234 " no of jets 1 : " << collected1.size() <<
" "
235 " no of jets differ ");
239 return StatusCode::SUCCESS;
255 return StatusCode::SUCCESS;