/*************************************************************************** * * * $Log: MDpartEventV1731.h,v $ * Revision 1.1 2009/04/21 12:45:36 daq * Initial revision * * Revision 1.1 2008/04/14 11:41:08 daq * * * Originally created by J.S. Graulich, December 2008 * * * ***************************************************************************/ #ifndef __MDPARTEVENTV1731_H #define __MDPARTEVENTV1731_H #include "MDdataContainer.h" #include "MDdataWordV1731.h" #include "MDexception.h" #include #include #include #include #include using namespace std; #define V1731_HEADER_WORDS 4 #define V1731_WORD_SIZE 4 #define V1731_NCHANNELS 8 class MDpartEventV1731 : public MDdataContainer { private: unsigned int _nChannels; unsigned int _length[ V1731_NCHANNELS ]; unsigned int* _sequence[ V1731_NCHANNELS ]; public: MDpartEventV1731( void *d = 0 ); virtual ~MDpartEventV1731(){} virtual void SetDataPtr( void *d ); virtual void Dump( int atTheTime = 1 ); void Init(); unsigned int GetNChannels(){ return _nChannels; } unsigned int GetLength(int ch){ return _length[ch]; } unsigned int GetNSamples(int ch){ return 4*_length[ch]; } // 4 sample data per word unsigned int* GetSequence(int ch){ return _sequence[ch]; } unsigned int GetWordCount(); unsigned int GetGeo(); int GetZS(); unsigned int GetPattern(); unsigned int GetChannelMask(); unsigned int GetEventCounter(); unsigned int GetEventCount(){ return GetEventCounter()-1; } unsigned int GetTriggerTimeTag(); int16_t GetSampleData( unsigned short aChannel, unsigned long aSample ); }; ostream &operator<<(ostream &s,MDpartEventV1731 &dw); istream &operator>>(istream &s,MDpartEventV1731 &dw); #endif