//////////////////////////////////// // KRATTA Array Event Unpacker // for the Asy-Eos experiment // TKRATMapping DECLARATION // March 2012 // revison 3/2012 // E.d.F ver 1.0 // sebastian.kupny@uj.edu.pl // Based on TLANDEvent 09/11/2011 //////////////////////////////////// #ifndef TKRATTA_MAPPING_H #define TKRATTA_MAPPING_H #include "TKRAT_global.h" //#include "TKRATPhotodiode.h" // %%%%%%%%%%%%%%%%%%%%%%%%%%% TKRATMapping %%%%%%%%%%%%%%%%%%%%%%%%%% /// Class TKrakMapping allow to read mapping configuration from file and get identificators for each modules and channels. class TKRATMapping : public TObject { /// Array contain mapping relation. For one pulse source: [ [[module],[channel],[filed not used]] : [[Row],[Column],[Photodiode]]] Int_t mappingArray[200][2][3]; /// Count of mapped elements. If is equal 0 that means, mapping wasn't done or was failed Int_t nMappedElements ; /// File name with mapping. char fFileName[200]; /// True if is arleady defined; Bool_t fIsMappingDefined; Int_t Init_GetMappingFromFile( void ); public: TKRATMapping(); ~TKRATMapping(); Int_t Init( const char * A_FileName); Int_t Init( const string A_FileName); void PrintMapping(); EnTRow GetPositionRow_Enum ( Int_t A_FadcModule, Int_t A_Channel ); EnTColumn GetPositionColumn_Enum ( Int_t A_FadcModule, Int_t A_Channel ); EnTPhotodiode GetPositionPhotodiode_Enum ( Int_t A_FadcModule, Int_t A_Channel ); Int_t GetPositionRow_Int ( Int_t A_FadcModule, Int_t A_Channel ); Int_t GetPositionColumn_Int ( Int_t A_FadcModule, Int_t A_Channel ); Int_t GetPositionPhotodiode_Int ( Int_t A_FadcModule, Int_t A_Channel ); Int_t GetNumberOfMappedOfElements(){ return nMappedElements; } Bool_t IsMappingDefined(){ return fIsMappingDefined; }; ClassDef( TKRATMapping, 1 ); }; #endif /// TKRATTA_MAPPING_H