ROOTANA
Loading...
Searching...
No Matches
TV792Data.cxx
Go to the documentation of this file.
1#include "TV792Data.hxx"
2
3
4/// Constructor
5TV792Data::TV792Data(int bklen, int bktype, const char* name, void *pdata):
6 TGenericData(bklen, bktype, name, pdata)
7{
8
11
12 for(int i = 0; i < GetSize(); i++){
13
14 uint32_t word = GetData32()[i];
15 if((word & 0x07000000) == 0x02000000){ // header
16 fAdc_header_word = word;
17 }
18
19
20 if((word & 0x07000000) == 0x00000000){ // measurement
22 }
23
24 if((word & 0x07000000) == 0x04000000) // trailer
25 fAdc_trailer_word = word;
26
27
28 }
29
30}
31
33
34 std::cout << "V792 decoder for bank " << GetName().c_str() << std::endl;
35
36 std::cout << "Geo-Add = " << GetGeoAddress() << ", crate number = " << GetCrate()
37 << ", Number of channels= " << GetNumberChannels() << ", event counter = "
38 << GetEventCounter() << std::endl;
39 for(unsigned i = 0; i < fMeasurements.size(); i++){
40 std::cout << "chan " << fMeasurements[i].GetChannel()
41 << " meas = " << fMeasurements[i].GetMeasurement() << " " ;
42 std::cout << " [UN/OV=" << fMeasurements[i].IsUnderThreshold() << "/" << fMeasurements[i].IsOverFlow() << "], ";
43
44 if((i-2)%3 == 0) std::cout << std::endl;
45
46 }
47 std::cout << std::endl;
48
49
50
51}
int GetSize() const
std::string GetName() const
const uint32_t * GetData32() const
uint32_t fAdc_trailer_word
Definition TV792Data.hxx:88
uint32_t GetGeoAddress() const
Get GEO address.
Definition TV792Data.hxx:65
uint32_t GetEventCounter() const
Get the event counter.
Definition TV792Data.hxx:74
uint32_t fAdc_header_word
Fields to hold the header, measurement, trailer and error words.
Definition TV792Data.hxx:87
std::vector< VADCMeasurement > fMeasurements
Vector of TDC Measurements.
Definition TV792Data.hxx:83
TV792Data(int bklen, int bktype, const char *name, void *pdata)
Constructor.
Definition TV792Data.cxx:5
uint32_t GetNumberChannels() const
Get the number of converted channels.
Definition TV792Data.hxx:71
uint32_t GetCrate() const
Get the crate number.
Definition TV792Data.hxx:68
void Print()
Print the bank contents in a structured way.
Definition TV792Data.cxx:32