diff --git a/Detectors/HMPID/base/include/HMPIDBase/Geo.h b/Detectors/HMPID/base/include/HMPIDBase/Geo.h index 104c8f2142301..18fb12364ce65 100644 --- a/Detectors/HMPID/base/include/HMPIDBase/Geo.h +++ b/Detectors/HMPID/base/include/HMPIDBase/Geo.h @@ -141,30 +141,32 @@ class ReadOut uint8_t Cru; uint8_t Lnk; uint8_t Flp; + std::string_view FlpHostName; }; union Lnk { LinkAddr Id; uint32_t LinkUId; }; - static constexpr Lnk mEq[Geo::MAXEQUIPMENTS] = {{0, 0, 0, 160}, - {1, 0, 1, 160}, - {2, 0, 2, 160}, - {3, 0, 3, 160}, - {4, 1, 0, 160}, - {5, 1, 1, 160}, - {8, 1, 2, 160}, - {9, 1, 3, 160}, - {6, 2, 0, 161}, - {7, 2, 1, 161}, - {10, 2, 2, 161}, - {11, 3, 0, 161}, - {12, 3, 1, 161}, - {13, 3, 2, 161}}; + static constexpr Lnk mEq[Geo::MAXEQUIPMENTS] = {{0, 0, 0, 160, "alio-cr1-flp160"}, + {1, 0, 1, 160, "alio-cr1-flp160"}, + {2, 0, 2, 160, "alio-cr1-flp160"}, + {3, 0, 3, 160, "alio-cr1-flp160"}, + {4, 1, 0, 160, "alio-cr1-flp160"}, + {5, 1, 1, 160, "alio-cr1-flp160"}, + {8, 1, 2, 160, "alio-cr1-flp160"}, + {9, 1, 3, 160, "alio-cr1-flp160"}, + {6, 2, 0, 161, "alio-cr1-flp161"}, + {7, 2, 1, 161, "alio-cr1-flp161"}, + {10, 2, 2, 161, "alio-cr1-flp161"}, + {11, 3, 0, 161, "alio-cr1-flp161"}, + {12, 3, 1, 161, "alio-cr1-flp161"}, + {13, 3, 2, 161, "alio-cr1-flp161"}}; static inline int FeeId(unsigned int idx) { return (idx > Geo::MAXEQUIPMENTS) ? -1 : mEq[idx].Id.Fee; }; static inline int CruId(unsigned int idx) { return (idx > Geo::MAXEQUIPMENTS) ? -1 : mEq[idx].Id.Cru; }; static inline int LnkId(unsigned int idx) { return (idx > Geo::MAXEQUIPMENTS) ? -1 : mEq[idx].Id.Lnk; }; static inline int FlpId(unsigned int idx) { return (idx > Geo::MAXEQUIPMENTS) ? -1 : mEq[idx].Id.Flp; }; + static inline std::string_view FlpHostName(unsigned int idx) { return (idx > Geo::MAXEQUIPMENTS) ? "" : mEq[idx].Id.FlpHostName; }; static inline uint32_t UniqueId(unsigned int idx) { return (idx > Geo::MAXEQUIPMENTS) ? -1 : mEq[idx].LinkUId; }; static unsigned int searchIdx(int FeeId) diff --git a/Detectors/HMPID/simulation/src/HmpidCoder2.cxx b/Detectors/HMPID/simulation/src/HmpidCoder2.cxx index 15781467a4155..6deabd2cf5a4b 100644 --- a/Detectors/HMPID/simulation/src/HmpidCoder2.cxx +++ b/Detectors/HMPID/simulation/src/HmpidCoder2.cxx @@ -248,11 +248,13 @@ void HmpidCoder2::openOutputStream(const std::string& outputFileName, const std: rdh.endPointID = 0; std::string outfname; if (fileFor == "link") { - outfname = fmt::format("{}_L{}.raw", outputFileName, ReadOut::FeeId(eq)); + outfname = fmt::format("{}_{}_feeid{}.raw", outputFileName, ReadOut::FlpHostName(eq), ReadOut::FeeId(eq)); } else if (fileFor == "flp") { - outfname = fmt::format("{}_flp{}.raw", outputFileName, ReadOut::FlpId(eq)); + outfname = fmt::format("{}_{}.raw", outputFileName, ReadOut::FlpHostName(eq)); } else if (fileFor == "all") { outfname = fmt::format("{}.raw", outputFileName); + } else if (fileFor == "cru") { + outfname = fmt::format("{}_{}.raw", outputFileName, ReadOut::FlpHostName(eq)); } else { throw std::runtime_error(fmt::format("unknown raw file grouping option {}", fileFor)); } diff --git a/Detectors/HMPID/workflow/src/DigitsToRawSpec.cxx b/Detectors/HMPID/workflow/src/DigitsToRawSpec.cxx index 0d8c3b641c443..b72bf4ab3d381 100644 --- a/Detectors/HMPID/workflow/src/DigitsToRawSpec.cxx +++ b/Detectors/HMPID/workflow/src/DigitsToRawSpec.cxx @@ -197,7 +197,7 @@ o2::framework::DataProcessorSpec getDigitsToRawSpec() outputs, AlgorithmSpec{adaptFromTask()}, Options{{"outdir", VariantType::String, "./", {"base dir for output file"}}, - {"file-for", VariantType::String, "all", {"single file per: all,flp,link"}}, + {"file-for", VariantType::String, "all", {"single file per: all,flp,link,cru"}}, {"outfile", VariantType::String, "hmpid", {"base name for output file"}}, {"in-file", VariantType::String, "hmpiddigits.root", {"name of the input sim root file"}}, {"dump-digits", VariantType::Bool, false, {"out the digits file in /tmp/hmpDumpDigits.dat"}},