pub struct RAT {
pub rat_id: i16,
pub pb_id: i16,
pub rb1_id: i16,
pub rb2_id: i16,
pub ltb_id: i16,
pub ltb_harting_cable_length: i16,
}Expand description
Representation of a local trigger board.
The individual LTB channels do not map directly to PaddleEnds. Rather two of them map to a paddle and then the whole paddle should get read out. To be more specific about this. The LTB has 16 channels, but we treat them as 8. Each 2 LTB channels get “married” internally in the board and will then continue on as 1 LTB channel, visible to the outside. The information about which end of the Paddle crossed which threshhold is lost. How it works is that the two channels will be combined by the trigger logic:
- There are 4 states (2 bits)
- 0 - no hit
- 1 - Hit
- 2 - Beta
- 3 - Veto
Each defining an individual threshold. If that is crossed, the whole paddle (ends A+B) will be read out by the ReadoutBoard
The LTB channels here are labeled 1-8. This is as it is in the TOF spreadsheet. Also dsi is labeled as in the spreadsheet and will start from one.
It is NOT clear from this which ch on the rb is connected to which side, for that the paddle/RB tables need to be consulted. Again: rb_ch0 does NOT necessarily correspond to the A side!
Fields§
§rat_id: i16§pb_id: i16§rb1_id: i16§rb2_id: i16§ltb_id: i16§ltb_harting_cable_length: i16Implementations§
Source§impl RAT
impl RAT
pub fn new() -> Self
Sourcepub fn where_rb2id(conn: &mut SqliteConnection, rb2id: u8) -> Option<Vec<RAT>>
pub fn where_rb2id(conn: &mut SqliteConnection, rb2id: u8) -> Option<Vec<RAT>>
Get the RAT where rb2id matched the argument
Sourcepub fn where_rb1id(conn: &mut SqliteConnection, rb2id: u8) -> Option<Vec<RAT>>
pub fn where_rb1id(conn: &mut SqliteConnection, rb2id: u8) -> Option<Vec<RAT>>
Get the RAT where rb1id (the rb id of rb“1“ in the RAT) matched the argument
pub fn all(conn: &mut SqliteConnection) -> Option<Vec<RAT>>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RAT
impl<'de> Deserialize<'de> for RAT
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<__DB: Backend, __ST0, __ST1, __ST2, __ST3, __ST4, __ST5> Queryable<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5), __DB> for RATwhere
(i16, i16, i16, i16, i16, i16): FromStaticSqlRow<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5), __DB>,
impl<__DB: Backend, __ST0, __ST1, __ST2, __ST3, __ST4, __ST5> Queryable<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5), __DB> for RATwhere
(i16, i16, i16, i16, i16, i16): FromStaticSqlRow<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5), __DB>,
Source§impl<__DB: Backend> Selectable<__DB> for RAT
impl<__DB: Backend> Selectable<__DB> for RAT
Source§type SelectExpression = (rat_id, pb_id, rb1_id, rb2_id, ltb_id, ltb_harting_cable_length)
type SelectExpression = (rat_id, pb_id, rb1_id, rb2_id, ltb_id, ltb_harting_cable_length)
Source§fn construct_selection() -> Self::SelectExpression
fn construct_selection() -> Self::SelectExpression
Auto Trait Implementations§
impl Freeze for RAT
impl RefUnwindSafe for RAT
impl Send for RAT
impl Sync for RAT
impl Unpin for RAT
impl UnwindSafe for RAT
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T, DB> SelectableHelper<DB> for Twhere
T: Selectable<DB>,
DB: Backend,
impl<T, DB> SelectableHelper<DB> for Twhere
T: Selectable<DB>,
DB: Backend,
Source§fn as_select() -> SelectBy<T, DB>
fn as_select() -> SelectBy<T, DB>
Selectable implementation. Read moreSource§fn as_returning() -> SelectBy<Self, DB>
fn as_returning() -> SelectBy<Self, DB>
as_select that can be used with returning clausesSource§impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
Source§const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more