#ifndef __TMrbCaen_V820_h__
#define __TMrbCaen_V820_h__
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;
class TMrbCaen_V820 : public TMrbVMEScaler {
public:
enum { kSegSize = 0x10000 };
enum { kAddrMod = 0x39 };
enum EMrbOffsets { kOffsCounter0 = 0x1000,
kOffsTestReg = 0x1080,
kOffsDwellTime = 0x1104,
kOffsControl = 0x1108,
kOffsControlBitSet = 0x111A,
kOffsControlBitClear = 0x110C,
kOffsStatus = 0x110E,
kOffsGeoAddr = 0x1110,
kOffsModuleReset = 0x1120,
kOffsSoftClear = 0x1122,
kOffsSoftTrigger = 0x1124,
kOffsDummy32 = 0x1200,
kOffsDummy16 = 0x1204,
kOffsFirmware = 0x1132
};
enum EMrbRegisters { kRegFirmWare,
kRegGeoAddr,
kRegBitSet,
kRegBitClear,
kRegStatus,
kRegControl,
kRegDummy32,
kRegDummy16
};
enum { kBitControlAcqMode = BIT(0),
kBitControlAutoRestart = BIT(7)
};
public:
TMrbCaen_V820() {};
TMrbCaen_V820(const Char_t * ModuleName, UInt_t BaseAddr);
~TMrbCaen_V820() {};
Bool_t MakeReadoutCode(ofstream & RdoStrm, TMrbConfig::EMrbModuleTag TagIndex);
Bool_t MakeReadoutCode(ofstream & RdoStrm, TMrbConfig::EMrbModuleTag TagIndex, TMrbModuleChannel * Channel, Int_t Value = 0);
virtual inline const Char_t * GetMnemonic() const { return("caen_V820"); };
inline void Help() { gSystem->Exec(Form("mrbHelp %s", this->ClassName())); };
protected:
void DefineRegisters();
protected:
Bool_t fFFMode;
Bool_t fCommonStart;
ClassDef(TMrbCaen_V820, 1)
};
#endif