DTLocalTrigger

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
#ifndef DTLocalTrigger_DTLocalTrigger_h
#define DTLocalTrigger_DTLocalTrigger_h

/** \class DTLocalTrigger
 *
 * Trigger from DT chamber
 *  
 *
 * \author FRC
 *
 */

#include <cstdint>

class DTLocalTrigger {
public:
  /// Constructor
  explicit DTLocalTrigger(int eventBx, int bx, int data);

  /// Default construction.
  DTLocalTrigger();

  /// triggers are equal if they are in the same chamber and have same BX count (??)
  bool operator==(const DTLocalTrigger& trig) const;

  uint16_t eventBx() const;
  uint16_t bx() const;
  uint16_t quality() const;
  uint16_t trTheta() const;
  bool secondTrack() const;
  bool trOut() const;

  /// Print content of trigger
  void print() const;

private:
  uint16_t theEventBX;
  uint16_t theBX;
  uint16_t theData;
};

#include <iostream>
inline std::ostream& operator<<(std::ostream& o, const DTLocalTrigger& trig) {
  return o << " BX: " << trig.bx() << " quality: " << trig.quality();
}
#endif