Ignore:
Timestamp:
03/02/01 12:48:15 (24 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mdatacheck/MDumpEvtHeader.cc

    r609 r666  
    11#include "MDumpEvtHeader.h"
    22
    3 #include <iostream.h>
    4 
     3#include "MLog.h"
     4#include "MLogManip.h"
    55#include "MParList.h"
    66#include "MRawEvtHeader.h"
    77#include "MRawEvtPixelIter.h"
    88
    9 //ClassImp(MDumpEvtHeader)
     9ClassImp(MDumpEvtHeader)
    1010
    1111Bool_t MDumpEvtHeader::PreProcess (MParList *pList)
    1212{
    13   fRawEvtHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader");
    14   if (!fRawEvtHeader)
     13    fRawEvtHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader");
     14    if (!fRawEvtHeader)
    1515    {
    16       cout << "MRawFileRead::PreProcess - WARNING: MRawEvtHeader not found... creating." << endl;
    17       return kFALSE ;
    18     }
    19  
    20   fRawEvtData = (MRawEvtData*)pList->FindObject("MRawEvtData");
    21  
    22   if (!fRawEvtData)
    23     {
    24       cout << "MRawFileRead::PreProcess - WARNING: MRawEvtData not found... creating." << endl;
    25       return kFALSE ;
     16        *fLog << dbginf << " Error: MRawEvtHeader not found... exit." << endl;
     17        return kFALSE ;
    2618    }
    2719
    28   fPixelIter = new MRawEvtPixelIter( fRawEvtData );
    29  
    30   return kTRUE ;
     20    fRawEvtData = (MRawEvtData*)pList->FindObject("MRawEvtData");
     21    if (!fRawEvtData)
     22    {
     23        *fLog << dbginf << " Error: MRawEvtData not found... exit." << endl;
     24        return kFALSE ;
     25    }
    3126
     27    return kTRUE ;
    3228}
    3329
    34    
    3530Bool_t MDumpEvtHeader::Process()
    3631{
    3732  fRawEvtHeader->Print() ;
    3833
    39   //fRawEvtData->Print() ;
     34  MRawEvtPixelIter pixel( fRawEvtData );
    4035
    41   fPixelIter->Reset() ;
     36  while ( pixel.Next() )
     37  {
     38      *fLog << " " << pixel.GetPixelId() ;
     39  }
    4240
    43   while ( fPixelIter->Next() )
    44     {
    45       cout << " " << fPixelIter->GetPixelId() ;
    46      
    47     }
    48 
    49   cout << endl ;
     41  *fLog << endl ;
    5042 
    5143  return kTRUE;
    52 
    5344}
Note: See TracChangeset for help on using the changeset viewer.