Ignore:
Timestamp:
01/26/09 11:59:12 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/msimcamera
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/msimcamera/MSimReadout.cc

    r9256 r9270  
    3333//
    3434//  Input Containers:
     35//   MGeomCam
    3536//   MAnalogChannels
    3637//   TriggerPos [MParameterD]
     
    5354#include "MParameters.h"
    5455
     56#include "MGeomCam.h"
     57
    5558#include "MRawRunHeader.h"
    5659#include "MRawEvtHeader.h"
     
    104107    }
    105108
    106 
    107109    fRunHeader = (MRawRunHeader*)pList->FindObject("MRawRunHeader");
    108110    if (!fRunHeader)
     
    112114    }
    113115
    114     // -----------------------------------------------------------------------
    115 
    116116    fData = (MRawEvtData*)pList->FindCreateObj("MRawEvtData");
    117117    if (!fData)
    118118        return kFALSE;
     119
     120    return kTRUE;
     121}
     122
     123Bool_t MSimReadout::ReInit(MParList *plist)
     124{
     125    MGeomCam *cam = (MGeomCam*)plist->FindObject("MGeomCam");
     126    if (!cam)
     127    {
     128        *fLog << err << "MGeomCam not found... aborting." << endl;
     129        return kFALSE;
     130    }
     131
     132    fRunHeader->InitPixels(cam->GetNumPixels());
    119133
    120134    fData->InitRead(fRunHeader);
     
    134148    if (fData->GetNumLoGainSamples()>0)
    135149    {
    136         *fLog << err << "ERROR - Lo-gains not implemented yet." << endl;
     150        *fLog << err << "ERROR - MSimReadout: Lo-gains not implemented yet." << endl;
    137151        return kERROR;
    138152    }
     
    141155    const UInt_t npix = fData->GetNumPixels();
    142156
    143     // Sanity check
    144     if (fData->GetNumPixels()!=fCamera->GetNumChannels())
    145     {
    146         *fLog << err << "ERROR - Number of analog channels doen't match number of pixels." << endl;
     157    if (npix!=fCamera->GetNumChannels())
     158    {
     159        *fLog << err;
     160        *fLog << "ERROR - Number of analog channels " << fCamera->GetNumChannels();
     161        *fLog << " doesn't match number of pixels " << fData->GetNumPixels() << endl;
    147162        return kERROR;
    148163    }
     
    150165    if (fTrigger->GetVal()<0)
    151166    {
    152         *fLog << err << "ERROR - MSimReadout executed for an event which has no trigger." << endl;
     167        *fLog << err << "ERROR - MSimReadout: MSimReadout executed for an event which has no trigger." << endl;
    153168        return kERROR;
    154169    }
  • trunk/MagicSoft/Mars/msimcamera/MSimReadout.h

    r9256 r9270  
    2323
    2424    // MTask
    25     Int_t PreProcess(MParList *pList);
    26     Int_t Process();
     25    Int_t  PreProcess(MParList *pList);
     26    Int_t  Process();
     27    Bool_t ReInit(MParList *pList);
    2728
    2829public:
Note: See TracChangeset for help on using the changeset viewer.