ROOT logo
#ifndef __TMrbCaen_V556_h__
#define __TMrbCaen_V556_h__

//_________________________________________________[C++ CLASS DEFINITION FILE]
//////////////////////////////////////////////////////////////////////////////
// Name:           expconf/inc/TMrbCaen_V556.h
// Purpose:        Define experimental configuration for MARaBOU
// Class:          TMrbCaen_V556        -- 8 chn peak sensing ADC
// Description:    Class definitions to implement a configuration front-end for MARaBOU
// Author:         R. Lutter
// Revision:       $Id: TMrbCaen_V556.h,v 1.9 2009-10-07 08:49:31 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 "TMrbVMEModule.h"

class TMrbVMEChannel;

//______________________________________________________[C++ CLASS DEFINITION]
//////////////////////////////////////////////////////////////////////////////
// Name:           TMrbCaen_V556
// Purpose:        Define a VME adc type CAEN V556
// Description:    Defines a VME adc CAEN V556
// Keywords:
//////////////////////////////////////////////////////////////////////////////

class TMrbCaen_V556 : public TMrbVMEModule {

	public:
		enum				{	kSegSize		=	0x1000	};
		enum				{	kAddrMod		=	0x39	};

		enum EMrbOffsets	{	kOffsReset		=	0x1C,
								kOffsHF			=	0x1E,
								kOffsControl	=	0x1A,
								kOffsOutput		=	0x18,
								kOffsFF 		=	0x16,
								kOffsDelay		=	0x14,
								kOffsTHRH		=	0x12,
								kOffsTHRL		=	0x10,
								kOffsModuleType =	0xFC,
								kOffsVersion 	=	0xFE
							};

		enum EMrbRegisters	{	kRegLowerThresh,
								kRegUpperThresh,
								kRegControl,
								kRegDelay
							};

	public:

		TMrbCaen_V556() {};  												// default ctor
		TMrbCaen_V556(const Char_t * ModuleName, UInt_t BaseAddr); 				// define a new adc
		~TMrbCaen_V556() {};												// 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("caen_v556"); }; 	// module mnemonic

		inline void SetFFMode(Bool_t FFFlag = kTRUE) { fFFMode = FFFlag; };
		inline Bool_t IsFFMode() const { return(fFFMode); };

		inline Bool_t HasRandomReadout() const { return(kFALSE); };

		virtual inline Bool_t HasPrivateCode() const { return(kTRUE); }; 				// use private code files
		virtual inline const Char_t * GetPrivateCodeFile() const { return("Module_Caen_V556"); };

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

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

	protected:
		Bool_t fFFMode;

	ClassDef(TMrbCaen_V556, 1)		// [Config] CAEN V556, 8 x 4K peak sensing VME ADC
};

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