ADC 400F Handbuch Seite 12

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 74
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 11
Chapter 2. Setting up the software
Tim Hoagland
11/3/04
*/
#ifndef __MYEVENTSEGMENT_H //
#define __MTEVENTSEGMENT_H
#ifdef HAVE_STD_NAMESPACE
using namespace std; //
#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 //
{
private:
CDocumentedPacket m_MyPacket; //
CAENcard* module; //
public:
MyEventSegment(short slot,unsigned short Id); //
// Defines packet info
~MyEventSegment(); //
virtual void Initialize(); //
// One time Module setup
virtual void Clear(); //
// Resets data buffer
virtual unsigned int MaxSize(); // (10)
virtual DAQWordBufferPtr& Read(DAQWordBufferPtr& rBuf); // (11)
// Reads data buffer
};
#endif
The header defines the class, its internal data and the services it exports to the readout framework. Refer
to the circled numbers in the listing above when reading the following explanation.
Ê Each header should protect itself against being included more than once per compilation unit. This
#ifndef directive and the subsequente #define do this. The first time the header is included,
7
Seitenansicht 11
1 2 ... 7 8 9 10 11 12 13 14 15 16 17 ... 73 74

Kommentare zu diesen Handbüchern

Keine Kommentare