NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
Public Member Functions | List of all members
RootConverter2 Class Reference

Converter for data formats : NSCLDAQ 10.2-00x. More...

#include <RootConverter2.h>

Inheritance diagram for RootConverter2:
Converter

Public Member Functions

 RootConverter2 ()
 Default constructor Constructs the DDASEvent object. More...
 
virtual ~RootConverter2 ()
 Default destructor Calls the parent destructor and also deletes the object pointed to by the m_ddasevent data member. More...
 
virtual void Initialize (std::string filein, std::string fileout)
 Adds ddasevent branch to tree and associates it with local DDASEvent object. More...
 
virtual void DumpData (const CRingItem &item)
 Conversion of CRingItem data and filling of the tree. More...
 
- Public Member Functions inherited from Converter
 Converter ()
 Default constructor. More...
 
virtual ~Converter ()
 Default destructor. More...
 
virtual void Close ()
 Close ROOT file. More...
 
TFile * GetFile ()
 Access the output file.
 
TTree * GetTree ()
 Access the output tree.
 

Additional Inherited Members

- Protected Attributes inherited from Converter
TFile * m_fileout
 
TTree * m_treeout
 

Detailed Description

Converter for data formats : NSCLDAQ 10.2-00x.

A concrete implementation of the Converter base class to support the conversion of data built with NSCLDAQ versions 10.2-00x. This class expects a ring item whose ring-item-type is PHYSICS_EVENT. These are composed of a set of EVBFragment-type structures that surround the type of data . These structures have the following format

struct data_structure { uint32_t size_in_bytes uint64_t timestamp uint32_t source_id uint32_t payload_size (bytes) uint32_t barrier_type uint32_t pixie16_data[]; }

The Pixie-16 data format is defined by the Pixie-16 digitizer module. It consists of a minimum of 4 32-bit words for the Pixie16 data header followed by any subsequent optional data. The optional data may include trace data, energy sum data, or QDC data. The ddaschannel class is solely responsible for interpreting its structure.

The RootConverter2 object creates a branch in the tree referenced by Converter::m_treepointer named ddasevent. It holds the DDASEvent objects produced by every call to the RootConverter2::DumpData(const CRingItem&) method. DDASEvent objects are really arrays of individual ddaschannel objects.

Constructor & Destructor Documentation

RootConverter2::RootConverter2 ( )

Default constructor Constructs the DDASEvent object.

See also
Converter::Converter()
RootConverter2::~RootConverter2 ( )
virtual

Default destructor Calls the parent destructor and also deletes the object pointed to by the m_ddasevent data member.

Member Function Documentation

void RootConverter2::DumpData ( const CRingItem &  item)
virtual

Conversion of CRingItem data and filling of the tree.

Responsible for converting the data stored in the CRingItem into the DDASEvent object. This is the top level iterator through the data. It steps through the EVBFragments. For each EVBFragemt, the ExtractDDASChannelFromEVBFragment method is called and then the generated ddaschannel object is appended to the DDASEvent object. When there are no more EVBFragments to process in the current item, the DDASEvent is added to the tree.

Parameters
itemis the CRingItem (that should always be of type PHYSICS_EVENT)

Implements Converter.

void RootConverter2::Initialize ( std::string  filein,
std::string  fileout 
)
virtual

Adds ddasevent branch to tree and associates it with local DDASEvent object.

First calls the Converter::Initialize(std::string,std::string) method to create the output file and the tree, then adds the ddasevent branch to the tree. This branch holds the DDASEvent objects produced by the DumpData(const CRingItem&) method.

Parameters
fileincurrently not implemented
fileoutname of the root file to store the outputted data tree

Reimplemented from Converter.


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