SctDataDisplay::DisplayManager Class Reference

Entrance point - handles a mpa between class names and Displayers. More...

#include <DisplayManager.h>

Collaboration diagram for SctDataDisplay::DisplayManager:

Collaboration graph
[legend]

Static Public Member Functions

static DisplayManagerinstance ()
 Get the DisplayManager instance.
static bool addToMap (string className, shared_ptr< Displayer > displayer)
 Add a Displayer to the map.
static shared_ptr< DisplayDatadisplay (shared_ptr< const Sct::Serializable > ob, const DisplayInfo &info, std::ostream &os)
 Display an object.
static bool addGeneric (shared_ptr< GenericDisplayer > generic)
 Adds a GenericDisplayer to the list.
static bool batchMode ()
 Returns true if the manager is in batch mode.
static void setBatchMode (bool b=true)
 Allows one to set the displayer in batch mode, so that all output goes to file.
static bool rootMode ()
 Returns true if the manager is in batch mode.
static void setRootMode (bool b=true)
 Set displayer in root mode, so that all histograms are output in ROOT format.
static shared_ptr< TDirectory > getTDirectory ()
 Get the ROOT directory from to which files should be written.
static std::string getOutputDir ()
 Returns file output directory.
static void setOutputDir (const std::string &dirname)
 OUtput directory to write files to.
static void OutputCanvases ()
 Write canvases to gif files.

Private Member Functions

 DisplayManager ()

Private Attributes

map< string, shared_ptr< Displayer > > displayerMap
vector< shared_ptr< GenericDisplayer > > genericList
bool m_batchMode
bool m_rootMode
std::string m_outputdir

Static Private Attributes

static shared_ptr< TDirectory > s_file

Detailed Description

Entrance point - handles a mpa between class names and Displayers.

Author:
Matthew Palmer

Definition at line 31 of file DisplayManager.h.


Member Function Documentation

bool SctDataDisplay::DisplayManager::addGeneric shared_ptr< GenericDisplayer generic  )  [static]
 

Adds a GenericDisplayer to the list.

These will be used if there is no specific Displayer available

Note:
nothrow

Definition at line 58 of file DisplayManager.cpp.

References genericList, and instance().

Here is the call graph for this function:

bool SctDataDisplay::DisplayManager::addToMap string  className,
shared_ptr< Displayer displayer
[static]
 

Add a Displayer to the map.

Returns true if added. Will not replace a pre-exisiting Displayer.

Definition at line 25 of file DisplayManager.cpp.

References displayerMap, and instance().

Here is the call graph for this function:

bool SctDataDisplay::DisplayManager::batchMode  )  [static]
 

Returns true if the manager is in batch mode.

Definition at line 63 of file DisplayManager.cpp.

References instance(), and m_batchMode.

Referenced by SctDataDisplay::Displayer::createCanvas(), and SctDataDisplay::TestDisplayer::printSummaryString().

Here is the call graph for this function:

static shared_ptr<DisplayData> SctDataDisplay::DisplayManager::display shared_ptr< const Sct::Serializable ob,
const DisplayInfo info,
std::ostream &  os
[static]
 

Display an object.

Forwards the call to the appropriate Displayer.

Exceptions:
NoDisplayerException if there is no appropriate Displayer.

std::string SctDataDisplay::DisplayManager::getOutputDir  )  [static]
 

Returns file output directory.

Definition at line 71 of file DisplayManager.cpp.

References instance(), and m_outputdir.

Referenced by OutputCanvases().

Here is the call graph for this function:

shared_ptr< TDirectory > SctDataDisplay::DisplayManager::getTDirectory  )  [static]
 

Get the ROOT directory from to which files should be written.

Definition at line 90 of file DisplayManager.cpp.

References s_file.

Referenced by SctDataDisplay::NoiseOccupancyDisplayer::displayChips(), SctDataDisplay::Displayer::displayHistogram(), and SctDataDisplay::NPtGainDisplayer::plotData().

DisplayManager & SctDataDisplay::DisplayManager::instance  )  [static]
 

Get the DisplayManager instance.

Definition at line 20 of file DisplayManager.cpp.

Referenced by addGeneric(), addToMap(), batchMode(), getOutputDir(), rootMode(), setBatchMode(), setOutputDir(), and setRootMode().

void SctDataDisplay::DisplayManager::OutputCanvases  )  [static]
 

Write canvases to gif files.

Definition at line 94 of file DisplayManager.cpp.

References getOutputDir(), and rootMode().

Here is the call graph for this function:

bool SctDataDisplay::DisplayManager::rootMode  )  [static]
 

Returns true if the manager is in batch mode.

Definition at line 67 of file DisplayManager.cpp.

References instance(), and m_rootMode.

Referenced by SctDataDisplay::NoiseOccupancyDisplayer::displayChips(), SctDataDisplay::Displayer::displayHistogram(), OutputCanvases(), and SctDataDisplay::NPtGainDisplayer::plotData().

Here is the call graph for this function:

void SctDataDisplay::DisplayManager::setBatchMode bool  b = true  )  [static]
 

Allows one to set the displayer in batch mode, so that all output goes to file.

Definition at line 82 of file DisplayManager.cpp.

References instance(), and m_batchMode.

Referenced by setOutputDir().

Here is the call graph for this function:

void SctDataDisplay::DisplayManager::setOutputDir const std::string &  dirname  )  [static]
 

OUtput directory to write files to.

Also sets batch mode.

Definition at line 76 of file DisplayManager.cpp.

References instance(), m_outputdir, and setBatchMode().

Here is the call graph for this function:

void SctDataDisplay::DisplayManager::setRootMode bool  b = true  )  [static]
 

Set displayer in root mode, so that all histograms are output in ROOT format.

Definition at line 86 of file DisplayManager.cpp.

References instance(), and m_rootMode.

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Mon Feb 6 14:09:24 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6