ROOT  6.06/09
Reference Guide
Public Member Functions | Private Member Functions | Private Attributes | List of all members
XrdProofGroupMgr Class Reference

Definition at line 93 of file XrdProofGroup.h.

Public Member Functions

 XrdProofGroupMgr (const char *fn=0)
 Constructor. More...
 
 ~XrdProofGroupMgr ()
 
int Config (const char *fn)
 (Re-)configure the group info using the file 'fn'. More...
 
int ReadPriorities ()
 Read update priorities from the file defined at configuration time. More...
 
int SetEffectiveFractions (bool optprio)
 Go through the list of active groups (those having at least a non-idle member) and determine the effective resource fraction on the base of the scheduling option and of priorities or nominal fractions. More...
 
XrdProofGroupApply (int(*f)(const char *, XrdProofGroup *, void *), void *arg)
 Apply function 'f' to the hash table of groups; 'arg' is passed to 'f' in the last argument. More...
 
XrdOucString Export (const char *grp)
 Return a string describing the group. More...
 
int Num ()
 
void Print (const char *grp)
 Return a string describing the group. More...
 
XrdProofGroupGetGroup (const char *grp)
 Returns the instance of for group 'grp. More...
 
XrdProofGroupGetUserGroup (const char *usr, const char *grp=0)
 Returns the instance of the first group to which this user belongs; if grp != 0, return the instance corresponding to group 'grp', if existing and the // user belongs to it. More...
 
const char * GetCfgFile () const
 
void ResetIter ()
 
XrdProofGroupNext ()
 Returns the instance of next group in the pseudo-iterator functionality. More...
 

Private Member Functions

int ParseInfoFrom (const char *fn)
 Parse config information from the open file 'fin'. More...
 

Private Attributes

XrdOucString fIterator
 
XrdOucHash< XrdProofGroupfGroups
 
XrdSysRecMutex fMutex
 
XrdProofdFile fCfgFile
 
XrdProofdFile fPriorityFile
 

#include <XrdProofGroup.h>

+ Collaboration diagram for XrdProofGroupMgr:

Constructor & Destructor Documentation

XrdProofGroupMgr::XrdProofGroupMgr ( const char *  fn = 0)

Constructor.

Definition at line 204 of file XrdProofGroup.cxx.

XrdProofGroupMgr::~XrdProofGroupMgr ( )
inline

Definition at line 106 of file XrdProofGroup.h.

Member Function Documentation

XrdProofGroup * XrdProofGroupMgr::Apply ( int(*)(const char *, XrdProofGroup *, void *)  f,
void arg 
)

Apply function 'f' to the hash table of groups; 'arg' is passed to 'f' in the last argument.

After applying 'f', the action depends on the return value with the following rule: < 0 - the hash table item is deleted. = 0 - the next hash table item is processed. > 0 - processing stops and the hash table item is returned.

Definition at line 218 of file XrdProofGroup.cxx.

Referenced by SetEffectiveFractions().

int XrdProofGroupMgr::Config ( const char *  fn)

(Re-)configure the group info using the file 'fn'.

Return the number of active groups or -1 in case of error.

Definition at line 325 of file XrdProofGroup.cxx.

Referenced by XrdProofdManager::DoDirectiveGroupfile(), XrdProofdManagerCron(), and XrdProofGroupMgr().

XrdOucString XrdProofGroupMgr::Export ( const char *  grp)

Return a string describing the group.

Definition at line 227 of file XrdProofGroup.cxx.

const char* XrdProofGroupMgr::GetCfgFile ( ) const
inline
XrdProofGroup * XrdProofGroupMgr::GetGroup ( const char *  grp)

Returns the instance of for group 'grp.

Return 0 in the case the group does not exist

Definition at line 264 of file XrdProofGroup.cxx.

Referenced by XrdProofdClientMgr::CheckClient(), CreateActiveList(), XrdProofSched::GetNumWorkers(), and XrdProofdPriorityMgr::SetGroupPriority().

XrdProofGroup * XrdProofGroupMgr::GetUserGroup ( const char *  usr,
const char *  grp = 0 
)

Returns the instance of the first group to which this user belongs; if grp != 0, return the instance corresponding to group 'grp', if existing and the // user belongs to it.

Return 0 in the case the user does not belong to any group or does not belong to 'grp'.

Definition at line 281 of file XrdProofGroup.cxx.

Referenced by XrdProofdClientMgr::CheckClient(), XrdProofdClientMgr::Config(), XrdProofdClientMgr::GetClient(), and XrdProofdAdmin::SetROOTVersion().

XrdProofGroup * XrdProofGroupMgr::Next ( )

Returns the instance of next group in the pseudo-iterator functionality.

To scan over all the groups do the following: ResetIter(); while ((g = Next())) { // ... Process group } Return 0 when there are no more groups

Definition at line 316 of file XrdProofGroup.cxx.

int XrdProofGroupMgr::Num ( )
inline
int XrdProofGroupMgr::ParseInfoFrom ( const char *  fn)
private

Parse config information from the open file 'fin'.

Can be called recursively following 'include sub-file' lines. Return 0 or -1 in case of error.

Definition at line 391 of file XrdProofGroup.cxx.

Referenced by Config().

void XrdProofGroupMgr::Print ( const char *  grp)

Return a string describing the group.

Definition at line 246 of file XrdProofGroup.cxx.

Referenced by XrdProofdManager::Config(), and Config().

int XrdProofGroupMgr::ReadPriorities ( )

Read update priorities from the file defined at configuration time.

Return 1 if the file did not change, 0 if the file has been read correctly, or -1 in case of error.

Definition at line 515 of file XrdProofGroup.cxx.

void XrdProofGroupMgr::ResetIter ( )
inline

Definition at line 125 of file XrdProofGroup.h.

Referenced by SetEffectiveFractions(), and XrdProofGroupMgr().

int XrdProofGroupMgr::SetEffectiveFractions ( bool  opri)

Go through the list of active groups (those having at least a non-idle member) and determine the effective resource fraction on the base of the scheduling option and of priorities or nominal fractions.

Return 0 in case of success, -1 in case of error, 1 if every group has the same priority so that the system scheduler should do the job.

Definition at line 659 of file XrdProofGroup.cxx.

Referenced by XrdProofdPriorityMgr::SetNiceValues().

Member Data Documentation

XrdProofdFile XrdProofGroupMgr::fCfgFile
private

Definition at line 99 of file XrdProofGroup.h.

Referenced by Config().

XrdOucHash<XrdProofGroup> XrdProofGroupMgr::fGroups
private
XrdOucString XrdProofGroupMgr::fIterator
private

Definition at line 95 of file XrdProofGroup.h.

Referenced by Next().

XrdSysRecMutex XrdProofGroupMgr::fMutex
private

Definition at line 97 of file XrdProofGroup.h.

Referenced by Config(), Export(), GetGroup(), GetUserGroup(), Print(), and ReadPriorities().

XrdProofdFile XrdProofGroupMgr::fPriorityFile
private

Definition at line 100 of file XrdProofGroup.h.

Referenced by ParseInfoFrom(), and ReadPriorities().


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