-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMASE.h
More file actions
103 lines (75 loc) · 2.32 KB
/
CMASE.h
File metadata and controls
103 lines (75 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*
This software is Copyright by the Board of Trustees of Michigan
State University (c) Copyright 2005.
You may use this software under the terms of the GNU public license
(GPL). The terms of this license are described at:
http://www.gnu.org/licenses/gpl.txt
Author:
Ron Fox
NSCL
Michigan State University
East Lansing, MI 48824-1321
*/
#ifndef __CMASE_H
#define __CMASE_H
#ifndef __CMODULEUNPACKER_H
#include <CModuleUnpacker.h>
#endif
#ifndef __CPARAMMAPCOMMAND_H
#include "CParamMapCommand.h"
#endif
#ifndef __STL_VECTOR
#include <vector>
#ifndef __STL_VECTOR
#define __STL_VECTOR
#endif
#endif
#ifndef __CRT_STDINT_H
#include <stdint.h>
#ifndef __CRT_STDINT_H
#define __CRT_STDINT_H
#endif
#endif
// Forward definitions.
class CEvent;
class CTreeParameterArray;
class CTCLInterpreter;
/*!
This class unpacks data from the CAENV1x90 TDC.
In this case the mapping is tacked on to the
mapping structure when we first seen an event.
to do that we use:
- The fact that the basename is the name in the mapping struct.
- The tcl global maseCOBCount(basename) is the number of COB boards in this module.
- The tcl global maseCHBCounts(mase) are the number of CHB boards in this module.
- Each CHB board has 32 channel all of which are assumed to be connected.
*/
class CMASE : public CModuleUnpacker
{
private:
// internal data structures/typedefs:
typedef std::vector<CTreeParameterArray*> CHBVector; // Vector of tree parameter arrays.
typedef std::vector<CHBVector*> COBVector; // Vector of COBs.
public:
// Supported anonicals.
CMASE();
virtual ~CMASE();
private:
// unsupported canonicals.
CMASE(const CMASE& rhs);
CMASE& operator=(const CMASE& rhs);
int operator==(const CMASE& rhs) const;
int operator!=(const CMASE& rhs) const;
// Implementing the module Unpacker interface:
public:
virtual unsigned int operator()(CEvent& rEvent,
std::vector<unsigned short>& event,
unsigned int offset,
CParamMapCommand::AdcMapping* pMap);
// private utilitye functions:
private:
COBVector& getInfo(CParamMapCommand::AdcMapping* pMap);
COBVector* createCOBVector(std::string baseName);
CHBVector* createCHBVector(std::string basename, int cobNumber, int chbCount);
};
#endif