Line | |
---|
1 | #include "MShowSpect.h"
|
---|
2 |
|
---|
3 | #include "MLog.h"
|
---|
4 | #include "MLogManip.h"
|
---|
5 | #include "MParList.h" // MParList
|
---|
6 | #include "MGDisplayAdc.h" // MGDisplayAdc
|
---|
7 |
|
---|
8 |
|
---|
9 | ////////////////////////////////////////////////////////////////////////
|
---|
10 | //
|
---|
11 | // MGShowSpect.h
|
---|
12 | //
|
---|
13 | // A Gui Task to show the raw ADC values in the histograms
|
---|
14 | //
|
---|
15 |
|
---|
16 | ClassImp(MShowSpect)
|
---|
17 |
|
---|
18 | MShowSpect::MShowSpect(const char *nameHist, const char *name, const char *title)
|
---|
19 | {
|
---|
20 | //
|
---|
21 | // default constructor
|
---|
22 | //
|
---|
23 |
|
---|
24 | *fName = name ? name : ClassName();
|
---|
25 | *fTitle = title ? title : "Task to ??? (Harald?)";
|
---|
26 |
|
---|
27 | strcpy( fHistName, nameHist ) ;
|
---|
28 | }
|
---|
29 |
|
---|
30 |
|
---|
31 | Bool_t MShowSpect::PreProcess(MParList *pList)
|
---|
32 | {
|
---|
33 | //
|
---|
34 | // Do the preprocessing for MShowSpect
|
---|
35 | //
|
---|
36 | // Connects Histogramms in the MHFadcCam container as the input
|
---|
37 | //
|
---|
38 |
|
---|
39 | fHists = (MHFadcCam*) pList->FindObject( fHistName );
|
---|
40 |
|
---|
41 | if (!fHists)
|
---|
42 | {
|
---|
43 | *fLog << dbginf << " Error: MHFadcCam '" << fHistName << "' not found!" << endl;
|
---|
44 | return kFALSE;
|
---|
45 | }
|
---|
46 |
|
---|
47 | return kTRUE;
|
---|
48 | }
|
---|
49 |
|
---|
50 |
|
---|
51 | Bool_t MShowSpect::PostProcess()
|
---|
52 | {
|
---|
53 | // just start the gui for displaying the adc spectra
|
---|
54 |
|
---|
55 | new MGDisplayAdc(fHists, gClient->GetRoot(), gClient->GetRoot(), 600, 600);
|
---|
56 |
|
---|
57 | return kTRUE;
|
---|
58 | }
|
---|
59 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.