Skip to content

Commit 1b7412b

Browse files
committed
Update SYNTHETIC run definition
1 parent b39541c commit 1b7412b

5 files changed

Lines changed: 17 additions & 13 deletions

File tree

docs/RUN_DEFINITIONS.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ During technical runs, the processes are reading the front-end electronics;
4747

4848
### SYNTHETIC:
4949
During synthetic runs, the processes are at the level of readout and emulate readout;
50-
- `readout_cfg_uri` to include (`pp` or `pbpb`) and `replay`
50+
- `run_type` set to `SYNTHETIC` or `REPLAY`
5151
- `dcs` = `false`
5252
- `trigger_value` = `OFF`
5353

@@ -56,3 +56,11 @@ During synthetic runs, the processes are at the level of readout and emulate rea
5656

5757
### COMMISIONING:
5858
- any run that does not fit any of the prior definitions;
59+
60+
## Previous RUN Definitions
61+
62+
### SYNTHETIC: (RUNS marked before @aliceo2/bookkeeping@1.10.0)
63+
During synthetic runs, the processes are at the level of readout and emulate readout;
64+
- `readout_cfg_uri` to include (`pp` or `pbpb`) and `replay`
65+
- `dcs` = `false`
66+
- `trigger_value` = `OFF`

lib/server/services/run/getRunDefinition.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ const getRunDefinition = (run) => {
3636
pdpWorkflowParameters,
3737
runType,
3838
pdpBeamType,
39-
readoutCfgUri,
4039
lhcBeamMode,
4140
} = run;
4241

@@ -79,8 +78,7 @@ const getRunDefinition = (run) => {
7978
} else if (
8079
!dcs
8180
&& triggerValue === 'OFF'
82-
&& readoutCfgUri?.includes('replay')
83-
&& readoutCfgUri?.match('pp|pbpb')
81+
&& (runType?.name?.match(/^replay$/i) || runType?.name?.match(/^synthetic$/i))
8482
) {
8583
definition = RunDefinition.SYNTHETIC;
8684
} else if (CALIBRATION_RUN_TYPES_STARTS_WITH.some((prefix) => runType?.name?.toUpperCase().startsWith(prefix))) {

test/lib/server/services/run/RunService.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ module.exports = () => {
141141

142142
it('should successfully prevent to create a non-calibration run with a calibrationStatus', async () => {
143143
await assert.rejects(
144-
() => runService.create({ ...SYNTHETIC.PBPB, calibrationStatus: RunCalibrationStatus.SUCCESS }),
144+
() => runService.create({ ...SYNTHETIC.SYNTHETIC, calibrationStatus: RunCalibrationStatus.SUCCESS }),
145145
new BadParameterError('Calibration status is reserved to calibration runs'),
146146
);
147147
});

test/lib/server/services/run/getRunDefinition.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ module.exports = () => {
3939
});
4040

4141
it('should successfully identify runs as SYNTHETIC', () => {
42-
expect(getRunDefinition(SYNTHETIC.PP)).to.equal(RunDefinition.SYNTHETIC);
43-
expect(getRunDefinition(SYNTHETIC.PBPB)).to.equal(RunDefinition.SYNTHETIC);
42+
expect(getRunDefinition(SYNTHETIC.REPLAY)).to.equal(RunDefinition.SYNTHETIC);
43+
expect(getRunDefinition(SYNTHETIC.SYNTHETIC)).to.equal(RunDefinition.SYNTHETIC);
4444
});
4545

4646
it('should successfully identify runs as CALIBRATION', () => {

test/mocks/mock-run.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,13 @@ module.exports = {
170170
},
171171
},
172172
SYNTHETIC: {
173-
PP: {
173+
REPLAY: {
174174
dcs: false,
175175
dd_flp: true,
176176
epn: true,
177177
triggerValue: 'OFF',
178178
tfbDdMode: 'processing',
179179
pdpWorkflowParameters: 'QC,CTF',
180-
readoutCfgUri: 'replay/pp',
181180
lhcFill: {
182181
stableBeamsStart: '2022-10-01T10:00:00',
183182
stableBeamsEnd: '2022-10-02T10:00:00',
@@ -186,17 +185,16 @@ module.exports = {
186185
timeTrgEnd: 1664625600000, // 2022-10-01T14:00:00
187186
concatenatedDetectors: 'TPC, TST',
188187
runType: {
189-
name: 'TECHNICAL',
188+
name: 'REPLAY',
190189
},
191190
},
192-
PBPB: {
191+
SYNTHETIC: {
193192
dcs: false,
194193
dd_flp: true,
195194
epn: true,
196195
triggerValue: 'OFF',
197196
tfbDdMode: 'processing',
198197
pdpWorkflowParameters: 'QC,CTF',
199-
readoutCfgUri: 'replay/pbpb',
200198
lhcFill: {
201199
stableBeamsStart: '2022-10-01T10:00:00',
202200
stableBeamsEnd: '2022-10-02T10:00:00',
@@ -205,7 +203,7 @@ module.exports = {
205203
timeTrgEnd: 1664625600000, // 2022-10-01T14:00:00
206204
concatenatedDetectors: 'TPC, TST',
207205
runType: {
208-
name: 'TECHNICAL',
206+
name: 'SYNTHETIC',
209207
},
210208
},
211209
},

0 commit comments

Comments
 (0)