Using event filters described filters, how to create them, and manipulate them to produce filtered data sets. This chapter will describe how to analyze filtered data sets. The scope of this chapter is limited to analyzing XDR formatted filters in SpecTcl.
Filter data files are self-describing, but require a special buffer decoder and event processor to unpack them into parameters. This chapter desribes:
How to prepare your spectcl to analyze filtered event files.
The format of filtered event files.
The steps required to prepare SpecTcl to read filtered event files are:
Remove your event processors from the event analysis pipeline. When doing so, however, ensure that your parameter definitions still exist.
Add a CFilterEventProcessor
at the front of the event analysis pipeline.
Rebuild your SpecTcl.
Use the
to attach your SpecTcl to filtered event files.
In our sample code, our event processors created tree parameters.
We still need those parameters to provide slots for the filtered
event data to put the unpacked data. The simplest way
to do this is to instantiate our event processors but just
to not register them with the event analysis pipeline.
See the sample CreateAnalysisPipeline
below:
Example 8-1. Removing our event processors from the analysis pipeline
void CMySpecTclApp::CreateAnalysisPipeline(CAnalyzer& rAnalyzer) { CEventProcessor* simple = new SimpleEventProcessor;// Note calibration is static.
#ifdef ANALYZE_FILTERS
#else RegisterEventProcessor(*simple "Test"); RegsisterEventProcessor(calibration, "Calibrator"); #endif }
To add in the filter event processor we have to include its header and register an instance of it at the front of the event analysis pipeline:
Example 8-2. Registering the filter event processor
... #include "CmdCalibration.h" #include "SetCalibCommand.h" #include <FilterEventProcessor.h> ... #ifdef ANALYZE_FILTERS RegisterEventProcessor(*(new CFilterEventProcessor), "FilterUnpacker"); #else ...
Now to analyze filter files we just need to modify the Makefile definition of USERCXXFLAGS:
Example 8-3. Defining ANALYZE_FILTERS
... # If you have any switches you need to add to the default c++ compilation rules, # add them to the defintion below: USERCXXFLAGS=-DANALYZE_FILTERS ...
Doing a make clean SpecTcl will now build SpecTcl to analyze filters. commenting out that definition and again doing make clean SpecTcl will build a SpecTcl capable of reading raw event files again.