ROOTANA
Loading...
Searching...
No Matches
TV792NData.cxx
Go to the documentation of this file.
1#include "TV792NData.hxx"
2
3
4/// Constructor
5TV792NData::TV792NData(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
void Print()
Print the bank contents in a structured way.
uint32_t GetCrate() const
Get the crate number.
uint32_t fAdc_header_word
Fields to hold the header, measurement, trailer and error words.
uint32_t fAdc_trailer_word
uint32_t GetNumberChannels() const
Get the number of converted channels.
uint32_t GetEventCounter() const
Get the event counter.
TV792NData(int bklen, int bktype, const char *name, void *pdata)
Constructor.
Definition TV792NData.cxx:5
uint32_t GetGeoAddress() const
Get GEO address.
std::vector< VADCNMeasurement > fMeasurements
Vector of TDC Measurements.