Skip to content
Snippets Groups Projects
Commit cf788e6b authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau
Browse files

[Online] Select STS walk and TRD setup files based on run id

parent 477c0647
No related branches found
No related tags found
1 merge request!1732[Online] Select STS walk and TRD setup files based on run id
......@@ -115,7 +115,8 @@ void Reco::Init(const Options& opts)
sts::ReadoutSetup readoutSetup = yaml::ReadFromFile<sts::ReadoutSetup>(Opts().ParamsDir() / readoutFile);
auto chanMask = yaml::ReadFromFile<sts::ChannelMaskSet>(Opts().ParamsDir() / "StsChannelMaskSet.yaml");
sts::ReadoutConfig readout{readoutSetup, chanMask};
auto walkMap = yaml::ReadFromFile<sts::WalkMap>(Opts().ParamsDir() / "StsWalkMap.yaml");
fs::path walkFile = 2724 <= Opts().RunId() ? "StsWalkMap_mcbm2024.yaml" : "StsWalkMap_mcbm2022.yaml";
auto walkMap = yaml::ReadFromFile<sts::WalkMap>(Opts().ParamsDir() / walkFile);
sts::Unpack::Config cfg{.readout = readout, .walkMap = walkMap};
fStsUnpack = std::make_unique<sts::Unpack>(cfg);
if (fSender != nullptr) {
......@@ -132,8 +133,9 @@ void Reco::Init(const Options& opts)
}
if (Opts().Has(Subsystem::TRD) && Opts().Has(Step::Unpack)) {
auto cfg = yaml::ReadFromFile<trd::ReadoutConfig>(Opts().ParamsDir() / "TrdReadoutSetup.yaml");
fTrdUnpack = std::make_unique<trd::Unpack>(cfg);
fs::path readoutFile = 2724 <= Opts().RunId() ? "TrdReadoutSetup_mcbm2024.yaml" : "TrdReadoutSetup_mcbm2022.yaml";
auto cfg = yaml::ReadFromFile<trd::ReadoutConfig>(Opts().ParamsDir() / readoutFile);
fTrdUnpack = std::make_unique<trd::Unpack>(cfg);
}
if (Opts().Has(Subsystem::TRD2D) && Opts().Has(Step::Unpack)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment