/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Private Types | Private Attributes
AdPlotterAlg Class Reference

Produce example plots demonstrating NuWa use. More...

#include <AdPlotterAlg.h>

Collaboration diagram for AdPlotterAlg:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AdPlotterAlg (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~AdPlotterAlg ()
virtual StatusCode initialize ()
virtual StatusCode execute ()
virtual StatusCode finalize ()

Private Types

typedef std::map
< DayaBay::Detector,
AdExamplePlots * > 
PlotMap

Private Attributes

std::string m_location
 Property: Location - TES path to the ReadoutHeader Defaults to DayaBay::ReadoutHeaderLocation::Default.
std::string m_filepath
 Property: FilePath - path to use when registering histograms.
bool m_findCoincidence
 Property: FindCoincidence - Add coincidence plots?
ITHistSvc * m_hsvc
ICableSvcm_cable
ICoordSysSvcm_coord
PlotMap m_plots

Detailed Description

Produce example plots demonstrating NuWa use.

dandwyer@caltech.edu 2008/12/2 Based on AdQuality by bv@bnl.gov

Definition at line 27 of file AdPlotterAlg.h.


Member Typedef Documentation

Definition at line 61 of file AdPlotterAlg.h.


Constructor & Destructor Documentation

AdPlotterAlg::AdPlotterAlg ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 509 of file AdPlotterAlg.cc.

  : GaudiAlgorithm(name,pSvcLocator)
  , m_hsvc(0), m_cable(0), m_coord(0)
{
  declareProperty("Location",m_location=DayaBay::ReadoutHeaderLocation::Default,
                  "Location in the TES to ReadoutHeaders");
  declareProperty("FilePath",m_filepath="/file1/adplotter/",
                  "File path of registered histograms.");
  declareProperty("FindCoincidence",m_findCoincidence=false,
                  "Generate coincidence figures");
}
AdPlotterAlg::~AdPlotterAlg ( ) [virtual]

Definition at line 521 of file AdPlotterAlg.cc.

{
}

Member Function Documentation

StatusCode AdPlotterAlg::initialize ( ) [virtual]

Definition at line 525 of file AdPlotterAlg.cc.

{
  this->GaudiAlgorithm::initialize();
  
  // Get the histogram service
  if ( service("THistSvc", m_hsvc).isFailure()) {
    error() << " No THistSvc available." << endreq;
    return StatusCode::FAILURE;
  } 
  // Get the cable service
  if ( service("CableSvc", m_cable).isFailure()) {
    error() << " No CableService available." << endreq;
    return StatusCode::FAILURE;
  } 

  // Get the coord sys service
  if ( service("CoordSysSvc", m_coord).isFailure()) {
    error() << " No CoordSysSvc available." << endreq;
    return StatusCode::FAILURE;
  } 
  
  return StatusCode::SUCCESS;
}
StatusCode AdPlotterAlg::execute ( ) [virtual]

Definition at line 549 of file AdPlotterAlg.cc.

{
  DayaBay::ReadoutHeader* roh = get<DayaBay::ReadoutHeader>(m_location);
  
  const Context &ctx = roh->context();
  DayaBay::Detector det(ctx.GetSite(),ctx.GetDetId());
  AdExamplePlots* plots = m_plots[det];
  if (!plots) {
    plots = new AdExamplePlots(det,info());
    if(m_findCoincidence){
      info() << "Adding IBD coincidence figure generation" << endreq;
      plots->findCoincidence = m_findCoincidence;
    }else{
      info() << "Do not add IBD coincidence figure generation" << endreq;
    }
    m_plots[det] = plots;
    plots->book(m_hsvc, m_filepath);
  }
  
  return plots->fill(m_cable,ServiceMode(ctx,0),m_coord,roh);
}
StatusCode AdPlotterAlg::finalize ( ) [virtual]

Definition at line 571 of file AdPlotterAlg.cc.

{
  return this->GaudiAlgorithm::finalize();
}

Member Data Documentation

std::string AdPlotterAlg::m_location [private]

Property: Location - TES path to the ReadoutHeader Defaults to DayaBay::ReadoutHeaderLocation::Default.

Definition at line 43 of file AdPlotterAlg.h.

std::string AdPlotterAlg::m_filepath [private]

Property: FilePath - path to use when registering histograms.

Must end in "/". Default "/file1/adplotter/"

Definition at line 47 of file AdPlotterAlg.h.

Property: FindCoincidence - Add coincidence plots?

Definition at line 50 of file AdPlotterAlg.h.

ITHistSvc* AdPlotterAlg::m_hsvc [private]

Definition at line 55 of file AdPlotterAlg.h.

Definition at line 57 of file AdPlotterAlg.h.

Definition at line 59 of file AdPlotterAlg.h.

Definition at line 62 of file AdPlotterAlg.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:06:20 for DataQuality by doxygen 1.7.4