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

[Online] Select STS chan mask files based on run id

parent de45cae5
No related branches found
No related tags found
1 merge request!1758[Online] mSTS 2024 channel masks
......@@ -111,12 +111,20 @@ void Reco::Init(const Options& opts)
}
if (Opts().Has(Subsystem::STS) && Opts().Has(Step::Unpack)) {
fs::path readoutFile = 2724 <= Opts().RunId() ? "StsReadout_mcbm2024.yaml" : "StsReadout_mcbm2022.yaml";
fs::path readoutFile = "StsReadout_mcbm2022.yaml";
fs::path chanMaskFile = "StsChannelMaskSet_mcbm2022.yaml";
fs::path walkFile = "StsWalkMap_mcbm2022.yaml";
if (2724 <= Opts().RunId()) {
readoutFile = "StsReadout_mcbm2024.yaml";
chanMaskFile = "StsChannelMaskSet_mcbm2024.yaml";
walkFile = "StsWalkMap_mcbm2024.yaml";
}
sts::ReadoutSetup readoutSetup = yaml::ReadFromFile<sts::ReadoutSetup>(Opts().ParamsDir() / readoutFile);
auto chanMask = yaml::ReadFromFile<sts::ChannelMaskSet>(Opts().ParamsDir() / "StsChannelMaskSet.yaml");
auto chanMask = yaml::ReadFromFile<sts::ChannelMaskSet>(Opts().ParamsDir() / chanMaskFile);
auto walkMap = yaml::ReadFromFile<sts::WalkMap>(Opts().ParamsDir() / walkFile);
sts::ReadoutConfig readout{readoutSetup, chanMask};
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) {
......
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