TMonaLisa
class description - source file - inheritance tree (.pdf)
public:
TMonaLisa(const char* monid = "0", const char* montag = "ROOT_PROCESS", const char* monserver = "0")
TMonaLisa(const TMonaLisa&)
virtual ~TMonaLisa()
static TClass* Class()
ApMon* GetApMon() const
virtual TClass* IsA() const
TMonaLisa& operator=(const TMonaLisa&)
virtual void Print(Option_t* option = "") const
Bool_t SendInfoDescription(const char* jobtag)
Bool_t SendInfoStatus(const char* status)
Bool_t SendInfoTime()
Bool_t SendInfoUser(const char* user = "0")
Bool_t SendParameters(TList* valuelist)
Bool_t SendProcessingProgress(Double_t nevent, Double_t nbytes)
Bool_t SendProcessingStatus(const char* status)
void SetLogLevel(const char* loglevel = "WARNING")
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
void Verbose(Bool_t onoff)
private:
ApMon* fApmon ! connection to MonaLisa
char* fJobId ! job id
TString fHostname ! hostname of MonaLisa server
Int_t fPid ! process id
Bool_t fInitialized true if initialized
Bool_t fVerbose verbocity
TMonaLisa
Class defining interface to MonaLisa Monitoring Services in ROOT.
The TMonaLisa object is used to send monitoring information to a
MonaLisa server using the MonaLisa ApMon package (libapmoncpp.so/UDP
packets). The MonaLisa ApMon library for C++ can be downloaded at
http://monalisa.cacr.caltech.edu/monalisa__Download__ApMon.html,
current version:
http://monalisa.cacr.caltech.edu/download/apmon/ApMon_c-2.0.6.tar.gz
The ROOT implementation is primary optimized for process/job
monitoring, although all other generic MonaLisa ApMon functionality
can be exploited through the ApMon class directly
(gMonaLisa->GetApMon()).
TMonaLisa(const char *monid, const char *montag,
const char *monserver)
Creates a TMonaLisa object to send monitoring information to a
MonaLisa server using the MonaLisa ApMon package (libapmoncpp.so/UDP
packets). The MonaLisa ApMon library for C++ can be downloaded at
http://monalisa.cacr.caltech.edu/monalisa__Download__ApMon.html,
current version:
http://monalisa.cacr.caltech.edu/download/apmon/ApMon_cpp-2.0.6.tar.gz
The ROOT implementation is primary optimized for process/job monitoring,
although all other generic MonaLisa ApMon functionality can be exploited
through the ApMon class directly (gMonaLisa->GetApMon()).
Monitoring information in MonaLisa is structured in the following tree
structure:
<farmname>
|
---> <nodename1>
|
---> <key1> - <value1>
---> <key2> - <value2>
---> <nodename2>
|
---> <key3> - <value3>
---> <key4> - <value4>
The parameter monid is equivalent to the MonaLisa node name, for the
case of process monitoring it can be just an identifier to classify
the type of jobs e.g. "PROOF_PROCESSING".
If monid is not specified, TMonaLisa tries to set it in this order
from environement variables:
- PROOF_JOB_ID
- GRID_JOB_ID
- LCG_JOB_ID
- ALIEN_MASTERJOB_ID
- ALIEN_PROC_ID
The parameter montag is equivalent to the MonaLisa farm name, for the
case of process monitoring it can be a process identifier e.g. a PROOF
session ID.
The parameter monserver specifies the server to whom to send the
monitoring UDP packets. If not specified, the hostname (the port is
a default one) is specified in the environment variable APMON_CONFIG.
To use TMonaLisa, libMonaLisa.so has to be loaded.
According to the fact, that the deepness of the MonaLisa naming scheme
is only 3 (<farm><node><value>), a special naming scheme is used for
process monitoring. There is a high-level method to send progress
information of Tree analysis (# of events, datasize).
To distinguish individual nodes running the processing, part of the
information is kept in the <value> parameter of ML.
<value> is named as:
<site-name>:<host-name>:<pid>:<valuetag>
<site-name> is taken from an environment variable in the following order:
- PROOF_SITE
- GRID_SITE
- ALIEN_SITE
- default 'none'
<host-name> is taken from gSystem->Hostname()
<pid> is the process ID of the ROOT process
Example of use for Process Monitoring:
new TMonaLisa("BATCH_ANALYSIS","AnalysisLoop-00001","lxplus050.cern.ch");
Once when you create an analysis task, execute
gMonaLisa->SendInfoUser("myname");
gMonaLisa->SendInfoDescription("My first Higgs analysis");
gMonaLisa->SendInfoTime();
gMonaLisa->SendInfoStatus("Submitted");
On each node executing a subtask, you can set the status of this subtask:
gMonaLisa->SendProcessingStatus("Started");
During the processing of your analysis you can send progress updates:
gMonaLisa->SendProcessProgress(100,1000000); <= 100 events, 1MB processed
....
gMonaLisa-SendProcessingStatus("Finished");
delete gMonaLisa; gMonaLisa=0;
Example of use for any Generic Monitoring information:
TList *valuelist = new TList();
valuelist->SetOwner(kTRUE);
// append a text object
TMonaLisaText *valtext = new TMonaLisaText("decaychannel","K->eeg");
valuelist->Add(valtext);
// append a double value
TMonaLisaValue* valdouble = new TMonaLisaValue("n-gamma",5);
valuelist->Add(valdouble);
Bool_t success = SendParameters(valuelist);
delete valuelist;
~TMonaLisa()
Cleanup.
Bool_t SendInfoStatus(const char *status)
Sends a <status> text to MonaLisa following the process scheme:
<monid> --> <jobid> --> 'status' = <status>
Used to set a global status for a groupjob, e.g.
a master-job or the general status of PROOF processing.
Bool_t SendInfoUser(const char *user)
Sends the <user> text to MonaLisa following the process scheme:
<monid> --> <jobid> --> 'user' = <user>
Bool_t SendInfoDescription(const char *jobtag)
Sends the description <jobtag> following the processing scheme:
<monid> --> <jobid> --> 'jobname' = <jobtag>
Bool_t SendInfoTime()
Sends the current time to MonaLisa following the processing scheme
<monid> --> <jobid> --> 'time' = >unixtimestamp<
Bool_t SendProcessingStatus(const char *status)
Send the procesing status 'status' to MonaLisa following the
processing scheme:
<monid> --> <jobid> --> '<site>:<host>:<pid>:status' = <status>
Used, to set the processing status of individual subtaks e.g. the
status of a batch (sub-)job or the status of a PROOF slave
participating in query <jobid>
Bool_t SendProcessingProgress(Double_t nevent, Double_t nbytes)
Send the procesing progress to MonaLisa.
Bool_t SendParameters(TList *valuelist)
Send the parameters to MonaLisa.
void SetLogLevel(const char *loglevel)
Set MonaLisa log level.
void Print(Option_t *) const
Print info about MonaLisa object.
Inline Functions
ApMon* GetApMon() const
void Verbose(Bool_t onoff)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
TMonaLisa TMonaLisa(const TMonaLisa&)
TMonaLisa& operator=(const TMonaLisa&)
Author: Andreas Peters 5/10/2005
Last update: root/monalisa:$Name: $:$Id: TMonaLisa.cxx,v 1.2 2005/12/14 11:35:48 rdm Exp $
Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.