typedef struct Chmerge {
    Int_t fromflag;
    Int_t scanflag;
    Int_t pscuOBT;
    Int_t pscucount;
    Int_t lastOBT[1000];
    Int_t lastcount[1000];
} chmerge;

typedef struct Evento {
      Int_t     iev;
      Int_t     stwerr[4];
      Float_t   emin;
      Float_t   perror[4];
      Float_t   dexy[2][22][96];
      Float_t   dexyc[2][22][96];
      Double_t  base[2][22][6];
      Float_t   calselftrig[4][7];
      Float_t   calIItrig[4];
      Float_t   calstriphit[4];
      Float_t   calDSPtaberr[4];
      Float_t   calevnum[4];
      Float_t   shift; 
} evento;    

typedef struct Calib {
    TString tablename;
    TString basepath;
    TString yodalev;
    char *db;
    Int_t DW;
    Int_t mysql;
    Int_t obtjump;    
    Int_t time[4][51];
    Int_t ttime[4][51];
    Int_t fcode[4][51];
    Int_t iev;
    Int_t cstwerr[4];
    Float_t ispaw;
    Float_t cperror[4];
    Float_t mip[2][22][96];
    Float_t calped[2][22][96];
    Float_t calgood[2][22][96];
    Float_t calthr[2][22][6];
    Float_t calrms[2][22][96];
    Float_t calbase[2][22][6];
    Float_t calvar[2][22][6];
    Float_t calpuls[2][22][96];
    Double_t sbase[2][22][6];
    Double_t al_p[5][2];
    Int_t trkchi2;
    Bool_t good2;
} calib;

