ROOTANA
Loading...
Searching...
No Matches
TCamacADCData.hxx
Go to the documentation of this file.
1#ifndef TCamacData_hxx_seen
2#define TCamacData_hxx_seen
3
4#include <vector>
5#include "stdio.h"
6
7#include "TGenericData.hxx"
8
9#define NADC 12
10
11/// This class is meant to store a single trigger (LAM) of CAMAC ADC data
13
14public:
16 for(int i = 0; i < NADC; i++) ADCValues[i] = -1;
17 };
18
19 // Set the ADC value for this channel.
20 void SetADC(int ch, int adc);
21
22 // Get the
23 int GetADC(int ch){
24 if(ch >= 0 && ch < NADC)
25 return ADCValues[ch];
26 return 0;
27 }
28
29
30
31
32
33private:
34
36
37};
38
39
40/// This class is meant to store a set of triggers (LAMs) of CAMAC ADC data
41/// specifically, it has been written to readout a set of events taken with
42/// the Wiener CC-USB... it might work for decoding other CAMAC data, though
43/// I haven't tried. T. Lindner
44class TCamacData: public TGenericData {
45
46public:
47
48 /// Constructor
49 TCamacData(int bklen, int bktype, const char* name, void *pdata);
50
51 /// Get the Vector of TDC Measurements.
52 std::vector<CamacADCEvent>& GetMeasurements() {return fMeasurements;}
53
54 /// Get number of triggers
55 int GetNTriggers(){return fMeasurements.size();}
56
57private:
58
59 /// Vector of CAMAC ADC measurements
60 std::vector<CamacADCEvent> fMeasurements;
61
62};
63
64#endif
#define NADC
This class is meant to store a single trigger (LAM) of CAMAC ADC data.
void SetADC(int ch, int adc)
int ADCValues[NADC]
int GetADC(int ch)
std::vector< CamacADCEvent > fMeasurements
Vector of CAMAC ADC measurements.
int GetNTriggers()
Get number of triggers.
std::vector< CamacADCEvent > & GetMeasurements()
Get the Vector of TDC Measurements.