TV1730RawData Class Reference

Class to store raw data from CAEN V1730 (for raw readout, no-DPP). More...

#include <TV1730RawData.hxx>

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

List of all members.

Public Member Functions

 TV1730RawData (int bklen, int bktype, const char *name, void *pdata)
 Constructor.
uint32_t GetEventCounter () const
 Get Event Counter.
uint32_t GetEventSize () const
 Get Event Counter.
uint32_t GetGeoAddress () const
 Get Geographical Address.
uint32_t GetTriggerTimeTag () const
 Get the extended trigger time tag.
uint32_t GetChMask ()
 Get channel mask.
void Print ()
 Print the bank contents in a structured way.
std::vector
< RawChannelMeasurement > & 
GetMeasurements ()
 Get the Vector of TDC Measurements.
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

std::vector< uint32_t > fGlobalHeader
 The overall global header.
std::vector
< RawChannelMeasurement
fMeasurements
 Vector of V1730 Measurements.

Detailed Description

Class to store raw data from CAEN V1730 (for raw readout, no-DPP).

Definition at line 49 of file TV1730RawData.hxx.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 7 of file TV1730RawData.cxx.

References RawChannelMeasurement::AddSamples(), fGlobalHeader, fMeasurements, GetChMask(), TGenericData::GetData32(), and GetEventSize().

00007                                                                                 :
00008     TGenericData(bklen, bktype, name, pdata)
00009 {
00010   
00011   // Do some sanity checking.  
00012   // Make sure first word has right identifier
00013         if( (GetData32()[0] & 0xf0000000) != 0xa0000000){ 
00014           std::cerr << "First word has wrong identifier; first word = 0x" 
00015                     << std::hex << GetData32()[0] << std::dec << std::endl;
00016           return;
00017         }
00018 
00019         fGlobalHeader.push_back(GetData32()[0]);
00020         fGlobalHeader.push_back(GetData32()[1]);
00021         fGlobalHeader.push_back(GetData32()[2]);
00022         fGlobalHeader.push_back(GetData32()[3]);
00023   
00024 
00025   
00026   int counter = 4;
00027         
00028         int number_available_channels = 0;
00029         for(int ch = 0; ch < 16; ch++){         
00030                 if((1<<ch) & GetChMask()){
00031                         number_available_channels++;
00032                 }
00033         }
00034 
00035         int nwords_per_channel = (GetEventSize() - 4)/number_available_channels;
00036         //      std::cout << "Number of channels " << nwords_per_channel << std::endl;
00037         
00038         // Loop over channel data
00039         for(int ch = 0; ch < 16; ch++){
00040                 
00041                 if((1<<ch) & GetChMask()){
00042 
00043                         std::vector<uint32_t> Samples;
00044                         for(int i = 0; i < nwords_per_channel; i++){
00045                                 uint32_t sample = (GetData32()[counter] & 0x3fff);
00046                                 Samples.push_back(sample);
00047                                 sample = (GetData32()[counter] & 0x3fff0000) >> 16;
00048                                 Samples.push_back(sample);                              
00049                                 counter++;
00050                         }
00051                         RawChannelMeasurement meas = RawChannelMeasurement(ch);
00052                         meas.AddSamples(Samples);
00053 
00054                         fMeasurements.push_back(meas);
00055                         
00056                 }
00057         }
00058 
00059 }

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 TV1730RawData::GetChMask (  )  [inline]

Get channel mask.

Definition at line 70 of file TV1730RawData.hxx.

References fGlobalHeader.

Referenced by TV1730RawData().

00070 {return (fGlobalHeader[1] & 0xff) + ((fGlobalHeader[2] & 0xff000000) >> 16);};

Here is the caller graph for this function:

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:

uint32_t TV1730RawData::GetEventCounter (  )  const [inline]

Get Event Counter.

Definition at line 58 of file TV1730RawData.hxx.

References fGlobalHeader.

00058 {return (fGlobalHeader[2] & 0xffffff);};

uint32_t TV1730RawData::GetEventSize (  )  const [inline]

Get Event Counter.

Definition at line 61 of file TV1730RawData.hxx.

References fGlobalHeader.

Referenced by TV1730RawData().

00061 {return (fGlobalHeader[0] & 0xfffffff);};

Here is the caller graph for this function:

uint32_t TV1730RawData::GetGeoAddress (  )  const [inline]

Get Geographical Address.

Definition at line 64 of file TV1730RawData.hxx.

References fGlobalHeader.

00064 {return (fGlobalHeader[1] & 0xf8000000) >> 27 ;};

std::vector<RawChannelMeasurement>& TV1730RawData::GetMeasurements (  )  [inline]

Get the Vector of TDC Measurements.

Definition at line 75 of file TV1730RawData.hxx.

References fMeasurements.

Referenced by TV1730RawWaveform::UpdateHistograms().

00075 {return fMeasurements;}

Here is the caller graph for this function:

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

Definition at line 32 of file TGenericData.hxx.

References TGenericData::fSize.

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

00032 {return fSize;}

Here is the caller graph for this function:

uint32_t TV1730RawData::GetTriggerTimeTag (  )  const [inline]

Get the extended trigger time tag.

Definition at line 67 of file TV1730RawData.hxx.

References fGlobalHeader.

00067 {return fGlobalHeader[3];};

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

Definition at line 34 of file TGenericData.hxx.

References TGenericData::fBankType.

00034 {return fBankType;}

void TV1730RawData::Print (  )  [virtual]

Print the bank contents in a structured way.

Reimplemented from TGenericData.

Definition at line 61 of file TV1730RawData.cxx.

References TGenericData::GetName().

00061                          {
00062 
00063   std::cout << "V1730 decoder for bank " << GetName().c_str() << std::endl;
00064 
00065 
00066 }

Here is the call graph for this function:


Member Data Documentation

std::vector<uint32_t> TV1730RawData::fGlobalHeader [private]

The overall global header.

Definition at line 85 of file TV1730RawData.hxx.

Referenced by GetChMask(), GetEventCounter(), GetEventSize(), GetGeoAddress(), GetTriggerTimeTag(), and TV1730RawData().

Vector of V1730 Measurements.

Definition at line 88 of file TV1730RawData.hxx.

Referenced by GetMeasurements(), and TV1730RawData().


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

Generated on 12 Feb 2016 for ROOT Analyzer by  doxygen 1.6.1