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