#ifndef TMidasTripTOldHisto_hxx_seen #define TMidasTripTOldHisto_hxx_seen // $Id: IMidasTripTOldHisto.hxx,v 1.2 2009/09/25 06:02:32 nickwest Exp $ // // The ProHisto class is for the prototype histogram bank used in the first implementation // of the DPT. The ITripTHistoBank and IMidasTripTHisto banks are used for the new // version of the DPT (developed in July 2009, installed a month or two later). #include "IMidasObj.hxx" #include "IMidasItr.hxx" //Needed for LinkDef namespace COMET { class IMidasTripTOldHisto; }; /// This class represents a single raw TripT dpt histogram. class COMET::IMidasTripTOldHisto: public COMET::IMidasObj { private: public: IMidasTripTOldHisto(UShort_t encoding, const UChar_t* dataPtr, const UShort_t size, const UChar_t tfb, const UChar_t trip, const UChar_t chan) { fData = dataPtr; fSize = size; fEncoding = encoding; fTfb = tfb; fTrip = trip; fChan = chan; } IMidasTripTOldHisto(UShort_t invalid_code = 0) // fSize = 0 means error object { fData = 0; fSize = 0; fEncoding = 0; fTfb = 255; fTrip = 255; fChan = 255; } virtual ~IMidasTripTOldHisto() {}; virtual void Print(const Option_t* opt = "") const; UInt_t GetPedestal() const; UInt_t GetNoise() const; void GetBinContents(UInt_t *c) const; UInt_t GetEncoding() const {return this->fEncoding;} UInt_t GetTFB() const { return fTfb; } UInt_t GetTrip() const { return fTrip; } UInt_t GetChan() const { return fChan; } private: /// The raw data. const UChar_t *fData; //< Pointer to start of histogram data UShort_t fSize; //< Size of this histogram data, used to know when to stop unpacking UChar_t fEncoding; //< Encoding - allows us to get version numbr of packing alg and number of channels UChar_t fTfb; //< TFB number (obtained from the slot number) UChar_t fTrip; //< Trip number [0-3] from slot number UChar_t fChan; //< Channel number [0-15] or 16 or 17 if special channels enabled }; #endif