Skip to content

Commit c30431d

Browse files
committed
Add new message object in proto for BeamMode
1 parent d6cb426 commit c30431d

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

common/protos/common.proto

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,49 @@ message WorkflowTemplateInfo {
4545
string description = 2;
4646
string path = 3;
4747
bool public = 4; // whether the environment is public or not
48-
}
48+
}
49+
50+
/**
51+
* Beam information at a specific point in time (e.g. start or end of stable beams)
52+
*/
53+
message BeamInfo {
54+
int64 stableBeamsStart = 1; // milliseconds since epoch when stable beams started
55+
int64 stableBeamsEnd = 2; // milliseconds since epoch when stable beams ended
56+
int32 fillNumber = 3; // LHC fill number
57+
string fillingSchemeName = 4; // LHC filling scheme name e.g. 25ns_2460b_2448_2089_2227_144bpi_20inj
58+
float beam1Energy = 5; // in GeV
59+
float beam2Energy = 6; // in GeV
60+
string beamType = 7; // e.g. PROTON-PROTON, O8-O8, Pb-Pb, p-Pb, Pb-p
61+
BeamMode beamMode = 8;
62+
}
63+
64+
/**
65+
* Beam modes as defined and sent by LHC DIP client plus:
66+
* * virtual type LOST_BEAMS - that is generated when beam 1 and beam 2 energy values are not equal anymore as per LHC DIP track: dip/acc/LHC/RunControl/SafeBeam
67+
* * virtual type UNKNOWN - that is generated when there is no beam in the machine or value not added by the BKP-LHC Client
68+
* Source of Beam Modes: https://lhc-commissioning.web.cern.ch/systems/data-exchange/doc/LHC-OP-ES-0005-10-00.pdf
69+
*/
70+
enum BeamMode {
71+
UNKNOWN = 0; // virtual type
72+
SETUP = 1;
73+
ABORT = 2;
74+
INJECTION_PROBE_BEAM = 3;
75+
INJECTION_SETUP_BEAM = 4;
76+
INJECTION_PHYSICS_BEAM = 5;
77+
PREPARE_RAMP = 6;
78+
RAMP = 7;
79+
FLAT_TOP = 8;
80+
SQUEEZE = 9;
81+
ADJUST = 10;
82+
STABLE_BEAMS = 11;
83+
LOST_BEAMS = 12; // virtual type
84+
UNSTABLE_BEAMS = 13;
85+
BEAM_DUMP_WARNING = 14;
86+
BEAM_DUMP = 15;
87+
RAMP_DOWN = 16;
88+
CYCLING = 17;
89+
RECOVERY = 18;
90+
INJECT_AND_DUMP = 19;
91+
CIRCULATE_AND_DUMP = 20;
92+
NO_BEAM = 21;
93+
}

common/protos/events.proto

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,15 @@ message Ev_RunEvent {
127127
common.User lastRequestUser = 8;
128128
}
129129

130+
/**
131+
* Beam mode changes are propagated as Kafka events and to be sent by the BKP-LHC-Client on a dedicated topic
132+
* e.g. dip.lhc.beam_mode
133+
*/
134+
message Ev_BeamModeEvent {
135+
int64 timestamp = 1; // milliseconds since epoch when the beam mode change happened
136+
common.BeamInfo beamInfo = 2;
137+
}
138+
130139
message Event {
131140
int64 timestamp = 1;
132141
int64 timestampNano = 2;
@@ -144,5 +153,7 @@ message Event {
144153
Ev_MetaEvent_FrameworkEvent frameworkEvent = 101;
145154
Ev_MetaEvent_MesosHeartbeat mesosHeartbeatEvent = 102;
146155
Ev_MetaEvent_CoreStart coreStartEvent = 103;
156+
157+
Ev_BeamModeEvent beamModeEvent = 110;
147158
}
148159
}

0 commit comments

Comments
 (0)