AlcapDAQ
1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
analyzer
src
DummyDet
DummyHisto.cpp
Go to the documentation of this file.
1
/********************************************************************\
2
3
Name: DummyHisto.cpp
4
Created by: Nam Tran
5
6
Contents: Create a dummy histogram
7
8
\********************************************************************/
9
10
/* Standard includes */
11
#include <stdio.h>
12
#include <stdlib.h>
13
#include <string>
14
#include <map>
15
#include <utility>
16
17
/* MIDAS includes */
18
#include "midas.h"
19
20
/* ROOT includes */
21
#include <TH1.h>
22
#include <TH2.h>
23
24
/* AlCap includes */
25
//#include "TOctalFADCIsland.h"
26
//#include "TOctalFADCBankReader.h"
27
#include "
TGlobalData.h
"
28
29
using
std::string;
30
using
std::map;
31
using
std::vector;
32
using
std::pair;
33
34
/*-- Module declaration --------------------------------------------*/
35
INT
DummyHisto_init
(
void
);
36
INT
DummyHisto
(EVENT_HEADER*,
void
*);
37
38
extern
HNDLE
hDB
;
39
extern
TGlobalData
*
gData
;
40
41
static
TH1*
hDummyHisto
;
42
43
ANA_MODULE
DummyHisto_module
=
44
{
45
"DummyHisto"
,
/* module name */
46
"Nam Tran"
,
/* author */
47
DummyHisto
,
/* event routine */
48
NULL,
/* BOR routine */
49
NULL,
/* EOR routine */
50
DummyHisto_init
,
/* init routine */
51
NULL,
/* exit routine */
52
NULL,
/* parameter structure */
53
0,
/* structure size */
54
NULL,
/* initial parameters */
55
};
56
59
INT
DummyHisto_init
()
60
{
61
hDummyHisto
=
new
TH1D(
"hDummy1"
,
"A test histogram"
,1000,0,100);
62
hDummyHisto
->Fill(2,24);
63
hDummyHisto
->Fill(4,405);
64
65
return
SUCCESS
;
66
}
67
68
INT
DummyHisto
(EVENT_HEADER *pheader,
void
*pevent)
69
{
70
// Get the event number
71
//int midas_event_number = pheader->serial_number;
72
73
// Fill Diagnostic histogram
74
//hNOctalFADCIslandsReadPerBlock->Fill(bank_name.c_str(), midas_event_number,
75
//fadc_islands.size());
76
77
return
SUCCESS
;
78
}
Generated by
1.8.4