PAASS
Software suite to Acquire and Analyze Data from Pixie16
Filterer Class Reference

#include <filterer.hpp>

Inheritance diagram for Filterer:
Collaboration diagram for Filterer:

Public Member Functions

 Filterer (int mod=0, int chan=0)
 
 ~Filterer ()
 
bool Initialize (std::string prefix_="")
 
int GetMod ()
 
int GetChan ()
 
int GetDelay ()
 
void SetMod (int mod)
 
void SetChan (int chan)
 
void SetDelay (int delay)
 Set the number of seconds to wait between drawing of traces. More...
 
void SyntaxStr (const char *name_, std::string prefix_="")
 Return the syntax string for this program. More...
 
void ArgHelp (std::string prefix_="")
 Print a command line help dialogue for recognized command line arguments. More...
 
void CmdHelp (std::string prefix_="")
 Print an in-terminal help dialogue for recognized commands. More...
 
bool SetArgs (std::deque< std::string > &args_, std::string &filename_)
 Scan input arguments and set class variables. More...
 
void PrintStatus (std::string prefix_="")
 Print a status message. More...
 
bool CommandControl (std::string cmd_, const std::vector< std::string > &args_)
 
void StopAcquisition ()
 Scan has stopped data acquisition. More...
 
void StartAcquisition ()
 Scan has started data acquisition. More...
 
virtual void IdleTask ()
 Perform tasks when waiting for a spill. More...
 
- Public Member Functions inherited from Unpacker
 Unpacker ()
 Default constructor. More...
 
virtual ~Unpacker ()
 Destructor. More...
 
size_t GetMaxModule ()
 Return the maximum module read from the input file. More...
 
unsigned int GetNumRawEvents ()
 Return the number of raw events read from the file. More...
 
double GetEventWidth ()
 Return the width of the raw event window in pixie16 clock ticks. More...
 
double GetFirstTime ()
 Return the time of the first fired channel event. More...
 
double GetEventStartTime ()
 Get the start time of the current raw event. More...
 
double GetEventStopTime ()
 Get the stop time of the current raw event. More...
 
double GetRealStartTime ()
 Get the time of the first xia event in the raw event. More...
 
double GetRealStopTime ()
 Get the time of the last xia event in the raw event. More...
 
bool IsRunning ()
 Return true if the scan is running and false otherwise. More...
 
bool SetDebugMode (bool state_=true)
 Toggle debug mode on / off. More...
 
double SetEventWidth (double width_)
 Set the width of events in pixie16 clock ticks. More...
 
void InitializeDataMask (const std::string &firmware, const unsigned int &frequency)
 
ScanInterfaceSetInterface (ScanInterface *interface_)
 Set the address of the scan interface used for file operations. More...
 
bool ReadSpill (unsigned int *data, unsigned int nWords, bool is_verbose=true)
 
void Write ()
 
void Stop ()
 
void Run ()
 

Private Member Functions

void ResetGraph (unsigned int size_)
 
void Filter (float *trace_, const size_t &length_, float *filtered1, const unsigned int &risetime_, const unsigned int &flattop_)
 
void Plot (ChannelEvent *event_)
 Plot the current event. More...
 
void ProcessRawEvent ()
 Process all events in the event list. More...
 

Private Attributes

int mod_
 The module of the signal of interest. More...
 
int chan_
 The channel of the signal of interest. More...
 
bool acqRun_
 
bool singleCapture_
 
int threshLow_
 
int threshHigh_
 
unsigned int trig_rise
 
unsigned int trig_flat
 Set the fast filter length. Analogous to setting TRIGGER_RISETIME. More...
 
unsigned int energy_rise
 Set the fast filter gap. Analogous to setting TRIGGER_FLATTOP. More...
 
unsigned int energy_flat
 Set the slow filter risetime. Analogous to setting ENERGY_RISETIME. More...
 
float * fast_filter_y
 Set the slow filter gap. Analogous to setting ENERGY_FLATTOP. More...
 
float * slow_filter_y
 
bool need_graph_update
 
int delay_
 Set to true if the graph range needs updated. More...
 
std::vector< int > x_vals
 The number of seconds to wait between drawing traces. More...
 
bool resetGraph_
 
time_t last_trace
 The time of the last trace. More...
 
unsigned int num_traces
 The total number of traces. More...
 
unsigned int num_displayed
 The number of displayed traces. More...
 
TApplication * rootapp
 Root application pointer. More...
 
TCanvas * canvas
 The main plotting canvas. More...
 
TGraph * graph
 The TGraph for plotting traces. More...
 
TGraph * f_fast
 The TGraph for plotting the fast filter. More...
 
TGraph * f_slow
 The TGraph for plotting the slow filter. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Unpacker
virtual void ProcessRawEvent (ScanInterface *addr_=NULL)
 Pointer to an object derived from ScanInterface. More...
 
virtual void RawStats (XiaData *event_, ScanInterface *addr_=NULL)
 
int ReadBuffer (unsigned int *buf)
 
- Protected Attributes inherited from Unpacker
XiaListModeDataMask mask_
 
double eventWidth
 
bool debug_mode
 The width of the raw event in pixie clock ticks (8 ns). More...
 
bool running
 True if debug mode is set. More...
 
std::vector< std::deque< XiaData * > > eventList
 True if the scan is running. More...
 
std::deque< XiaData * > rawEvent
 The list of all events in a spill. More...
 
ScanInterfaceinterface
 The list of all events in the event window. More...
 

Detailed Description

Definition at line 15 of file filterer.hpp.

Constructor & Destructor Documentation

§ Filterer()

Filterer::Filterer ( int  mod = 0,
int  chan = 0 
)

Definition at line 46 of file filterer.cpp.

Here is the caller graph for this function:

§ ~Filterer()

Filterer::~Filterer ( )

Definition at line 80 of file filterer.cpp.

Member Function Documentation

§ ArgHelp()

void Filterer::ArgHelp ( std::string  prefix_ = "")

Print a command line help dialogue for recognized command line arguments.

Parameters
[in]prefix_

Definition at line 240 of file filterer.cpp.

Here is the caller graph for this function:

§ CmdHelp()

void Filterer::CmdHelp ( std::string  prefix_ = "")

Print an in-terminal help dialogue for recognized commands.

Parameters
[in]prefix_

Definition at line 249 of file filterer.cpp.

Here is the caller graph for this function:

§ CommandControl()

bool Filterer::CommandControl ( std::string  cmd_,
const std::vector< std::string > &  args_ 
)

Search for an input command and perform the desired action.

Returns
True if the command is valid and false otherwise.

Definition at line 293 of file filterer.cpp.

Here is the caller graph for this function:

§ Filter()

void Filterer::Filter ( float *  trace_,
const size_t &  length_,
float *  filtered1,
const unsigned int &  risetime_,
const unsigned int &  flattop_ 
)
private

Definition at line 22 of file filterer.cpp.

Here is the caller graph for this function:

§ GetChan()

int Filterer::GetChan ( )
inline

Definition at line 73 of file filterer.hpp.

§ GetDelay()

int Filterer::GetDelay ( )
inline

Definition at line 75 of file filterer.hpp.

§ GetMod()

int Filterer::GetMod ( )
inline

Definition at line 71 of file filterer.hpp.

§ IdleTask()

void Filterer::IdleTask ( void  )
virtual

Perform tasks when waiting for a spill.

Definition at line 395 of file filterer.cpp.

Here is the caller graph for this function:

§ Initialize()

bool Filterer::Initialize ( std::string  prefix_ = "")

Definition at line 228 of file filterer.cpp.

§ Plot()

void Filterer::Plot ( ChannelEvent event_)
private

Plot the current event.

The limits of the vertical axis

Definition at line 114 of file filterer.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ PrintStatus()

void Filterer::PrintStatus ( std::string  prefix_ = "")
inline

Print a status message.

Definition at line 97 of file filterer.hpp.

Here is the call graph for this function:

§ ProcessRawEvent()

void Filterer::ProcessRawEvent ( )
private

Process all events in the event list.

Definition at line 165 of file filterer.cpp.

Here is the call graph for this function:

§ ResetGraph()

void Filterer::ResetGraph ( unsigned int  size_)
private

Definition at line 91 of file filterer.cpp.

Here is the caller graph for this function:

§ SetArgs()

bool Filterer::SetArgs ( std::deque< std::string > &  args_,
std::string &  filename_ 
)

Scan input arguments and set class variables.

Parameters
args_
filename_

Definition at line 265 of file filterer.cpp.

Here is the caller graph for this function:

§ SetChan()

void Filterer::SetChan ( int  chan)
inline

Definition at line 79 of file filterer.hpp.

§ SetDelay()

void Filterer::SetDelay ( int  delay)
inline

Set the number of seconds to wait between drawing of traces.

Definition at line 82 of file filterer.hpp.

§ SetMod()

void Filterer::SetMod ( int  mod)
inline

Definition at line 77 of file filterer.hpp.

§ StartAcquisition()

void Filterer::StartAcquisition ( )

Scan has started data acquisition.

Definition at line 391 of file filterer.cpp.

Here is the caller graph for this function:

§ StopAcquisition()

void Filterer::StopAcquisition ( )

Scan has stopped data acquisition.

Definition at line 386 of file filterer.cpp.

Here is the caller graph for this function:

§ SyntaxStr()

void Filterer::SyntaxStr ( const char *  name_,
std::string  prefix_ = "" 
)
inline

Return the syntax string for this program.

Definition at line 85 of file filterer.hpp.

Here is the call graph for this function:

Field Documentation

§ acqRun_

bool Filterer::acqRun_
private

Definition at line 19 of file filterer.hpp.

§ canvas

TCanvas* Filterer::canvas
private

The main plotting canvas.

Definition at line 48 of file filterer.hpp.

§ chan_

int Filterer::chan_
private

The channel of the signal of interest.

Definition at line 18 of file filterer.hpp.

§ delay_

int Filterer::delay_
private

Set to true if the graph range needs updated.

Definition at line 34 of file filterer.hpp.

§ energy_flat

unsigned int Filterer::energy_flat
private

Set the slow filter risetime. Analogous to setting ENERGY_RISETIME.

Definition at line 27 of file filterer.hpp.

§ energy_rise

unsigned int Filterer::energy_rise
private

Set the fast filter gap. Analogous to setting TRIGGER_FLATTOP.

Definition at line 26 of file filterer.hpp.

§ f_fast

TGraph* Filterer::f_fast
private

The TGraph for plotting the fast filter.

Definition at line 51 of file filterer.hpp.

§ f_slow

TGraph* Filterer::f_slow
private

The TGraph for plotting the slow filter.

Definition at line 52 of file filterer.hpp.

§ fast_filter_y

float* Filterer::fast_filter_y
private

Set the slow filter gap. Analogous to setting ENERGY_FLATTOP.

Definition at line 29 of file filterer.hpp.

§ graph

TGraph* Filterer::graph
private

The TGraph for plotting traces.

Definition at line 50 of file filterer.hpp.

§ last_trace

time_t Filterer::last_trace
private

The time of the last trace.

Definition at line 40 of file filterer.hpp.

§ mod_

int Filterer::mod_
private

The module of the signal of interest.

Definition at line 17 of file filterer.hpp.

§ need_graph_update

bool Filterer::need_graph_update
private

Definition at line 32 of file filterer.hpp.

§ num_displayed

unsigned int Filterer::num_displayed
private

The number of displayed traces.

Definition at line 44 of file filterer.hpp.

§ num_traces

unsigned int Filterer::num_traces
private

The total number of traces.

Definition at line 42 of file filterer.hpp.

§ resetGraph_

bool Filterer::resetGraph_
private

Definition at line 38 of file filterer.hpp.

§ rootapp

TApplication* Filterer::rootapp
private

Root application pointer.

Definition at line 46 of file filterer.hpp.

§ singleCapture_

bool Filterer::singleCapture_
private

Definition at line 20 of file filterer.hpp.

§ slow_filter_y

float* Filterer::slow_filter_y
private

Definition at line 30 of file filterer.hpp.

§ threshHigh_

int Filterer::threshHigh_
private

Definition at line 22 of file filterer.hpp.

§ threshLow_

int Filterer::threshLow_
private

Definition at line 21 of file filterer.hpp.

§ trig_flat

unsigned int Filterer::trig_flat
private

Set the fast filter length. Analogous to setting TRIGGER_RISETIME.

Definition at line 25 of file filterer.hpp.

§ trig_rise

unsigned int Filterer::trig_rise
private

Definition at line 24 of file filterer.hpp.

§ x_vals

std::vector<int> Filterer::x_vals
private

The number of seconds to wait between drawing traces.

Definition at line 36 of file filterer.hpp.


The documentation for this class was generated from the following files: