TMesytecData Class Reference

#include <TMesytecData.hxx>

Inheritance diagram for TMesytecData:
Inheritance graph
[legend]
Collaboration diagram for TMesytecData:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TMesytecData (int bklen, int bktype, const char *name, void *pdata)
 Constructor.
void Print ()
 Print the bank contents in a structured way.
std::vector< ADCMeasMesy > & GetMeasurements ()
 Get the Vector of ADC Measurements.
uint32_t GetADCResolution () const
uint32_t GetModuleID () const
 Get Module ID.
uint32_t GetOutputFormat () const
 Get Output format (???).
uint32_t GetTimeStamp () const
const uint16_t * GetData16 () const
const uint32_t * GetData32 () const
const uint64_t * GetData64 () const
int GetSize () const
int GetType () const
std::string GetName () const
void Dump ()
 Dump the bank contents in an unstructured way.

Private Attributes

uint32_t fGlobalHeader
 The overall global header.
uint32_t fGlobalTrailer
 The overall global trailer.
std::vector< ADCMeasMesyfMeasurements
 Vector of ADC Measurements.

Detailed Description

Class to store data from Mesytec MADC32 module. For details on this module see: http://daq-plone.triumf.ca/HR/VME/mesytec-modules/MADC-32_V14_fw0126.pdf/at_download/file

Definition at line 54 of file TMesytecData.hxx.


Constructor & Destructor Documentation

TMesytecData::TMesytecData ( int  bklen,
int  bktype,
const char *  name,
void *  pdata 
)

Constructor.

Save the current header.

Definition at line 11 of file TMesytecData.cxx.

References fGlobalHeader, fGlobalTrailer, fMeasurements, gBitResolution, TGenericData::GetData32(), and TGenericData::GetSize().

00011                                                                               :
00012     TGenericData(bklen, bktype, name, pdata)
00013 {
00014 
00015   /// Save the current header.
00016   fGlobalHeader =0;
00017 
00018   for(int i = 0; i < GetSize(); i++){
00019     uint32_t word = GetData32()[i];
00020 
00021     if( (word & 0xc0000000) == 0x40000000){ // header word
00022       fGlobalHeader = word;
00023       // Figure out which bit resolution we are using
00024       int bitresolution = ((fGlobalHeader & 0x7000) >> 12);
00025       if(bitresolution == 1)
00026         gBitResolution = 0x7ff; 
00027       else if(bitresolution == 2)
00028         gBitResolution = 0xfff;
00029       else if(bitresolution == 4)
00030         gBitResolution = 0x1fff;
00031       
00032     }
00033 
00034     if( (word & 0xc0000000) == 0x00000000 && 
00035         (word & 0x3fe00000) == 0x04000000 ){ // Data word
00036       fMeasurements.push_back(ADCMeasMesy(fGlobalHeader,word));
00037     }
00038     
00039     if( (word & 0xc0000000) == 0x00000000 && 
00040         (word & 0x3fe00000) == 0x04000000 ){ // Data extended timestamp
00041       // Not currently supported!!!
00042     }
00043     
00044     if((word & 0xc0000000) == 0xc0000000){ // trailer word
00045       fGlobalTrailer = word;
00046     }
00047 
00048   }
00049 
00050 }
 

Here is the call graph for this function:


Member Function Documentation

void TGenericData::Dump (  )  [inline, inherited]

Dump the bank contents in an unstructured way.

Definition at line 39 of file TGenericData.hxx.

References TGenericData::GetData32(), TGenericData::GetName(), and TGenericData::GetSize().

Referenced by TGenericData::Print().

00039              {
00040 
00041     std::cout << "Generic decoder for bank named " <<  GetName().c_str() << std::endl;
00042     for(int i = 0; i < GetSize(); i++){
00043       std::cout << std::hex << "0x" << GetData32()[i] << std::dec << std::endl;
00044     }
00045 
00046   }

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t TMesytecData::GetADCResolution (  )  const [inline]

Get ADC resolution (11, 12 or 13 bit); Return values: 1 -> 11 bit, 2 -> 12 bit, 3 -> 13 bit (??)

Definition at line 68 of file TMesytecData.hxx.

References fGlobalHeader.

00068 {return (fGlobalHeader & 0x7000) >> 12;};

const uint16_t* TGenericData::GetData16 (  )  const [inline, inherited]

Definition at line 24 of file TGenericData.hxx.

References TGenericData::fData.

Referenced by TL2249Data::TL2249Data().

00024 { return reinterpret_cast<const uint16_t*>(fData); }

Here is the caller graph for this function:

const uint32_t* TGenericData::GetData32 (  )  const [inline, inherited]
const uint64_t* TGenericData::GetData64 (  )  const [inline, inherited]

Definition at line 30 of file TGenericData.hxx.

References TGenericData::fData.

Referenced by TAgilentHistograms::UpdateHistograms().

00030 { return reinterpret_cast<const uint64_t*>(fData); }

Here is the caller graph for this function:

std::vector<ADCMeasMesy>& TMesytecData::GetMeasurements (  )  [inline]

Get the Vector of ADC Measurements.

Definition at line 64 of file TMesytecData.hxx.

References fMeasurements.

Referenced by Print().

00064 {return fMeasurements;}

Here is the caller graph for this function:

uint32_t TMesytecData::GetModuleID (  )  const [inline]

Get Module ID.

Definition at line 71 of file TMesytecData.hxx.

References fGlobalHeader.

Referenced by Print().

00071 {return (fGlobalHeader & 0xff0000) >> 16;};

Here is the caller graph for this function:

std::string TGenericData::GetName (  )  const [inline, inherited]
uint32_t TMesytecData::GetOutputFormat (  )  const [inline]

Get Output format (???).

Definition at line 74 of file TMesytecData.hxx.

References fGlobalHeader.

00074 {return (fGlobalHeader & 0x8000) >> 15;};

int TGenericData::GetSize (  )  const [inline, inherited]

Definition at line 32 of file TGenericData.hxx.

References TGenericData::fSize.

Referenced by TGenericData::Dump(), TL2249Data::TL2249Data(), TMesytecData(), TV1190Data::TV1190Data(), and TV792Data::TV792Data().

00032 {return fSize;}

Here is the caller graph for this function:

uint32_t TMesytecData::GetTimeStamp (  )  const [inline]

Definition at line 77 of file TMesytecData.hxx.

References fGlobalTrailer.

Referenced by Print().

00077 {return (fGlobalTrailer & 0x3fffffff);};

Here is the caller graph for this function:

int TGenericData::GetType (  )  const [inline, inherited]

Definition at line 34 of file TGenericData.hxx.

References TGenericData::fBankType.

00034 {return fBankType;}

void TMesytecData::Print (  )  [virtual]

Print the bank contents in a structured way.

Reimplemented from TGenericData.

Definition at line 53 of file TMesytecData.cxx.

References gBitResolution, ADCMeasMesy::GetChannel(), ADCMeasMesy::GetMeasurement(), GetMeasurements(), GetModuleID(), TGenericData::GetName(), GetTimeStamp(), and ADCMeasMesy::IsOutOfRange().

00053                         {
00054  
00055   std::cout << "Data for Mesytec module in bank " << GetName() << std::endl;
00056   std::cout << "Module ID = " << GetModuleID() << std::endl;
00057   std::cout << "Bit resolution : 0x" << std::hex 
00058             << gBitResolution << std::dec << std::endl;
00059 
00060   std::cout << "Timestamp = " << GetTimeStamp() << std::endl;
00061 
00062   std::vector<ADCMeasMesy> measurements = GetMeasurements();
00063   std::cout << "Number of measurements: " << measurements.size() << std::endl;
00064 
00065   for(unsigned int i = 0; i < measurements.size(); i++){
00066     ADCMeasMesy adcmeas = measurements[i];
00067     std::cout << "meas: " << adcmeas.GetMeasurement() 
00068               << " [chan="<< adcmeas.GetChannel()
00069               <<",OOR=" << adcmeas.IsOutOfRange() << "]  ";
00070     if(i%2==1) std::cout <<  std::endl;
00071   }
00072   std::cout <<  std::endl;
00073 
00074 
00075 }

Here is the call graph for this function:


Member Data Documentation

uint32_t TMesytecData::fGlobalHeader [private]

The overall global header.

Definition at line 77 of file TMesytecData.hxx.

Referenced by GetADCResolution(), GetModuleID(), GetOutputFormat(), and TMesytecData().

uint32_t TMesytecData::fGlobalTrailer [private]

The overall global trailer.

Definition at line 85 of file TMesytecData.hxx.

Referenced by GetTimeStamp(), and TMesytecData().

std::vector<ADCMeasMesy> TMesytecData::fMeasurements [private]

Vector of ADC Measurements.

Definition at line 88 of file TMesytecData.hxx.

Referenced by GetMeasurements(), and TMesytecData().


The documentation for this class was generated from the following files:

Generated on 12 Feb 2016 for ROOT Analyzer by  doxygen 1.6.1