12#ifndef ROOT_XrdProofGroup
13#define ROOT_XrdProofGroup
27#include "XrdOuc/XrdOucHash.hh"
28#include "XrdOuc/XrdOucString.hh"
71 int Active(
const char *usr = 0);
85 void Count(
const char *usr,
int n = 1);
108 int Config(
const char *fn);
115 XrdOucString
Export(
const char *grp);
117 void Print(
const char *grp);
#define XrdSysMutexHelper
XrdProofGroupMember(const char *n)
virtual ~XrdProofGroupMember()
const char * Name() const
XrdProofGroupMgr(const char *fn=0)
Constructor.
XrdProofGroup * Next()
Returns the instance of next group in the pseudo-iterator functionality.
XrdProofGroup * Apply(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.
XrdOucHash< XrdProofGroup > fGroups
void Print(const char *grp)
Return a string describing the group.
int Config(const char *fn)
(Re-)configure the group info using the file 'fn'.
XrdProofGroup * GetGroup(const char *grp)
Returns the instance of for group 'grp.
int ParseInfoFrom(const char *fn)
Parse config information from the open file 'fin'.
XrdOucString Export(const char *grp)
Return a string describing the group.
int SetEffectiveFractions(bool optprio)
Go through the list of active groups (those having at least a non-idle member) and determine the effe...
int ReadPriorities()
Read update priorities from the file defined at configuration time.
const char * GetCfgFile() const
XrdProofGroup * 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 ...
XrdProofdFile fPriorityFile
const char * Members() const
~XrdProofGroup()
Destructor.
const char * Name() const
void AddMember(const char *usr)
int Active(const char *usr=0)
Return the number of active groups (usr = 0) or the number of active sessions for user 'usr'.
bool HasMember(const char *usr)
Check if 'usr' is member of this group.
void Count(const char *usr, int n=1)
Modify the active count.
XrdProofGroup(const char *n, const char *m=0)
Constructor.
XrdOucHash< XrdProofGroupMember > fActives
void Print()
Dump group content.
void SetPriority(float p)