ROOT logo
// File: hldunpack.cc
//
//*-- Author : Walter Karig <W.Karig@gsi.de>
//*-- Modified : 25/03/98 by Manuel Sanchez 
//*-- Modified : 97/11/13 15:23:49 by Walter Karig
//

//_HADES_CLASS_DESCRIPTION 
///////////////////////////////////////
//HldUnpack
//
//  ABC for the different unpackers.
//
//  The unpackers are used to unpack the data from Lmd files and put them
//  into the HEvent structure.
//
//  The job of an unpacker starts when its execute function is called within
//  HLmdSource::getNextEvent(), in this function the unpacker reads data from
//  an HldEvt (corresponding to an event as stored by the data adquisition 
//  system) and extracts the info to the category pRawCat.
///////////////////////////////////////
using namespace std;
#include <iostream>
#include "hades.h"
#include "hldunpack.h"
#include "hldsubevt.h"
#include "hldsource.h"
#include "htrbnetunpacker.h"

HldUnpack::HldUnpack(void) {
    //Constructor por defecto para un Unpacker generico.
    pEvt    = NULL;
    pSubEvt = NULL;
    pRawCat = NULL;
    trbNetUnpacker = NULL;
}

HldUnpack::~HldUnpack(void) {
    //Destructor
}

 HldSubEvt** HldUnpack::getpSubEvt(void) {
    //Return a pointer to the subevent read by this unpacker
    return &pSubEvt;
}

Int_t HldUnpack::execute(void) {
    //Default execute function. It just gives some info about the read subevent
    // This function is overriden by derived classes.
    if (pSubEvt)
	cout << "subEvtId = " << pSubEvt->getId() << endl;
    return kTRUE;
}

void HldUnpack::setCategory(HCategory *aCat) {
    //Sets the category where the unpacked data go to.
    pRawCat=aCat;
}

Int_t HldUnpack::decodeTrbNet(UInt_t *data, Int_t subEventId)
{
    return (trbNetUnpacker) ? trbNetUnpacker->unpackData(data,subEventId) :  -1;
}

ClassImp(HldUnpack)

 hldunpack.cc:1
 hldunpack.cc:2
 hldunpack.cc:3
 hldunpack.cc:4
 hldunpack.cc:5
 hldunpack.cc:6
 hldunpack.cc:7
 hldunpack.cc:8
 hldunpack.cc:9
 hldunpack.cc:10
 hldunpack.cc:11
 hldunpack.cc:12
 hldunpack.cc:13
 hldunpack.cc:14
 hldunpack.cc:15
 hldunpack.cc:16
 hldunpack.cc:17
 hldunpack.cc:18
 hldunpack.cc:19
 hldunpack.cc:20
 hldunpack.cc:21
 hldunpack.cc:22
 hldunpack.cc:23
 hldunpack.cc:24
 hldunpack.cc:25
 hldunpack.cc:26
 hldunpack.cc:27
 hldunpack.cc:28
 hldunpack.cc:29
 hldunpack.cc:30
 hldunpack.cc:31
 hldunpack.cc:32
 hldunpack.cc:33
 hldunpack.cc:34
 hldunpack.cc:35
 hldunpack.cc:36
 hldunpack.cc:37
 hldunpack.cc:38
 hldunpack.cc:39
 hldunpack.cc:40
 hldunpack.cc:41
 hldunpack.cc:42
 hldunpack.cc:43
 hldunpack.cc:44
 hldunpack.cc:45
 hldunpack.cc:46
 hldunpack.cc:47
 hldunpack.cc:48
 hldunpack.cc:49
 hldunpack.cc:50
 hldunpack.cc:51
 hldunpack.cc:52
 hldunpack.cc:53
 hldunpack.cc:54
 hldunpack.cc:55
 hldunpack.cc:56
 hldunpack.cc:57
 hldunpack.cc:58
 hldunpack.cc:59
 hldunpack.cc:60
 hldunpack.cc:61
 hldunpack.cc:62
 hldunpack.cc:63
 hldunpack.cc:64
 hldunpack.cc:65
 hldunpack.cc:66