Changeset 3144 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
02/13/04 18:02:54 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3142 r3144  
    9292     mjobs/MJPedestal.cc:
    9393     - fixed usage of AddNotify
     94
     95   * mfileio/MReadReports.cc:
     96     - use a different way to determin whether the tree is a valid tree,
     97       skip invalid trees
     98       
     99   * mfileio/MReadTree.cc:
     100     - added another sanity check at the beginning of PreProcess
     101     
     102   * mhbase/MFillH.[h,cc]:
     103     - added bit kCanSkip which skips MFillH in case the necessary container
     104       wasn't found.
     105     - cd into the corresponding canvas before filling the MH
    94106
    95107
  • trunk/MagicSoft/Mars/mfileio/MReadReports.cc

    r2607 r3144  
    198198    while ((tree=(MReadTree*)NextT()))
    199199    {
    200         if (((TChain*)tree->fChain)->GetListOfFiles()->GetEntries()==0)
     200        if (!((TChain*)tree->fChain)->GetFile())
    201201        {
    202             *fLog << warn << "No files for Tree " << tree->GetName() << "... skipped." << endl;
     202            *fLog << warn << "No files or no tree '" << tree->GetName() << "'... skipped." << endl;
     203            fTrees->RemoveFromList(tree);
    203204            continue;
    204205        }
     
    240241    }
    241242
     243    if (i==0)
     244    {
     245        *fLog << err << "Files do not contain any valid tree... abort." << endl;
     246        return kFALSE;
     247    }
     248
    242249    fPosEntry.Set(i);
    243250
     
    338345        }
    339346
     347        *fLog << dbg << "Removing chain " << chain->GetName() << " from list." << endl;
     348
    340349        delete *GetTime(chain);
    341350        delete  GetTime(chain);
  • trunk/MagicSoft/Mars/mfileio/MReadTree.cc

    r3009 r3144  
    597597
    598598    //
     599    // check for files and for the tree!
     600    //
     601    if (!fChain->GetFile())
     602    {
     603        *fLog << err << GetDescriptor() << ": No file or no tree with name " << fChain->GetName() << " in file." << endl;
     604        return kFALSE;
     605    }
     606
     607    //
    599608    // get number of events in this tree
    600609    //
    601610    if (!GetEntries())
    602611    {
    603         *fLog << warn << GetDescriptor() << ": No entries found in file(s)" << endl;
     612        *fLog << err << GetDescriptor() << ": No entries found in file(s)" << endl;
    604613        return kFALSE;
    605614    }
  • trunk/MagicSoft/Mars/mhbase/MFillH.cc

    r2735 r3144  
    395395
    396396        if (!fWeight)
    397           {
    398             *fLog << err << fWeightName << " [MWeight] not found... aborting." << endl;
    399             return kFALSE;
    400           }
     397        {
     398            *fLog << err << fWeightName << " [MWeight] not found... aborting." << endl;
     399            return kFALSE;
     400        }
    401401    }
    402402
     
    474474        return DrawToDisplay();
    475475
     476    if (TestBit(kCanSkip))
     477    {
     478        *fLog << warn << fParContainerName << " [MParContainer] not found... skipped." << endl;
     479        return kSKIP;
     480    }
     481
    476482    *fLog << err << fParContainerName << " [MParContainer] not found... aborting." << endl;
    477483    return kFALSE;
     
    501507     */
    502508
    503     return fH->Fill(fParContainer, fWeight?fWeight->GetWeight():1);
     509    TVirtualPad *save = gPad;
     510    if (fCanvas)
     511        fCanvas->cd();
     512
     513    Bool_t rc = fH->Fill(fParContainer, fWeight?fWeight->GetWeight():1);
     514
     515    if (save && fCanvas)
     516        save->cd();
     517
     518    return rc;
    504519}
    505520
  • trunk/MagicSoft/Mars/mhbase/MFillH.h

    r2735 r3144  
    1818public:
    1919    enum {
    20         kDoNotDisplay = BIT(17)
     20        kDoNotDisplay = BIT(17),
     21        kCanSkip      = BIT(18)
    2122    };
    2223
Note: See TracChangeset for help on using the changeset viewer.