Changeset 9574 for trunk


Ignore:
Timestamp:
04/21/10 16:46:18 (15 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9573 r9574  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2010/04/21 Thomas Bretz
     22
     23   * macros/rootlogon.C:
     24     - a small fix which gets rid of the annoying error about an
     25       unlocked mutex when starting the MStatusDisplay in the
     26       interpreter. It makes sure that fGThreadFactory gets initialized
     27       from the main thread.
     28
     29   * mbase/MStatusDisplay.cc:
     30     - added a console output if TryLock fails
     31     - the return value of TString::Index was misinterpreted
     32
     33   * mmuon/MHSingleMuon.cc:
     34     - removed another reference to gMinuit
     35
     36   * msimcamera/MSimRandomPhotons.cc:
     37     - re-did the output
     38     - choose the other rate f2 instead of f1
     39
     40   * msimcamera/MSimTrigger.[h,cc]:
     41     - keep the index of the trigger channel which finnaly issued
     42       the trigger and propagate it to the event header
     43
     44   * mraw/MrawEvtHeader.h:
     45     - implementd setter for fNumTriggerLvl1
     46
     47
    2048
    2149 2010/04/19 Thomas Bretz
  • trunk/MagicSoft/Mars/NEWS

    r9565 r9574  
    1212   * Allow for individual mirrors with parabolic shape (for details see
    1313     MReflector::ReadFile)
     14
     15   * As an additional output artificial star-files are written. They
     16     contain star output compatible output based on the signal as
     17     in the artificial callisto output files.
     18
     19   * The trigger channel which issued the trigger is now stored in
     20     MRawEvtHeader::fNumTriggerLvl1
    1421
    1522
  • trunk/MagicSoft/Mars/macros/rootlogon.C

    r9274 r9574  
    124124    MLog::RedirectErrorHandler(MLog::kColor);
    125125
     126    // This initialized the thread factory. This is needed to supress
     127    // an error which is displayed if the thread factory is initialized
     128    // from another than the main thread (e.g. in the constructor
     129    // of MStatusDisplay)
     130    TThread::Self();
     131
    126132    gInterpreter->AddIncludePath(dir+"macros");
    127133    gInterpreter->AddIncludePath(dir+"manalysis");
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r9410 r9574  
    12231223    // in the same thread
    12241224    //
    1225     if (fMutex->TryLock())
     1225    const Int_t rc = fMutex->TryLock();
     1226    if (rc==13)
     1227        gLog << warn << "MStatusDisplay::UpdateTab - mutex is already locked by this thread." << endl;
     1228
     1229    if (rc)
    12261230        return;
    12271231
     
    26382642    {
    26392643        Bool_t found = kFALSE;
    2640         if (name.Index("%%%%name%%%%"))
     2644        if (name.Index("%%%%name%%%%")>=0)
    26412645        {
    26422646            name.ReplaceAll("%%name%%", c->GetName());
     
    26442648        }
    26452649
    2646         if (name.Index("%%%%title%%%%"))
     2650        if (name.Index("%%%%title%%%%")>=0)
    26472651        {
    26482652            name.ReplaceAll("%%title%%", c->GetTitle());
     
    26502654        }
    26512655
    2652         if (name.Index("%%%%tab%%%%"))
     2656        if (name.Index("%%%%tab%%%%")>=0)
    26532657        {
    26542658            name.ReplaceAll("%%tab%%", MString::Format("%d", i));
  • trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc

    r9573 r9574  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHSingleMuon.cc,v 1.20 2010-04-19 12:40:16 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHSingleMuon.cc,v 1.21 2010-04-21 15:42:24 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    433433    //           Q  quiet mode
    434434//    fHistWidth.Fit(&f1, "QRO");
    435     fHistWidth.Fit(&f1, "QRN");
    436 
    437     if (!gMinuit)
     435    if (fHistWidth.Fit(&f1, "QRN"))
    438436        return kFALSE;
    439437
  • trunk/MagicSoft/Mars/mraw/MRawEvtHeader.h

    r9308 r9574  
    5656
    5757    UInt_t   fNumTrigLvl1;     // Number of 1st level tiggers between 2 events
     58                               // Used in MSimTrigger for the index of the trigger channel
    5859    UInt_t   fNumTrigLvl2;     // Number of 2nd level tiggers between 2 events
    5960    UInt_t   fTrigPattern[2];  // Trigger configuration
     
    9899    void  SetCalibrationPattern( const UInt_t pattern )  {  fTrigPattern[1] = pattern; }
    99100    void  SetDAQEvtNumber(const UInt_t n) { fDAQEvtNumber = n; }
     101    void  SetNumTrigLvl1(UInt_t num) { fNumTrigLvl1 = num; }
    100102
    101103    // TObject
  • trunk/MagicSoft/Mars/msimcamera/MSimRandomPhotons.cc

    r9525 r9574  
    363363    // *fLog << 1.75e6/(600-300) * f2 * eff->GetSpline()->Integral() << " MHz" << endl;
    364364
    365     *fLog << "Conversion factor Fnu:      " << f  << endl;
    366     *fLog << "Total reflective area:      " << Form("%.2f", Ar) << " m" << UTF8::kSquare << endl;
    367     *fLog << "Acceptance area of cone 0:  " << Form("%.2f", A0*1e6) << " mm" << UTF8::kSquare << " = ";
     365    *fLog << "Conversion factor Fnu:         " << f  << endl;
     366    *fLog << "Total reflective area:         " << Form("%.2f", Ar) << " m" << UTF8::kSquare << endl;
     367    *fLog << "Acceptance area of cone 0:     " << Form("%.2f", A0*1e6) << " mm" << UTF8::kSquare << " = ";
    368368    *fLog << A0*conv*conv << " sr" << endl;
    369     *fLog << "Cones angular acceptance:   " << sr << " sr" << endl;
    370     *fLog << "ConeArea*MirrorAngle (f1):  " << f1 << " m^2 sr" << endl;
    371     *fLog << "MirrorArea*ConeAngle (f2):  " << f2 << " m^2 sr" << endl;
    372     *fLog << "Effective. transmission:    " << Form("%.1f", nm) << " nm" << endl;
     369    *fLog << "Cones angular acceptance:      " << sr << " sr" << endl;
     370    *fLog << "ConeArea*ConeSolidAngle (f1):  " << f1 << " m^2 sr" << endl;
     371    *fLog << "MirrorArea*ConeSkyAngle (f2):  " << f2 << " m^2 sr" << endl;
     372    *fLog << "Effective. transmission:       " << Form("%.1f", nm) << " nm" << endl;
    373373    *fLog << "NSB freq. in " << fNameGeomCam << "[0] (f1): " << Form("%.2f", rate * f1) << " MHz" << endl;
    374374    *fLog << "NSB freq. in " << fNameGeomCam << "[0] (f2): " << Form("%.2f", rate * f2) << " MHz" << endl;
    375     *fLog << "Using f1." << endl;
     375    *fLog << "Using f2." << endl;
    376376
    377377    // Scale the rate per mm^2 and to GHz
    378     fScale = rate * f1 / (*fGeom)[0].GetA() / 1000;
     378    fScale = rate * f2 / (*fGeom)[0].GetA() / 1000;
    379379
    380380    // FIXME: Scale with the number of pixels
    381     if (rate*f1>1000)
     381    if (rate*f2>1000)
    382382    {
    383383        *fLog << err << "ERROR - Frequency exceeds 1GHz, this might leed to too much memory consumption." << endl;
  • trunk/MagicSoft/Mars/msimcamera/MSimTrigger.cc

    r9518 r9574  
    422422        return sig ? sig->GetStart() : -1;
    423423    }
     424    Int_t GetFirstIndex() const
     425    {
     426        MDigitalSignal *sig = static_cast<MDigitalSignal*>(fSignals[0]);
     427        return sig ? sig->GetIndex() : -1;
     428    }
    424429    Bool_t GetPixelContent(Double_t&, Int_t, const MGeomCam&, Int_t) const
    425430    {
     
    441446
    442447
    443 void MSimTrigger::SetTrigger(Double_t pos)
     448void MSimTrigger::SetTrigger(Double_t pos, Int_t idx)
    444449{
    445450    // FIXME: Jitter! (Own class?)
     
    453458    // Flag this event as triggered by the lvl1 trigger (FIXME?)
    454459    fEvtHeader->SetTriggerPattern(pos<0 ? 0 : pat);
     460    fEvtHeader->SetNumTrigLvl1((UInt_t)idx);
    455461    fEvtHeader->SetReadyToSave();
    456462}
     
    473479    if (!fSimulateElectronics)
    474480    {
    475         SetTrigger(min);
     481        SetTrigger(min, -1);
    476482        return kTRUE;
    477483    }
     
    611617            }
    612618
    613             // Set trigger channel index
    614             ttl->SetIndex(j);
     619            // Set trigger-channel index to keep this information
     620            //ttl->SetIndex(j);
    615621        }
    616622
     
    623629        // FIXME: Simulate trigger dead-time!
    624630        if (arr->GetEntriesFast()>0)
    625             triggers.Add(static_cast<MDigitalSignal*>(arr->RemoveAt(0)));
     631        {
     632            ttl = static_cast<MDigitalSignal*>(arr->RemoveAt(0));
     633            // Set trigger-channel index to keep this information
     634            ttl->SetIndex(j);
     635            triggers.Add(ttl);
     636        }
    626637
    627638        // delete the allocated space
     
    636647    // FIXME: Store triggers! (+ Reversed pixels?)
    637648
    638     SetTrigger(triggers.GetFirstTrigger());
     649    SetTrigger(triggers.GetFirstTrigger(), triggers.GetFirstIndex());
    639650
    640651    // No trigger issued. Go on.
  • trunk/MagicSoft/Mars/msimcamera/MSimTrigger.h

    r9462 r9574  
    4848    TObjArray *CalcMinMultiplicity(const MArrayI &idx, const TObjArray &ttls, Int_t threshold) const;
    4949    TObjArray *CalcCoincidences(const MArrayI &idx, const TObjArray &ttls) const;
    50     void SetTrigger(Double_t pos);
     50    void SetTrigger(Double_t pos, Int_t idx);
    5151
    5252    // MTask
Note: See TracChangeset for help on using the changeset viewer.