Changeset 666 for trunk/MagicSoft/Mars/mdatacheck
- Timestamp:
- 03/02/01 12:48:15 (24 years ago)
- Location:
- trunk/MagicSoft/Mars/mdatacheck
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mdatacheck/DataCheckLinkDef.h
r545 r666 7 7 #pragma link C++ class MShowSpect; 8 8 #pragma link C++ class MHistosAdc; 9 #pragma link C++ class MFillAdcSpect; 10 11 #pragma link C++ class MDumpEvtHeader; 9 12 10 13 #endif -
trunk/MagicSoft/Mars/mdatacheck/MDumpEvtHeader.cc
r609 r666 1 1 #include "MDumpEvtHeader.h" 2 2 3 #include <iostream.h>4 3 #include "MLog.h" 4 #include "MLogManip.h" 5 5 #include "MParList.h" 6 6 #include "MRawEvtHeader.h" 7 7 #include "MRawEvtPixelIter.h" 8 8 9 //ClassImp(MDumpEvtHeader)9 ClassImp(MDumpEvtHeader) 10 10 11 11 Bool_t MDumpEvtHeader::PreProcess (MParList *pList) 12 12 { 13 fRawEvtHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader");14 if (!fRawEvtHeader)13 fRawEvtHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader"); 14 if (!fRawEvtHeader) 15 15 { 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 ; 26 18 } 27 19 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 } 31 26 27 return kTRUE ; 32 28 } 33 29 34 35 30 Bool_t MDumpEvtHeader::Process() 36 31 { 37 32 fRawEvtHeader->Print() ; 38 33 39 //fRawEvtData->Print() ;34 MRawEvtPixelIter pixel( fRawEvtData ); 40 35 41 fPixelIter->Reset() ; 36 while ( pixel.Next() ) 37 { 38 *fLog << " " << pixel.GetPixelId() ; 39 } 42 40 43 while ( fPixelIter->Next() ) 44 { 45 cout << " " << fPixelIter->GetPixelId() ; 46 47 } 48 49 cout << endl ; 41 *fLog << endl ; 50 42 51 43 return kTRUE; 52 53 44 } -
trunk/MagicSoft/Mars/mdatacheck/MDumpEvtHeader.h
r466 r666 12 12 class MRawEvtHeader; 13 13 class MRawEvtData; 14 class MRawEvtPixelIter;15 14 class MParList; 16 15 … … 21 20 MRawEvtData *fRawEvtData; 22 21 23 MRawEvtPixelIter *fPixelIter ; 24 25 public: 26 MDumpEvtHeader () { 27 fRawEvtHeader = NULL ; 28 } ; 22 public: 23 MDumpEvtHeader () : fRawEvtHeader(NULL) { } ; 29 24 30 25 Bool_t PreProcess(MParList *pList); 31 26 Bool_t Process() ; 32 27 33 // ClassDef(MDumpEvtHeader, 1) // Task to read the raw data binary file28 ClassDef(MDumpEvtHeader, 1) // Class to dump the pixel ids of a raw evt to the screen 34 29 35 30 }; -
trunk/MagicSoft/Mars/mdatacheck/MFillAdcSpect.cc
r665 r666 1 1 #include "MFillAdcSpect.h" 2 2 3 #include <iostream.h>4 3 #include "MLog.h" 4 #include "MLogManip.h" 5 5 #include "MParList.h" 6 6 #include "MHistosAdc.h" … … 8 8 #include "MRawEvtPixelIter.h" 9 9 10 //ClassImp(MFillAdcSpect)10 ClassImp(MFillAdcSpect) 11 11 12 MFillAdcSpect::MFillAdcSpect (const char *name, const char *title)12 MFillAdcSpect::MFillAdcSpect (const char *name, const char *title) : fRawEvtData(NULL) 13 13 { 14 14 *fName = name ? name : "MFillAdcSpect"; 15 15 *fTitle = title ? title : "Task to fill the adc spectra with raw data"; 16 17 fRawEvtData = NULL ;18 fPixelIter = NULL ;19 16 } 20 21 22 17 23 18 Bool_t MFillAdcSpect::PreProcess (MParList *pList) … … 25 20 // connect the raw data with this task 26 21 27 fHistos = (MHistosAdc*)pList->FindObject("MHistosAdc"); 28 if (!fHistos) 29 { 30 cout << "MRawFileRead::PreProcess - WARNING: MHistosAdc not found... creating." << endl; 31 fHistos = new MHistosAdc; 32 pList->AddToList(fHistos); 33 } 22 fHistos = (MHistosAdc*)pList->FindCreateObj("MHistosAdc"); 23 if (!fHistos) 24 return kFALSE; 34 25 35 fRawEvtData = (MRawEvtData*)pList->Find Object("MRawEvtData");26 fRawEvtData = (MRawEvtData*)pList->FindCreateObj("MRawEvtData"); 36 27 if (!fRawEvtData) 37 { 38 cout << "MRawFileRead::PreProcess - WARNING: MRawEvtData not found... exit." << endl; 39 return kFALSE; 40 } 41 42 fPixelIter = new MRawEvtPixelIter( fRawEvtData ); 28 { 29 *fLog << dbginf << " Error: MRawEvtData not found... exit." << endl; 30 return kFALSE ; 31 } 43 32 44 33 return kTRUE ; … … 46 35 } 47 36 48 49 37 Bool_t MFillAdcSpect::Process() 50 38 { 51 39 // loop over the pixels and fill the values in the histograms 52 40 53 fPixelIter->Reset() ;41 MRawEvtPixelIter pixel(fRawEvtData); 54 42 55 43 const Int_t nhisamples = fRawEvtData->GetNumHiGainSamples() ; … … 58 46 // cout << "HighSamples " << iHighSamples ; 59 47 60 while ( fPixelIter->Next() )48 while ( pixel.Next() ) 61 49 { 62 50 for (Int_t i=0 ; i<nhisamples ; i++ ) 63 51 { 64 fHistos->FillAdcHistHi ( fPixelIter->GetPixelId(),65 fPixelIter->GetHiGainFadcSamples()[i] );52 fHistos->FillAdcHistHi ( pixel.GetPixelId(), 53 pixel.GetHiGainFadcSamples()[i] ); 66 54 } 67 55 68 56 for (Int_t i=0 ; i<nlosamples ; i++ ) 69 57 { 70 fHistos->FillAdcHistLo ( fPixelIter->GetPixelId(),71 fPixelIter->GetLoGainFadcSamples()[i] );58 fHistos->FillAdcHistLo ( pixel.GetPixelId(), 59 pixel.GetLoGainFadcSamples()[i] ); 72 60 } 73 61 } -
trunk/MagicSoft/Mars/mdatacheck/MFillAdcSpect.h
r466 r666 13 13 class MHistosAdc; 14 14 class MRawEvtData; 15 class MRawEvtPixelIter;16 15 17 16 class MFillAdcSpect : public MTask { 18 17 private: 19 18 MRawEvtData *fRawEvtData; 20 MRawEvtPixelIter *fPixelIter ;21 19 22 20 MHistosAdc *fHistos ; … … 28 26 Bool_t Process() ; 29 27 30 // ClassDef(MFillAdcSpect, 1) // Task to read the raw data binary file28 ClassDef(MFillAdcSpect, 1) // Task to fill a MHistosAdc Container with data 31 29 32 30 }; -
trunk/MagicSoft/Mars/mdatacheck/MShowSpect.cc
r609 r666 1 1 #include "MShowSpect.h" 2 2 3 #include <iostream.h>4 3 #include "MLog.h" 4 #include "MLogManip.h" 5 5 #include "MParList.h" // MParList 6 6 #include "MGDisplayAdc.h" // MGDisplayAdc … … 36 36 if (!fHists) 37 37 { 38 cout << "ERROR: MShowSpect::PreProc(): " << fHistName << "not found!" << endl;39 return kFALSE;38 *fLog << dbginf << " Error: MHistosAdc '" << fHistName << "' not found!" << endl; 39 return kFALSE; 40 40 } 41 41
Note:
See TracChangeset
for help on using the changeset viewer.