class Par : public genNamedObj<Par*>, public Pu

Proxy for the PartitionModule in a DCM crate

Inheritance:


Public Methods

int configure( const char *cmd, const char *value, const char *aux_param )
Configure command
void dump( ostream &os = cout )
Dumps all relevant information about the object to ostream os
static void dump_all( ostream &os = cout )
Dumps all relevant information about the object to ostream os
void identify( ostream &os = cout )
Prints a short description of the object to ostream os
static void listAll( ostream &os = cout )
Dumps a short description to ostream os which is the result of the identify
Par( const char *name, const char *pud_name )
Creator with the name of the board and its type

Public

Accessors
void setSlot( int slot )
To set the VME slot number
void setServerName( const char *server_name )
To set the objmanager name
void setReadoutMode( const char *mode )
To set the readout mode
void setRoObject( const char *pRoName )
To relate the Par with a readout object
pstring getRoObject()
Returns the readout object
int addDcm( DCM *pDcm )
To add a DCM to the list of DCMs that are controlled by this PM
void setSeb( const char* pcSebName )
To relate the Par to an SEB
void setSebPort( int iPort )
To set the port number of an SEB
pstring getSeb()
Returns a pointer to the SEB (or NULL)
int getSebPort()
Returns the port number or -1 (if we send the data to the SEB over TCP/IP)
state transition functions - to be invoked by the PRST
int initialise()
Initialise function
int download()
Download function
int start_run()
Start_run function
int end_run()
End_run function
bool updatePu( int iStatus, int eState_on_success )
UpdatePu function

Private Fields

int iLastCmdSent
Last command that was sent
int iSebPort
Port of the SEB to which we send the data to in TCP/IP-SEB mode
int iSlot
Slot in the board
list <DCM*> listDcm
List of the DCMs that are to the left of this PAR in the DCM crate
pstring psReadoutMode
Readout mode
pstring psRoObject
Name of the readout object that is reading out this PAR
pstring psSeb
Name of the SEB to send the data to
pstring psServerName
Name of the daqobjmanager

Private Methods

int sendParEvent( int iEventId )
Sends the event to CORBA

Inherited from genNamedObj:

Public Methods

static void add( const char *name, X x )
inline static X begin()
inline static X end()
static bool exists( const char *name )
static X get( const char *name )
int getLocation()
inline static int getNbElements()
static X getObject( const char *name )
static int getObjects( const char *name, list<X> &theList )
inline const char* getObjName()
inline static X next()
static void remove( const char *name )

Private Fields

static map < const char*, X, cstring_ordering_t > ::iterator m_It
static map < const char*, X, cstring_ordering_t > m_Map
char* m_Name

Inherited from Pu:

Public

Accessors common to all PU

const char* getPudName()
Returns the name of the Process Unit Design
const char* getPrstName()
Return the name of the process stage, which controls this PU
Prst* getPrst()
Return a pointer to the process stage, which controls this PU
inline void enable()
To set the enable flag of the PU to true
inline void disable()
To set the disable flag of the PU to false
virtual bool isEnabled( const char* pccTransition = NULL )
To find out whether a process unit is enabled
void setSimulate( bool bValue )
To set the simulate mode
void setDebug( bool aBool )
To set the debug mode
bool getDebug()
Returns true if we are in debug mode

Architectural common member functions for all PU

Pu(const char *name, const char *pud_name )
constructor with the name and design as input
virtual ~Pu()
virtual destructor for handling dtor of subtypes
static mapPu_t mapPu
The PUs are organized in a global STL map
static bool exists( const char *name )
Returns true if a PU of this name exists
static mapPu_t::iterator locate( const char *name )
given the name of the PU return an STL map iterator to it
static Pu* get( char *name )
given the name return a pointer to the object itself
static int getPuByTag( const char* pcTag, list<Pu*> &theList )
To get a whole bunch of Pu that start with a given name
virtual void identify( ostream &os = cout )
To print out a one-line identifing message to the ostream os
virtual void dump( ostream &os = cout )
To print out a detailed summary of the Pu to ostream os
static void dump_all( ostream &os = cout )
To print out a detailed summary for all PU to ostream os
static void listAll( ostream &os = cout )
To print out a one-line summary for all PU to ostream os

Simple implementation of RTTI (see note above)

virtual Rdev* castToRdev()
virtual casts to Rdev
virtual Rout* castToRout()
virtual casts to Rout
virtual EvPool* castToEvPool()
virtual casts to EvPool
virtual Swpu* castToSwpu()
virtual casts to Swpu
virtual rcGTM* castToGTM()
virtual casts to GTM
virtual FEM* castToFEM()
virtual casts to FEM
virtual DCM* castToDCM()
virtual casts to DCM
virtual DDsocket* castToDDsocket()
virtual casts to DDsocket
virtual ROobject* castToROobject()
virtual casts to ROobject
virtual ddEventServer* castToddEventServer()
virtual casts to ddEventServer
virtual DataLogger* castToDataLogger()
virtual casts to DataLogger
virtual rcDataLogger* castToRcDataLogger()
virtual casts to rcDataLogger
virtual DummyDevice* castToDummyDevice()
virtual casts to Dummy device
virtual Par* castToPar()
virtual casts to Par
virtual EvbComponent* castToEvbComponent()
virtual casts to EvbComponent

State transitions

enum states
enum with the different possible states - these are common to all PU!!!
static const char* pcStates[]
the names of the state transitions as static const char*
int setState(int state )
Sets the state to the new state given by the enum int
int setState( const char *pcState )
Sets the state to the new state given by the name of the state
int getState()
Returns the state to the new state as enum int
const char* getcState()
Returns the state to the new state as a string
static int setStateAndUpdateStage( const char *pcPuGroup, const char *pcNewState )
Function that searches for a named PU (or group of PUs), sets its STT to the pcNewState and updates the ProcessStage at the same time

virtual functions for generic configuring, starting/updating/continuing a state transition

virtual int configure( const char* config_req, const char* value, const char *param = NULL )
To configure a PU
virtual int connect()
Connect is called once at initialisation time
virtual int initialise()
To initialise the PU
virtual int download()
To download the PU
virtual int start_run()
To start a new run
virtual int end_run()
To stop a run in progress
virtual bool updatePu( int iStatus, int eState_on_success )
Whenever a PU reports to the prst that is has done a state transition, the prst calls this virtual function
virtual bool checkReady( int iLevel )
Returns true if the process unit is in a ready state

Protected Fields

bool bDebug
bool bEnabled
bool bIgnoreErrorOnTransition[ eNStates ]
bool bSimulate
int eState
char* pcName
char* pcPud_name
const char* pcState

Protected Methods

int sendEventPuDone( int eState_on_success )
int updateStateAfterConfigReq( int eNewState = eInitialised )

Private Methods

int setIgnoreErrorOnTransition( const char* pcTransition, bool bValue )

Documentation

Proxy for the PartitionModule in a DCM crate. This board defines a collection of DCBs that are common read out. It defines a hardware boundary that the software must respect. Note that the DCMs can be read out in vme mode, which means that the partitioner module is not used at all. We solve this by assuming that we always have (at least) one partitioner in the DCM crate and the first thing to do is to call PAR_RESET, then deal with the DCMs and the last thing to do is to call PAR_ONLINE.

The basic state transition functions do nothing for this object. The PAR_RESET command is given by the readout object after the configuration files have been read in by the VxWorks task. The PAR_ONLINE is done after the last DCM has been initialised.

Last update: Feb 1, 2000, CW

Par( const char *name, const char *pud_name )
Creator with the name of the board and its type

Accessors

void setSlot( int slot )
To set the VME slot number

void setServerName( const char *server_name )
To set the objmanager name

void setReadoutMode( const char *mode )
To set the readout mode

void setRoObject( const char *pRoName )
To relate the Par with a readout object

pstring getRoObject()
Returns the readout object

int addDcm( DCM *pDcm )
To add a DCM to the list of DCMs that are controlled by this PM

void setSeb( const char* pcSebName )
To relate the Par to an SEB. If we send the data to the SEB

void setSebPort( int iPort )
To set the port number of an SEB. If we send the data to the SEB over TCP/IP

pstring getSeb()
Returns a pointer to the SEB (or NULL)

int getSebPort()
Returns the port number or -1 (if we send the data to the SEB over TCP/IP)

static void dump_all( ostream &os = cout )
Dumps all relevant information about the object to ostream os

static void listAll( ostream &os = cout )
Dumps a short description to ostream os which is the result of the identify

void identify( ostream &os = cout )
Prints a short description of the object to ostream os

void dump( ostream &os = cout )
Dumps all relevant information about the object to ostream os

state transition functions - to be invoked by the PRST

int initialise()
Initialise function. Does nothing. PAR_RESET is done by the roObject

int download()
Download function. Does nothing.

int start_run()
Start_run function. Does nothing.

int end_run()
End_run function. Does nothing.

bool updatePu( int iStatus, int eState_on_success )
UpdatePu function

int configure( const char *cmd, const char *value, const char *aux_param )
Configure command. Currently there are no configuration commands for the PAR.

int sendParEvent( int iEventId )
Sends the event to CORBA. iEventId = PAR_RESET, PAR_ONLINE.

int iLastCmdSent
Last command that was sent

pstring psServerName
Name of the daqobjmanager

pstring psReadoutMode
Readout mode. none, vme, token.

int iSlot
Slot in the board

list <DCM*> listDcm
List of the DCMs that are to the left of this PAR in the DCM crate

pstring psRoObject
Name of the readout object that is reading out this PAR

pstring psSeb
Name of the SEB to send the data to

int iSebPort
Port of the SEB to which we send the data to in TCP/IP-SEB mode


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de