From: <ro...@us...> - 2008-05-29 11:04:10
|
Revision: 1862 http://nscldaq.svn.sourceforge.net/nscldaq/?rev=1862&view=rev Author: ron-fox Date: 2008-05-29 04:04:15 -0700 (Thu, 29 May 2008) Log Message: ----------- Event processor that just sets rEvent[0] = 1 so that we can count events. Added Paths: ----------- branches/STUKSpecTcl/CRateEventProcessor.cpp branches/STUKSpecTcl/CRateEventProcessor.h Added: branches/STUKSpecTcl/CRateEventProcessor.cpp =================================================================== --- branches/STUKSpecTcl/CRateEventProcessor.cpp (rev 0) +++ branches/STUKSpecTcl/CRateEventProcessor.cpp 2008-05-29 11:04:15 UTC (rev 1862) @@ -0,0 +1,36 @@ +/* + This software is Copyright by the Board of Trustees of Michigan + State University (c) Copyright 2005. + + You may use this software under the terms of the GNU public license + (GPL). The terms of this license are described at: + + http://www.gnu.org/licenses/gpl.txt + + Author: + Ron Fox + NSCL + Michigan State University + East Lansing, MI 48824-1321 +*/ + +#include <config.h> +#include "CRateEventProcessor.h" +#include <Event.h> + +/* These are all trivial methods: + */ + +CRateEventProcessor::CRateEventProcessor() {} +CRateEventProcessor::~CRateEventProcessor() {} + + +Bool_t +CRateEventProcessor:: operator()(const Address_t pEvent, + CEvent& rEvent, + CAnalyzer& rAnalyzer, + CBufferDecoder& rDecoder) +{ + rEvent[0] = 1; + return kfTRUE; +} Added: branches/STUKSpecTcl/CRateEventProcessor.h =================================================================== --- branches/STUKSpecTcl/CRateEventProcessor.h (rev 0) +++ branches/STUKSpecTcl/CRateEventProcessor.h 2008-05-29 11:04:15 UTC (rev 1862) @@ -0,0 +1,50 @@ +#ifndef __CRATEEVENTPROCESSOR_H +#define __CRATEEVENTPROCESSOR_H + +/* + This software is Copyright by the Board of Trustees of Michigan + State University (c) Copyright 2005. + + You may use this software under the terms of the GNU public license + (GPL). The terms of this license are described at: + + http://www.gnu.org/licenses/gpl.txt + + Author: + Ron Fox + NSCL + Michigan State University + East Lansing, MI 48824-1321 +*/ + + +#ifndef __EVENTPROCESSOR_H +#include <EventProcessor.h> +#endif + +#ifndef __TRANSLATORPOINTER_H +#include <TranslatorPointer.h> +#endif + + +/*! + This is a trivial event processor. ALl it does it + set rEvent[0] to 1. That allows a strip chart spectrum + of event rate vs. time to be created by making rEvent[0] the y + axis of the strip chart and a timestamp the x axis. +*/ +class CRateEventProcessor : public CEventProcessor +{ +public: + CRateEventProcessor(); + virtual ~CRateEventProcessor(); + + // Event processor interface implemented functions: + + virtual Bool_t operator()(const Address_t pEvent, + CEvent& rEvent, + CAnalyzer& rAnalyzer, + CBufferDecoder& rDecoder); +}; + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |