ADC 400F Handbuch Seite 61

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 74
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 60
Chapter 5. Complete program listings.
static const ULong_t CAEN_GEOMASK(0xf8000000);
static const ULong_t CAEN_GEOSHIFT(27);
static const ULong_t CAEN_COUNTMASK(0x3f00); // co:constants
static const ULong_t CAEN_COUNTSHIFT(8);
static const ULong_t CAEN_CHANNELMASK(0x3f0000);
static const ULong_t CAEN_CHANNELSHIFT(16);
static const ULong_t CAEN_DATAMASK(0xfff);
static inline ULong_t getLong(TranslatorPointer<UShort_t>& p) // co:getLong
{
ULong_t high = p[0];
ULong_t low = p[1];
return (high << 16) | low;
}
MyEventProcessor::MyEventProcessor(int ourId,
int ourSlot,
const char* baseParameterName) :
m_rawData(*(new CTreeParameterArray(string(baseParameterName),
4096, 0.0, 4095.0, string("channels"),
32, 0))), // co:epinitializers
m_nId(ourId),
m_nSlot(ourSlot)
{
}
MyEventProcessor::~MyEventProcessor()
{
delete &m_rawData; // co:epcleanup
}
Bool_t
MyEventProcessor::operator()(const Address_t pEvent,
CEvent& rEvent,
CAnalyzer& rAnalyzer,
CBufferDecoder& rDecoder)
{
TranslatorPointer<UShort_t> p(*(rDecoder.getBufferTranslator()),
pEvent);
UShort_t nWords = *p++; // co:epboilerplate
CTclAnalyzer& rAna((CTclAnalyzer&)rAnalyzer);
rAna.SetEventSize(nWords*sizeof(UShort_t));
nWords--; // Remaining words after word count.
while (nWords) {
UShort_t nPacketWords = *p; // co:packetHeader
UShort_t nId = p[1];
if (nId == m_nId) { // co:packetSearch
try { // co:tryCatch
56
Seitenansicht 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 73 74

Kommentare zu diesen Handbüchern

Keine Kommentare