XRootD
Loading...
Searching...
No Matches
XrdMonRoll Class Reference

#include <XrdMonRoll.hh>

Collaboration diagram for XrdMonRoll:

Classes

class  Item
struct  setMember

Public Types

enum  rollType {
  Misc ,
  Protocol ,
  AddOn ,
  Plugin
}

Public Member Functions

 XrdMonRoll (XrdMonitor &xMon)
 ~XrdMonRoll ()
bool Register (rollType setType, const char *setName, setMember setVec[])
bool Register (rollType setType, const char *setName, std::vector< Item > &iVec)

Static Public Attributes

static RAtomic_uint EOV = {0}
static const int ItemSize = sizeof(Item)

Detailed Description

Definition at line 51 of file XrdMonRoll.hh.


Class Documentation

◆ XrdMonRoll::setMember

struct XrdMonRoll::setMember

The setMember structure is used to define a set of counters that will be registered with this class. These counters are reported in the summary.

Parameters
varName- Is the name of the variable and becomes the xml tag or of JSON key for the reported value.
varValu- Is the reference to the associated counter variable holding the value.

Definition at line 242 of file XrdMonRoll.hh.

Collaboration diagram for XrdMonRoll::setMember:
Class Members
const char * varName
RAtomic_uint & varValu

Member Enumeration Documentation

◆ rollType

Misc mapped to AddOn and Protocol is mapped to Plugin since Misc and Protocol are now deprecated. Use AddOn or Plugin!

Enumerator
Misc 
Protocol 
AddOn 
Plugin 

Definition at line 201 of file XrdMonRoll.hh.

Constructor & Destructor Documentation

◆ XrdMonRoll()

XrdMonRoll::XrdMonRoll ( XrdMonitor & xMon)

Definition at line 46 of file XrdMonRoll.cc.

46 : XrdMon(xMon)
47{ memset(rsvd, 0, sizeof(rsvd));}

◆ ~XrdMonRoll()

XrdMonRoll::~XrdMonRoll ( )
inline

Definition at line 267 of file XrdMonRoll.hh.

267{}

Member Function Documentation

◆ Register() [1/2]

bool XrdMonRoll::Register ( rollType setType,
const char * setName,
setMember setVec[] )

Definition at line 60 of file XrdMonRoll.cc.

62{
63 int numE = 0;
64
65// Convert this setMember list to an Item list as using setMember is deprecated.
66//
67 std::vector<Item>* iVec = new std::vector<Item>();
68
69 for(int i = 0; &setVec[i].varValu != &EOV; i++)
70 {XrdMonRoll::Item theItem(setVec[i].varName, setVec[i].varValu);
71 iVec->push_back(theItem);
72 numE++;
73 }
74
75// Now register the converted list
76//
77 if (XrdMon.Register(setType, setName, iVec->data(), numE)) return true;
78 delete iVec;
79 return false;
80}
static RAtomic_uint EOV
Definition XrdMonRoll.hh:40

References EOV, and XrdMonRoll::setMember::varValu.

◆ Register() [2/2]

bool XrdMonRoll::Register ( rollType setType,
const char * setName,
std::vector< Item > & iVec )

Register the list of counters to be reported.

Parameters
setType- Is the type of set being defined: AddOn - counters for miscellaneous activities. Plugin - counters for a plugin.
setName- Is the name of the set of counter variables. The name must not already be registered. The name is reported in stats xml tag or JSON stats key value.
setVec- Is a vector of class Item objects that define the set of variables for the summary report. The vector must reside in allocated storage until execution ends. Typically, it is declared static.
Returns
true when the set has been registered and false if the set is already registered (i.e. setName is in use) or if the setVec cannot be represented in JSON or CML.
Note
When false is returned messages will appear in the log desscribing why registration failed.

Definition at line 53 of file XrdMonRoll.cc.

55{
56 return XrdMon.Register(setType, setName, iVec.data(), iVec.size());
57}

Member Data Documentation

◆ EOV

RAtomic_uint XrdMonRoll::EOV = {0}
static

Register a set of counters to be reported.

Parameters
setType- Is the type of set being defined: AddOn - counters for miscellaneous activities. Plugin - counters for a plugin.
setName- Is the name of the set of counter variables. The name must not already be registered. The name is reported in stats xml tag or JSON stats key value.
setVec- Is a vector of setMember items that define the set of variables for the summary report. The last element of the vector must be initialized to {0, EOV}. The vector must reside in allocated storage until execution ends.
Returns
true when the set has been registered and false if the set is already registered (i.e. setName is in use).

Definition at line 40 of file XrdMonRoll.hh.

Referenced by Register().

◆ ItemSize

const int XrdMonRoll::ItemSize = sizeof(Item)
static

Definition at line 194 of file XrdMonRoll.hh.


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