Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OnlMonClient Class Reference

Base class for the OnlMon subsystem module. More...

#include </dev/shm/kenichi/update-github-e1039-doc/e1039-core/online/onlmonserver/OnlMonClient.h>

+ Inheritance diagram for OnlMonClient:
+ Collaboration diagram for OnlMonClient:

Public Member Functions

 OnlMonClient ()
 
virtual ~OnlMonClient ()
 
virtual OnlMonClientClone ()
 
void Title (const std::string &title)
 
std::string Title ()
 
int Init (PHCompositeNode *topNode)
 
int InitRun (PHCompositeNode *topNode)
 
int process_event (PHCompositeNode *topNode)
 
int End (PHCompositeNode *topNode)
 Called at the end of all processing. More...
 
void GetBasicID (int *run_id=0, int *spill_id=0, int *event_id=0, int *spill_id_min=0, int *spill_id_max=0)
 
void GetBasicCount (int *n_evt=0, int *n_sp=0)
 
int StartMonitor ()
 
TH1 * FindMonHist (const std::string name, const bool non_null=true)
 
virtual int InitOnlMon (PHCompositeNode *topNode)
 
virtual int InitRunOnlMon (PHCompositeNode *topNode)
 
virtual int ProcessEventOnlMon (PHCompositeNode *topNode)
 
virtual int EndOnlMon (PHCompositeNode *topNode)
 
virtual int FindAllMonHist ()
 
virtual int DrawMonitor ()
 
int SendHist (TSocket *sock, int sp_min, int sp_max)
 
- Public Member Functions inherited from SubsysReco
virtual ~SubsysReco ()
 
virtual int EndRun (const int)
 Called at the end of each run. More...
 
virtual int Reset (PHCompositeNode *)
 Reset. More...
 
virtual int ResetEvent (PHCompositeNode *)
 Clean up after each event. More...
 
virtual void Print (const std::string &what="ALL") const
 
- Public Member Functions inherited from Fun4AllBase
virtual ~Fun4AllBase ()
 
virtual const std::string Name () const
 Returns the name of this module. More...
 
virtual void Name (const std::string &name)
 Sets the name of this module. More...
 
virtual void Verbosity (const int ival)
 Sets the verbosity of this module (0 by default=quiet). More...
 
virtual void Verbosity (enu_Verbosity ival)
 Sets the verbosity of this module (0 by default=quiet). More...
 
virtual int Verbosity () const
 Gets the verbosity of this module. More...
 

Static Public Member Functions

static void SetClearUsFlag (const bool val)
 
static bool GetClearUsFlag ()
 

Protected Types

enum  HistMode_t { MODE_ADD, MODE_UPDATE }
 

Protected Member Functions

void RegisterHist (TH1 *h1, const HistMode_t mode=MODE_ADD)
 
void NumCanvases (const int num)
 
int NumCanvases ()
 
OnlMonCanvasGetCanvas (const int num=0)
 
- Protected Member Functions inherited from SubsysReco
 SubsysReco (const std::string &name="NONAME")
 
- Protected Member Functions inherited from Fun4AllBase
 Fun4AllBase (const std::string &name="NONAME")
 

Additional Inherited Members

- Public Types inherited from Fun4AllBase
enum  enu_Verbosity {
  VERBOSITY_QUIET = 0, VERBOSITY_SOME = 1, VERBOSITY_MORE = 2, VERBOSITY_EVEN_MORE = 3,
  VERBOSITY_A_LOT = 4, VERBOSITY_MAX = INT_MAX - 10
}
 
- Protected Attributes inherited from Fun4AllBase
std::string ThisName
 
int verbosity
 The verbosity level. 0 means not verbose at all. More...
 

Detailed Description

Base class for the OnlMon subsystem module.

All OnlMon histograms are held by "m_hm" via RegisterHist(). They are used in

Spill-by-spill histograms are by default created and held by "m_map_hist_sp". A set per spill is created when a new spill is found in process_event(). The creation is disabled when

  • Fun4MainDaq.C starts in the offline mode (via OnlMonServer::GetOnline()) or
  • The number of spills processed exceeds "m_n_sp_max_hist". Spill-by-spill histograms are merged via MakeMergedHist() when
  • The creation is disabled in process_event(),
  • They are sent to the viewer in SendHist() or
  • They are saved in End().

Todo:

  • We had better not use "m_hm" but only a set of HistList_t to hold histograms, so that we can reduce the number of operations to copy histograms.
  • A count in spill-by-spill histogram is not correct when it is an accumulated number over one run (i.e. MODE_UPDATE). Should we take a difference from its number in previous spill?

Definition at line 35 of file OnlMonClient.h.

Member Enumeration Documentation

enum OnlMonClient::HistMode_t
protected
Enumerator
MODE_ADD 
MODE_UPDATE 

Definition at line 37 of file OnlMonClient.h.

Constructor & Destructor Documentation

OnlMonClient::OnlMonClient ( )

Definition at line 26 of file OnlMonClient.cc.

OnlMonClient::~OnlMonClient ( )
virtual

Definition at line 40 of file OnlMonClient.cc.

Member Function Documentation

OnlMonClient * OnlMonClient::Clone ( )
virtual
int OnlMonClient::DrawMonitor ( )
virtual
int OnlMonClient::End ( PHCompositeNode )
virtual

Called at the end of all processing.

Reimplemented from SubsysReco.

Definition at line 128 of file OnlMonClient.cc.

References Fun4AllHistoManager::dumpHistos(), EndOnlMon(), Fun4AllReturnCodes::EVENT_OK, GetBasicID(), Fun4AllHistoManager::getHisto(), UtilOnline::GetOnlMonDir(), Fun4AllBase::Name(), and Fun4AllHistoManager::nHistos().

+ Here is the call graph for this function:

int OnlMonClient::EndOnlMon ( PHCompositeNode topNode)
virtual

Reimplemented in OnlMonV1495, OnlMonH4, OnlMonHodo, OnlMonCham, OnlMonProp, OnlMonMainDaq, OnlMonTrigSig, OnlMonReco, and OnlMonTrigNim.

Definition at line 208 of file OnlMonClient.cc.

Referenced by End().

+ Here is the caller graph for this function:

int OnlMonClient::FindAllMonHist ( )
virtual
TH1 * OnlMonClient::FindMonHist ( const std::string  name,
const bool  non_null = true 
)

Definition at line 178 of file OnlMonClient.cc.

Referenced by OnlMonCham::FindAllMonHist(), OnlMonProp::FindAllMonHist(), OnlMonH4::FindAllMonHist(), OnlMonHodo::FindAllMonHist(), and OnlMonV1495::FindAllMonHist().

+ Here is the caller graph for this function:

void OnlMonClient::GetBasicCount ( int *  n_evt = 0,
int *  n_sp = 0 
)

Definition at line 172 of file OnlMonClient.cc.

void OnlMonClient::GetBasicID ( int *  run_id = 0,
int *  spill_id = 0,
int *  event_id = 0,
int *  spill_id_min = 0,
int *  spill_id_max = 0 
)

Definition at line 163 of file OnlMonClient.cc.

Referenced by End().

+ Here is the caller graph for this function:

OnlMonCanvas * OnlMonClient::GetCanvas ( const int  num = 0)
protected

Definition at line 464 of file OnlMonClient.cc.

Referenced by OnlMonCham::DrawMonitor(), OnlMonProp::DrawMonitor(), OnlMonH4::DrawMonitor(), OnlMonHodo::DrawMonitor(), and OnlMonV1495::DrawMonitor().

+ Here is the caller graph for this function:

static bool OnlMonClient::GetClearUsFlag ( )
inlinestatic

Definition at line 93 of file OnlMonClient.h.

Referenced by OnlMonUI::BuildInterface(), OnlMon4MainDaq(), and StartMonitor().

+ Here is the caller graph for this function:

int OnlMonClient::Init ( PHCompositeNode )
virtual

Called during initialization. Typically this is where you can book histograms, and e.g. register them to Fun4AllServer (so they can be output to file using Fun4AllServer::dumpHistos() method).

Reimplemented from SubsysReco.

Definition at line 55 of file OnlMonClient.cc.

References InitOnlMon(), and OnlMonServer::instance().

+ Here is the call graph for this function:

int OnlMonClient::InitOnlMon ( PHCompositeNode topNode)
virtual

Reimplemented in OnlMonV1495, OnlMonH4, OnlMonHodo, OnlMonCham, OnlMonProp, OnlMonMainDaq, OnlMonTrigSig, OnlMonReco, and OnlMonTrigNim.

Definition at line 190 of file OnlMonClient.cc.

Referenced by Init().

+ Here is the caller graph for this function:

int OnlMonClient::InitRun ( PHCompositeNode )
virtual

Called for first event when run number is known. Typically this is where you may want to fetch data from database, because you know the run number.

These settings will be applied to histograms created in InitRunOnlMon(). Fine tunes should be necessary in the future. Note: the label/title size is a percent of the pad height, and the offset is a relative scale to the default distance from axis.

Reimplemented from SubsysReco.

Definition at line 61 of file OnlMonClient.cc.

References Fun4AllReturnCodes::ABORTEVENT, SQRun::get_run_id(), InitRunOnlMon(), OnlMonServer::instance(), Fun4AllBase::Name(), Fun4AllHistoManager::registerHisto(), and Fun4AllServer::registerHistoManager().

+ Here is the call graph for this function:

int OnlMonClient::InitRunOnlMon ( PHCompositeNode topNode)
virtual

Reimplemented in OnlMonV1495, OnlMonH4, OnlMonHodo, OnlMonCham, OnlMonProp, OnlMonMainDaq, OnlMonTrigSig, OnlMonReco, and OnlMonTrigNim.

Definition at line 196 of file OnlMonClient.cc.

Referenced by InitRun().

+ Here is the caller graph for this function:

void OnlMonClient::NumCanvases ( const int  num)
inlineprotected

Definition at line 100 of file OnlMonClient.h.

int OnlMonClient::NumCanvases ( )
inlineprotected

Definition at line 101 of file OnlMonClient.h.

Referenced by OnlMonCham::OnlMonCham(), OnlMonH4::OnlMonH4(), OnlMonHodo::OnlMonHodo(), OnlMonProp::OnlMonProp(), and OnlMonV1495::OnlMonV1495().

+ Here is the caller graph for this function:

int OnlMonClient::process_event ( PHCompositeNode )
virtual

Called for each event. This is where you do the real work.

Reimplemented from SubsysReco.

Definition at line 88 of file OnlMonClient.cc.

References Fun4AllReturnCodes::ABORTEVENT, OnlMonComm::AddSpill(), OnlMonComm::GetMaxNumSelSpills(), OnlMonServer::GetMutex(), OnlMonComm::GetNumSpills(), OnlMonServer::instance(), OnlMonComm::instance(), Fun4AllBase::Name(), and ProcessEventOnlMon().

+ Here is the call graph for this function:

int OnlMonClient::ProcessEventOnlMon ( PHCompositeNode topNode)
virtual

Reimplemented in OnlMonV1495, OnlMonH4, OnlMonHodo, OnlMonCham, OnlMonProp, OnlMonMainDaq, OnlMonTrigSig, OnlMonReco, and OnlMonTrigNim.

Definition at line 202 of file OnlMonClient.cc.

Referenced by process_event().

+ Here is the caller graph for this function:

void OnlMonClient::RegisterHist ( TH1 *  h1,
const HistMode_t  mode = MODE_ADD 
)
protected

Definition at line 250 of file OnlMonClient.cc.

References Fun4AllHistoManager::registerHisto().

Referenced by OnlMonCham::InitRunOnlMon(), OnlMonProp::InitRunOnlMon(), OnlMonH4::InitRunOnlMon(), OnlMonHodo::InitRunOnlMon(), and OnlMonV1495::InitRunOnlMon().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnlMonClient::SendHist ( TSocket *  sock,
int  sp_min,
int  sp_max 
)

Definition at line 261 of file OnlMonClient.cc.

References OnlMonComm::FindFullSpillRange(), Fun4AllHistoManager::getHisto(), OnlMonServer::GetMutex(), OnlMonServer::instance(), OnlMonComm::instance(), and Fun4AllHistoManager::nHistos().

Referenced by OnlMonServer::HandleConnection().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void OnlMonClient::SetClearUsFlag ( const bool  val)
inlinestatic

Definition at line 92 of file OnlMonClient.h.

int OnlMonClient::StartMonitor ( )

Definition at line 226 of file OnlMonClient.cc.

References GetClearUsFlag().

Referenced by OnlMon4MainDaqSingle().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void OnlMonClient::Title ( const std::string &  title)
inline

Definition at line 72 of file OnlMonClient.h.

std::string OnlMonClient::Title ( )
inline

Definition at line 73 of file OnlMonClient.h.

Referenced by OnlMonCham::OnlMonCham(), OnlMonH4::OnlMonH4(), OnlMonHodo::OnlMonHodo(), OnlMonProp::OnlMonProp(), and OnlMonV1495::OnlMonV1495().

+ Here is the caller graph for this function:


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