Public Member Functions | List of all members
om::HistoSourceBase Class Referenceabstract

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/OnlineMonitoring/viewer/HistoSource.h"

Inheritance diagram for om::HistoSourceBase:
om::HistoFile om::HistoSHM om::HistoSource

Public Member Functions

virtual ~HistoSourceBase ()
 
virtual void SetName (const char *nm)=0
 Set the source name. More...
 
virtual TH1F * GetTH1FCopy (const char *n)=0
 
virtual TH2F * GetTH2FCopy (const char *n)=0
 
virtual void GetHistogramList (std::list< std::string > &h)=0
 Get a list of all histograms held by this source. More...
 
virtual void GetStatus (std::string &nm, unsigned int *run, unsigned int *subrun, unsigned int *event, pid_t *pid, long *stime, long *utime, long *cpu, long *rsize, time_t *t)
 Get the histogram server status. More...
 
void FindAllMatches (const char *include_pattern, const char *exclude_pattern, std::list< std::string > &objs)
 

Detailed Description

Define the base class for any source (root files, shared memory, etc...) of histograms to be displayed by the viewer.

Definition at line 16 of file HistoSource.h.

Constructor & Destructor Documentation

virtual om::HistoSourceBase::~HistoSourceBase ( )
inlinevirtual

Member Function Documentation

void HistoSourceBase::FindAllMatches ( const char *  include_pattern,
const char *  exclude_pattern,
std::list< std::string > &  objs 
)

Return the names of all objects in the file who's names match a particular set of patterns

Parameters
include_pattern- Names must match this expression
exclude_pattern- Names must not match this expression
objs- List of object names that satisfy the above

Definition at line 10 of file HistoSource.cxx.

References GetHistogramList(), make_syst_table_plots::h, MECModelEnuComparisons::i, in, om::regex_match(), and string.

Referenced by GetStatus().

13 {
14  std::string include_p(include_pattern);
15  std::string exclude_p(exclude_pattern);
16  bool in, ex;
17 
18  std::list<std::string> h;
19  this->GetHistogramList(h);
20 
21  std::list<std::string>::iterator i(h.begin());
22  std::list<std::string>::iterator iend(h.end());
23  for (; i!=iend; ++i) {
24  in = (regex_match(*i, include_p)==0);
25  ex = (regex_match(*i, exclude_p)==0);
26  if (in && !ex) objs.push_back(*i);
27  }
28 }
virtual void GetHistogramList(std::list< std::string > &h)=0
Get a list of all histograms held by this source.
ifstream in
Definition: comparison.C:7
int regex_match(const std::string &s, const std::string &p)
Definition: RegexMatch.cxx:7
enum BeamMode string
virtual void om::HistoSourceBase::GetHistogramList ( std::list< std::string > &  h)
pure virtual

Get a list of all histograms held by this source.

Implemented in om::HistoSource, om::HistoSHM, and om::HistoFile.

Referenced by FindAllMatches(), om::HistoSource::GetHistogramList(), and ~HistoSourceBase().

virtual void om::HistoSourceBase::GetStatus ( std::string nm,
unsigned int run,
unsigned int subrun,
unsigned int event,
pid_t *  pid,
long *  stime,
long *  utime,
long *  cpu,
long *  rsize,
time_t *  t 
)
inlinevirtual

Get the histogram server status.

Reimplemented in om::HistoSource, and om::HistoSHM.

Definition at line 36 of file HistoSource.h.

References FindAllMatches().

Referenced by om::HistoSource::GetStatus().

45  { }
virtual TH1F* om::HistoSourceBase::GetTH1FCopy ( const char *  n)
pure virtual

Read a copy of a named histogram into memory. User accepts ownership and responsibility for deletetion

Implemented in om::HistoSource, om::HistoSHM, and om::HistoFile.

Referenced by om::HistoSource::GetTH1FCopy(), and ~HistoSourceBase().

virtual TH2F* om::HistoSourceBase::GetTH2FCopy ( const char *  n)
pure virtual

Read a copy of a named histogram into memory. User accepts ownership and responsibility for deletion.

Implemented in om::HistoSource, om::HistoSHM, and om::HistoFile.

Referenced by om::HistoSource::GetTH2FCopy(), and ~HistoSourceBase().

virtual void om::HistoSourceBase::SetName ( const char *  nm)
pure virtual

Set the source name.

Implemented in om::HistoSource, om::HistoSHM, and om::HistoFile.

Referenced by ~HistoSourceBase().


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