| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

RuleParser::PrescaleRule Class Reference

Example of a custom rule and factory that can do prescaling. More...

#include <PrescaleRule.h>

Inheritance diagram for RuleParser::PrescaleRule:

[legend]
Collaboration diagram for RuleParser::PrescaleRule:
[legend]
List of all members.

Public Member Functions

 PrescaleRule (std::string n, unsigned int interval)
virtual ~PrescaleRule ()
virtual bool select (const Queriable *)
virtual const std::string & name () const

Protected Attributes

std::string m_name
RulemA
RulemB

Private Attributes

unsigned int m_interval
unsigned int m_cycle

Detailed Description

Example of a custom rule and factory that can do prescaling.

Author:
Nathaniel Tagg (tagg@minos.phy.tufts.edu)

Definition at line 21 of file PrescaleRule.h.


Constructor & Destructor Documentation

RuleParser::PrescaleRule::PrescaleRule ( std::string  n,
unsigned int  interval 
) [inline]

Definition at line 24 of file PrescaleRule.h.

00025              : Rule(n), m_interval(interval), m_cycle(0) {};

virtual RuleParser::PrescaleRule::~PrescaleRule (  )  [inline, virtual]

Definition at line 26 of file PrescaleRule.h.

00026 {};


Member Function Documentation

virtual bool RuleParser::PrescaleRule::select ( const Queriable  )  [inline, virtual]

Implements RuleParser::Rule.

Definition at line 28 of file PrescaleRule.h.

00029      { 
00030        if( ( (m_cycle++)%m_interval ) ==0) return true;
00031        return false;
00032      };

virtual const std::string& RuleParser::Rule::name (  )  const [inline, virtual, inherited]

Definition at line 25 of file Rules.h.

00025 { return m_name; };


Member Data Documentation

unsigned int RuleParser::PrescaleRule::m_interval [private]

Definition at line 32 of file PrescaleRule.h.

unsigned int RuleParser::PrescaleRule::m_cycle [private]

Definition at line 36 of file PrescaleRule.h.

std::string RuleParser::Rule::m_name [protected, inherited]

Definition at line 30 of file Rules.h.

Rule* RuleParser::Rule::mA [protected, inherited]

Definition at line 32 of file Rules.h.

Rule* RuleParser::Rule::mB [protected, inherited]

Definition at line 33 of file Rules.h.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:09:15 2011 for RuleParser by doxygen 1.4.7