ROOT logo
#ifndef __TMrbSubevent_DGF_3_h__
#define __TMrbSubevent_DGF_3_h__

//_________________________________________________[C++ CLASS DEFINITION FILE]
//////////////////////////////////////////////////////////////////////////////
// Name:           expconf/inc/TMrbSubevent_DGF_3.h
// Purpose:        Define experimental configuration for MARaBOU
// Class:          TMrbSubevent_DGF_3   -- MBS subevent type [10,23]
//                                         dedicated format for XIA DGF-4C modules
// Description:    Class definitions to implement a configuration front-end for MARaBOU
// Author:         R. Lutter
// Revision:       $Id: TMrbSubevent_DGF_3.h,v 1.6 2006-02-14 15:57:09 Marabou 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 "TMrbSubevent.h"
#include "TMrbTemplate.h"

//______________________________________________________[C++ CLASS DEFINITION]
//////////////////////////////////////////////////////////////////////////////
// Name:           TMrbSubevent_DGF_3
// Purpose:        Define MBS subevents of type [10,23]
// Methods:        MakeReadoutCode  -- output readout code for subevent [10,23]
// Description:    Defines a MBS subevent of type [10,23] - a special format
//                 reflecting DGF's data structure.
//                 Generates code.
// Keywords:
//////////////////////////////////////////////////////////////////////////////

class TMrbSubevent_DGF_3 : public TMrbSubevent {

	public:

		TMrbSubevent_DGF_3() {}; 				// default ctor
		TMrbSubevent_DGF_3(const Char_t * SevtName, const Char_t * SevtTitle = "", Int_t Crate = -1);	// create a new DGF subevent
		~TMrbSubevent_DGF_3() {};	 			// remove current subevent from list

		Bool_t MakeReadoutCode(ofstream & RdoStrm, TMrbConfig::EMrbReadoutTag TagIndex, 		// generate part of code for this subevent
											TMrbTemplate & Template, const Char_t * Prefix = NULL);

		Bool_t MakeRcFile(ofstream & RcStrm, TMrbConfig::EMrbRcFileTag TagIndex, const Char_t * ResourceName);

		inline Bool_t HasFixedLengthFormat() const { return(kFALSE); };				// variable length data
		inline Bool_t AllowsMultipleModules() const { return(kTRUE); };				// can store multiple modules

		inline Bool_t CheckModuleID(TMrbModule * Module) const {						// needs modules of type XIA DGF-4C
			return(Module->CheckID(TMrbConfig::kModuleXia_DGF_4C));
		};

		inline void SetClusterID(Int_t Number, Int_t Serial, const Char_t * Color) {
			fClusterNumber = Number;
			fClusterID.Set(Serial, Color);
		};
		inline Int_t GetClusterNumber() const { return(fClusterNumber); };
		inline Int_t GetClusterSerial() const { return(fClusterID.GetIndex()); }; 		// use TMrbNamedX object:
		inline const Char_t * GetClusterColor() const { return(fClusterID.GetName()); };	// index <- serial, name <- color

		inline Bool_t NeedsHitBuffer() const { return(kTRUE); };  					// allocate hit buffer
		inline Bool_t HasPrivateCode() const { return(kTRUE); }; 						// use private code files
		inline Bool_t NeedsBranchMode() const { return(kTRUE); }; 					// needs branch mode
		virtual const Char_t * GetCommonCodeFile(); 									// common code to be loaded

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

	protected:
		Int_t fClusterNumber;			// cluster number
		TMrbNamedX fClusterID;			// cluster serial & color

	ClassDef(TMrbSubevent_DGF_3, 1) 	// [Config] Subevent type [10,23]: a format dedicated to XIA DGF-4C modules
};

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