Changeset 1471


Ignore:
Timestamp:
08/01/02 12:31:56 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r1466 r1471  
    22
    33 2002/08/01: Thomas Bretz
     4
     5   * manalysis/MHillasSrcCalc.[h,cc], manalysis/MImgCleanStd.[h,cc],
     6     manalysis/MSrcPosCam.[h,cc], mbase/MEvtLoop.[h,cc],
     7     mbase/MParContainer.[h,cc], mbase/MParList.[h,cc],
     8     mbase/MTaskList.[h,cc], mfileio/MReadTree.[h,cc],
     9     mfileio/MWriteRootFile.[h,cc], mhist/MFillH.[h,cc]:
     10     - added SavePrimitive
    411
    512   * manalysis/MHillas.[h,cc]:
  • trunk/MagicSoft/Mars/manalysis/MHillasSrcCalc.cc

    r1434 r1471  
    3232//////////////////////////////////////////////////////////////////////////////
    3333#include "MHillasSrcCalc.h"
     34
     35#include <fstream.h>
    3436
    3537#include "MParList.h"
     
    9496}
    9597
     98
     99void MHillasSrcCalc::SavePrimitive(ofstream &out, Option_t *o="")
     100{
     101    out << "   MHillasSrcCalc " << ToLower(fName) << "(\"";
     102    out << fSrcName << "\", \"" << fHillasName << "\", \"";
     103    out << fName << "\", \"" << fTitle << "\");" << endl;
     104}
  • trunk/MagicSoft/Mars/manalysis/MHillasSrcCalc.h

    r1203 r1471  
    2727    Bool_t Process();
    2828
     29    void SavePrimitive(ofstream &out, Option_t *o="");
     30
    2931    ClassDef(MHillasSrcCalc, 0) // task to calculate the source position depandant hillas parameters
    3032};
  • trunk/MagicSoft/Mars/manalysis/MImgCleanStd.cc

    r1461 r1471  
    4444
    4545#include <stdlib.h>       // atof
     46#include <fstream.h>      // ofstream, SavePrimitive
    4647
    4748#include <TGFrame.h>      // TGFrame
     
    406407    return kTRUE;
    407408}
     409
     410void MImgCleanStd::SavePrimitive(ofstream &out, Option_t *o="")
     411{
     412    out << "   MImgCleanStd " << ToLower(fName) << "(";
     413    out << fCleanLvl1 << ", " << fCleanLvl2 << ", \"";
     414    out << fName << "\", \"" << fTitle << "\");" << endl;
     415}
  • trunk/MagicSoft/Mars/manalysis/MImgCleanStd.h

    r1457 r1471  
    3434
    3535    void Print(Option_t *o="") const;
     36    void SavePrimitive(ofstream &out, Option_t *o="");
    3637
    3738    Bool_t ProcessMessage(Int_t msg, Int_t submsg, Long_t param1, Long_t param2);
  • trunk/MagicSoft/Mars/manalysis/MSrcPosCam.cc

    r1460 r1471  
    8181}
    8282*/
     83
     84void MSrcPosCam::SavePrimitive(ofstream &out, Option_t *o="")
     85{
     86    out << "   MSrcPosCam " << ToLower(fName) << "(\"";
     87    out << fName << "\", " << fTitle << "\");" << endl;
     88
     89    out << "   " << ToLower(fName) << ".SetXY(" << fX << ", " << fY << ");" << endl;}
  • trunk/MagicSoft/Mars/manalysis/MSrcPosCam.h

    r1460 r1471  
    2929    //void AsciiWrite(ofstream &fout) const;
    3030
     31    void SavePrimitive(ofstream &out, Option_t *o="");
     32
    3133    ClassDef(MSrcPosCam, 1) // container to store source position in the camera plain
    3234};
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.cc

    r1191 r1471  
    5454#include "MEvtLoop.h"
    5555
     56#include <fstream.h>     // ofstream, SavePrimitive
    5657#include <iostream.h>
    5758
     
    274275}
    275276
     277void MEvtLoop::SavePrimitive(ofstream &out, Option_t *)
     278{
     279    fParList->SavePrimitive(out);
     280
     281    out << "   MEvtLoop evtloop;" << endl;
     282    out << "   evtloop.SetParList(&" << ToLower(fParList->GetName()) << ")" << endl;
     283    out << "   if (!evtloop.Eventloop())" << endl;
     284    out << "      return;" << endl;
     285}
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.h

    r1268 r1471  
    4646    Bool_t Eventloop(Int_t maxcnt=-1, const char *tlist="MTaskList");
    4747
     48    void SavePrimitive(ofstream &out, Option_t *o="");
     49
    4850    ClassDef(MEvtLoop, 0) // Class to execute the tasks in a tasklist
    4951};
  • trunk/MagicSoft/Mars/mbase/MParContainer.cc

    r1299 r1471  
    346346    return call;
    347347}
     348
     349void MParContainer::SavePrimitive(ofstream &out, Option_t *o="")
     350{
     351    out << "   // SavePrimitive not overloaded... using default." << endl;
     352    out << "   " << ClassName() << " " << ToLower(fName) << "(\"";
     353    out << fName << "\", \"" << fTitle << "\");" << endl;
     354}
     355
  • trunk/MagicSoft/Mars/mbase/MParContainer.h

    r1348 r1471  
    6161    virtual void        Print(Option_t *option="") const;
    6262    virtual Int_t       Sizeof() const;
     63    virtual void        SavePrimitive(ofstream &out, Option_t *o="");
    6364
    6465    virtual void   SetLogStream(MLog *lg) { fLog = lg; }
  • trunk/MagicSoft/Mars/mbase/MParList.cc

    r1337 r1471  
    4141#include "MParList.h"
    4242
     43#include <fstream.h>     // ofstream, SavePrimitive
     44
    4345#include <TNamed.h>
    4446#include <TClass.h>
     
    657659    return list;
    658660}
     661
     662void MParList::SavePrimitive(ofstream &out, Option_t *o="")
     663{
     664    out << "   MParList " << ToLower(fName) << ";" << endl << endl;
     665
     666    TIter Next(fContainer);
     667
     668    TObject *cont = NULL;
     669    while ((cont=Next()))
     670    {
     671        cont->SavePrimitive(out, "");
     672        out << "   " << ToLower(fName) << ".AddToList(&";
     673        out << ToLower(cont->GetName()) << ");" << endl << endl;
     674    }
     675}
  • trunk/MagicSoft/Mars/mbase/MParList.h

    r1337 r1471  
    7878
    7979    void Print(Option_t *t = NULL) const;
     80    void SavePrimitive(ofstream &out, Option_t *o="");
    8081
    8182    ClassDef(MParList, 0) // list of parameter containers (MParContainer)
  • trunk/MagicSoft/Mars/mbase/MTaskList.cc

    r1337 r1471  
    5757#include "MTaskList.h"
    5858
     59#include <fstream.h>     // ofstream, SavePrimitive
     60
    5961#include <TClass.h>
    6062#include <TBaseClass.h>
     
    512514}
    513515
     516
     517void MTaskList::SavePrimitive(ofstream &out, Option_t *o="")
     518{
     519    out << "   MTaskList " << ToLower(fName) << ";" << endl << endl;
     520
     521    TIter Next(fTasks);
     522
     523    TObject *cont = NULL;
     524    while ((cont=Next()))
     525    {
     526        cont->SavePrimitive(out, "");
     527        out << "   " << ToLower(fName) << ".AddToList(&";
     528        out << ToLower(cont->GetName()) << ");" << endl << endl;
     529    }
     530}
  • trunk/MagicSoft/Mars/mbase/MTaskList.h

    r1283 r1471  
    5656    void SetOwner(Bool_t enable=kTRUE);
    5757
     58    void SavePrimitive(ofstream &out, Option_t *o="");
     59
    5860    const TList *GetList() const { return fTasks; }
    5961
  • trunk/MagicSoft/Mars/mfileio/MReadTree.cc

    r1465 r1471  
    801801    *fLog << " Next Entry to read: " << fNumEntry << endl;
    802802}
     803
     804void MReadTree::SavePrimitive(ofstream &out, Option_t *o="")
     805{
     806    TString name = ToLower(fName);
     807
     808    out << "   " << ClassName() << " " << name << "(";
     809    out << fChain->GetName() << ", \"" << fName << "\", \"" << fTitle << "\");" << endl;
     810
     811    TIter Next(fChain->GetListOfFiles());
     812    TObject *obj = NULL;
     813    while ((obj=Next()))
     814        out << "   " << name << ".AddFile(\"" << obj->GetTitle() << "\");" << endl;
     815
     816    if (!fAutoEnable)
     817        out << "   " << name << ".DisableAutoScheme();" << endl;
     818
     819    if (fNumEntry!=0)
     820       out << "   " << name << ".SetEventNum(" << fNumEntry << ");" << endl;
     821
     822
     823}
  • trunk/MagicSoft/Mars/mfileio/MReadTree.h

    r1381 r1471  
    7171
    7272    virtual Bool_t Notify();
     73    virtual void   SavePrimitive(ofstream &out, Option_t *o="");
    7374
    7475    ClassDef(MReadTree, 0)      // Reads a tree from file(s)
  • trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc

    r1381 r1471  
    3434//                                                                         //
    3535/////////////////////////////////////////////////////////////////////////////
    36 
    3736#include "MWriteRootFile.h"
     37
     38#include <fstream.h>
    3839
    3940#include <TFile.h>
     
    383384}
    384385
     386void MWriteRootFile::SavePrimitive(ofstream &out, Option_t *o="")
     387{
     388    out << "   MWriteRootFile " << ToLower(fName) << "(\"";
     389    out << fOut->GetName() << "\", \"";
     390    out << fOut->GetOption() << "\", \"";
     391    out << fOut->GetTitle() << "\", ";
     392    out << fOut->GetCompressionLevel() << ", \"";
     393    out << fName << "\", " << fTitle << "\");" << endl;;
     394
     395    MRootFileBranch *entry;
     396    TIter Next(&fBranches);
     397    while ((entry=(MRootFileBranch*)Next()))
     398    {
     399        out << "   " << ToLower(fName) << ".AddContainer(\"";
     400        out << entry->GetContName() << "\", \"";
     401        out << entry->GetName() << "\", \"";
     402        out << entry->GetTitle() << "\")" << endl;
     403    }
     404}
  • trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h

    r1381 r1471  
    8585
    8686    void Print(Option_t *t=NULL) const;
     87    void SavePrimitive(ofstream &out, Option_t *o="");
    8788
    8889    ClassDef(MWriteRootFile, 0) // Class to write one container to a root file
  • trunk/MagicSoft/Mars/mhist/MFillH.cc

    r1336 r1471  
    6969#include "MFillH.h"
    7070
     71#include <fstream.h>
     72
    7173#include "MLog.h"
    7274#include "MLogManip.h"
     
    331333    return kTRUE;
    332334}
     335
     336void MFillH::SavePrimitive(ofstream &out, Option_t *o="")
     337{
     338    out << "   MFillH " << ToLower(fName) << "(\"";
     339    out << fHName << "\", \"" << fParContainerName << "\")" << endl;
     340}
  • trunk/MagicSoft/Mars/mhist/MFillH.h

    r1209 r1471  
    3333    Bool_t PostProcess();
    3434
     35    void SavePrimitive(ofstream &out, Option_t *o="");
     36
    3537    ClassDef(MFillH, 0) // Task to fill a histogram with data from a parameter container
    3638};
Note: See TracChangeset for help on using the changeset viewer.