/[PAMELA software]/calo/flight/FUTILITIES/macros/FCaloADC2MIP.cxx
ViewVC logotype

Diff of /calo/flight/FUTILITIES/macros/FCaloADC2MIP.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by mocchiut, Fri Mar 31 10:03:45 2006 UTC revision 1.3 by mocchiut, Fri Jun 30 12:08:13 2006 UTC
# Line 3038  void FCaloALIG2DAT(TString txtple){ Line 3038  void FCaloALIG2DAT(TString txtple){
3038    Int_t ixalig;    Int_t ixalig;
3039    Int_t iyalig;    Int_t iyalig;
3040    Int_t izalig;    Int_t izalig;
3041      Int_t iemip;
3042    Float_t xalig;    Float_t xalig;
3043    Float_t yalig;    Float_t yalig;
3044    Float_t zalig;    Float_t zalig;
3045      Float_t emip;
3046    //    //
3047    FILE *f;    FILE *f;
3048    f = fopen(txtple.Data(),"wb");    f = fopen(txtple.Data(),"wb");
3049    //    //
3050    printf("\n Insert four cifres parameters, the last one will become the decimal (1234 will be transformed into 123.4) \n");    printf("\n Insert parameters in microns \n");
3051    printf("\n Insert the x alignment parameter: \n");    printf("\n Insert the x alignment parameter: \n");
3052    cin.getline(value,256);    cin.getline(value,256);
3053    ixalig = atoi(value);    ixalig = atoi(value);
3054    xalig = (Float_t)ixalig/10.;    xalig = (Float_t)ixalig/1000.;
3055    fwrite(&xalig,sizeof(xalig),1,f);    fwrite(&xalig,sizeof(xalig),1,f);
3056    printf(" xalig = %f \n",xalig);    printf(" xalig = %f mm\n",xalig);
3057    //    //
3058    printf("\n Insert the y alignment parameter: \n");    printf("\n Insert the y alignment parameter: \n");
3059    cin.getline(value,256);    cin.getline(value,256);
3060    iyalig = atoi(value);    iyalig = atoi(value);
3061    yalig = (Float_t)iyalig/10.;    yalig = (Float_t)iyalig/1000.;
3062    fwrite(&yalig,sizeof(yalig),1,f);    fwrite(&yalig,sizeof(yalig),1,f);
3063    printf(" yalig = %f \n",yalig);    printf(" yalig = %f mm\n",yalig);
3064    //    //
3065    printf("\n Insert the z alignment parameter: \n");    printf("\n Insert the z alignment parameter: \n");
3066    cin.getline(value,256);    cin.getline(value,256);
3067    izalig = atoi(value);    izalig = atoi(value);
3068    zalig = (Float_t)izalig/10.;    zalig = (Float_t)izalig/1000.;
3069    fwrite(&zalig,sizeof(zalig),1,f);    fwrite(&zalig,sizeof(zalig),1,f);
3070    printf(" zalig = %f \n",zalig);    printf(" zalig = %f mm\n",zalig);
3071      //
3072      printf("\n Insert the signal/noise threshold (times 1000): \n");
3073      cin.getline(value,256);
3074      iemip = atoi(value);
3075      emip = (Float_t)iemip/1000.;
3076      fwrite(&emip,sizeof(emip),1,f);
3077      printf(" emip = %f mip \n",emip);
3078    //    //
3079    fclose(f);    fclose(f);
3080  }  }
# Line 3082  void FCaloREADALIG(TString txtple){ Line 3091  void FCaloREADALIG(TString txtple){
3091    mip = 0.;    mip = 0.;
3092    fread(&mip,sizeof(mip),1,f);    fread(&mip,sizeof(mip),1,f);
3093    printf(" zalig = %f \n",mip);    printf(" zalig = %f \n",mip);
3094      mip = 0.;
3095      fread(&mip,sizeof(mip),1,f);
3096      printf(" signal threshold = %f \n",mip);
3097    fclose(f);    fclose(f);
3098  }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.23