Changeset 4766 for trunk/MagicSoft


Ignore:
Timestamp:
08/27/04 16:57:55 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4757 r4766  
    1919
    2020                                                 -*-*- END OF LINE -*-*-
    21  2004/08/27:
     21 2004/08/27: Markus Gaug
    2222
    2323   * mjobs/MJCalibration.h
     
    3535
    3636
     37
    3738 2004/08/27: Thomas Bretz
    3839
     
    4344   * callisto.cc:
    4445     - fixed some output
     46     - fixed batch mode
    4547
    4648   * mbadpixels/Makefile:
     
    6062       took a lot of time.
    6163
    62    * mjobs/MJCalibrateSignal.cc, mjobs/MJPedestal.cc:
     64   * mjobs/MJCalibrateSignal.cc, mjobs/MJPedestal.cc, MJCalibration.cc:
    6365     - added two empty lines to output if finished
     66     - added a sanity check around the call to CheckEnv
    6467
    6568   * mpedestal/MPedPhotCam.cc:
     
    100103   * mmain/MEventDisplay.cc:
    101104     - fixed reading of resource file
     105
     106   * mbase/MStatusDisplay.cc:
     107     - made Reset() batch-mode safe
     108
     109   * mcalib/MCalibrateData.cc:
     110     - simplified a calculation
     111
     112   * mfileio/MReadReports.[h,cc]:
     113     - implemented GetEntries()
     114     - implemented GetFileName()
     115     - changed kHasMaster from BIT(15) to BIT(14)
     116     - fixed a bug in AddTree which caused the Master-Bit to be
     117       set for the wrong object
     118
     119   * mfileio/MReadTree.cc:
     120     - return 0 entries if entrie==TChain::kBigNumber
     121
     122   * msignal/MExtractFixedWindow.cc:
     123     - updated output to fitz into a std 80-col console
    102124
    103125
  • trunk/MagicSoft/Mars/callisto.cc

    r4752 r4766  
    258258
    259259    TApplication app("Callisto", &argc, argv);
    260     if (gROOT->IsBatch() || !gClient)
     260    if (!gROOT->IsBatch() && !gClient)
    261261    {
    262262        gLog << err << "Bombing... maybe your DISPLAY variable is not set correctly!" << endl;
  • trunk/MagicSoft/Mars/mbase/MArgs.cc

    r4722 r4766  
    5757//  fArgv: A TList containing all other command line arguments
    5858//
    59 MArgs::MArgs(int argc, char **argv) : fArgc(argc)
     59//  If root==kFALSE all root commandline options are deleted from
     60//  the list, namely: -b
     61//
     62MArgs::MArgs(int argc, char **argv, Bool_t root) : fArgc(argc)
    6063{
    6164    // FIXME: argv has no const-qualifier to be idetical with
     
    7275        fArgv->Add(&o);
    7376    }
     77
     78    if (root)
     79        return;
     80
     81    HasOnlyAndRemove("-b");
    7482}
    7583
     
    408416    const TString name = n.Strip(TString::kBoth);
    409417
     418    Bool_t rc = kFALSE;
     419
    410420    TIter Next(fArgv);
    411421    TString *s = NULL;
     
    414424        {
    415425            delete fArgv->Remove(dynamic_cast<TObject*>(s));
    416             return kTRUE;
     426            rc = kTRUE;
    417427        }
    418428
    419     return kFALSE;
    420 }
     429    return rc;
     430}
  • trunk/MagicSoft/Mars/mbase/MArgs.h

    r4722 r4766  
    2727
    2828public:
    29     MArgs(int argc, char **argv);
     29    MArgs(int argc, char **argv, Bool_t root=kFALSE);
    3030    ~MArgs();
    3131
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r4588 r4766  
    11311131void MStatusDisplay::Reset()
    11321132{
     1133    if (gROOT->IsBatch())
     1134    {
     1135        fBatch->Delete();
     1136        return;
     1137    }
     1138
    11331139    for (int i=fTab->GetNumberOfTabs()-1; i>0; i--)
    11341140        RemoveTab(i);
  • trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc

    r4752 r4766  
    430430    if (calibConv != 0. && calibQE != 0.)
    431431    {
    432         const Float_t calibConv2 = calibConv*calibConv;
    433         calibConvVar  = calibConvVar/calibConv2 + calibQEVar/(calibQE*calibQE);
    434         calibConvVar *= calibConv2;
     432        // Now doing:
     433        // calibConvVar  = calibConvVar/(calibConv*calibConv) + calibQEVar/(calibQE*calibQE);
     434        // calibConvVar *= (calibConv*calibConv);
     435        calibConvVar += calibQEVar*(calibConv*calibConv)/(calibQE*calibQE);
    435436    }
    436437
  • trunk/MagicSoft/Mars/mfileio/MReadReports.cc

    r4183 r4766  
    113113}
    114114
     115// --------------------------------------------------------------------------
     116//
     117// Return the number of entries in all trees.
     118//
     119UInt_t MReadReports::GetEntries()
     120{
     121    UInt_t n=0;
     122
     123    TIter NextT(fTrees->GetList());
     124    MReadTree *tree=0;
     125    while ((tree=(MReadTree*)NextT()))
     126        n += tree->GetEntries();
     127
     128    return n;
     129}
     130
     131// --------------------------------------------------------------------------
     132//
     133// In case of a Master Tree GetFileName() of the MReadMarsFile is returned.
     134// If no master is available "<MReadReports>" is returned.
     135//
     136TString MReadReports::GetFileName() const
     137{
     138    if (!TestBit(kHasMaster))
     139        return "<MReadReports>";
     140
     141    TIter NextT(fTrees->GetList());
     142    MReadTree *tree=0;
     143    while ((tree=(MReadTree*)NextT()))
     144        if (tree->InheritsFrom("MReadMarsFile"))
     145            return tree->GetFileName();
     146
     147    return "<n/a>";
     148
     149}
     150
    115151void MReadReports::AddToBranchList(const char *name)
    116152{
     
    150186    t->SetTitle(time?time:"");
    151187    if (master)
    152         t->SetBit(kHasMaster);
     188        SetBit(kHasMaster);
    153189
    154190    if (!fEnableAutoScheme)
  • trunk/MagicSoft/Mars/mfileio/MReadReports.h

    r4746 r4766  
    3030    Int_t   FindNextTime();
    3131
    32     UInt_t  GetEntries() { return 0; }
    33     TString GetFileName() const { return "<MReadReports>"; };
     32    UInt_t  GetEntries();
     33    TString GetFileName() const;
    3434
    3535    Int_t   PreProcess(MParList *plist);
     
    3737    Int_t   PostProcess();
    3838
    39     //Bool_t  Notify();
    40 
    4139    enum {
    42         //MReadTree::kChainWasChanged = BIT(14)
    43         kHasMaster = BIT(15)
     40        kHasMaster = BIT(14)
    4441    };
    4542
  • trunk/MagicSoft/Mars/mfileio/MReadTree.cc

    r4756 r4766  
    566566        ResetBit(kChainWasChanged);
    567567    }
    568     return fNumEntries;
     568    return fNumEntries==TChain::kBigNumber ? 0 : fNumEntries;
    569569}
    570570
     
    616616    //
    617617    fChain->ResetTree();
     618    // Maybe this would be enough, but the above might be safer...
     619    //if (fChain->GetTreeNumber()==0)
     620    //    fChain->ResetTree();
    618621
    619622    //
  • trunk/MagicSoft/Mars/msignal/MExtractFixedWindow.cc

    r4723 r4766  
    165165  *fLog << endl;
    166166  *fLog << inf << GetDescriptor() << ": Taking " << fNumHiGainSamples
    167         << " HiGain FADC samples from slice: " << (Int_t)fHiGainFirst
    168         << " to (including) slice: " << (Int_t)(fHiGainLast+fHiLoLast) << endl;
     167        << " HiGain samples from slice " << (Int_t)fHiGainFirst
     168        << " to " << (Int_t)(fHiGainLast+fHiLoLast) << "incl" << endl;
    169169  *fLog << inf << GetDescriptor() << ": Taking " << fNumLoGainSamples
    170         << " LoGain FADC samples from slice: " << (Int_t)fLoGainFirst
    171         << " to (including) slice: " << (Int_t)fLoGainLast << endl;
     170        << " LoGain samples from slice " << (Int_t)fLoGainFirst
     171        << " to " << (Int_t)fLoGainLast << "incl" << endl;
    172172  return kTRUE;
    173173 
Note: See TracChangeset for help on using the changeset viewer.