Changeset 6513 for trunk/MagicSoft


Ignore:
Timestamp:
02/16/05 10:44:53 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6509 r6513  
    2121
    2222                                                 -*-*- END OF LINE -*-*-
     23
     24 2005/02/16 Thomas Bretz
     25
     26   * mbase/MEvtLoop.cc:
     27     - fixed a typo
     28
     29   * mbase/MParList.cc, mfileio/MReadMarsFile.cc,
     30     mfileio/MReadTree.cc, mfileio/MWriteRootFile.cc,
     31     mjobs/MJStar.cc:
     32     - optimized size of some output
     33
     34   * mfileio/MWriteRootFile.[h,cc]:
     35     - fixed CopySource option for single-file case
     36
     37   * mhist/MHCamEvent.cc:
     38     - replaced the warn in SetupFill by an inf
     39
     40
    2341
    2442 2005/02/15 Abelardo Moralejo
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.cc

    r5911 r6513  
    668668            "!   Author(s): Thomas Bretz et al. <mailto:tbretz@astro.uni-wuerzburg.de>" << endl <<
    669669            "!" << endl <<
    670             "!   Copyright: MAGIC Software Development, 2000-2002" << endl <<
     670            "!   Copyright: MAGIC Software Development, 2000-2005" << endl <<
    671671            "!" << endl <<
    672672            "!" << endl <<
  • trunk/MagicSoft/Mars/mbase/MParList.cc

    r6078 r6513  
    532532    // if object is not existing in the list try to create one
    533533    //
    534     *fLog << inf << "Object '" << oname << "' [" << cname << "] not yet in " << GetName() << "... creating." << endl;
     534    *fLog << inf << "Object '" << oname << "' ";
     535    if (oname!=cname)
     536        *fLog << "[" << cname << "] ";
     537    *fLog << "not yet in " << GetName() << "... creating." << endl;
    535538
    536539    //
  • trunk/MagicSoft/Mars/mfileio/MReadMarsFile.cc

    r6503 r6513  
    7979    // open the input stream
    8080    //
    81     fRun = new MReadTree("RunHeaders", fname, "ReadRunHeaders");
     81    fRun = new MReadTree("RunHeaders", fname, "RunHeaders");
    8282
    8383    //
  • trunk/MagicSoft/Mars/mfileio/MReadTree.cc

    r6503 r6513  
    395395    {
    396396        SetBit(kChainWasChanged);
    397         *fLog << inf << GetDescriptor() << " - AddFile: " << numfiles << " files added from " << fname << "." << endl;
     397        *fLog << inf << GetDescriptor() << ": Added " << fname << " <" << numfiles << ">" << endl;
    398398    }
    399399    else
     
    839839        fTree->SetBranchAddress(bname, pcont); // *CHANGED-fChain-to-fTree*
    840840
    841         *fLog << inf << "Master branch address '" << bname << "' [";
    842         *fLog << classname << "] setup for reading." << endl;
     841        *fLog << inf << "Master branch address '" << bname << "' ";
     842        if ((TString)bname!=(TString)classname)
     843            *fLog << "[" << classname << "] ";
     844        *fLog << "setup for reading." << endl;
    843845
    844846        //*fLog << "Branch " << bname << " autodel: " << (int)branch->IsAutoDelete() << endl;
  • trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc

    r6507 r6513  
    582582            // The containers should be written in Splitlevel=1
    583583            //
    584             *fLog << inf << "Creating Branch " << cname << " of " << cont->ClassName();
    585             *fLog << " in tree " << tree->GetName() << "... " << flush;
     584            *fLog << inf << "Creating Branch '" << cname << "' ";
     585            if ((TString)cname!=(TString)cont->ClassName())
     586                *fLog << "[" << cont->ClassName() << "] ";
     587            *fLog << "in tree " << tree->GetName() << "... " << flush;
    586588
    587589            branch = tree->Branch(branchname, cont->ClassName(), entry->GetAddress());
     
    805807// If you need more difficult rules please send me an eMail...
    806808//
    807 TString MWriteRootFile::GetNewFileName(TString &inname) const
     809TString MWriteRootFile::GetNewFileName(const char *inname) const
    808810{
    809811    // Remove the path from the filename
     
    868870        path.Append("/");
    869871
    870     inname.Prepend(path);
     872    //inname.Prepend(path);
    871873
    872874    // Create full qualified pathname
     
    924926        TTree *gettree = dynamic_cast<TTree*>(file->Get(o->GetName()));
    925927        if (!gettree)
    926             continue;
     928        {
     929            *fLog << err << "ERROR - MakeCopies: Tree " << o->GetName() << " not found in file " << fname << "... abort." << endl;
     930            return kFALSE;
     931        }
    927932
    928933        gettree->SetBranchStatus(o->GetTitle(), 1);
     
    960965Bool_t MWriteRootFile::ReInit(MParList *pList)
    961966{
     967    MRead *read = (MRead*)pList->FindTask("MRead");
     968    if (fSplitRule.IsNull() && fCopies.GetEntries()>0 && fOut)
     969    {
     970        if (!read)
     971        {
     972            *fLog << err;
     973            *fLog << "ERROR: No Task 'MRead' found in the tasklist.  This task is" << endl;
     974            *fLog << "  necessary to  get the filename.  Without  a filename file" << endl;
     975            *fLog << "  AddCopySource cannot be used... abort." << endl;
     976            *fLog << endl;
     977            return kFALSE;
     978        }
     979        if (!MakeCopies(read->GetFullFileName()))
     980            return kFALSE;
     981
     982    }
     983
    962984    if (fSplitRule.IsNull() || !(fOut || TestBit(kIsNotOwner)))
    963985        return MWriteFile::ReInit(pList);
    964986
    965     MRead *read = (MRead*)pList->FindTask("MRead");
    966987    if (!read)
    967988    {
     
    975996    }
    976997
    977     TString oldname = read->GetFileName();
    978 
     998
     999    const TString oldname = read->GetFullFileName();
    9791000    const TString newname = GetNewFileName(oldname);
    9801001    if (!ChangeFile(newname))
  • trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h

    r6500 r6513  
    9393    // File handling
    9494    void    Close();
    95     TString GetNewFileName(TString &inname) const;
     95    TString GetNewFileName(const char *inname) const;
    9696    Bool_t  ChangeFile(const char *fname);
    9797    TFile  *OpenFile(const char *name, Option_t *option, const char *title, Int_t comp);
  • trunk/MagicSoft/Mars/mhist/MHCamEvent.cc

    r6276 r6513  
    149149            return kFALSE;
    150150        }
    151         *fLog << warn << GetDescriptor() << ": No MCamEvent available..." << endl;
     151        *fLog << inf << GetDescriptor() << ": Assuming to get MCamEvent from Fill()..." << endl;
    152152    }
    153153
  • trunk/MagicSoft/Mars/mjobs/MJStar.cc

    r6505 r6513  
    125125    *fLog << inf;
    126126    fLog->Separator(GetDescriptor());
    127     *fLog << "Calculate image parameters from sequence ";
     127    *fLog << "Calculate image parameters of sequence ";
    128128    *fLog << fSequence.GetName() << endl;
    129129    *fLog << endl;
Note: See TracChangeset for help on using the changeset viewer.