20 const EventContext& ctx = Gaudi::Hive::currentContext();
22 if (!asBuiltContainer.
isValid()){
24 return StatusCode::FAILURE;
29 return StatusCode::FAILURE;
32 unsigned int nLines{0};
37 ostr<<
" {"<<std::endl;
39 ostr<<
" \"typ\": \""<<asBuilt.AmdbStation()<<
"\","<<std::endl;
40 ostr<<
" \"jzz\": "<<asBuilt.AmdbEta()<<
", "<<std::endl;
41 ostr<<
" \"jff\": "<<asBuilt.AmdbPhi()<<
", "<<std::endl;
42 for (
const multilayer_t ml : {multilayer_t::ML1, multilayer_t::ML2}){
43 for (
const tubeSide_t side: {tubeSide_t::POS, tubeSide_t::NEG}){
44 const std::string prefix = std::format(
"Ml{}{}TubeSide",
45 static_cast<unsigned>(ml) + 1,
46 side == tubeSide_t::POS ?
"Pos" :
"Neg");
48 const auto dumpValue = [&ostr, &prefix](std::string_view field,
51 ostr <<
" \"" << prefix << field <<
"\": "
52 << val << (last ?
"" :
", ") <<
'\n';
55 dumpValue(
"y0", asBuilt.y0(ml, side));
56 dumpValue(
"z0", asBuilt.z0(ml, side));
57 dumpValue(
"alpha", asBuilt.alpha(ml, side));
58 dumpValue(
"ypitch", asBuilt.ypitch(ml, side));
59 dumpValue(
"zpitch", asBuilt.zpitch(ml, side));
60 dumpValue(
"stagg", asBuilt.stagg(ml, side),
61 ml == multilayer_t::ML2 && side == tubeSide_t::NEG);
64 ostr<<
" }"<< (nLines != asBuiltContainer->size() ?
"," :
"")<<std::endl;
70 return StatusCode::SUCCESS;