Changeset 2958 for trunk


Ignore:
Timestamp:
01/29/04 16:52:22 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2956 r2958  
    44
    55                                                 -*-*- END OF LINE -*-*-
     6 2004/01/29: Thomas Bretz
     7
     8   * manalysis/MArrivalTime.h, manalysis/MCameraData.h,
     9     manalysis/MCerPhotEvt.h, manalysis/MExtractSignalCam.h,
     10     manalysis/MPedPhotCam.h, manalysis/MPedestalCam.h,
     11     mcalib/MCalibrationCam.h, mcamera/MCameraDC.h,
     12     mraw/MRawEvtData.h, mreflector/MRflEvtData.h:
     13     - split derivement into MParContainer and MCamEvent
     14
     15   * manalysis/MExtractSignalCam.[h,cc]:
     16     - removed obsolete MExtractSignal::ReInit
     17     - added -> to fArray
     18
     19   * mbase/MParList.h:
     20     - added a new bit kIsProcessing
     21     
     22   * mbase/MTaskList.cc:
     23     - fixed the handling of kDoNotReset and the bahaviour of
     24       SetReadyToSave, such that it is possible to write all
     25       headers
     26
     27   * mfileio/MWriteFile.cc:
     28     - added ReInit which also calls CheckAndWrite
     29     
     30   * mgui/MCamEvent.h:
     31     - does not derive from MParContainer anymore
     32
     33
     34
    635 2004/01/29: Markus Gaug
    736
  • trunk/MagicSoft/Mars/manalysis/MArrivalTime.h

    r2935 r2958  
    22#define MARS_MArrivalTime
    33
     4#ifndef MARS_MParContainer
     5#include "MParContainer.h"
     6#endif
    47#ifndef MARS_MCamEvent
    58#include "MCamEvent.h"
     
    1518class MRawEvtData;
    1619
    17 class MArrivalTime : public MCamEvent
     20class MArrivalTime : public MParContainer, public MCamEvent
    1821{
    1922 private:
  • trunk/MagicSoft/Mars/manalysis/MCameraData.h

    r2781 r2958  
    77#ifndef ROOT_TArrayC
    88#include <TArrayC.h>
     9#endif
     10#ifndef MARS_MParContainer
     11#include "MParContainer.h"
    912#endif
    1013#ifndef MARS_MCamEvent
     
    1720class MPedPhotCam;
    1821
    19 class MCameraData : public MCamEvent
     22class MCameraData : public MParContainer, public MCamEvent
    2023{
    2124private:
  • trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h

    r2502 r2958  
    1818class MCerPhotPix;
    1919
    20 class MCerPhotEvt : public MCamEvent
     20class MCerPhotEvt : public MParContainer, public MCamEvent
    2121{
    2222private:
  • trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc

    r2946 r2958  
    3636
    3737#include "MParList.h"
    38 #include "MGeomCam.h"
    3938
    4039#include "MRawEvtData.h"
     
    125124        return kFALSE;
    126125   
    127     return kTRUE;
    128 }
    129 
    130 
    131 // --------------------------------------------------------------------------
    132 //
    133 // The ReInit searches for the following input containers:
    134 //  - MRawRunHeader
    135 //
    136 Bool_t MExtractSignal::ReInit(MParList *pList )
    137 {
    138     MGeomCam *cam = (MGeomCam*)pList->FindObject(AddSerialNumber("MGeomCam"));
    139     if (!cam)
    140     {
    141         *fLog << err << GetDescriptor() << ": No MGeomCam found... aborting." << endl;
    142         return kFALSE;
    143     }
    144 
    145126    return kTRUE;
    146127}
  • trunk/MagicSoft/Mars/manalysis/MExtractSignal.h

    r2901 r2958  
    2929    static const Byte_t fgLast;
    3030
    31     MPedestalCam             *fPedestals;    // Pedestals of all pixels in the camera
    32     MExtractedSignalCam      *fSignals;      // Extracted signal of all pixels in the camera
     31    MPedestalCam        *fPedestals;    // Pedestals of all pixels in the camera
     32    MExtractedSignalCam *fSignals;      // Extracted signal of all pixels in the camera
    3333
    34     MRawEvtData              *fRawEvt;       // raw event data (time slices)
    35     MRawRunHeader            *fRunHeader;    // RunHeader information
     34    MRawEvtData         *fRawEvt;       // raw event data (time slices)
     35    MRawRunHeader       *fRunHeader;    // RunHeader information
    3636
    37     MArrivalTime             *fArrivalTime;  // Arrival Time of FADC sample
     37    MArrivalTime        *fArrivalTime;  // Arrival Time of FADC sample
    3838 
    39     Byte_t fHiGainFirst;
    40     Byte_t fLoGainFirst;
     39    Byte_t  fHiGainFirst;
     40    Byte_t  fLoGainFirst;
    4141
    42     Byte_t fNumHiGainSamples;
    43     Byte_t fNumLoGainSamples;
     42    Byte_t  fNumHiGainSamples;
     43    Byte_t  fNumLoGainSamples;
    4444
    4545    Float_t fSqrtHiGainSamples;
     
    4848    Byte_t  fSaturationLimit;
    4949
    50     Bool_t ReInit(MParList *pList);
    5150    Int_t  PreProcess(MParList *pList);
    5251    Int_t  Process();
  • trunk/MagicSoft/Mars/manalysis/MExtractedSignalCam.h

    r2914 r2958  
    11#ifndef MARS_MExtractedSignalCam
    22#define MARS_MExtractedSignalCam
     3
     4#ifndef MARS_MParContainer
     5#include "MParContainer.h"
     6#endif
    37
    48#ifndef MARS_MCamEvent
     
    913class MExtractedSignalPix;
    1014
    11 class MExtractedSignalCam : public MCamEvent
     15class MExtractedSignalCam : public MParContainer, public MCamEvent
    1216{
    1317private:
    14     TClonesArray *fArray; // FIXME: Change TClonesArray away from a pointer?
     18    TClonesArray *fArray; //-> FIXME: Change TClonesArray away from a pointer?
    1519
    1620    Byte_t fFirstUsedSliceHiGain;
  • trunk/MagicSoft/Mars/manalysis/MPedPhotCam.h

    r2630 r2958  
    22#define MARS_MPedPhotCam
    33
     4#ifndef MARS_MParContainer
     5#include "MParContainer.h"
     6#endif
    47#ifndef MARS_MCamEvent
    58#include "MCamEvent.h"
     
    1114class MPedPhotPix;
    1215
    13 class MPedPhotCam : public MCamEvent
     16class MPedPhotCam : public MParContainer, public MCamEvent
    1417{
    1518private:
  • trunk/MagicSoft/Mars/manalysis/MPedestalCam.h

    r2951 r2958  
    22#define MARS_MPedestalCam
    33
     4#ifndef MARS_MParContainer
     5#include "MParContainer.h"
     6#endif
    47#ifndef MARS_MCamEvent
    58#include "MCamEvent.h"
     
    1114class MPedestalPix;
    1215
    13 class MPedestalCam : public MCamEvent
     16class MPedestalCam : public MParContainer, public MCamEvent
    1417{
    1518private:
     
    2124
    2225    void Clear(Option_t *o="");
    23     void InitUseHists();
    2426   
    2527    void InitSize(const UInt_t i);
    2628    Int_t GetSize() const;
     29
     30    void InitUseHists();
    2731
    2832    MPedestalPix &operator[](Int_t i);
  • trunk/MagicSoft/Mars/mbase/MParList.h

    r1965 r2958  
    3636
    3737public:
    38     enum { kDoNotReset = BIT(17) };
     38    enum { kDoNotReset = BIT(17), kIsProcessing = BIT(18) };
    3939
    4040    MParList(const char *name=NULL, const char *title=NULL);
  • trunk/MagicSoft/Mars/mbase/MTaskList.cc

    r2529 r2958  
    308308    *fLog << all << "Reinit... " << flush;
    309309
     310    if (!pList)
     311        pList = fParList;
     312
     313    //
     314    // Make sure, that the ReadyToSave flag is not reset from a tasklist
     315    // running as a task in another tasklist.
     316    //
     317    const Bool_t noreset = pList->TestBit(MParList::kDoNotReset);
     318    if (!noreset)
     319        pList->SetBit(MParList::kDoNotReset);
     320
    310321    //
    311322    //  create the Iterator over the tasklist
     
    314325
    315326    MTask *task=NULL;
     327
    316328    //
    317329    // loop over all tasks for reinitialization
     
    321333        *fLog << all << task->GetName() << "... " << flush;
    322334
    323         if (!task->ReInit(pList?pList:fParList))
     335        if (!task->ReInit(pList/*?pList:fParList*/))
    324336        {
    325337            *fLog << err << "ERROR - ReInit of Task '" << task->GetDescriptor() << "' failed." << endl;
     
    329341
    330342    *fLog << all << endl;
     343
     344    //
     345    // Reset the ReadyToSave flag.
     346    //
     347    if (!noreset)
     348    {
     349        pList->SetReadyToSave(kFALSE);
     350        pList->ResetBit(MParList::kDoNotReset);
     351    }
    331352
    332353    return kTRUE;
     
    366387    fParList = pList;
    367388
    368     fTasksProcess.Clear();
     389    //
     390    // Make sure, that the ReadyToSave flag is not reset from a tasklist
     391    // running as a task in another tasklist.
     392    //
     393    const Bool_t noreset = fParList->TestBit(MParList::kDoNotReset);
     394    if (!noreset)
     395        fParList->SetBit(MParList::kDoNotReset);
    369396
    370397    //
     
    406433    *fLog << all << endl;
    407434
     435    //
     436    // Reset the ReadyToSave flag.
     437    //
     438    if (!noreset)
     439    {
     440        fParList->SetReadyToSave(kFALSE);
     441        fParList->ResetBit(MParList::kDoNotReset);
     442    }
     443
     444    //
     445    // loop over all tasks to fill fTasksProcess
     446    //
    408447    Next.Reset();
    409 
    410     //
    411     // loop over all tasks for preproccesing
    412     //
     448    fTasksProcess.Clear();
    413449    while ((task=(MTask*)Next()))
    414450        if (task->OverwritesProcess())
     
    441477    // running as a task in another tasklist.
    442478    //
    443     const Bool_t noreset = fParList->TestBit(MParList::kDoNotReset);
     479    const Bool_t noreset = fParList->TestBit(MParList::kIsProcessing);
    444480    if (!noreset)
    445481    {
    446         fParList->SetReadyToSave(kFALSE);
     482        fParList->SetBit(MParList::kIsProcessing);
    447483        fParList->Reset();
    448         fParList->SetBit(MParList::kDoNotReset);
    449484    }
    450485
     
    514549
    515550    if (!noreset)
    516         fParList->ResetBit(MParList::kDoNotReset);
     551    {
     552        fParList->SetReadyToSave(kFALSE);
     553        fParList->ResetBit(MParList::kIsProcessing);
     554    }
    517555
    518556    return rc;
     
    535573
    536574    //
    537     // Reset the ReadyToSave flag.
    538     // Reset all containers.
    539     //
    540     // FIXME: To run a tasklist as a single task in another tasklist we
    541     //        have to make sure, that the Parameter list isn't reset.
    542     //
    543     fParList->SetReadyToSave(kFALSE);
    544     fParList->Reset();
     575    // Make sure, that the ReadyToSave flag is not reset from a tasklist
     576    // running as a task in another tasklist.
     577    //
     578    const Bool_t noreset = fParList->TestBit(MParList::kDoNotReset);
     579    if (!noreset)
     580    {
     581        fParList->SetBit(MParList::kDoNotReset);
     582        fParList->Reset();
     583    }
    545584
    546585    //
     
    566605
    567606    *fLog << all << endl;
     607
     608    //
     609    // Reset the ReadyToSave flag.
     610    //
     611    if (!noreset)
     612    {
     613        fParList->SetReadyToSave(kFALSE);
     614        fParList->ResetBit(MParList::kDoNotReset);
     615    }
    568616
    569617    return kTRUE;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h

    r2956 r2958  
    22#define MARS_MCalibrationCam
    33
     4#ifndef MARS_MParContainer
     5#include "MParContainer.h"
     6#endif
    47#ifndef MARS_MCamEvent
    58#include "MCamEvent.h"
     
    1417class MCalibrationPINDiode;
    1518
    16 class MCalibrationCam : public MCamEvent
     19class MCalibrationCam : public MParContainer, public MCamEvent
    1720{
    1821private:
  • trunk/MagicSoft/Mars/mcamera/MCameraDC.h

    r2632 r2958  
    22#define MARS_MCameraDC
    33
     4#ifndef MARS_MParContainer
     5#include "MParContainer.h"
     6#endif
    47#ifndef MARS_MCamEvent
    58#include "MCamEvent.h"
     
    1013#endif
    1114
    12 class MCameraDC : public MCamEvent
     15class MCameraDC : public MParContainer, public MCamEvent
    1316{
    1417private:
     
    3033    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const
    3134    {
    32         val = (*this)[idx];
     35        val = fArray[idx];
    3336        return val>0;
    3437    }
  • trunk/MagicSoft/Mars/mfileio/MWriteFile.cc

    r2206 r2958  
    1818!   Author(s): Thomas Bretz, 6/2001 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2003
     20!   Copyright: MAGIC Software Development, 2000-2004
    2121!
    2222!
     
    2424
    2525/////////////////////////////////////////////////////////////////////////////
    26 //                                                                         //
    27 // MWriteFile                                                              //
    28 //                                                                         //
    29 // This is a base class for writing tasks. If you want to implement        //
    30 // writing out parameter containers in a new file format, this is a good   //
    31 // starting point.                                                         //
    32 // The class defines a generalized interface between writing out data in   //
    33 // an eventloop and your file format.                                      //
    34 //                                                                         //
     26//
     27// MWriteFile
     28//
     29// This is a base class for writing tasks. If you want to implement
     30// writing out parameter containers in a new file format, this is a good
     31// starting point.
     32// The class defines a generalized interface between writing out data in
     33// an eventloop and your file format.
     34//
    3535/////////////////////////////////////////////////////////////////////////////
    36 
    3736#include "MWriteFile.h"
    3837
     
    8685// --------------------------------------------------------------------------
    8786//
    88 // Checks if the HasChanged flag of the output container is set. If it is set
    89 // the container should be written to the output.
     87// Checks if the SetReadyToSave flag of the output container is set. If it
     88// is set the container should be written to the output.
     89//
     90Bool_t MWriteFile::ReInit(MParList *pList)
     91{
     92    CheckAndWrite();
     93    return kTRUE;
     94}
     95
     96// --------------------------------------------------------------------------
     97//
     98// Checks if the SetReadyToSave flag of the output container is set. If it is
     99// set the container should be written to the output.
    90100//
    91101Int_t MWriteFile::Process()
     
    97107// --------------------------------------------------------------------------
    98108//
    99 // Checks if the HasChanged flag of the output container is set. If it is set
    100 // the container should be written to the output.
     109// Checks if the SetReadyToSave flag of the output container is set. If it is
     110// set the container should be written to the output.
    101111//
    102112Int_t MWriteFile::PostProcess()
     
    108118    return kTRUE;
    109119}
    110 
  • trunk/MagicSoft/Mars/mgui/MCamEvent.h

    r2417 r2958  
    22#define MARS_MCamEvent
    33
    4 #ifndef MARS_MParContainer
    5 #include "MParContainer.h"
     4#ifndef ROOT_TROOT
     5#include <TROOT.h>
    66#endif
    77
    88class MGeomCam;
    99
    10 class MCamEvent : public MParContainer
     10class MCamEvent
    1111{
    1212public:
  • trunk/MagicSoft/Mars/mraw/MRawEvtData.h

    r2645 r2958  
    22#define MARS_MRawEvtData
    33
     4#ifndef MARS_MParContainer
     5#include "MParContainer.h"
     6#endif
    47#ifndef MARS_MCamEvent
    58#include "MCamEvent.h"
     
    1720class MArrayB;
    1821
    19 class MRawEvtData : public MCamEvent
     22class MRawEvtData : public MParContainer, public MCamEvent
    2023{
    2124    friend class MRawEvtPixelIter;
     
    8386        ;
    8487
    85     ClassDef(MRawEvtData, 3) //Container to store the raw Event Data
     88    ClassDef(MRawEvtData, 4) //Container to store the raw Event Data
    8689};
    8790
  • trunk/MagicSoft/Mars/mreflector/MRflEvtData.h

    r2229 r2958  
    11#ifndef MARS_MRflEvtData
    22#define MARS_MRflEvtData
     3
     4#ifndef MARS_MParContainer
     5#include "MParContainer.h"
     6#endif
    37
    48#ifndef MARS_MCamEvent
     
    1216class MRflSinglePhoton;
    1317
    14 class MRflEvtData : public MCamEvent
     18class MRflEvtData : public MParContainer, public MCamEvent
    1519{
    1620    TClonesArray fList;
Note: See TracChangeset for help on using the changeset viewer.