source: trunk/MagicSoft/Mars/manalysis/MMcPedestalCopy.cc@ 701

Last change on this file since 701 was 698, checked in by tbretz, 24 years ago
*** empty log message ***
File size: 1.5 KB
Line 
1/////////////////////////////////////////////////////////////////////////////
2// //
3// MMcPedestalCopy //
4// //
5/////////////////////////////////////////////////////////////////////////////
6
7#include "MMcPedestalCopy.h"
8
9#include "MParList.h"
10
11#include "MLog.h"
12#include "MLogManip.h"
13
14#include "MPedestalCam.h"
15#include "MMcFadcHeader.hxx"
16
17ClassImp(MMcPedestalCopy)
18
19MMcPedestalCopy::MMcPedestalCopy(const char *name, const char *title)
20{
21 *fName = name ? name : "MMcPedestalCopy";
22 *fTitle = title ? title : "Task to copy monte carlo pedestals into MPedestal Container";
23}
24
25Bool_t MMcPedestalCopy::PreProcess( MParList *pList )
26{
27 fMcPedestals = (MMcFadcHeader*)pList->FindObject("MMcFadcHeader");
28 if (!fMcPedestals)
29 {
30 *fLog << dbginf << "MMcFadcHeader not found... aborting." << endl;
31 return kFALSE;
32 }
33
34 fPedestals = (MPedestalCam*)pList->FindCreateObj("MPedestalCam");
35 if (!fPedestals)
36 return kFALSE;
37
38 return kTRUE;
39}
40
41Bool_t MMcPedestalCopy::Process()
42{
43 fPedestals->InitSize(fMcPedestals->GetNumPixel());
44
45 for (int i=0; i<MFADC_CHANNELS; i++)
46 {
47 MPedestalPix &pix = (*fPedestals)[i];
48
49 pix.SetPedestal(fMcPedestals->GetPedestal(i), 0);
50 pix.SetPedestalRms(fMcPedestals->GetPedestalRms(i), 0);
51 }
52
53 return kTRUE;
54}
55
Note: See TracBrowser for help on using the repository browser.