Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion common/protos/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,49 @@ message WorkflowTemplateInfo {
string description = 2;
string path = 3;
bool public = 4; // whether the environment is public or not
}
}

/**
* Beam information at a specific point in time (e.g. start or end of stable beams)
*/
message BeamInfo {
int64 stableBeamsStart = 1; // milliseconds since epoch when stable beams started
int64 stableBeamsEnd = 2; // milliseconds since epoch when stable beams ended
int32 fillNumber = 3; // LHC fill number
string fillingSchemeName = 4; // LHC filling scheme name e.g. 25ns_2460b_2448_2089_2227_144bpi_20inj
float beam1Energy = 5; // in GeV
float beam2Energy = 6; // in GeV
string beamType = 7; // e.g. PROTON-PROTON, O8-O8, Pb-Pb, p-Pb, Pb-p
BeamMode beamMode = 8;
}

/**
* Beam modes as defined and sent by LHC DIP client plus:
* * 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
* * virtual type UNKNOWN - that is generated when there is no beam in the machine or value not added by the BKP-LHC Client
* Source of Beam Modes: https://lhc-commissioning.web.cern.ch/systems/data-exchange/doc/LHC-OP-ES-0005-10-00.pdf
*/
enum BeamMode {
UNKNOWN = 0; // virtual type
SETUP = 1;
ABORT = 2;
INJECTION_PROBE_BEAM = 3;
INJECTION_SETUP_BEAM = 4;
INJECTION_PHYSICS_BEAM = 5;
PREPARE_RAMP = 6;
RAMP = 7;
FLAT_TOP = 8;
SQUEEZE = 9;
ADJUST = 10;
STABLE_BEAMS = 11;
LOST_BEAMS = 12; // virtual type
UNSTABLE_BEAMS = 13;
BEAM_DUMP_WARNING = 14;
BEAM_DUMP = 15;
RAMP_DOWN = 16;
CYCLING = 17;
RECOVERY = 18;
INJECT_AND_DUMP = 19;
CIRCULATE_AND_DUMP = 20;
NO_BEAM = 21;
}
11 changes: 11 additions & 0 deletions common/protos/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,15 @@ message Ev_RunEvent {
common.User lastRequestUser = 8;
}

/**
* Beam mode changes are propagated as Kafka events and to be sent by the BKP-LHC-Client on a dedicated topic
* e.g. dip.lhc.beam_mode
*/
message Ev_BeamModeEvent {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name Ev_BeamModeEvent follows the naming convention for the test of events.

I personally, consider that the Ev already stands for Event and I would recommend something like Ev_BeamModeChange

What do you @knopers8 and @justonedev1 think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that you are right, but I would keep the same convention as the rest of ECS. So I'd keep it as it is now.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though I also don't see a strong reason for the duplicated "event", I would rather keep it consistent with the existing convention.

int64 timestamp = 1; // milliseconds since epoch when the beam mode change happened
common.BeamInfo beamInfo = 2;
}

message Event {
int64 timestamp = 1;
int64 timestampNano = 2;
Expand All @@ -144,5 +153,7 @@ message Event {
Ev_MetaEvent_FrameworkEvent frameworkEvent = 101;
Ev_MetaEvent_MesosHeartbeat mesosHeartbeatEvent = 102;
Ev_MetaEvent_CoreStart coreStartEvent = 103;

Ev_BeamModeEvent beamModeEvent = 110;
}
}