source: trunk/MagicSoft/Mars/mdatacheck/MViewAdcSpectra.cc@ 462

Last change on this file since 462 was 462, checked in by harald, 24 years ago
Import the files for the datacheck section in this subdir.
  • Property svn:executable set to *
File size: 2.2 KB
Line 
1#include "MViewAdcSpectra.h"
2
3#include <iostream.h>
4
5#include "MParList.h"
6#include "MTaskList.h"
7#include "MEvtLoop.h"
8
9#include "MRawRunHeader.h"
10#include "MRawEvtHeader.h"
11#include "MRawEvtData.h"
12#include "MRawCrateArray.h"
13#include "MTime.h"
14
15#include "MReadTree.h"
16#include "MDumpEvtHeader.h"
17#include "MFillAdcSpect.h"
18#include "MShowSpect.h"
19#include "MHistosAdc.h"
20
21MViewAdcSpectra::MViewAdcSpectra()
22{
23 // default constructor
24}
25
26MViewAdcSpectra::~MViewAdcSpectra()
27{
28 // default destructor
29}
30
31
32// ================================================================================
33Bool_t MViewAdcSpectra::PedAdcSpectra ( Char_t *inputfile )
34{
35 // This job reads in the FADC data from all events and fills
36 // the spectrum for each pmt pixel.
37 //
38
39 cout << "PedAdcSpectra:: Analyse the file " << inputfile << endl ;
40
41 // create a (empty) list of parameters which can be used by the tasks
42 // and an (empty) list of tasks which should be executed
43 // connect them in the required way.
44
45 MParList *plist = new MParList;
46 MTaskList *tasks = new MTaskList;
47 plist->AddToList(tasks);
48
49 // create the data containers for the raw data
50
51 MRawRunHeader *runheader = new MRawRunHeader;
52 plist->AddToList(runheader);
53
54 MRawEvtHeader *evtheader = new MRawEvtHeader;
55 plist->AddToList(evtheader);
56
57 MRawEvtData *evtdata = new MRawEvtData;
58 plist->AddToList(evtdata);
59
60 MRawCrateArray *cratearray = new MRawCrateArray;
61 plist->AddToList(cratearray);
62
63 MTime *evttime = new MTime("MTime");
64 plist->AddToList(evttime);
65
66 MHistosAdc *histosAdc = new MHistosAdc() ;
67 plist->AddToList( histosAdc ) ;
68
69 // set up the tasks for this job
70
71 MReadTree *readin = new MReadTree ( inputfile, "Data") ;
72 tasks->AddToList( readin ) ;
73
74 // MDumpEvtHeader *dumpheader = new MDumpEvtHeader() ;
75 // tasks->AddToList( dumpheader ) ;
76
77 MFillAdcSpect *fillspect = new MFillAdcSpect() ;
78 tasks->AddToList( fillspect ) ;
79
80 MShowSpect *showspect = new MShowSpect( "MHistosAdc" ) ;
81 tasks->AddToList( showspect ) ;
82
83 // set up the loop for the processing
84
85 MEvtLoop magic;
86 magic.SetParList(plist);
87
88 // start the loop running
89
90 magic.Eventloop() ;
91
92
93 cout << " End of this job " << endl ;
94
95 return kTRUE ;
96
97}
Note: See TracBrowser for help on using the repository browser.