Changeset 3487 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
03/12/04 16:07:58 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MCerPhotAnal2.cc

    r3471 r3487  
    153153        ULong_t sqsb  = 0;   // sum sqares signal+background
    154154
    155         Int_t sat = 0; // saturates?
    156         Int_t nb  = 0;
    157         Int_t nsb = 0;
     155        Int_t sat  = 0; // saturates?
     156        Int_t ishi = 0; // has a high content?
     157        Int_t nb   = 0;
     158        Int_t nsb  = 0;
    158159
    159160        if (*max==255)
    160161            sat++;
     162
     163        if (*max>80)
     164            ishi++;
    161165
    162166        while (ptr<end)
     
    177181        }
    178182
    179         if (sat>1)
     183        if (sat==0 && ishi)
     184        {
     185            // Area: x9
     186            ptr = pixel.GetLoGainSamples();
     187            max = ptr+pixel.GetIdxMaxLoGainSample();
     188            end = ptr+fRawEvt->GetNumLoGainSamples();
     189
     190            sumb = 0;   // sum background
     191            sqb  = 0;   // sum sqares background
     192            nb   = 0;
     193
     194            while (ptr<end)
     195            {
     196                // Background already calced from hi-gains!
     197                sumb += *ptr;
     198                sqb  += *ptr* *ptr;
     199                nb++;
     200            }
     201        }
     202
     203        if (sat>1 && !ishi)
    180204        {
    181205            // Area: x9
  • trunk/MagicSoft/Mars/mastro/MAstroCamera.cc

    r3457 r3487  
    286286        mean *= 1./num;
    287287
    288         DrawStar(mean(1), mean(0), *radec, !hasmean);
     288        DrawStar(mean(1), mean(0), *radec, !hasmean, Form("x=%.1fmm y=%.1fmm", mean(1), mean(0)));
    289289    }
    290290}
  • trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc

    r3478 r3487  
    468468    //        return;
    469469
    470     const Int_t v0x = (int)(v0.X()*TMath::RadToDeg());
    471     const Int_t v0y = (int)(v0.Y()*TMath::RadToDeg());
     470    //    const Int_t v0x = (int)(v0.X()*TMath::RadToDeg());
     471    //    const Int_t v0y = (int)(v0.Y()*TMath::RadToDeg());
    472472
    473473    Int_t idx[] = {1, 1, 1, 1};
     
    568568}
    569569
    570 void MAstroCatalog::DrawStar(Double_t x, Double_t y, const TVector3 &v, Bool_t transparent)
     570void MAstroCatalog::DrawStar(Double_t x, Double_t y, const TVector3 &v, Bool_t transparent, const char *txt)
    571571{
    572572    const Double_t ra  = v.Phi()*TMath::RadToDeg()/15;
     
    577577    str += Form("  Dec=%.1fd", dec);
    578578    str += Form("  Mag=%.1f", -2.5*log10(v.Mag()));
     579    if (txt)
     580        str += Form("  (%s)", txt);
    579581
    580582    // draw star on the camera display
  • trunk/MagicSoft/Mars/mastro/MAstroCatalog.h

    r3457 r3487  
    8787    Float_t atof(const TString &s);
    8888
     89//#if ROOT_VERSION_CODE < ROOT_VERSION(4,00,03)
    8990    Bool_t fPlainScreen;  //! Just a dummy!!!! ([Set,Is]Freezed)
     91//#endif
    9092
    9193protected:
     
    110112    void  Draw(const TVector2 &v0, const TRotation &rot, TArrayI &dx, TArrayI &dy, Int_t stepx, Int_t stepy, Int_t type);
    111113    void  DrawNet(const TVector2 &v0, const TRotation &rot, Int_t type);
    112     void  DrawStar(Double_t x, Double_t y, const TVector3 &v, Bool_t t);
     114    void  DrawStar(Double_t x, Double_t y, const TVector3 &v, Bool_t t, const char *txt=0);
    113115    void  Paint(Option_t *o="");
    114116    Int_t DistancetoPrimitive(Int_t px, Int_t py);
     
    173175    void SetGuiActive(Bool_t b=kTRUE)        { b ? SetBit(kGuiActive) : ResetBit(kGuiActive); }
    174176
    175     void   SetPlainScreen(Bool_t b=kTRUE)    { b ? SetBit(kPlainScreen) : ResetBit(kPlainScreen); Update(); } // *TOGGLE*
     177    void   SetPlainScreen(Bool_t b=kTRUE)    { b ? SetBit(kPlainScreen) : ResetBit(kPlainScreen); Update(); } // *TOGGLE* *GETTER=IsPlainScreen
    176178    Bool_t IsPlainScreen() const             { return TestBit(kPlainScreen); }
    177179
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r3387 r3487  
    19541954        //
    19551955        gPad = n;
     1956        //n->cd();
    19561957
    19571958        //
     
    19831984        //
    19841985        n->SetBatch(kFALSE);
    1985         if (num<0)
    1986             *fLog << "done." << endl;
     1986        *fLog << "done." << endl;
    19871987    }
    19881988
     
    19941994    SetStatusLine2("Updating header of PS file...");
    19951995
    1996     *fLog << inf << " - Updating header of PS file... " << flush;
     1996    if (num<0)
     1997        *fLog << " - Updating header of PS file... " << flush;
    19971998    UpdatePSHeader(name);
    1998     *fLog << inf << "done." << endl;
     1999    if (num<0)
     2000        *fLog << inf << "done." << endl;
    19992001
    20002002    gVirtualPS = psave;
     
    20022004        padsav->cd();
    20032005
    2004     *fLog << inf << "done." << endl;
     2006    if (num<0)
     2007        *fLog << inf << "done." << endl;
    20052008
    20062009    SetStatusLine2(Form("Done (%dpages)", page-1));
  • trunk/MagicSoft/Mars/merpp.cc

    r3442 r3487  
    6161    gLog << all << endl;
    6262    gLog << "Sorry the usage is:" << endl;
    63     gLog << "   merpp [-h] [-?] [-a] [-vn] [-cn] [-u]" << endl;
     63    gLog << "   merpp [-h] [-?] [-a] [-vn] [-cn] [-u, -f]" << endl;
    6464    gLog << "         inputfile[.rep,[.raw],[.txt]] [outputfile[.root]]" << endl << endl;
    6565    gLog << "     inputfile.raw:  Magic DAQ binary file." << endl;
     
    7171    gLog << "     -u, --update                     Update file" << endl;
    7272    gLog << "     -a, --no-colors                  Do not use Ansii color codes" << endl;
     73    gLog << "     -f                               Force overwrite of an existing file" << endl;
    7374    gLog << "     --sql=mysql://user:password@url  Insert run into database <raw data only>" << endl;
    7475    gLog << "     --start=yyyy-mm-dd/hh:mm:ss.mmm  Start event time for merpping report files" << endl;
     
    118119    const Int_t kComprlvl = arg.HasOption("-c") ? arg.GetIntAndRemove("-c") : 1;
    119120    Bool_t kUpdate = arg.HasOnlyAndRemove("--update") || arg.HasOnlyAndRemove("-u");
     121    const Bool_t kForce = arg.HasOnlyAndRemove("-f");
    120122
    121123    gLog.SetDebugLevel(arg.HasOption("-v") ? arg.GetIntAndRemove("-v") : 2);
     
    194196    }
    195197
    196     if (fileexist && !kUpdate)
     198    if (fileexist && !kUpdate && !kForce)
    197199    {
    198200        gLog << err << "Sorry, file '" << kNameout << "' already existing." << endl;
  • trunk/MagicSoft/Mars/mfilter/MFCosmics.cc

    r3262 r3487  
    167167
    168168        allpix++;
     169
    169170        //
    170171        // We consider a pixel as presumably due to cosmics
     
    193194    *fLog << " " << setw(7) << fCut[0] << " (" << setw(3) ;
    194195    *fLog << (int)(fCut[0]*100/GetNumExecutions()) ;
    195     *fLog << "%) Evts skipped due to: Cosmics Rejection applied " ;
     196    *fLog << "%) Detected cosmics " ;
    196197    *fLog << " (with fMaxEmptyPixels = " << fMaxEmptyPixels*100 << "%)" << endl;
    197198
    198199    *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) ;
    199200    *fLog << (int)(fCut[1]*100/GetNumExecutions()) ;
    200     *fLog << "%) Evts survived the cosmics rejection!" << endl;
     201    *fLog << "%) No cosmics!" << endl;
    201202    *fLog << endl;
    202203
  • trunk/MagicSoft/Mars/mhist/MHCamera.h

    r3471 r3487  
    4242    TList         *fNotify;      //!
    4343
     44//#if ROOT_VERSION_CODE < ROOT_VERSION(4,00,03)
    4445    Bool_t         fFreezed;     //! Just a dummy!!!! ([Set,Is]Freezed)
    45 
    46     //Int_t          fOptStat;
    47     //TGStatusBar   *fStatusBar;
     46//#endif
    4847
    4948    void Init();
     
    202201    void     DisplayAsCamera() { SetDrawOption(""); } // *MENU*
    203202
    204     void     SetFreezed(Bool_t f=kTRUE) { f ? SetBit(kFreezed) : ResetBit(kFreezed); } // *TOGGLE*
     203    void     SetFreezed(Bool_t f=kTRUE) { f ? SetBit(kFreezed) : ResetBit(kFreezed); } // *TOGGLE* *GETTER=IsFreezed
    205204    Bool_t   IsFreezed() const { return TestBit(kFreezed); }
    206205    //void  SetOptStat(Int_t os=-1) { fOptStat = os; } // *MENU*
Note: See TracChangeset for help on using the changeset viewer.