Jpp  18.3.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
JTRIGGER::JPrescaler Class Reference

Auxiliary class for prescaling. More...

#include <JPrescaler.hh>

Inheritance diagram for JTRIGGER::JPrescaler:
TObject

Public Member Functions

 JPrescaler ()
 Default constructor. More...
 
 JPrescaler (const long long int value)
 Constructor. More...
 
virtual ~JPrescaler ()
 Virtual destructor. More...
 
bool equals (const JPrescaler &prescaler) const
 Equality. More...
 
bool operator() () const
 Test operator. More...
 
 operator bool () const
 Check status. More...
 
 ClassDef (JPrescaler, 2)
 

Public Attributes

long long int prescale
 
long long int counter
 

Detailed Description

Auxiliary class for prescaling.

Definition at line 23 of file JPrescaler.hh.

Constructor & Destructor Documentation

JTRIGGER::JPrescaler::JPrescaler ( )
inline

Default constructor.

Definition at line 30 of file JPrescaler.hh.

30  :
31  prescale(0),
32  counter (0)
33  {}
long long int prescale
Definition: JPrescaler.hh:96
long long int counter
Definition: JPrescaler.hh:97
JTRIGGER::JPrescaler::JPrescaler ( const long long int  value)
inline

Constructor.

Parameters
valueprescale value (0 is off)

Definition at line 41 of file JPrescaler.hh.

41  :
42  prescale(value),
43  counter (0)
44  {}
long long int prescale
Definition: JPrescaler.hh:96
long long int counter
Definition: JPrescaler.hh:97
virtual JTRIGGER::JPrescaler::~JPrescaler ( )
inlinevirtual

Virtual destructor.

Definition at line 50 of file JPrescaler.hh.

51  {}

Member Function Documentation

bool JTRIGGER::JPrescaler::equals ( const JPrescaler prescaler) const
inline

Equality.

Parameters
prescalerprescaler
Returns
true if equals; else false

Definition at line 60 of file JPrescaler.hh.

61  {
62  return prescale == prescaler.prescale;
63  }
long long int prescale
Definition: JPrescaler.hh:96
bool JTRIGGER::JPrescaler::operator() ( ) const
inline

Test operator.

This operator increments the internal counter and checks whether this counter complies with the prescale value.

Returns
true if this turn not prescaled; else false

Definition at line 74 of file JPrescaler.hh.

75  {
76  ++counter;
77 
78  return prescale != 0 && counter%prescale == 0;
79  }
long long int prescale
Definition: JPrescaler.hh:96
long long int counter
Definition: JPrescaler.hh:97
JTRIGGER::JPrescaler::operator bool ( ) const
inline

Check status.

Returns
true if this turn not prescaled; else false

Definition at line 87 of file JPrescaler.hh.

88  {
89  return prescale != 0 && counter%prescale == 0;
90  }
long long int prescale
Definition: JPrescaler.hh:96
long long int counter
Definition: JPrescaler.hh:97
JTRIGGER::JPrescaler::ClassDef ( JPrescaler  ,
 
)

Member Data Documentation

long long int JTRIGGER::JPrescaler::prescale

Definition at line 96 of file JPrescaler.hh.

long long int JTRIGGER::JPrescaler::counter
mutable

Definition at line 97 of file JPrescaler.hh.


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