1 #ifndef GEMValidation_GenericDigi_h 2 #define GEMValidation_GenericDigi_h 40 typedef std::tuple<unsigned int, int, int, DigiType, int, int, int, float>
Digi;
47 inline Digi
make_digi(
unsigned int id,
int ch,
int bx, DigiType
t) {
48 return std::make_tuple(
id, ch, bx, t, 0, 0, 0, 0.);
50 inline Digi
make_digi(
unsigned int id,
int ch,
int bx, DigiType
t,
int q) {
51 return std::make_tuple(
id, ch, bx, t, q, 0, 0, 0.);
54 return std::make_tuple(
id, ch, bx, t, q, pat, 0, 0.);
56 inline Digi
make_digi(
unsigned int id,
int ch,
int bx, DigiType
t,
int q,
int pat,
int wg) {
57 return std::make_tuple(
id, ch, bx, t, q, pat, wg, 0.);
59 inline Digi
make_digi(
unsigned int id,
int ch,
int bx, DigiType
t,
int q,
int pat,
int wg,
float dphi) {
60 return std::make_tuple(
id, ch, bx, t, q, pat, wg, dphi);
66 inline unsigned int digi_id(
const Digi &
d) {
return std::get<0>(
d); }
68 inline int digi_bx(
const Digi &
d) {
return std::get<2>(
d); }
69 inline DigiType
digi_type(
const Digi &
d) {
return std::get<3>(
d); }
79 inline float &
digi_dphi(Digi &d) {
return std::get<7>(
d); }
81 inline float digi_dphi(
const Digi &d) {
return std::get<7>(
d); }
float & digi_dphi(Digi &d)
std::ostream & operator<<(std::ostream &o, const matching::Digi &d)
bool is_valid(const Digi &d)
std::vector< Digi > DigiContainer
std::tuple< unsigned int, int, int, DigiType, int, int, int, float > Digi
DigiType digi_type(const Digi &d)
int digi_pattern(const Digi &d)
int digi_bx(const Digi &d)
int digi_quality(const Digi &d)
int digi_channel(const Digi &d)
unsigned int digi_id(const Digi &d)