GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ADF::AgataConfAgent Class Reference

The Agata Data Flow agent. More...

Inheritance diagram for ADF::AgataConfAgent:

Public Types

enum  EMode { kRead, kWrite }
 Operating mode for frame IO. More...
 
enum  EModel { kStrict, kSafe, kGrowing }
 Model for FrameIO. More...
 

Public Member Functions

virtual void AddConf (DotConf *)
 add a conf object to this. The added objects are not owned by this so not deleted. More...
 
 AgataConfAgent ()
 used to set global agent More...
 
 AgataConfAgent (const char *)
 used to set local agent i.e. clones More...
 
ConfAgentClone (const char *comment="Clone of the global ConfAgent")
 Clone of the main (global) Agent. More...
 
virtual Bool_t Configure (const Char_t *name, const char *option="in", Bool_t allow_init=true)
 to avoid some warning of hidden methods More...
 
virtual Bool_t Configure (ConfigurationFrame *, const char *option="in", Bool_t allow_init=false)
 configuration from/to a configuration frame : extact string from the frame and call DoConfigure More...
 
virtual Bool_t Configure (const char *name, const char *option="in", Bool_t allow_init=true)
 configuration from/to a file : open the file and call DoConfigure More...
 
virtual Bool_t DoConfigure (std::istream &, Bool_t allow_init)
 configure this from an input stream More...
 
virtual Bool_t DoConfigure (std::ostream &)
 write the configuration in an output stream More...
 
const Char_t * GetComment () const
 
virtual const DFAgentGetConstDFAgent () const
 
virtual const RunAgentGetConstRunAgent () const
 
virtual DFAgentGetDFAgent ()
 to get the Data Flow Agent in charge of knowing the structure of the DF More...
 
const Char_t * GetLastModif () const
 
Short_t GetMaxVersion () const
 this class could managed moddification of the versionned part up to MaxVersion : should be set in the constructor part of the inheriting class More...
 
virtual const Char_t * GetRID () const
 to get the record id More...
 
virtual RunAgentGetRunAgent ()
 to get the run Agent in charge of knowing the conditions of the DF being processed More...
 
virtual const Char_t * GetSRID () const
 to get the record id More...
 
virtual const Char_t * GetStreamOption () const
 get/set option More...
 
virtual Short_t GetVersion () const
 to get the curent version of this object More...
 
Bool_t IsWithRecord () const
 to know if this is intialisased with a stream composed of records. More...
 
virtual void RemoveConf (DotConf *aconf=0x0)
 
virtual void Reset (const Char_t *opt="")
 Reset : all values are set to default. More...
 
void SetComment (const Char_t *comment)
 
virtual void SetRID (const Char_t *rid, const Char_t *srid="")
 to set the record id More...
 
virtual void SetStreamOption (const Char_t *opt)
 
void SetWithRecord (Bool_t is_record=true)
 to change the behavior More...
 
virtual ~AgataConfAgent ()
 destructor More...
 

Static Public Member Functions

static ConfAgent::EModel GetModel (std::string)
 
static const Char_t * GetStringModel (ConfAgent::EModel)
 
static void KilltheGlobalAgent ()
 to kill the global agent More...
 
static ConfAgenttheGlobalAgent (std::string="Agata")
 to get the global agent More...
 
static AgataConfAgenttheGlobalAgent ()
 

Protected Member Functions

Bool_t AddRecord (std::ostream &, char t= 'b')
 Add a begin or end of record, return true if done. More...
 
std::string BeginOfRecord ()
 string that gives a start of record for this object More...
 
std::string EndOfRecord ()
 string that gives an end of record for this object More...
 
Bool_t IsBeginOfRecord (const std::string &, Bool_t allow_init)
 Return true if this string is a begin of record and call Reset if Init is found. More...
 
Bool_t IsEndOfRecord (const std::string &)
 Return true if this string is an end of record. More...
 
virtual Bool_t ProcessLine (const std::string &)
 a helper template to do clones : it requires a default constructor. then it uses the Configure facilities to configure the new object More...
 
void SetLastModif ()
 set in last modif string the current date. More...
 
void SetMaxVersion (Short_t v)
 
void SetVersion (Short_t v)
 

Protected Attributes

LogMessage fLog
 the log messenger ... to know the object hae been properly intitialised/modified More...
 

Detailed Description

The Agata Data Flow agent.

this contents all the information concerning the agata data flow @ a given point. A global, static agent is loaded @ the beginning. It is initialised by the ADF.conf file. One is installed in the distribution, the other one is in the user space in the directory defined under ADF_CONF_PATH.

Any sub-system (actor) has its own agent (local) which is a Clone of the global one so that @ the beginning all the system is synchronized. Local agents could be re-configured locally (for instance by configuration frames) independently to adapt themself to the local data flow without breaking the whole system.

As a agata data flow agent, it defines the factories needed to allocate keys/frames. The global agent has references to global (singleton) factories. Local agent have clones of the global ones. The agent also defines the endianness of the data flow, the factories it really needs to work completely (it should be included in the list of loaded ones), as well as the definition of the frames going one.

The Primarykey is the minimum information to be able to map the flow. Indeed, one may have the length of the frames coded on 2 or 4 bytes. The AutoConf frame is used by the inner ADF system to reconfigure itself the agent. Comment the line to switch off this feature.

# This is a begin of the ADF configuration record
# Option is Init. It means the Agent is reset before being initialised
#
#
#
#
Endian: kLittle
#
# List of factories required
#
# Factories for Keys
#
KeyFactory: Default
KeyFactory: Agata
#
# Factories for Frames
#
FrameFactory: Agata
#
#
# Version of the primary key that structures the data flow
# and the frame expected to reconfigure it
#
PrimaryKey: Default FS 0 1
#
# comment/uncomment to switch off/on auto-reconf
AutoConf: Agata conf:global 2 0 Agata conf:global 0 0
#
#
# Current Frames going through the data flow
#
Frame: Agata data:crystal 4 0 Agata data:crystal 65000 0
Frame: Agata data:ccrystal 4 0 Agata data:ccrystal 65000 0
Frame: Agata data:ranc0 4 0 Agata data:ranc0 65000 0
Frame: Agata data:ranc1 4 0 Agata data:ranc1 65000 0
Frame: Agata data:psa 4 0 Agata data:psa 65000 1
Frame: Agata data:tracked 4 0 Agata data:tracked 65000 0
Frame: Agata event:data 4 0 Agata event:data 4 0
Frame: Agata event:data:psa 4 0 Agata event:data:psa 4 0
#
# end of Data Flow Defaults
#
#////ADF::ConfAgent_end////

To work with a factory version different that -1 (which is the default), just set

KeyFactory: Agata 0

Definition at line 183 of file ConfAgent.cpp.


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