Index: trunk/MagicSoft/Mars/macros/ONOFFAnalysis.C
===================================================================
--- trunk/MagicSoft/Mars/macros/ONOFFAnalysis.C	(revision 4867)
+++ trunk/MagicSoft/Mars/macros/ONOFFAnalysis.C	(revision 4868)
@@ -172,5 +172,6 @@
       //TString tag = "040126";
       //TString tag = "040127";
-      TString tag = "040215";
+      //TString tag = "040215";
+      TString tag = "040422";
 
       //const char *offfile = "~magican/ct1test/wittek/offdata.preproc"; 
@@ -184,6 +185,6 @@
       // 15 Feb 04
       //const char *offfile  = "*.OFF";
-      const char *offfile  = "174*.OFF";
-
+      //const char *offfile  = "174*.OFF";
+      const char *offfile  = "*.OffMrk421*";
 
       //const char *onfile  = "~magican/ct1test/wittek/mkn421_on.preproc"; 
@@ -199,5 +200,6 @@
       // 15 Feb 04
       //const char *onfile  = "*.ON";
-      const char *onfile  = "174*.ON";
+      //const char *onfile  = "174*.ON";
+      const char *onfile  = "*.Mrk421*";
 
 
@@ -231,13 +233,25 @@
      //if (tag == "040215")
      //  TString inPath = "/mnt/magicserv01/scratch/David/CalibratedData/Crab/2004_02_15/";
-     if (tag == "040215")   
+     if (tag == "040215")  
+     { 
        TString inPathON = "/.magic/magicserv01/scratch/Daniel/CalibratedData/MispointingTest/2004_02_15ForgottenData/finesam20/";
        TString inPathOFF = "/.magic/magicserv01/scratch/David/CalibratedData/Mkn421/2004_02_15/";
        TString inPathMC = "/.magic/magicserv01/scratch/David/MCData/MCApril2004/Data/gammas_highnoise/";
+     }
+
+     if (tag == "040422")  
+     { 
+       TString inPathON  = "/.magic/data03a/mazin/calibrdata/2004_04_22/";
+       TString inPathOFF = "/.magic/data03a/mazin/calibrdata/2004_04_22/";
+       TString inPathMC  = "/.magic/magicserv01/scratch/David/MCData/MCApril2004/Data/gammas_highnoise/";
+     }
 
       // path for output from Mars
       //TString outPath = "~wittek/datacrab_feb04/";
      //TString outPath = "~wittek/datacrab_01march04/";
-      TString outPath = "~wittek/datacrab_27april04/";
+     // TString outPath = "~wittek/datacrab_27april04/";
+     TString outPath = "/mnt/data03a/wittek/";
+     outPath += tag;
+     outPath += "/";
 
       //-----------------------------------------------
@@ -256,10 +270,10 @@
 
     Bool_t JobA    = kTRUE;  
-    Bool_t GPadON  = kFALSE;    // \  generate padding histograms 
+    Bool_t GPadON  = kTRUE;    // \  generate padding histograms 
     Bool_t GPadOFF = kFALSE;    //  | and write them onto disk
     Bool_t GPadMC  = kFALSE;    // /
     Bool_t Merge   = kFALSE;   // merge padding histograms
                                // and write them onto disk
-    Bool_t Wout    = kTRUE;   // read in merged padding histograms and
+    Bool_t Wout    = kFALSE;   // read in merged padding histograms and
                               // write out root file of padded data
                               // (ON1.root, OFF1.root or MC1.root) 
@@ -477,22 +491,28 @@
     MGeomApply        apply;
 
-    MSourcePosfromStarPos sourcefromstaron;
-    sourcefromstaron.AddFile("~wittek/datacrab_26feb04/positions040215.txt", 0);
-
-      MBlindPixelsCalc2 blindon;
-      //blindon.SetUseBlindPixels();
-      blindon.SetCheckPedestalRms();
+    TString pedphotcamname("MPedPhotCamFromData");
+
+    MBadPixelsCalc badcalcon;
+    badcalcon.SetNamePedPhotContainer(pedphotcamname);
+    badcalcon.SetPedestalLevel(2.0);
+
+    MBadPixelsTreat badtreaton;
+    badtreaton.SetNamePedPhotCam(pedphotcamname);
+    badtreaton.SetUseInterpolation();
+    badtreaton.SetProcessPedestalEvt();
+    badtreaton.SetProcessTimes();
 
       MFSelBasic selbasicon;
       MContinue contbasicon(&selbasicon);
 
-      MHBlindPixels blindON("BlindPixelsON");
-      MFillH fillblindON("BlindPixelsON[MHBlindPixels]", "MBlindPixels");
-      fillblindON.SetName("FillBlind");
+      MHBadPixels badON("BadPixelsON");
+      MFillH fillbadON("BadPixelsON[MHBadPixels]", "MBadPixelsCam");
+      fillbadON.SetName("FillBad");
 
       MSigmabarCalc sigbarcalcon;
 
       MHSigmaTheta sigthON("SigmaThetaON");
-      MFillH fillsigthetaON ("SigmaThetaON[MHSigmaTheta]", "MPointingPos");
+      sigthON.SetNamePedPhotCam(pedphotcamname);
+      MFillH fillsigthetaON ("SigmaThetaON[MHSigmaTheta]", "");
       fillsigthetaON.SetName("FillSigTheta");    
  
@@ -503,5 +523,5 @@
       InitBinnings(&pliston);
       pliston.AddToList(&observon);
-      pliston.AddToList(&blindON);
+      pliston.AddToList(&badON);
       pliston.AddToList(&sigthON);
 
@@ -512,10 +532,10 @@
       tliston.AddToList(&readON);
       tliston.AddToList(&apply);
-      tliston.AddToList(&sourcefromstaron);
-
-      tliston.AddToList(&blindon);
+
+      tliston.AddToList(&badcalcon);
+      tliston.AddToList(&badtreaton);
 
       tliston.AddToList(&contbasicon);
-      tliston.AddToList(&fillblindON);
+      tliston.AddToList(&fillbadON);
       tliston.AddToList(&sigbarcalcon);
       tliston.AddToList(&fillsigthetaON);
@@ -533,5 +553,5 @@
       tliston.PrintStatistics(0, kTRUE);
 
-      blindON.DrawClone();
+      badON.DrawClone();
       sigthON.DrawClone();
 
@@ -541,6 +561,6 @@
       TH3D *diffpixthon = sigthON.GetDiffPixTheta();
 
-      TH2D *blindidthon = blindON.GetBlindId();
-      TH2D *blindnthon  = blindON.GetBlindN();
+      TH2D *badidthon = badON.GetBadId();
+      TH2D *badnthon  = baddON.GetBadN();
 
       gLog << "" << endl;
@@ -552,6 +572,6 @@
       sigpixthon->Write();
       diffpixthon->Write();
-      blindidthon->Write();
-      blindnthon->Write();
+      badidthon->Write();
+      badnthon->Write();
       filewriteon.Close();
 
Index: trunk/MagicSoft/Mars/mtemp/findTelAxisFromStars.C
===================================================================
--- trunk/MagicSoft/Mars/mtemp/findTelAxisFromStars.C	(revision 4867)
+++ trunk/MagicSoft/Mars/mtemp/findTelAxisFromStars.C	(revision 4868)
@@ -207,5 +207,5 @@
 
   //$$$$$$$$$$$$$$$$ ww
-  Int_t InputType = 1;
+  Int_t InputType = 0;
   //findstars.SetUseCorrelatedGauss(kFALSE);
 
@@ -265,11 +265,11 @@
   while (tlist.Process())
     {
-      gLog << "---------------------------------------------" << endl;
-      gLog << "Macro : MStarPos content = " << endl;
-      starcam.Print("namepossizchierr");
-      gLog << "---------------------------------------------" << endl;
-      gLog << "Macro : MSourcePos content = " << endl;
-      sourcecam.Print("namepossizchierr");
-      gLog << "---------------------------------------------" << endl;
+      //gLog << "---------------------------------------------" << endl;
+      //gLog << "Macro : MStarPos content = " << endl;
+      //starcam.Print("namepossizchierr");
+      //gLog << "---------------------------------------------" << endl;
+      //gLog << "Macro : MSourcePos content = " << endl;
+      //sourcecam.Print("namepossizchierr");
+      //gLog << "---------------------------------------------" << endl;
 
       numevents++;
@@ -314,5 +314,5 @@
       		   + source->GetYIdeal()*source->GetYIdeal() );
 
-        cout << "R0, R = " << R0 << ",  " << R << endl;
+        //cout << "R0, R = " << R0 << ",  " << R << endl;
 
 	aberr->Fill(R0, R, 1.0);
@@ -345,8 +345,8 @@
   //$$$$$$$$$$$$$$$$ ww
   
-  gLog << "Event loop finished; call DrawClone of MHTelAxisFromStars" << endl;
-  TObject *srccam = plist.FindObject("MSourceCam");
-
-  gLog << "srccam = " << srccam << endl;
+  //gLog << "Event loop finished; call DrawClone of MHTelAxisFromStars" << endl;
+
+  //TObject *srccam = plist.FindObject("MSourceCam");
+  //gLog << "srccam = " << srccam << endl;
 
   TObject *obj = plist.FindObject("MHTelAxisFromStars");
