From: <ka...@us...> - 2003-07-28 17:25:18
|
Update of /cvsroot/nsclspectcl/SpecTcl/Events In directory sc8-pr-cvs1:/tmp/cvs-serv17034 Modified Files: Analyzer.cpp Analyzer.h Log Message: Continuing updates for event filtering. Index: Analyzer.cpp =================================================================== RCS file: /cvsroot/nsclspectcl/SpecTcl/Events/Analyzer.cpp,v retrieving revision 4.3 retrieving revision 4.4 diff -C2 -d -r4.3 -r4.4 *** Analyzer.cpp 25 Jul 2003 01:43:36 -0000 4.3 --- Analyzer.cpp 28 Jul 2003 17:25:15 -0000 4.4 *************** *** 519,526 **** // For event filtering: ! Address_t pData = m_pDecoder->getBody(); ! CFilterEventProcessor* pFilterEventProcessor = new CFilterEventProcessor; ! if(pFilterEventProcessor->operator()(pData, (*this), rDecoder)) { ! vector<CEvent*> Events = *(pFilterEventProcessor->getEvents()); for(vector<CEvent*>::iterator ipEvent = Events.begin(); ipEvent != Events.end(); ipEvent++) { m_EventList.assign_back(*ipEvent); --- 519,529 ---- // For event filtering: ! Address_t pData = rDecoder.getBody(); ! // Make sure that a filter event processor exists, but don't make one unnecessarily. ! if(m_pFilterEventProcessor == (CFilterEventProcessor*)kpNULL) { ! m_pFilterEventProcessor = new CFilterEventProcessor; ! } ! if(m_pFilterEventProcessor->operator()(pData, (*this), rDecoder)) { ! vector<CEvent*> Events = *(m_pFilterEventProcessor->getEvents()); for(vector<CEvent*>::iterator ipEvent = Events.begin(); ipEvent != Events.end(); ipEvent++) { m_EventList.assign_back(*ipEvent); Index: Analyzer.h =================================================================== RCS file: /cvsroot/nsclspectcl/SpecTcl/Events/Analyzer.h,v retrieving revision 4.3 retrieving revision 4.4 diff -C2 -d -r4.3 -r4.4 *** Analyzer.h 18 Jul 2003 15:06:43 -0000 4.3 --- Analyzer.h 28 Jul 2003 17:25:15 -0000 4.4 *************** *** 323,326 **** --- 323,334 ---- #endif + #ifndef __FILTEREVENTPROCESSOR_H + #include <FilterEventProcessor.h> + #define __FILTEREVENTPROCESSOR_H + #endif + + // Forward class declaration: + class CFilterEventProcessor; + class CAnalyzer { // Attributes: *************** *** 332,335 **** --- 340,346 ---- CEventSink* m_pSink; Bool_t m_fAbort; + + CFilterEventProcessor* m_pFilterEventProcessor; // For event filtering. + public: static UInt_t m_nDefaultEventThreshold; *************** *** 338,342 **** // constructors destructors and other canonical member funtions. public: ! //Default constructor CAnalyzer() : m_nEventThreshold(CAnalyzer::m_nDefaultEventThreshold), --- 349,353 ---- // constructors destructors and other canonical member funtions. public: ! // Default constructor CAnalyzer() : m_nEventThreshold(CAnalyzer::m_nDefaultEventThreshold), *************** *** 345,354 **** m_EventPool(), m_pDecoder(0), ! m_pSink(0) {}; virtual ~CAnalyzer(); //Destructor ! //Constructor with arguments CAnalyzer(UInt_t am_nParametersInEvent, UInt_t nThreshold = CAnalyzer::m_nDefaultEventThreshold) : --- 356,366 ---- m_EventPool(), m_pDecoder(0), ! m_pSink(0), ! m_pFilterEventProcessor((CFilterEventProcessor*)kpNULL) // For event filtering. {}; virtual ~CAnalyzer(); //Destructor ! // Constructor with arguments CAnalyzer(UInt_t am_nParametersInEvent, UInt_t nThreshold = CAnalyzer::m_nDefaultEventThreshold) : *************** *** 357,364 **** m_EventList(nThreshold), m_pDecoder(0), ! m_pSink(0) {}; ! //Copy constructor CAnalyzer(const CAnalyzer& aCAnalyzer) { m_nEventThreshold = aCAnalyzer.m_nEventThreshold; --- 369,377 ---- m_EventList(nThreshold), m_pDecoder(0), ! m_pSink(0), ! m_pFilterEventProcessor((CFilterEventProcessor*)kpNULL) // For event filtering. {}; ! // Copy constructor CAnalyzer(const CAnalyzer& aCAnalyzer) { m_nEventThreshold = aCAnalyzer.m_nEventThreshold; *************** *** 374,378 **** }; ! //Operator= Assignment Operator CAnalyzer& operator=(const CAnalyzer& aCAnalyzer) { if (this == &aCAnalyzer) return *this; --- 387,391 ---- }; ! // Operator= Assignment Operator CAnalyzer& operator=(const CAnalyzer& aCAnalyzer) { if (this == &aCAnalyzer) return *this; *************** *** 383,387 **** CopyEventPool(aCAnalyzer.m_EventPool); ! // The various attached objects must be detached before assigned: DetachAll(); m_pDecoder = aCAnalyzer.m_pDecoder; --- 396,400 ---- CopyEventPool(aCAnalyzer.m_EventPool); ! // The various attached objects must be detached before assigned: DetachAll(); m_pDecoder = aCAnalyzer.m_pDecoder; *************** *** 395,399 **** }; ! //Operator== Equality Operator int operator==(const CAnalyzer& aCAnalyzer) { return ( --- 408,412 ---- }; ! // Operator== Equality Operator int operator==(const CAnalyzer& aCAnalyzer) { return ( |