ADC 400F Handbuch Seite 65

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 74
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 64
Chapter 5. Complete program listings.
param++;
}
return kfTRUE; // kfFALSE would abort pipeline.
}
// CAddFirst2 - Sample unpacker which adds a pair of unpacked parameters
// together to get a new parameter.
class CAddFirst2 : public CEventProcessor
{
public:
virtual Bool_t operator()(const Address_t pEvent,
CEvent& rEvent,
CAnalyzer& rAnalyzer,
CBufferDecoder& rDecoder);
};
Bool_t
CAddFirst2::operator()(const Address_t pEvent,
CEvent& rEvent,
CAnalyzer& rAnalyzer,
CBufferDecoder& rDecoder)
{
event.sum = event.raw[0]*vars.w1 + event.raw[1]*vars.w2;
return kfTRUE;
}
// Instantiate the unpackers we’ll use.
static CFixedEventUnpacker Stage1;
static CAddFirst2 Stage2;
// CFortranUnpacker:
// This sample unpacker is a bridge between the C++ SpecTcl
// and a FORTRAN unpacking/analysis package.
// The raw event is passed as a parameter to the FORTRAN function
// f77unpacker. This function has the signature:
// LOGICAL F77UNPACKER(EVENT)
// INTEGER*2 EVENT(*)
//
// As with all event processors, this function is supposed to
// return .TRUE. if processing continues or .FALSE. to abort event processing.
// Unpacked events are returned to SpecTcl via a Common block declared
// as follows:
// ! generated by the unpacker:
// COMMON/F77PARAMS/NOFFSET, NUSED, PARAMETERS(F77NPARAMS),
// 1 FPARAMETERS(F77NPARAMS)
// INTEGER*4 PARAMETERS
// LOGICAL FPARAMETERS
60
Seitenansicht 64
1 2 ... 60 61 62 63 64 65 66 67 68 69 70 ... 73 74

Kommentare zu diesen Handbüchern

Keine Kommentare