Commit 3e9f9f2e authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau
Browse files

Add autoset of setup based on run ID for 03/22 beams in macro + MQ

parent a4458af6
......@@ -82,7 +82,18 @@ _parfileBmon=@VMCWORKDIR@/macro/beamtime/mcbm2022/mBmonCriPar.par
_parfileRich=@VMCWORKDIR@/macro/beamtime/mcbm2021/mRichPar_70.par
_parfilePsd=@VMCWORKDIR@/macro/beamtime/mcbm2021/mPsdPar.par
_setup_name=mcbm_beam_2022_03_22_iron
_run_id=2158
_run_id=2160
if [ _run_id -ge 2060 ]; then
if [ _run_id -le 2065 ]; then
_setup_name=mcbm_beam_2022_03_09_carbon
elif [ _run_id -le 2160 ]; then # Potentially wrong setup between 2065 and 2150 but not official runs
_setup_name=mcbm_beam_2022_03_22_iron
elif [ _run_id -le 2310 ]; then # Potentially wrong setup between 2160 and 2176 but not official runs
_setup_name=mcbm_beam_2022_03_28_uranium
fi
fi
_ratelog=0 # hides ZMQ messages rates and bandwidth
#_ratelog=1 # display ZMQ messages rates and bandwidth
......
......@@ -73,6 +73,21 @@ void run_unpack_online(std::vector<std::string> publisher = {"tcp://localhost:55
// ----- CbmSetup -----------------------------------------------------
if (2060 <= runid && defaultSetupName == setupName) {
/// Setup changed multiple times between the 2022 carbon and uranium runs
if (runid <= 2065) {
/// Carbon runs: 2060 - 2065 = 10/03/2022
setupName = "mcbm_beam_2022_03_09_carbon";
}
else if (2150 <= runid && runid <= 2160) {
/// Iron runs: 2150 - 2160 = 24-25/03/2022
setupName = "mcbm_beam_2022_03_22_iron";
}
else if (2176 <= runid && runid <= 2310) {
/// Uranium runs: 2176 - 2310 = 30/03/2022 - 01/04/2022
setupName = "mcbm_beam_2022_03_28_uranium";
}
}
auto cbmsetup = CbmSetup::Instance();
cbmsetup->LoadSetup(setupName);
// ------------------------------------------------------------------------
......
......@@ -65,6 +65,21 @@ void run_unpack_online_bmon(std::vector<std::string> publisher = {"tcp://localho
// ----- CbmSetup -----------------------------------------------------
if (2060 <= runid && defaultSetupName == setupName) {
/// Setup changed multiple times between the 2022 carbon and uranium runs
if (runid <= 2065) {
/// Carbon runs: 2060 - 2065 = 10/03/2022
setupName = "mcbm_beam_2022_03_09_carbon";
}
else if (2150 <= runid && runid <= 2160) {
/// Iron runs: 2150 - 2160 = 24-25/03/2022
setupName = "mcbm_beam_2022_03_22_iron";
}
else if (2176 <= runid && runid <= 2310) {
/// Uranium runs: 2176 - 2310 = 30/03/2022 - 01/04/2022
setupName = "mcbm_beam_2022_03_28_uranium";
}
}
auto cbmsetup = CbmSetup::Instance();
cbmsetup->LoadSetup(setupName);
// ------------------------------------------------------------------------
......
......@@ -85,6 +85,21 @@ void run_unpack_tsa(std::vector<std::string> infile = {"test.tsa"}, UInt_t runid
// ----- CbmSetup -----------------------------------------------------
if (2060 <= runid && defaultSetupName == setupName) {
/// Setup changed multiple times between the 2022 carbon and uranium runs
if (runid <= 2065) {
/// Carbon runs: 2060 - 2065 = 10/03/2022
setupName = "mcbm_beam_2022_03_09_carbon";
}
else if (2150 <= runid && runid <= 2160) {
/// Iron runs: 2150 - 2160 = 24-25/03/2022
setupName = "mcbm_beam_2022_03_22_iron";
}
else if (2176 <= runid && runid <= 2310) {
/// Uranium runs: 2176 - 2310 = 30/03/2022 - 01/04/2022
setupName = "mcbm_beam_2022_03_28_uranium";
}
}
auto cbmsetup = CbmSetup::Instance();
cbmsetup->LoadSetup(setupName);
// ------------------------------------------------------------------------
......
......@@ -78,6 +78,21 @@ void run_unpack_tsa_bmon(std::vector<std::string> infile = {"test.tsa"}, UInt_t
// ----- CbmSetup -----------------------------------------------------
if (2060 <= runid && defaultSetupName == setupName) {
/// Setup changed multiple times between the 2022 carbon and uranium runs
if (runid <= 2065) {
/// Carbon runs: 2060 - 2065 = 10/03/2022
setupName = "mcbm_beam_2022_03_09_carbon";
}
else if (2150 <= runid && runid <= 2160) {
/// Iron runs: 2150 - 2160 = 24-25/03/2022
setupName = "mcbm_beam_2022_03_22_iron";
}
else if (2176 <= runid && runid <= 2310) {
/// Uranium runs: 2176 - 2310 = 30/03/2022 - 01/04/2022
setupName = "mcbm_beam_2022_03_28_uranium";
}
}
auto cbmsetup = CbmSetup::Instance();
cbmsetup->LoadSetup(setupName);
// ------------------------------------------------------------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment