/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Protected Attributes | Private Attributes
RuleParser::PrescaleRule Class Reference

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

#include <PrescaleRule.h>

Inheritance diagram for RuleParser::PrescaleRule:
Inheritance graph
[legend]
Collaboration diagram for RuleParser::PrescaleRule:
Collaboration graph
[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.

             : Rule(n), m_interval(interval), m_cycle(0) {};
virtual RuleParser::PrescaleRule::~PrescaleRule ( ) [inline, virtual]

Definition at line 26 of file PrescaleRule.h.

{};

Member Function Documentation

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

Implements RuleParser::Rule.

Definition at line 28 of file PrescaleRule.h.

     { 
       if( ( (m_cycle++)%m_interval ) ==0) return true;
       return false;
     };
virtual const std::string& RuleParser::Rule::name ( ) const [inline, virtual, inherited]

Definition at line 25 of file Rules.h.

{ 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 Fri May 16 2014 09:53:45 for RuleParser by doxygen 1.7.4