ROOT logo
#ifndef __TMrbSis_3820_h__
#define __TMrbSis_3820_h__

//_________________________________________________[C++ CLASS DEFINITION FILE]
//////////////////////////////////////////////////////////////////////////////
// Name:           expconf/inc/TMrbSis_3820.h
// Purpose:        Define experimental configuration for MARaBOU
// Class:          TMrbSis_3820        -- 32 chn 32 bit VME scaler
// Description:    Class definitions to implement a configuration front-end for MARaBOU
// Author:         R. Lutter
// Revision:       $Id: TMrbSis_3820.h,v 1.13 2010-06-11 08:34:42 Rudolf.Lutter Exp $
// Date:
// Keywords:
//////////////////////////////////////////////////////////////////////////////

namespace std {} using namespace std;

#include <cstdlib>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <fstream>

#include "Rtypes.h"
#include "TSystem.h"
#include "TObject.h"

#include "TMrbVMEScaler.h"

class TMrbVMEChannel;

//______________________________________________________[C++ CLASS DEFINITION]
//////////////////////////////////////////////////////////////////////////////
// Name:           TMrbSis_3820
// Purpose:        Define a VME scaler type SIS 3820
// Description:    Defines a VME scaler SIS 3820 (list mode)
// Keywords:
//////////////////////////////////////////////////////////////////////////////

class TMrbSis_3820 : public TMrbVMEScaler {

	public:
		enum				{	kSegSize		=	0x800000	};
		enum				{	kAddrMod		=	0x09		};

		enum EMrbOffsets	{	kOffsControlStatus	=	0x0
							};

		enum EMrbRegisters	{	kRegControlStatus,
							};

	public:

		TMrbSis_3820() {};  												// default ctor
		TMrbSis_3820(const Char_t * ModuleName, UInt_t BaseAddr, Int_t FifoDepth = 1); 	// define a new scaler
		~TMrbSis_3820() {};												// default dtor

		Bool_t MakeReadoutCode(ofstream & RdoStrm, TMrbConfig::EMrbModuleTag TagIndex);  	// generate part of code
		Bool_t MakeReadoutCode(ofstream & RdoStrm, TMrbConfig::EMrbModuleTag TagIndex, TMrbVMEChannel * Channel, Int_t Value = 0);  	// generate code for given channel

		virtual inline const Char_t * GetMnemonic() const { return("sis_3820"); }; 	// module mnemonic

		inline void SetFifoDepth(Int_t FifoDepth) { fFifoDepth = FifoDepth; };
		inline Int_t GetFifoDepth() const { return(fFifoDepth); };

		inline void SetNonClearingMode(Bool_t Flag = kTRUE) { fNonClearingMode = Flag; };
		inline Bool_t NonClearingMode() { return(fNonClearingMode); };

		inline void ClearAfterRead(Bool_t Flag = kTRUE) { fClearAfterRead = Flag; };
		inline Bool_t ToBeClearedAfterRead() { return(fClearAfterRead); };

		inline void SetDataFormat24(Bool_t Flag = kTRUE) { fDataFormat24 = Flag; };
		inline Bool_t DataFormat24() { return(fDataFormat24); };

		inline void EnableRefPulser(Bool_t Flag = kTRUE) { fEnableRefPulser = Flag; };
		inline Bool_t RefPulserIsOn() { return(fEnableRefPulser); };

		inline void SelectLNEChannel(Int_t Channel) { fLNEChannel = Channel; };
		inline Int_t GetLNEChannel() { return(fLNEChannel); };

		inline void SetExtension48(Bool_t Flag = kTRUE) { fExtension48 = Flag; };
		inline Bool_t Extension48() { return(fExtension48); };

		inline void XferOverflows(Bool_t Flag = kTRUE) { fXferOverflows = Flag; };
		inline Bool_t OverflowsToBeXferred() { return(fXferOverflows); };

		inline void Help() { gSystem->Exec(Form("mrbHelp %s", this->ClassName())); };

	protected:
		void DefineRegisters(); 							// define vme registers

	protected:
		Int_t fFifoDepth;			// fifo depth per channel
		Int_t fLNEChannel;			// channel to act as LNE source
		Bool_t fNonClearingMode;	// kTRUE if non-clearing mode
		Bool_t fClearAfterRead;		// kTRUE if to be cleared even if non-clearing mode
		Bool_t fDataFormat24;		// kTRUE data format 24 bit + channel + user
		Bool_t fEnableRefPulser;	// kTRUE if reference pulser is to be used in ch0
		Bool_t fExtension48;		// kTRUE if chn0 & chn16 extended to 48 bits (data will be stored in chn#31)
		Bool_t fXferOverflows;		// kTRUE if overflows should be included into data (data will be stored in ch#30)
	ClassDef(TMrbSis_3820, 1)		// [Config] SIS 3820, 32 x 32 bit VME scaler
};

#endif
 TMrbSis_3820.h:1
 TMrbSis_3820.h:2
 TMrbSis_3820.h:3
 TMrbSis_3820.h:4
 TMrbSis_3820.h:5
 TMrbSis_3820.h:6
 TMrbSis_3820.h:7
 TMrbSis_3820.h:8
 TMrbSis_3820.h:9
 TMrbSis_3820.h:10
 TMrbSis_3820.h:11
 TMrbSis_3820.h:12
 TMrbSis_3820.h:13
 TMrbSis_3820.h:14
 TMrbSis_3820.h:15
 TMrbSis_3820.h:16
 TMrbSis_3820.h:17
 TMrbSis_3820.h:18
 TMrbSis_3820.h:19
 TMrbSis_3820.h:20
 TMrbSis_3820.h:21
 TMrbSis_3820.h:22
 TMrbSis_3820.h:23
 TMrbSis_3820.h:24
 TMrbSis_3820.h:25
 TMrbSis_3820.h:26
 TMrbSis_3820.h:27
 TMrbSis_3820.h:28
 TMrbSis_3820.h:29
 TMrbSis_3820.h:30
 TMrbSis_3820.h:31
 TMrbSis_3820.h:32
 TMrbSis_3820.h:33
 TMrbSis_3820.h:34
 TMrbSis_3820.h:35
 TMrbSis_3820.h:36
 TMrbSis_3820.h:37
 TMrbSis_3820.h:38
 TMrbSis_3820.h:39
 TMrbSis_3820.h:40
 TMrbSis_3820.h:41
 TMrbSis_3820.h:42
 TMrbSis_3820.h:43
 TMrbSis_3820.h:44
 TMrbSis_3820.h:45
 TMrbSis_3820.h:46
 TMrbSis_3820.h:47
 TMrbSis_3820.h:48
 TMrbSis_3820.h:49
 TMrbSis_3820.h:50
 TMrbSis_3820.h:51
 TMrbSis_3820.h:52
 TMrbSis_3820.h:53
 TMrbSis_3820.h:54
 TMrbSis_3820.h:55
 TMrbSis_3820.h:56
 TMrbSis_3820.h:57
 TMrbSis_3820.h:58
 TMrbSis_3820.h:59
 TMrbSis_3820.h:60
 TMrbSis_3820.h:61
 TMrbSis_3820.h:62
 TMrbSis_3820.h:63
 TMrbSis_3820.h:64
 TMrbSis_3820.h:65
 TMrbSis_3820.h:66
 TMrbSis_3820.h:67
 TMrbSis_3820.h:68
 TMrbSis_3820.h:69
 TMrbSis_3820.h:70
 TMrbSis_3820.h:71
 TMrbSis_3820.h:72
 TMrbSis_3820.h:73
 TMrbSis_3820.h:74
 TMrbSis_3820.h:75
 TMrbSis_3820.h:76
 TMrbSis_3820.h:77
 TMrbSis_3820.h:78
 TMrbSis_3820.h:79
 TMrbSis_3820.h:80
 TMrbSis_3820.h:81
 TMrbSis_3820.h:82
 TMrbSis_3820.h:83
 TMrbSis_3820.h:84
 TMrbSis_3820.h:85
 TMrbSis_3820.h:86
 TMrbSis_3820.h:87
 TMrbSis_3820.h:88
 TMrbSis_3820.h:89
 TMrbSis_3820.h:90
 TMrbSis_3820.h:91
 TMrbSis_3820.h:92
 TMrbSis_3820.h:93
 TMrbSis_3820.h:94
 TMrbSis_3820.h:95
 TMrbSis_3820.h:96
 TMrbSis_3820.h:97
 TMrbSis_3820.h:98
 TMrbSis_3820.h:99
 TMrbSis_3820.h:100
 TMrbSis_3820.h:101
 TMrbSis_3820.h:102
 TMrbSis_3820.h:103
 TMrbSis_3820.h:104