Logo ROOT   6.18/05
Reference Guide
List of all members | 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 ()
 
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...
 
int Config (const char *fn)
 (Re-)configure the group info using the file 'fn'. More...
 
XrdOucString Export (const char *grp)
 Return a string describing the group. More...
 
const char * GetCfgFile () const
 
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...
 
XrdProofGroupNext ()
 Returns the instance of next group in the pseudo-iterator functionality. More...
 
int Num ()
 
void Print (const char *grp)
 Return a string describing the group. More...
 
int ReadPriorities ()
 Read update priorities from the file defined at configuration time. More...
 
void ResetIter ()
 
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...
 

Private Member Functions

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

Private Attributes

XrdProofdFile fCfgFile
 
XrdOucHash< XrdProofGroupfGroups
 
XrdOucString fIterator
 
XrdSysRecMutex fMutex
 
XrdProofdFile fPriorityFile
 

#include <XrdProofGroup.h>

Constructor & Destructor Documentation

◆ XrdProofGroupMgr()

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

Constructor.

Definition at line 204 of file XrdProofGroup.cxx.

◆ ~XrdProofGroupMgr()

XrdProofGroupMgr::~XrdProofGroupMgr ( )
inline

Definition at line 106 of file XrdProofGroup.h.

Member Function Documentation

◆ Apply()

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.

◆ Config()

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.

◆ Export()

XrdOucString XrdProofGroupMgr::Export ( const char *  grp)

Return a string describing the group.

Definition at line 227 of file XrdProofGroup.cxx.

◆ GetCfgFile()

const char * XrdProofGroupMgr::GetCfgFile ( ) const
inline

Definition at line 122 of file XrdProofGroup.h.

◆ GetGroup()

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.

◆ GetUserGroup()

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.

◆ Next()

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.

◆ Num()

int XrdProofGroupMgr::Num ( )
inline

Definition at line 116 of file XrdProofGroup.h.

◆ ParseInfoFrom()

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.

◆ Print()

void XrdProofGroupMgr::Print ( const char *  grp)

Return a string describing the group.

Definition at line 246 of file XrdProofGroup.cxx.

◆ ReadPriorities()

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.

◆ ResetIter()

void XrdProofGroupMgr::ResetIter ( )
inline

Definition at line 125 of file XrdProofGroup.h.

◆ SetEffectiveFractions()

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.

Member Data Documentation

◆ fCfgFile

XrdProofdFile XrdProofGroupMgr::fCfgFile
private

Definition at line 99 of file XrdProofGroup.h.

◆ fGroups

XrdOucHash<XrdProofGroup> XrdProofGroupMgr::fGroups
private

Definition at line 96 of file XrdProofGroup.h.

◆ fIterator

XrdOucString XrdProofGroupMgr::fIterator
private

Definition at line 95 of file XrdProofGroup.h.

◆ fMutex

XrdSysRecMutex XrdProofGroupMgr::fMutex
private

Definition at line 97 of file XrdProofGroup.h.

◆ fPriorityFile

XrdProofdFile XrdProofGroupMgr::fPriorityFile
private

Definition at line 100 of file XrdProofGroup.h.


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