Ignore:
Timestamp:
04/26/04 16:44:20 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/macros/calibration.C

    r3796 r3832  
    5252//
    5353/////////////////////////////////////////////////////////////////////////////
    54 const TString inpath = "/home/rootdata/BlindPixel/";
    55 const Int_t pedrun  = 20491;
    56 const Int_t calrun1 = 20494;
    57 const Int_t calrun2 = 20496;
     54const TString inpath = "/home/rootdata/Calib/2004_04_16/";
     55const Int_t pedrun  = 22265;
     56const Int_t calrun1 = 22299;
     57const Int_t calrun2 = 22300;
    5858
    5959void calibration(const Int_t prun=pedrun, const Int_t crun1=calrun1, const Int_t crun2=calrun2)
     
    7070    cruns.AddRuns(crun1,crun2,inpath);
    7171
    72   MCalibrationCam::PulserColor_t color;
    73 
    74   if (crun1 < 20000)
    75     color = MCalibrationCam::kCT1;
    76   else
    77     color = FindColor((MDirIter*)&cruns);
    78 
    79   if (color == MCalibrationCam::kNONE)
    80     return;
    81 
    8272  MCalibrationQECam qecam;
    8373  MBadPixelsCam     badcam;
     
    8878  //
    8979  //  badcam.AsciiRead("badpixels.dat");
    90 
    91   for (Int_t i=0;i<badcam.GetSize();i++)
    92     if (badcam[i].IsBad())
    93       cout << "Bad Pixel: " << i << endl;
    9480
    9581  MStatusDisplay *display = new MStatusDisplay;
     
    114100  //
    115101  MJCalibration calloop;
    116   calloop.SetColor(color);
     102  //  calloop.SetColor(color);
    117103
    118104  //
     
    136122}
    137123
    138 MCalibrationCam::PulserColor_t FindColor(MDirIter* run)
    139 {
    140  
    141   MCalibrationCam::PulserColor_t col = MCalibrationCam::kNONE;
    142 
    143   TString filenames;
    144 
    145   while (!(filenames=run->Next()).IsNull())
    146     {
    147 
    148       filenames.ToLower();
    149 
    150       if (filenames.Contains("green"))
    151         if (col == MCalibrationCam::kNONE)
    152           {
    153             cout << "Found colour: Green  in " << filenames << endl;
    154             col = MCalibrationCam::kGREEN;
    155           }
    156         else if (col != MCalibrationCam::kGREEN)
    157           {
    158             cout << "Different colour found in " << filenames << "... abort" << endl;
    159             return MCalibrationCam::kNONE;
    160           }
    161 
    162       if (filenames.Contains("blue"))
    163         if (col == MCalibrationCam::kNONE)
    164           {
    165             cout << "Found colour: Blue  in " << filenames << endl;
    166             col = MCalibrationCam::kBLUE;
    167           }
    168         else if (col != MCalibrationCam::kBLUE)
    169           {
    170             cout << "Different colour found in " << filenames << "... abort" << endl;
    171             return MCalibrationCam::kNONE;
    172           }
    173 
    174       if (filenames.Contains("uv"))
    175         if (col == MCalibrationCam::kNONE)
    176           {
    177             cout << "Found colour: Uv  in " << filenames << endl;
    178             col = MCalibrationCam::kUV;
    179           }
    180         else if (col != MCalibrationCam::kUV)
    181           {
    182             cout << "Different colour found in " << filenames << "... abort" << endl;
    183             return MCalibrationCam::kNONE;
    184           }
    185 
    186       if (filenames.Contains("ct1"))
    187         if (col == MCalibrationCam::kNONE)
    188           {
    189             cout << "Found colour: Ct1  in " << filenames << endl;
    190             col = MCalibrationCam::kCT1;
    191           }
    192         else if (col != MCalibrationCam::kCT1)
    193           {
    194             cout << "Different colour found in " << filenames << "... abort" << endl;
    195             return MCalibrationCam::kNONE;
    196           }
    197      
    198     }
    199  
    200 
    201      
    202   if (col == MCalibrationCam::kNONE)
    203     cout <<  "No colour found in filenames of runs: " << ((MRunIter*)run)->GetRunsAsString()
    204          << "... abort" << endl;
    205  
    206   return col;     
    207 }
Note: See TracChangeset for help on using the changeset viewer.