//////////////////////////////////// // KRATTA Array Event Unpacker // for the Asy-Eos experiment // TKRATTRawAEvent DECLARATION // March 2012 // revison 3/2012 // E.d.F ver 1.0 // sebastian.kupny@uj.edu.pl // Based on TLANDEvent 09/11/2011 // Changes: // 2012.06.24 TKRATRawEvent inherits now from TNamed not from TObject //////////////////////////////////// #ifndef TKRATTA_RAW_EVENT_H #define TKRATTA_RAW_EVENT_H #include "TKRAT_global.h" #include "TKRATPhotodiode.h" #include "TKRATMapping.h" // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TKRATRawEvent %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% class TKRATRawEvent : public TNamed ///public TObject { protected: ///Debug mode (level: 0 - no output (default), 1 - initialisation and finalisation, 2 - info for each event, 3 - info for each subevent, 3> all infos) Int_t fDebugModeLvl; /// fRawEventNo //Int_t fEventId; Int_t fMbsEventNo; /// fMbsRunNo Int_t fMbsRunNo; ///raw multiplicity Int_t fRawmulti; /// Pointer to object with contain mapping information ///TKRATMapping * fKrattaMapping; TClonesArray * fPhotodiodesArray; public: ///constructor TKRATRawEvent(); ///destructor ~TKRATRawEvent(); ///Function decode signal from subevent and save them to array firedPhotodiodeRawSignal_. ///Length of the signal is saved to array firedPhotodiodeSignalLength_ what allow you to see if the channel was fired. In this case ///signal length is higher than zero (should be 512 or 1024) ///Int_t ProcessCurrentEventMBS(Int_t * buffer, Int_t SubEventArrayLength, TKRATMapping *fKrattaMapping, Bool_t A_withPrintingSubeventHeader = kFALSE ); Int_t ProcessCurrentEventMBS( Int_t * buffer, Int_t SubEventArrayLengthLongWord, TKRATMapping & A_krattaMapping, Bool_t A_withPrintingSubeventHeader= kFALSE ); /// void LoadMapping( const TString ); Depricated??? ///Print into standard output mapping for KRATTA Array Detector /// void PrintMapping ( void ); Depricated??? TString ToString ( void ); TString ToStringPhotodiode( Int_t id ); TString ToStringPhotodiode( void ); void Clear( void ); /// /////////////////////////////////////////////////////////////////// /// //////////// Event Get-Information methods //////////////////////// /// /////////////////////////////////////////////////////////////////// /// void GetTimeStamp( Int_t *, Int_t *, Int_t *); /// Int_t GetEvent( Int_t * ); /// void GetTimeStamp( void ); Int_t GetKRATTAMultiplicity( void ){ return fRawmulti; }; TClonesArray * GetPhotodiodesClonesArrayPtr( void ){ return fPhotodiodesArray; }; Bool_t ContainSignalFromPh( Int_t PhotodiodeId ); Bool_t ContainSignalFromPh( Int_t Module, Int_t PhotodiodeInModule ); Bool_t ContainSignalFromPh( Int_t Column, Int_t Row, Int_t PhotodiodeInModule ); TKRATPhotodiode* GetPhotodiode( Int_t PhotodiodeId ); TKRATPhotodiode* GetPhotodiode( Int_t Module, Int_t PhotodiodeInModule ); TKRATPhotodiode* GetPhotodiode( Int_t Column, Int_t Row, Int_t PhotodiodeInModule ); Int_t GetSignalArraySize( Int_t PhotodiodeId ); Int_t GetSignalArraySize( Int_t Module, Int_t PhotodiodeInModule ); Int_t * GetSignalArray( Int_t PhotodiodeId ); Int_t * GetSignalArray( Int_t Module, Int_t PhotodiodeInModule ); ///Those functions calculate mapping betwen: ///module :=: row and column Int_t GetModuleNumber(Int_t row, Int_t col); Int_t GetColumnOfModule(Int_t module); Int_t GetRowOfModule(Int_t module); //void SetId( Int_t id ); // Int_t GetId( void ) // { // return fEventId; // }; void SetDebugMode( Int_t A_debugLevel = 1 ) { fDebugModeLvl = A_debugLevel; }; Int_t GetDebugMode( void ) { return fDebugModeLvl; }; /// Mbs No void SetMbsEventNo( Int_t A_MbsEventNo = 0 ) { fMbsEventNo = A_MbsEventNo; }; Int_t GetMbsEventNo( void ) { return fMbsEventNo; }; /// Run No void SetMbsRunNo( Int_t A_MbsRunNo = 0 ) { fMbsRunNo = A_MbsRunNo; }; Int_t GetMbsRunNo( void ) { return fMbsRunNo; }; ClassDef( TKRATRawEvent, 1 ); }; #endif /// TKRATTA_RAW_EVENT_H