#ifndef CLUSTER_H
#define CLUSTER_H
#include <stdint.h>
// Data type for the cluster
// has to be extended
typedef struct {
    int16_t x;
    int16_t y;
    int32_t data[9];
} Cluster;

typedef enum {
    cBottomLeft = 0,
    cBottomRight = 1,
    cTopLeft = 2,
    cTopRight = 3
} corner;

typedef enum {
    pBottomLeft = 0,
    pBottom = 1,
    pBottomRight = 2,
    pLeft = 3,
    pCenter = 4,
    pRight = 5,
    pTopLeft = 6,
    pTop = 7,
    pTopRight = 8
} pixel;

typedef struct {
    uint32_t c;
    int32_t tot;
    double etax;
    double etay;
} ClusterAnalysis;

enum DetectorType {
    DT_GENERIC = 0, 
    DT_MOENCH_03 = 3,
    DT_MOENCH_04_A = 4,
    DT_MOENCH_04_AD = 5 
};

typedef struct
{
  int64_t frame_number;
  int32_t subframe_number;
  int32_t packet_number;
  int64_t bunch_id;
  int64_t timestamp;
  int16_t module_id;
  int16_t row;
  int16_t column;
  int16_t reserved;
  int32_t debug;
  int16_t round_robin_nb;
  int8_t detector_type;
  int8_t header_version;
  int64_t packets_caught_mask[8];
} Header;



#endif
