CMS 3D CMS Logo

TkStateMachine Class Reference

Implement a state machine. More...

#include <CalibTracker/SiStripAPVAnalysis/interface/TkStateMachine.h>

List of all members.

Public Types

enum  StatusType { ready = 1, calibrating = 2, updating = 3, stuck = 4 }

Public Member Functions

bool alreadyCalibrated () const
bool isCalibrating () const
bool isReady () const
bool isStuck () const
bool isUpdating () const
void setCalibrating ()
void setReady ()
void setStatus (StatusType in)
void setStuck ()
void setUpdating ()
StatusType status () const
std::string statusName ()

Public Attributes

StatusType myStatus


Detailed Description

Implement a state machine.

Each of the ApvAnalysis component can be

Definition at line 12 of file TkStateMachine.h.


Member Enumeration Documentation

enum TkStateMachine::StatusType

Enumerator:
ready 
calibrating 
updating 
stuck 

Definition at line 15 of file TkStateMachine.h.

00015 {ready=1,calibrating=2,updating=3,stuck=4};


Member Function Documentation

bool TkStateMachine::alreadyCalibrated (  )  const [inline]

Definition at line 17 of file TkStateMachine.h.

References myStatus, ready, and updating.

00017 {return (myStatus == updating || myStatus == ready);}

bool TkStateMachine::isCalibrating (  )  const [inline]

Definition at line 30 of file TkStateMachine.h.

References calibrating, and myStatus.

Referenced by TT6NoiseCalculator::updateNoise(), SimpleNoiseCalculator::updateNoise(), SimplePedestalCalculator::updatePedestal(), TT6PedestalCalculator::updatePedestal(), SimplePedestalCalculator::updateStatus(), TT6NoiseCalculator::updateStatus(), TT6PedestalCalculator::updateStatus(), and SimpleNoiseCalculator::updateStatus().

00030 {return myStatus==calibrating;}

bool TkStateMachine::isReady (  )  const [inline]

Definition at line 27 of file TkStateMachine.h.

References myStatus, and ready.

00027 {return myStatus==ready;}

bool TkStateMachine::isStuck (  )  const [inline]

Definition at line 28 of file TkStateMachine.h.

References myStatus, and stuck.

00028 {return myStatus==stuck;}

bool TkStateMachine::isUpdating (  )  const [inline]

Definition at line 29 of file TkStateMachine.h.

References myStatus, and updating.

Referenced by ApvAnalysis::updateCalibration(), TT6NoiseCalculator::updateNoise(), SimpleNoiseCalculator::updateNoise(), SimplePedestalCalculator::updatePedestal(), and TT6PedestalCalculator::updatePedestal().

00029 {return myStatus==updating;}

void TkStateMachine::setCalibrating (  )  [inline]

Definition at line 22 of file TkStateMachine.h.

References calibrating, and myStatus.

Referenced by TT6NoiseCalculator::init(), TT6PedestalCalculator::init(), and SimplePedestalCalculator::init().

00022 {myStatus = calibrating;}

void TkStateMachine::setReady (  )  [inline]

Definition at line 20 of file TkStateMachine.h.

References myStatus, and ready.

00020 {myStatus = ready;}

void TkStateMachine::setStatus ( StatusType  in  )  [inline]

Definition at line 25 of file TkStateMachine.h.

References myStatus.

00025 {myStatus = in;}

void TkStateMachine::setStuck (  )  [inline]

Definition at line 23 of file TkStateMachine.h.

References myStatus, and stuck.

00023 {myStatus = stuck;}

void TkStateMachine::setUpdating (  )  [inline]

Definition at line 21 of file TkStateMachine.h.

References myStatus, and updating.

Referenced by TT6NTPedestalCalculator::TT6NTPedestalCalculator(), SimplePedestalCalculator::updateStatus(), TT6NoiseCalculator::updateStatus(), TT6PedestalCalculator::updateStatus(), and SimpleNoiseCalculator::updateStatus().

00021 {myStatus = updating;}

StatusType TkStateMachine::status (  )  const [inline]

Definition at line 18 of file TkStateMachine.h.

References myStatus.

00018 {return myStatus;}

std::string TkStateMachine::statusName (  )  [inline]

Definition at line 33 of file TkStateMachine.h.

References calibrating, myStatus, ready, stuck, and updating.

00033                          {
00034     if (myStatus == ready) return "Ready";
00035     if (myStatus == calibrating) return "Calibrating";
00036     if (myStatus == updating) return "Updating";
00037     if (myStatus == stuck) return "Stuck";
00038     return "Unknown Status";
00039   }


Member Data Documentation

StatusType TkStateMachine::myStatus

Definition at line 44 of file TkStateMachine.h.

Referenced by alreadyCalibrated(), isCalibrating(), isReady(), isStuck(), isUpdating(), setCalibrating(), setReady(), setStatus(), setStuck(), setUpdating(), status(), and statusName().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:33:39 2009 for CMSSW by  doxygen 1.5.4