Changeset 765 for trunk


Ignore:
Timestamp:
04/23/01 15:42:03 (24 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.cc

    r749 r765  
    2828// MCT1ReadAscii                                                           //
    2929//                                                                         //
     30// Reads a ascii file with CT1 data. The file description and some example //
     31// files can be found on the Magic homepage.                               //
     32//                                                                         //
    3033/////////////////////////////////////////////////////////////////////////////
    3134
     
    4548ClassImp(MCT1ReadAscii)
    4649
     50// --------------------------------------------------------------------------
     51//
     52// Default constructor. Creates an array which stores the file names of
     53// the files which should be read. If a filename is given it is added
     54// to the list.
     55//
    4756MCT1ReadAscii::MCT1ReadAscii(const char *fname,
    4857                             const char *name,
     
    6069}
    6170
     71// --------------------------------------------------------------------------
     72//
     73// Delete the filename list and the input stream if one exists.
     74//
    6275MCT1ReadAscii::~MCT1ReadAscii()
    6376{
     
    6780}
    6881
     82// --------------------------------------------------------------------------
     83//
     84// Add this file as the last entry in the chain
     85//
    6986void MCT1ReadAscii::AddFile(const char *txt)
    7087{
    71     //
    72     // Add this file as the last entry in the chain
    73     //
    74     const int   sz  = fFileNames->GetSize();
    75     const int   tsz = strlen(txt)+1;
     88    const int sz  = fFileNames->GetSize();
     89    const int tsz = strlen(txt)+1;
    7690
    7791    fFileNames->Set(sz+tsz);
     
    8094}
    8195
     96// --------------------------------------------------------------------------
     97//
     98// This opens the next file in the list and deletes its name from the list.
     99//
    82100Bool_t MCT1ReadAscii::OpenNextFile()
    83101{
     
    128146}
    129147
     148// --------------------------------------------------------------------------
     149//
     150// Open the first file in the list. Check for the output containers or create
     151// them if they don't exist.
     152//
     153// Initialize the size of the MPedestalCam container to 127 pixels (CT1 camera)
     154//
    130155Bool_t MCT1ReadAscii::PreProcess(MParList *pList)
    131156{
     
    159184}
    160185
     186// --------------------------------------------------------------------------
     187//
     188// Read apedestal entry (line) from the file
     189//
    161190void MCT1ReadAscii::ReadPedestals()
    162191{
     
    185214}
    186215
     216// --------------------------------------------------------------------------
     217//
     218// Read a data entry (line) from the file
     219//
    187220void MCT1ReadAscii::ReadData()
    188221{
     
    218251}
    219252
     253// --------------------------------------------------------------------------
     254//
     255// Check for the event number and depending on this number decide if
     256// pedestals or event data has to be read.
     257//
     258// If the end of the file is reached try to open the next in the list. If
     259// there is now next file stop the eventloop.
     260//
    220261Bool_t MCT1ReadAscii::Process()
    221262{
  • trunk/MagicSoft/Mars/manalysis/MHillas.cc

    r749 r765  
    4747ClassImp(MHillas)
    4848
     49// --------------------------------------------------------------------------
     50//
     51// Default constructor.
     52//
    4953MHillas::MHillas(const char *name, const char *title) :
    5054    fAlpha(0), fTheta(0), fWidth(0), fLength(0), fSize(0), fDist(0), fEllipse(NULL)
     
    5660}
    5761
     62// --------------------------------------------------------------------------
     63//
     64// Destructor. Deletes the TEllipse if one exists.
     65//
    5866MHillas::~MHillas()
    5967{
     
    6169}
    6270
     71// --------------------------------------------------------------------------
     72//
     73// Print the hillas Parameters to *fLog
     74//
    6375void MHillas::Print(Option_t *)
    6476{
     
    7183}
    7284
     85// --------------------------------------------------------------------------
     86//
     87// call the Paint function of the Ellipse if a TEllipse exists
     88//
    7389void MHillas::Paint(Option_t *)
    7490{
     
    7995}
    8096
     97// --------------------------------------------------------------------------
     98//
     99// Instead of adding MHillas itself to the Pad
     100// (s. AppendPad in TObject) we create an ellipse,
     101// which is added to the Pad by it's Draw function
     102// You can remove it by deleting the Ellipse Object
     103// (s. Clear() )
     104//
    81105void MHillas::Draw(Option_t *)
    82106{
    83     //
    84     // Instead of adding MHillas itself to the Pad
    85     // (s. AppendPad in TObject) we create an ellipse,
    86     // which is added to the Pad by it's Draw function
    87     // You can remove it by deleting the Ellipse Object
    88     // (s. Clear() )
    89     //
    90 
    91107    Clear();
    92108
     
    112128}
    113129
     130// --------------------------------------------------------------------------
     131//
     132// If a TEllipse object exists it is deleted
     133//
    114134void MHillas::Clear(Option_t *)
    115135{
     
    122142}
    123143
     144// --------------------------------------------------------------------------
     145//
     146// Calculate the Hillas parameters from a cerenkov photon event
     147// (The calcualtion is some kind of two dimentional statistics)
     148//
    124149Bool_t MHillas::Calc(MGeomCam &geom, MCerPhotEvt &evt)
    125150{
    126     //
    127     // Calculate the Hillas parameters from a cerenkov photon event
    128     // (The calcualtion is some kind of two dimentional statistics)
    129     //
    130 
    131151    const UInt_t nevt = evt.GetNumPixels();
    132152
  • trunk/MagicSoft/Mars/manalysis/MHillasCalc.cc

    r749 r765  
    2626/////////////////////////////////////////////////////////////////////////////
    2727//                                                                         //
    28 //   MHillas Calc                                                          //
     28//  MHillasCalc                                                            //
     29//                                                                         //
     30//  This is a task to calculate the Hillas parameters from each event      //
    2931//                                                                         //
    3032/////////////////////////////////////////////////////////////////////////////
     
    4244ClassImp(MHillasCalc)
    4345
     46// --------------------------------------------------------------------------
     47//
     48// Default constructor.
     49//
    4450MHillasCalc::MHillasCalc(const char *name, const char *title)
    4551{
     
    4854}
    4955
     56// --------------------------------------------------------------------------
     57//
     58// Check for a MCerPhotEvt object from which the Hillas are calculated.
     59// Try to find the Geometry conatiner. And try to find the output
     60// (Hillas) container or create one.
     61//
    5062Bool_t MHillasCalc::PreProcess( MParList *pList )
    5163{
     
    7183}
    7284
     85// --------------------------------------------------------------------------
     86//
     87// If you want do complex descisions inside the calculations
     88// we must move the calculation code inside this function
     89//
     90// If the calculation wasn't sucessfull skip this event
     91//
    7392Bool_t MHillasCalc::Process()
    7493{
    75     //
    76     // If you want do complex descisions inside the calculations
    77     // we must move the calculation code inside this function
    78     //
    79     // If the calculation wasn't sucessfull skip this event
    80     //
    8194    return fHillas->Calc(*fGeomCam, *fCerPhotEvt) ? kTRUE : kCONTINUE;
    8295}
  • trunk/MagicSoft/Mars/manalysis/MImgCleanStd.cc

    r749 r765  
    2424\* ======================================================================== */
    2525
     26/////////////////////////////////////////////////////////////////////////////
     27//
     28//  MImgCleanStd
     29//
     30//  This is the standard image cleaning. If you want to know how it works
     31//  Please look at the three CleanSteps and Process
     32//
     33/////////////////////////////////////////////////////////////////////////////
    2634#include "MImgCleanStd.h"
    2735
     
    3644ClassImp(MImgCleanStd)
    3745
     46// --------------------------------------------------------------------------
     47//
     48// Default constructor. Here you can specify the cleaning levels. If you
     49// don't specify them the 'common standard' values 2.5 and 3.0 (sigma
     50// above mean) are used
     51//
    3852MImgCleanStd::MImgCleanStd(const Float_t lvl1, const Float_t lvl2,
    3953                           const char *name, const char *title)
    4054    : fCleanLvl1(lvl1), fCleanLvl2(lvl2)
    4155{
    42     //
    43     //   the default constructor
    44     //
    4556    *fName  = name  ? name  : "MImgCleanStd";
    4657    *fTitle = title ? title : "Task which does a standard image cleaning";
     
    4960}
    5061
     62// --------------------------------------------------------------------------
     63//
     64//  This method looks for all pixels with an entry (photons)
     65//  that is three times bigger than the noise of the pixel
     66//  (std: 3 sigma, clean level 1)
     67//
    5168void MImgCleanStd::CleanStep1()
    5269{
    53     //
    54     //  This method looks for all pixels with an entry (photons)
    55     //  that is three times bigger than the noise of the pixel
    56     //  (std: 3 sigma, clean level 1)
    57     //
    58 
    5970    const Int_t entries = fEvt->GetNumPixels();
    6071
     
    7687}
    7788
     89// --------------------------------------------------------------------------
     90//
     91//  check if the survived pixel have a neighbor, that also
     92//  survived
     93//
    7894void MImgCleanStd::CleanStep2()
    7995{
    80     //
    81     //  check if the survived pixel have a neighbor, that also
    82     //  survived
    83     //
    84 
    8596    const Int_t entries = fEvt->GetNumPixels();
    8697
     
    142153}
    143154
     155// --------------------------------------------------------------------------
     156//
     157//   Look for the boundary pixels around the core pixels
     158//   if a pixel has more than 2.5 (clean level 2) sigma, and
     159//   a core neigbor it is declared as used.
     160//
    144161void MImgCleanStd::CleanStep3()
    145162{
    146     //
    147     //   Look for the boundary pixels around the core pixels
    148     //   if a pixel has more than 2.5 (clean level 2) sigma, and
    149     //   a core neigbor it is declared as used.
    150     //
    151163    const Int_t entries = fEvt->GetNumPixels();
    152164
     
    202214}
    203215
     216// --------------------------------------------------------------------------
     217//
     218//  check if MEvtHeader exists in the Parameter list already.
     219//  if not create one and add them to the list
     220//
    204221Bool_t MImgCleanStd::PreProcess (MParList *pList)
    205222{
    206     //
    207     //  check if MEvtHeader exists in the Parameter list already.
    208     //  if not create one and add them to the list
    209     //
    210223    fCam = (MGeomCam*)pList->FindObject("MGeomCam");
    211224    if (!fCam)
     
    225238}
    226239   
     240// --------------------------------------------------------------------------
     241//
     242// Cleans the image.
     243//
    227244Bool_t MImgCleanStd::Process()
    228245{
  • trunk/MagicSoft/Mars/manalysis/MPedestalCam.cc

    r749 r765  
    3636ClassImp(MPedestalCam)
    3737
     38// --------------------------------------------------------------------------
     39//
     40// Default constructor. Creates a MPedestalPix object for each pixel
     41//
    3842MPedestalCam::MPedestalCam(const char *name, const char *title)
    3943{
     
    5054}
    5155
     56// --------------------------------------------------------------------------
     57//
     58// Delete the array conatining the pixel pedest information
     59//
    5260MPedestalCam::~MPedestalCam()
    5361{
     62    // FIXME: Do we have to delete the objects itself?
    5463    delete fArray;
    5564}
  • trunk/MagicSoft/Mars/manalysis/MPedestalPix.cc

    r749 r765  
    3333#include "MPedestalPix.h"
    3434
    35 //#include <fstream.h>
    36 
    3735#include "MLog.h"
    3836
  • trunk/MagicSoft/Mars/mbase/MLog.h

    r698 r765  
    116116    }
    117117
    118     ClassDef(MLog, 0)
     118    ClassDef(MLog, 0) // This is what we call 'The logging system'
    119119};
    120120
  • trunk/MagicSoft/Mars/mhist/MFillHFadc.cc

    r749 r765  
    2424\* ======================================================================== */
    2525
    26 ////////////////////////////////////////////////////////////////////////
     26//////////////////////////////////////////////////////////////////////////////
    2727//
    2828//  MFillHFadc
     
    3232//  This histograms (one per pixel) are stored in MHFadcCam, MHFadcPix
    3333//
    34 ////////////////////////////////////////////////////////////////////////
     34//////////////////////////////////////////////////////////////////////////////
    3535
    3636#include "MFillHFadc.h"
     
    4545ClassImp(MFillHFadc)
    4646
     47// --------------------------------------------------------------------------
    4748MFillHFadc::MFillHFadc (const char *name, const char *title) : fRawEvtData(NULL)
    4849{
     
    5152}
    5253
     54// --------------------------------------------------------------------------
     55//
     56// The PrProcess function checks for the existance of all necessary
     57// parameter containers
     58//
    5359Bool_t MFillHFadc::PreProcess (MParList *pList)
    5460{
    55     //
    56     // The PrProcess function checks for the existance of all necessary
    57     // parameter containers
    58     //
    59 
    6061    //
    6162    // check if all necessary input containers are existing
     
    7879}
    7980
     81// --------------------------------------------------------------------------
     82//
     83// This process function loops over all pixels in an MRawEvtData
     84// event and fills the values into histograms
     85//
    8086Bool_t MFillHFadc::Process()
    8187{
    82     //
    83     // This process function loops over all pixels in an MRawEvtData
    84     // event and fills the values into histograms
    85     //
    86 
    8788    //  loop over the pixels and fill the values in the histograms
    8889 
     
    9192    const Int_t nhisamples = fRawEvtData->GetNumHiGainSamples() ;
    9293    const Int_t nlosamples = fRawEvtData->GetNumLoGainSamples() ;
    93 
    94     //  cout << "HighSamples " << iHighSamples ;
    9594
    9695    while ( pixel.Next() )
  • trunk/MagicSoft/Mars/mhist/MFillHHillas.cc

    r749 r765  
    4141ClassImp(MFillHHillas)
    4242
     43// --------------------------------------------------------------------------
    4344MFillHHillas::MFillHHillas (const char *name, const char *title)
    4445{
     
    4748}
    4849
     50// --------------------------------------------------------------------------
    4951Bool_t MFillHHillas::PreProcess (MParList *pList)
    5052{
     
    6365}
    6466
     67// --------------------------------------------------------------------------
    6568Bool_t MFillHHillas::Process()
    6669{
  • trunk/MagicSoft/Mars/mhist/MFillHStarMap.cc

    r749 r765  
    4242ClassImp(MFillHStarMap)
    4343
     44// --------------------------------------------------------------------------
    4445MFillHStarMap::MFillHStarMap (const char *name, const char *title)
    4546{
     
    4849}
    4950
     51// --------------------------------------------------------------------------
    5052Bool_t MFillHStarMap::PreProcess (MParList *pList)
    5153{
     
    6466}
    6567
     68// --------------------------------------------------------------------------
    6669Bool_t MFillHStarMap::Process()
    6770{
  • trunk/MagicSoft/Mars/mhist/MHFadcCam.cc

    r749 r765  
    3838ClassImp(MHFadcCam)
    3939
     40// --------------------------------------------------------------------------
     41//
     42//  default constructor
     43//  creates an a list of histograms for all pixels and both gain channels
     44//
    4045MHFadcCam::MHFadcCam (const char *name, const char *title)
    4146{
    42     //
    43     //  default constructor
    44     //  creates an a list of histograms for all pixels and both gain channels
    45     //
    46 
    4747    //
    4848    //   set the name and title of this object
     
    6363}
    6464
     65// --------------------------------------------------------------------------
    6566MHFadcCam::~MHFadcCam ()
    6667{
  • trunk/MagicSoft/Mars/mhist/MHFadcPix.cc

    r749 r765  
    3939ClassImp(MHFadcPix)
    4040
     41// --------------------------------------------------------------------------
     42//
     43// Creates the histograms for lo and hi gain of one pixel
     44//
    4145MHFadcPix::MHFadcPix(UInt_t pixid)
    4246{
    43     //
    44     // Creates the histograms for lo and hi gain of one pixel
    45     //
    4647    // FIXME! Set the right axis titles and ... and ...
    47     //
    4848    Char_t tmp1[40]="hi";
    4949    Char_t tmp2[40]="hi gain Pixel";
     
    6868}
    6969
     70// --------------------------------------------------------------------------
    7071MHFadcPix::~MHFadcPix()
    7172{
     
    7475}
    7576
     77// --------------------------------------------------------------------------
    7678void MHFadcPix::Draw(Option_t *)
    7779{
  • trunk/MagicSoft/Mars/mmain/MDataCheck.h

    r714 r765  
    3939    Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
    4040
    41     ClassDef(MDataCheck, 0)
     41    ClassDef(MDataCheck, 0) // GUI: The 'data-check' window.
    4242};
    4343
  • trunk/MagicSoft/Mars/mmain/MMars.h

    r714 r765  
    6666  Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
    6767
    68   ClassDef(MMars, 0)
     68  ClassDef(MMars, 0) // GUI: Mars - the main window
    6969} ;
    7070
  • trunk/MagicSoft/Mars/mmain/MMonteCarlo.h

    r714 r765  
    2929    Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
    3030
    31     ClassDef(MMonteCarlo, 0)
     31    ClassDef(MMonteCarlo, 0) // GUI: The 'monte-carlo' window
    3232};
    3333
  • trunk/MagicSoft/Mars/mraw/MRawCrateArray.cc

    r760 r765  
    2525/////////////////////////////////////////////////////////////////////////////
    2626//
    27 // MRawCrateArray
     27//  MRawCrateArray
    2828//
    29 // This class exists to make it possible to read in the crate data
    30 // TClones Array. In principal we can directly write the TClonesArray
    31 // to the root file, but when we read in again the root file we cannot
    32 // put the TClonesArray into our parameter list, becaus it isn't derived
    33 // from TNamed. This class is derived from TNamed and can be put in the list
     29//  This class exists to make it possible to read in the crate data
     30//  TClones Array. In principal we can directly write the TClonesArray
     31//  to the root file, but when we read in again the root file we cannot
     32//  put the TClonesArray into our parameter list, becaus it isn't derived
     33//  from MParContainer. This class is derived from MParContainer and can be
     34//  put in the list. The TClones Array containes conatiners which store
     35//  the information about one crate (MRawCrateData).
    3436//
    3537/////////////////////////////////////////////////////////////////////////////
  • trunk/MagicSoft/Mars/mraw/MRawCrateArray.h

    r454 r765  
    2424
    2525    void Clear(Option_t *opt=NULL);
    26     void Print(Option_t *opt=NULL);
    2726
    2827    MRawCrateData *GetEntry(Int_t i);
  • trunk/MagicSoft/Mars/mraw/MRawCrateData.cc

    r749 r765  
    2323\* ======================================================================== */
    2424
     25/////////////////////////////////////////////////////////////////////////////
     26//
     27//  MRawCrateData
     28//
     29//  This container stores the information about one crate. A list of this
     30//  informations can be find at MRawCrateArray
     31//
     32/////////////////////////////////////////////////////////////////////////////
    2533#include "MRawCrateData.h"
    2634
     
    3038#include <fstream.h>
    3139
     40#include "MLog.h"
     41
    3242ClassImp(MRawCrateData)
    3343
     
    3646}
    3747
     48// --------------------------------------------------------------------------
     49//
     50//  read the information from a binary input stream about the CRATE DATA,
     51//  like specified in a TDAS note
     52//
    3853void MRawCrateData::ReadEvt(istream& fin)
    3954{
    40     //
    41     // read the information from a binary input stream about the CRATE DATA,
    42     // like specified in a TDAS note
    43     //
    4455    fin.read((Byte_t*)&fDAQCrateNumber, 2);
    4556    fin.read((Byte_t*)&fFADCEvtNumber,  4);
     
    4758}
    4859
     60// --------------------------------------------------------------------------
     61//
     62//  print all stored information to gLog
     63//
    4964void MRawCrateData::Print(Option_t *t)
    5065{
    51     //
    52     // print all stored information to screen
    53     //
    54     cout << "Crate Number " << fDAQCrateNumber << ":  ";
    55     cout << "FADCEventNr=" << fFADCEvtNumber << "  ";
    56     cout << "FADCClockTick=" << fFADCClockTick << " (20MHz)" << endl;
     66    gLog << "Crate Number " << fDAQCrateNumber << ":  ";
     67    gLog << "FADCEventNr=" << fFADCEvtNumber << "  ";
     68    gLog << "FADCClockTick=" << fFADCClockTick << " (20MHz)" << endl;
    5769}
  • trunk/MagicSoft/Mars/mraw/MRawEvtHeader.h

    r716 r765  
    4343public:
    4444
    45   MRawEvtHeader(const char *name=NULL, const char *title=NULL);
    46   ~MRawEvtHeader();
     45    MRawEvtHeader(const char *name=NULL, const char *title=NULL);
     46    ~MRawEvtHedare();
    4747
    48   void Init(MRawRunHeader *rh, MTime *t);
     48    void Init(MRawRunHeader *rh, MTime *t);
    4949
    50   void Clear(Option_t * = NULL);
    51   void Print(Option_t * = NULL);
     50    void Clear(Option_t * = NULL);
     51    void Print(Option_t * = NULL);
    5252
    53   void FillHeader(UInt_t, Float_t=0);
     53    void FillHeader(UInt_t, Float_t=0);
    5454
    55   UShort_t GetTrigType() const { return fTrigType; }
     55    UShort_t GetTrigType() const { return fTrigType; }
    5656
    57   int ReadEvt(istream& fin);
     57    int ReadEvt(istream& fin);
    5858
    59   ClassDef(MRawEvtHeader, 1) // Parameter Conatiner for raw EVENT HEADER
    60 
     59    ClassDef(MRawEvtHeader, 1) // Parameter Conatiner for raw EVENT HEADER
    6160};
    6261
Note: See TracChangeset for help on using the changeset viewer.