Chapter 5. Complete program listings.
5.1. Readout Software
This section contains the files that make up the Readout software in their entirety. We include the
Makefiles and scripts as well as the C++ source code. This software is also available online at
http://docs.nscl.msu.edu/daq/samples/CAENV785/CAENV785.zip
Example 5-1. MyEventSegment.h
/*
This is the header file to define the MyEventSegment class, which
is derived from CEventSegment. This class can be used to read
out any number of CAEN modules covered by the CAENcard class.
Those cards include the V785, V775, and V792.
Tim Hoagland
11/3/04
*/
#ifndef __MYEVENTSEGMENT_H // co:protect
#define __MTEVENTSEGMENT_H
#ifdef HAVE_STD_NAMESPACE
using namespace std; // co:namespace
#endif
#include <spectrodaq.h>
#include <CEventSegment.h>
#include <CDocumentedPacket.h>
#include <CAENcard.h>
#define CAENTIMEOUT 50
// Declares a class derived from CEventSegment
class MyEventSegment : public CEventSegment // co:eventsegderived
{
private:
CDocumentedPacket m_MyPacket; // co:docpacket
CAENcard* module; // co:hardwareobject
public:
MyEventSegment(short slot,unsigned short Id); // co:mysegconstructor
// Defines packet info
~MyEventSegment(); // co:mysegdestructor
virtual void Initialize(); // co:myseginit
44
Kommentare zu diesen Handbüchern