// // File : MiPixelData.hh // // Purpose: Declaration of Mirror pixel data (SLT) class // // // $Id: MiPixelData.hh 12810 2011-11-28 14:43:50Z mathes $ // /** @file MiPixelData.hh * Declaration of class TMirrorPixelData * @author H.-J. Mathes, FzK */ #ifndef _MiPixelData_hh_ #define _MiPixelData_hh_ // --> prevent users from including that file directly #ifndef __CINT__ # if (!defined _MiEvent_hh_) && (!defined _VMiEvent_hh_) # error You are not supposed to include that header file ! # error Please use MiEvent.hh instead ! # endif // !_MiEvent_hh_ && !_VMiEvent_hh_ #endif // __CINT__ #include #include #include #include #undef EA_FORMAT /** @anchor MiPixelData * * This class contains the representation of the Pixel Data (SLT) and the * multiplicity data. * * This class defines the data read from the pixel memory of the SLT * interface. The data is used by the SLT trigger board to form the * trigger decision. * * Based upon this data a more sophisticated software alqorithm could * do another trigger decision and could decide about the pixels it is * interested to be read out. */ class TMirrorPixelData : public TObject { friend class TMirrorEvent; friend class TMirrorBitArray; friend class TShmEvent; friend class ShmEventDescriptor; public: /** SLT bin width in ns. */ static const unsigned int kSLTBinWidth = 100; /** Value returned if no triggered time bin was found. */ static const int kNoTrigger = -1; /** SLT memory data word format V2 (used for EA). * * Note: The fTrigger bit was not working during EA. */ typedef struct _PixelDataWordV2Rec { /** Data bits for one pixel column. */ unsigned fPixel : 22; /** Flag to indicate if there was a parity error. */ unsigned fParityError : 1; /** SLT pattern class. */ unsigned fPatternClass : 7; /** Flag to indicate if the external trigger bit was set. */ unsigned fTrigger : 1; /** Unused bit. */ unsigned fSpare : 1; } PixelDataWordV2Rec, *PixelDataWordV2; /** SLT memory data word format V3 and V4. */ typedef struct _PixelDataWordV3Rec { /** Data bits for one pixel column. * * These bits are the outputs of the boxcar summing trigger sent at * the column specific time slice to the SLT memory. Each 50 ns a * column of 22 bits is sent from a FLT to the * SLT. Before being used for a forming the SLT trigger, they are * prolongated (in time) by the FLT modules coincidence window time. */ unsigned fPixel : 22; /** Parity of the transferred FLT trigger word. */ unsigned fParity : 1; /** Give information about the SLT pattern class. * See also: hardware specification. */ unsigned fPatternClass : 7; /** Flag if there was a parity error during the transmission of the * FLT trigger bits to the SLT module. */ unsigned fParityError : 1; /** Flag if the external trigger bit was set (fed via GPS clock). */ unsigned fExtTrigger : 1; } PixelDataWordV3Rec, *PixelDataWordV3; /** Hardware V3: SLT memory data word format. * * This data structure contains the information read out from the SLT * memory. It contains mainly information about the 1st level trigger * (boxcar summing threshold). * * The format of this structure is (of course) very hardware dependent and * is chosen according to the specification given in the document * Specification of the SLT module, 1.30, 16.08.01. This * specification is repeated and implemented by the FE API software layer * (A. Kopmann, Rev. 0.42 or later) * * The latest revision is Rev. 3.1. * @see http://fuzzy.fzk.de/bscw/bscw.cgi/14458 * * This data structure has to be accessed using: * @li PixelDataClass(), PixelDataSetClass() * @li PixelDataPixel(), PixelDataGetData(), PixelDataSetData() * @li PixelDataTrigger(), * @li PixelDataParity(), * @li PixelDataGetWord(), PixelDataSetWord() */ typedef union _PixelDataWordRec { /** Describes the whole data (32 Bits). */ UInt_t fWord; # ifndef __CINT__ # ifdef EA_FORMAT struct _PixelDataWordV2Rec fBits; # else struct _PixelDataWordV3Rec fBits; # endif // EA_FORMAT # endif /* __CINT__ */ } PixelDataWordRec, *PixelDataWord; /** Hardware V4: Format of the pixel page raw data, Rev. 2.06, Fig. 14. */ typedef union _PixelPageDataWordRec { /** Describes the whole _FADCTraceInfoRec data (32 Bits). */ UInt_t fWord; # ifndef __CINT__ /** An alternative bit-field overlayed our data word. */ struct { /** Pixel trigger, each 100 ns. */ unsigned fPixelTrigger : 22; unsigned fUnused : 10; } fBits; # endif /* __CINT__ */ } PixelPageDataWordRec, *PixelPageDataWord; /** Hardware V4: Format of the SLT page raw data, Rev. 2.06, Fig. 15. */ typedef union _SLTPageDataWordRec { /** Describes the whole _FADCTraceInfoRec data (32 Bits). */ UInt_t fWord; # ifndef __CINT__ /** An alternative bit-field overlayed our data word. */ struct { /** (time) extended pixel trigger, slices shifted by 50ns */ unsigned fExtPixelTrigger : 22; /** SLT trigger pattern. */ unsigned fPattern : 7; /** This was the 'ExtTrigger' before. */ unsigned fGlobTrigger : 1; unsigned fUnused : 1; } fBits; # endif /* __CINT__ */ } SLTPageDataWordRec, *SLTPageDataWord; /** Hardware V4: Format of the multiplicity page raw data, Rev. 2.06, Fig. 16. */ typedef union _MultiplicityPageDataWordRec { /** Describes the whole _FADCTraceInfoRec data (32 Bits). */ UInt_t fWord; # ifndef __CINT__ /** An alternative bit-field overlayed our data word. */ struct { /** ? projected on ? . */ unsigned fProjection : 22; /** Multiplicity data. */ unsigned fMultiplicity : 9; unsigned fUnused : 1; } fBits; # endif /* __CINT__ */ } MultiplicityPageDataWordRec, *MultiplicityPageDataWord; public: # ifndef __CINT__ /** Limits for the multiplicity... */ enum EPixelDataLimits { /** Maximum multiplicity we could get for hardware V3. */ kMaxMultiplicityV3 = 63, /** Maximum multiplicity we could get for hardware V4. */ kMaxMultiplicityV4 = 440, /** Current maximum multiplicity. */ kMaxMultiplicity = kMaxMultiplicityV4 }; # endif /* __CINT__ */ /** Representation of a single multiplicity data word from SLT device - V3. */ typedef unsigned char MultiplicityDataWordV3Rec; typedef unsigned char *MultiplicityDataWordV3; /** Representation of a single multiplicity data word from SLT device - V4. */ typedef unsigned short MultiplicityDataWordRec; typedef unsigned short *MultiplicityDataWord; protected: /** Mirror SLT data. * * This structure describes the (SLT) pixel data of a mirror. * * This data structure has to be accessed using: * @li MiPixelDataVersion(), MiPixelDataSetVersion() * @li MiPixelDataArray() * @li MiPixelData() */ typedef struct _MiPixelData { /** Version information, could be checked when * different (hardware) data formats are used. */ Version_t fVersion; // fVersion; /** Number of the mirror and the eye from where the data was read. */ FdUtil::Fd::MirrorNumberRec fMirrorNumber; /** The multiplicity data = 1K. */ #ifndef __CINT__ # if (FDUTIL_VERSION_CODE >= ModuleVersionCode(4,0,0)) MultiplicityDataWordRec fMultiplicityData[FdUtil::Fd::kMI_NMULT_BINS]; # else MultiplicityDataWordRec fMultiplicityData[FdUtil::Fd::kMI_NFADC_BINS]; # endif //FDUTIL_VERSION_CODE #else MultiplicityDataWord fMultiplicityData; #endif // __CINT__ /** The pixel data = 8K in pixel data memory. */ PixelDataWordRec fPixelData[FdUtil::Fd::kMI_NSLT_BINS][FdUtil::Fd::kMI_NCOLS]; # if 0 /** This is redundant, thus we skip it... */ PixelPageDataWordRec fPixelPageData[FdUtil::Fd::kMI_NSLT_BINS][FdUtil::Fd::kMI_NCOLS]; # endif /** Global Trigger, pattern & extended pixel trigger - hardware V4. */ SLTPageDataWordRec fSLTPageData[FdUtil::Fd::kMI_NSLT_BINS][FdUtil::Fd::kMI_NCOLS]; /** Partly the same data as 'fMultiplicityData' - hardware V4. */ MultiplicityPageDataWordRec fMultiplicityPageData[FdUtil::Fd::kMI_NMULT_BINS]; } MiPixelDataRec, *MiPixelData; public: /** Default constructor for class TMirrorPixelData. * * This constructor allocates additional space for the data on the heap. */ TMirrorPixelData(); /** Constructor from a void pointer (for example to C-struct MiPixelData). */ TMirrorPixelData(void*); /** Copy constructor of the class TMirrorPixelData. */ TMirrorPixelData(const TMirrorPixelData&); /** Destructor for class TMirrorPixelData. * * The destructor destroys the object in a way which is compatible to * the specific method of its construction. */ virtual ~TMirrorPixelData(); /** operator=() for the class TMirrorPixelData. * * This operator has to be defined in order to perform a deep copy of * a TMirrorPixelData object. */ TMirrorPixelData& operator=(const TMirrorPixelData&); /** Create the Multiplicity data from the MultiplicityPageData. */ static void Convert(const MultiplicityPageDataWord,MultiplicityDataWord); /** Convert from V3 data to V4 data. */ static void ConvertToV4(const TMirrorPixelData*,TMirrorPixelData*); /** Convert PixelData from V4s SLTPageData V3 (for the old structure.) */ static void ConvertToV3(const SLTPageDataWord,PixelDataWordV3); /** Convert the Multiplicity data from V3 to V4. */ static void ConvertToV4(const MultiplicityDataWordV3,MultiplicityDataWord); /** Clear the contents of a TMirrorPixelData object. */ virtual void Clear(Option_t * ="") { Init(); } /** Create the Multiplicity data from the FADC data. */ static void CreateMultiplicityData(TMirrorFADCData*, TMirrorPixelList*, MultiplicityDataWord); /** Print a TMirrorPixelData object to the specified stream. * * Not the complete 8 kByte of data will be dumped to cout but only a * single time slice of the pixel data. The optional argument selects which * time slice to print. If a value outside the valid range * 0...Fd::kMI_NSLT_BINS-1 is provided, the bitwise OR of all slices is * printed. */ void Show(std::ostream& ostr=std::cout, unsigned int slice = FdUtil::Fd::kMI_NSLT_BINS) const; /** This method returns true, if the selected pixel has triggered within the * specified range of time bins. * * @param col column index, Fd::kMI_FIRST_COL... Fd::kMI_LAST_COL * @param row row index, Fd::kMI_FIRST_ROW ... Fd::kMI_LAST_ROW * @param first_bin index of time slice where to start looking for * triggered pixels, 0 ... Fd::kMI_NSLT_BINS - 1 * @param first_bin index of time slice where to stop looking for * triggered pixels, 0 ... Fd::kMI_NSLT_BINS - 1
* * If parameters are outside the valid parameter range, false is returned. */ bool HasTriggered(unsigned int col,unsigned int row, unsigned int first_bin=0, unsigned int last_bin=FdUtil::Fd::kMI_NSLT_BINS) const; /** This method returns true, if a pixel of the selected column has * triggered within the specified range of time bins. * * The parameter specification and range is the same as in the previous * method ! */ bool HasTriggeredColumn(unsigned int col,unsigned int first_bin=0, unsigned int last_bin=FdUtil::Fd::kMI_NSLT_BINS) const; #if 0 /** Return true if the class has set/valid multiplicity data. */ bool IsMultiplicityDataSet(); #endif // --- getters ... /** Get the Eye number (1..5). */ unsigned int GetEyeNo() const { return FdUtil::Fd::GetEyeNo( &fPixelData->fMirrorNumber ); } /** Get the FD Mirror number (1..27). */ unsigned int GetFdMirrorNo() const { return FdUtil::Fd::GetFdMirrorNo( &fPixelData->fMirrorNumber ); } /** Get the first time bin where the specified pixel has triggered. * * By default, all time bins are searched for this but a limited range of * time bins might be specified. * * @param col column index, Fd::kMI_FIRST_COL ... Fd::kMI_LAST_COL * @param row row index, Fd::kMI_FIRST_ROW ... Fd::kMI_LAST_ROW * @param first_bin index of time slice where to start looking for * triggered pixels, 0 ... Fd::kMI_NSLT_BINS - 1 * @param first_bin index of time slice where to stop looking for * triggered pixels, 0 ... Fd::kMI_NSLT_BINS - 1
* * @return the time bin (0 ... Fd::kMI_NSLT_BINS - 1) where the first trigger * occurred or a kNoTrigger if there was no trigger at all, i.e. * the return value has to be interpreted in units of usec. */ int GetFirstTriggeredTimeBin(unsigned int col,unsigned int row, unsigned int first_bin=0, unsigned int last_bin=FdUtil::Fd::kMI_NSLT_BINS - 1) const; /** Get the first triggered time bin for the specified pixel. */ int GetFirstTriggeredTimeBin(FdUtil::Fd::PixelNumber pixel, unsigned int first_bin=0, unsigned int last_bin=FdUtil::Fd::kMI_NSLT_BINS - 1) const { return GetFirstTriggeredTimeBin( FdUtil::Fd::GetColumnNo( pixel ), FdUtil::Fd::GetRowNo( pixel ), first_bin, last_bin ); } /** Get the first triggered time bin for the specified pixel. * * @return the time bin (0 ... Fd::kMI_NSLT_BINS - 1) where the last * trigger occurred or a number < 0 if there was no trigger at all. */ int GetFirstTriggeredTimeBin(FdUtil::Fd::FdPixelNumber pixel, unsigned int first_bin=0, unsigned int last_bin=FdUtil::Fd::kMI_NSLT_BINS - 1) const; /** Get the last time bin where the specified pixel has triggered. * By default, all time bins are searched for this but a limited range of * time bins might be specified. * * Parameter ranges are the same as in method GetFirstTriggeredTimebin() ! * * @return the time bin (0 ... Fd::kMI_NSLT_BINS - 1) where the last trigger * occurred or a number < 0 if there was no trigger at all. * * Note: Due to the prolongation of the FLT ttrigger signal at the * SLT input (SLT coincidence time) the end of the trigger * might be useless ! */ int GetLastTriggeredTimeBin(unsigned int col,unsigned int row, unsigned int first_bin=0, unsigned int last_bin=FdUtil::Fd::kMI_NSLT_BINS) const; /** Retrieve the composite mirror number which is stored for control * purposes. */ FdUtil::Fd::MirrorNumber GetMirrorNumber() const { return &fPixelData->fMirrorNumber; } /** Get the Mirror number (1..6). */ unsigned int GetMirrorNo() const { return FdUtil::Fd::GetMirrorNo( &fPixelData->fMirrorNumber ); } // --- TMirrorPixelData::MultiplicityPageData /** Get a single MuliplicityPageDataWord reference spoecified by its bin * number. * * @param bin the bin number between 0 ... Fd::kMI_NMULT_BINS. * * @return the selected word or NULL if an illegal bin is specified. */ MultiplicityPageDataWord GetMultiplicityPageData(unsigned int) const; /** Get a single MultiplicityPageDataWord reference specified by its bin * number without doing any index checks. */ MultiplicityPageDataWord GetMultiplicityPageDataFast(unsigned int bin) const { return &fPixelData->fMultiplicityPageData[bin]; } /** Get a pointer to the internally stored multiplicity page data which * is organized as MultiplicityPageDataWordRec[Fd::kMI_NMULT_BINS]. */ MultiplicityPageDataWord GetMultiplicityPageData() const { return &fPixelData->fMultiplicityPageData[0]; } // --- TMirrorPixelData::MultiplicityData /** Get a single MuliplicityDataWord reference spoecified by its bin * number. * * @param bin the bin number between 0 ... Fd::kMI_NMULT_BINS. * * @return the selected word or NULL if an illegal bin is specified. */ MultiplicityDataWord GetMultiplicityData(unsigned int) const; /** Get a single MultiplicityDataWord reference specified by its bin * number without doing any index checks. */ MultiplicityDataWord GetMultiplicityDataFast(unsigned int bin) const { return &fPixelData->fMultiplicityData[bin]; } /** Get a pointer to the internally stored multiplicity data which * is organized as MultiplicityDataWordRec[Fd::kMI_NMULT_BINS]. */ MultiplicityDataWord GetMultiplicityData() const { return &fPixelData->fMultiplicityData[0]; } /** Get the number of triggered pixel within the specified time range (in * usec) of the SLT memory. */ unsigned int GetNumberOfTriggeredPixels(unsigned int start_slice = 0, unsigned int end_slice = FdUtil::Fd::kMI_NSLT_BINS) const; // --- TMirrorPixelList::PixelData /** Get a pointer to the internally stored pixel data which is organized * as PixelDataWordRec[Fd::kMI_NSLT_BINS][Fd::kMI_NCOLS]. * * This array represents the information read out from the SLT * memory. It contains mainly information about the 1st level trigger * (boxcar summing threshold). * * The format of this structure is hardware dependent and is chosen * according to the specification given in the documentation of the * class FEevent (ak 07/26/00 & M.Balzer priv. communication). * * It has to be accessed using: * @li PixelDataClass(), PixelDataSetClass() * @li PixelDataPixel(), PixelDataGetData(), PixelDataSetData() * @li PixelDataTrigger(), * @li PixelDataParity(), * @li PixelDataGetWord(), PixelDataSetWord() */ PixelDataWord GetPixelData() const { return &fPixelData->fPixelData[0][0]; } /** Get a single PixelDataWord reference specified by its column and bin. * * Valid values for column are Fd::kMI_FIRST_COL ... Fd::kMI_LAST_COL * and for bin 0 ... Fd::kMI_NSLT_BINS (usually 100). * * @return NULL when illegal column is specified. */ PixelDataWord GetPixelData(unsigned int,unsigned int) const; /** Get a single PixelDataWord reference specified by its column and bin * number without doing any index checks. */ PixelDataWord GetPixelDataFast(unsigned int column,unsigned int bin) const { return &fPixelData->fPixelData[bin][column - FdUtil::Fd::kMI_FIRST_COL]; } // --- TMirrorPixelList::SLTPageData /** Get a single SLTPageDataWord reference specified by its column and bin. * * Valid values for column are Fd::kMI_FIRST_COL ... Fd::kMI_LAST_COL * and for bin 0 ... Fd::kMI_NSLT_BINS (usually 100). * * @return NULL when illegal column is specified. */ SLTPageDataWord GetSLTPageData(unsigned int,unsigned int) const; /** Get a single SLTPageDataWord reference specified by its column and bin * number without doing any index checks. */ SLTPageDataWord GetSLTPageDataFast(unsigned int column,unsigned int bin) const { return &fPixelData->fSLTPageData[bin][column - FdUtil::Fd::kMI_FIRST_COL]; } /** */ SLTPageDataWord GetSLTPageData() const { return &fPixelData->fSLTPageData[0][0]; } // --- setters ... /** Set the Eye number (1..5). */ void SetEyeNo(unsigned int eye_no) { FdUtil::Fd::SetEyeNo( &fPixelData->fMirrorNumber, eye_no ); } /** Set the FD Mirror number (1..27). * * Note: This will also set the eye number. */ void SetFdMirrorNo(unsigned int mirror_no) { FdUtil::Fd::SetFdMirrorNo( &fPixelData->fMirrorNumber, mirror_no ); } /** Set the Mirror number (1..6). * * Note: This will not set the eye number. */ void SetMirrorNo(unsigned int mirror_no) { FdUtil::Fd::SetMirrorNo( &fPixelData->fMirrorNumber, mirror_no ); } /** Set the composite mirror number which is kept for control purposes. */ void SetMirrorNumber(FdUtil::Fd::MirrorNumber mi_number) { fPixelData->fMirrorNumber = *mi_number; } /** Set the composite mirror number which is kept for control purposes. * * The mirror number is determined from the site where the software is * currently running. This method makes only sense on FD telescope systems. * When it is used elsewhere, a warning will be issued and the defaults * will be set. */ void SetMirrorNumber(); protected: /** Init (partially) a TMirrorPixelData object. */ void Init(); private: /** Allocate the C-struct in memory. */ void Construct() { fPixelData = new MiPixelDataRec(); } /** Remove the C-struct from memory. */ void Destruct() { delete fPixelData; fPixelData = NULL; } MiEvent::Constructor_t fConstructorType; //! how object was created MiPixelData fPixelData; //! pointer to C-struct ClassDef(TMirrorPixelData, MiEVENTVERSIONv4) }; // ------------------------------------------------------------------------- // ------------------------------------------------------------------------- // // defines and inlines for the public data structures // /* --- accessing Pixel data --- */ /** Return the complete contents of a word of the SLT data. */ #ifndef _MIEVENT_USE_MACROS_ inline unsigned int PixelDataGetWord(TMirrorPixelData::PixelDataWord pixeld) { return pixeld->fWord; } #else # define PixelDataGetWord(_pixeld) (int)(_pixeld)->fWord #endif // _MIEVENT_USE_MACROS_ /** Set the complete contents of a word of the SLT data. */ #ifndef _MIEVENT_USE_MACROS_ inline void PixelDataSetWord(TMirrorPixelData::PixelDataWord pixeld,unsigned int word) { pixeld->fWord = word; } #else # define PixelDataSetWord(_pixeld,_x) (_pixeld)->fWord = (_x) #endif // _MIEVENT_USE_MACROS_ /** Return the pixel data value of a word of the SLT data. */ #ifndef _MIEVENT_USE_MACROS_ inline unsigned int PixelDataGetData(TMirrorPixelData::PixelDataWord pixeld) { return pixeld->fBits.fPixel; } #else # define PixelDataGetData(_pixeld) (int)(_pixeld)->fBits.fPixel #endif // _MIEVENT_USE_MACROS_ /** Set the pixel data of a word of the SLT data. */ #ifndef _MIEVENT_USE_MACROS_ inline void PixelDataSetData(TMirrorPixelData::PixelDataWord pixeld,unsigned int pixel) { pixeld->fBits.fPixel = pixel & 0x3fffff; } #else # define PixelDataSetData(_pixeld,_x) (_pixeld)->fBits.fPixel = (_x) #endif // _MIEVENT_USE_MACROS_ /** Return the pixel data value of a word of the SLT data. */ #ifndef _MIEVENT_USE_MACROS_ inline unsigned int PixelDataGetPixel(TMirrorPixelData::PixelDataWord pixeld) { return pixeld->fBits.fPixel; } #else # define PixelDataGetPixel(_pixeld) (int)(_pixeld)->fBits.fPixel #endif // _MIEVENT_USE_MACROS_ /** Set the pixel data of a word of the SLT data. */ #ifndef _MIEVENT_USE_MACROS_ inline void PixelDataSetPixel(TMirrorPixelData::PixelDataWord pixeld,unsigned int pixel) { pixeld->fBits.fPixel = pixel & 0x3fffff; } #else # define PixelDataSetPixel(_pixeld,_x) (_pixeld)->fBits.fPixel = (_x) #endif // _MIEVENT_USE_MACROS_ #ifndef EA_FORMAT /** Return the parity information of a word of the SLT data. */ # ifdef _MIEVENT_USE_MACROS_ inline unsigned char PixelDataGetParity(TMirrorPixelData::PixelDataWord pixeld) { return pixeld->fBits.fParityError; } # else # define PixelDataGetParity(_pixeld) (int)(_pixeld)->fBits.fParity # endif // _MIEVENT_USE_MACROS_ /** Return the parity information of a word of the SLT data. */ # ifdef _MIEVENT_USE_MACROS_ inline bool PixelDataGetParityError(TMirrorPixelData::PixelDataWord pixeld) { return (bool)pixeld->fBits.fParityError; } # else # define PixelDataGetParityError(_pixeld) (int)(_pixeld)->fBits.fParityError # endif // _MIEVENT_USE_MACROS_ #endif // EA_FORMAT /** Return the pattern class id of a word of the SLT data. */ #ifndef _MIEVENT_USE_MACROS_ inline unsigned char PixelDataGetPatternClass(TMirrorPixelData::PixelDataWord pixeld) { return pixeld->fBits.fPatternClass; } #else # define PixelDataGetPatternClass(_pixeld) (int)(_pixeld)->fBits.fPatternClass #endif // _MIEVENT_USE_MACROS_ /** Set the pattern class id of a word of the SLT data. */ #ifndef _MIEVENT_USE_MACROS_ inline void PixelDataSetPatternClass(TMirrorPixelData::PixelDataWord pixeld,unsigned char pclass) { pixeld->fBits.fPatternClass = pclass & 0x7f; } #else # define PixelDataSetPatternClass(_pixeld,_x) (_pixeld)->fBits.fPatternClass = (_x) #endif // _MIEVENT_USE_MACROS_ /** Return the trigger information of a word of the SLT data. */ #ifndef _MIEVENT_USE_MACROS_ inline unsigned char PixelDataGetTrigger(TMirrorPixelData::PixelDataWord pixeld) # ifdef EA_FORMAT { return pixeld->fBits.fTrigger; } # else { return pixeld->fBits.fExtTrigger; } # endif // EA_FORMAT #else # ifdef EA_FORMAT # define PixelDataGetTrigger(_pixeld) (int)(_pixeld)->fBits.fTrigger # else # define PixelDataGetTrigger(_pixeld) (int)(_pixeld)->fBits.fExtTrigger # endif // EA_FORMAT #endif // _MIEVENT_USE_MACROS_ #ifdef EA_FORMAT # define PixelDataSetTrigger(_pixeld,_t) (_pixeld)->fBits.fTrigger = (_t) #else # define PixelDataSetTrigger(_pixeld,_t) (_pixeld)->fBits.fExtTrigger = (_t) #endif // EA_FORMAT #endif // _MiPixelData_hh_