| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

AdPlotterAlg Class Reference

Produce example plots demonstrating NuWa use. More...

#include <AdPlotterAlg.h>

Inheritance diagram for AdPlotterAlg:

[legend]
Collaboration diagram for AdPlotterAlg:
[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 ()
virtual StatusCode sysExecute ()
void put (IDataProviderSvc *svc, DataObject *object, const std::string &address, const bool useRootInTES=true) const
void put (DataObject *object, const std::string &address, const bool useRootInTES=true) const
Gaudi::Utils::GetData< TYPE
>::return_type 
get (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
Gaudi::Utils::GetData< TYPE
>::return_type 
get (const std::string &location, const bool useRootInTES=true) const
TYPE * getDet (IDataProviderSvc *svc, const std::string &location) const
TYPE * getDet (const std::string &location) const
bool exist (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
bool exist (const std::string &location, const bool useRootInTES=true) const
bool existDet (IDataProviderSvc *svc, const std::string &location) const
bool existDet (const std::string &location) const
TYPE * getOrCreate (IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
TYPE * getOrCreate (const std::string &location, const bool useRootInTES=true) const
bool registerContext () const
INTupleSvcevtColSvc () const
IAlgContextSvccontextSvc () const
TOOL * tool (const std::string &type, const std::string &name, const IInterface *parent=0, bool create=true) const
TOOL * tool (const std::string &type, const IInterface *parent=0, bool create=true) const
SERVICE * svc (const std::string &name, const bool create=true) const
IUpdateManagerSvcupdMgrSvc () const
IDataProviderSvcfastContainersSvc () const
StatusCode Error (const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const
StatusCode Warning (const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const
StatusCode Print (const std::string &msg, const StatusCode st=StatusCode::SUCCESS, const MSG::Level lev=MSG::INFO) const
StatusCode Assert (const bool ok, const std::string &message="", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
StatusCode Assert (const bool ok, const char *message, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
StatusCode Exception (const std::string &msg, const GaudiException &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
StatusCode Exception (const std::string &msg, const std::exception &exc, const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
StatusCode Exception (const std::string &msg="no message", const StatusCode sc=StatusCode(StatusCode::FAILURE, true)) const
MsgStreammsgStream (const MSG::Level level) const
MsgStreamalways () const
MsgStreamfatal () const
MsgStreamerr () const
MsgStreamerror () const
MsgStreamwarning () const
MsgStreaminfo () const
MsgStreamdebug () const
MsgStreamverbose () const
MsgStreammsg () const
const Statisticscounters () const
StatEntitycounter (const std::string &tag) const
MSG::Level msgLevel () const
bool msgLevel (const MSG::Level level) const
void resetMsgStream () const
bool typePrint () const
bool propsPrint () const
bool statPrint () const
bool errorsPrint () const
long printStat (const MSG::Level level=MSG::ALWAYS) const
long printErrors (const MSG::Level level=MSG::ALWAYS) const
long printProps (const MSG::Level level=MSG::ALWAYS) const
void registerCondition (const std::string &condition, StatusCode(CallerClass::*mf)()=NULL)
void registerCondition (const std::string &condition, CondType *&condPtrDest, StatusCode(CallerClass::*mf)()=NULL)
void registerCondition (char *condition, StatusCode(CallerClass::*mf)()=NULL)
void registerCondition (TargetClass *condition, StatusCode(CallerClass::*mf)()=NULL)
StatusCode runUpdate ()
TransientFastContainer< T > * getFastContainer (const std::string &location, typename TransientFastContainer< T >::size_type initial=0)
StatusCode release (const IInterface *interface) const
unsigned long release ()
const std::string & context () const
const std::string & rootInTES () const
double globalTimeOffset () const
virtual StatusCode sysStart ()
virtual StatusCode sysInitialize ()
virtual StatusCode sysReinitialize ()
virtual StatusCode sysRestart ()
virtual StatusCode sysStop ()
virtual StatusCode sysFinalize ()
virtual StatusCode sysBeginRun ()
virtual StatusCode sysEndRun ()
virtual const std::string & name () const
virtual const std::string & version () const
virtual StatusCode configure ()
virtual StatusCode terminate ()
virtual StatusCode start ()
virtual StatusCode stop ()
virtual StatusCode reinitialize ()
virtual StatusCode restart ()
virtual bool isExecuted () const
virtual void setExecuted (bool state)
virtual void resetExecuted ()
virtual StatusCode beginRun ()
virtual StatusCode endRun ()
virtual Gaudi::StateMachine::State FSMState () const
virtual Gaudi::StateMachine::State targetFSMState () const
virtual bool isEnabled () const
virtual bool filterPassed () const
virtual void setFilterPassed (bool state)
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
StatusCode service (const std::string &svcType, const std::string &svcName, T *&psvc) const
void setOutputLevel (int level)
IAuditorSvcauditorSvc () const
IChronoStatSvcchronoSvc () const
IChronoStatSvcchronoStatService () const
IDataProviderSvcdetSvc () const
IDataProviderSvcdetDataService () const
IConversionSvcdetCnvSvc () const
IConversionSvcdetDataCnvService () const
IDataProviderSvceventSvc () const
IDataProviderSvcevtSvc () const
IDataProviderSvceventDataService () const
IConversionSvceventCnvSvc () const
IConversionSvceventDataCnvService () const
IHistogramSvchistoSvc () const
IHistogramSvchistogramDataService () const
IMessageSvcmsgSvc () const
IMessageSvcmessageService () const
INTupleSvcntupleSvc () const
INTupleSvcntupleService () const
IRndmGenSvcrandSvc () const
IToolSvctoolSvc () const
IExceptionSvcexceptionSvc () const
ISvcLocatorserviceLocator () const
ISvcLocatorsvcLoc () const
StatusCode createSubAlgorithm (const std::string &type, const std::string &name, Algorithm *&pSubAlg)
std::vector< Algorithm * > * subAlgorithms () const
virtual StatusCode setProperty (const Property &p)
virtual StatusCode setProperty (const std::string &s)
virtual StatusCode setProperty (const std::string &n, const std::string &v)
StatusCode setProperty (const std::string &name, const TYPE &value)
virtual StatusCode getProperty (Property *p) const
virtual const PropertygetProperty (const std::string &name) const
virtual StatusCode getProperty (const std::string &n, std::string &v) const
virtual const std::vector<
Property * > & 
getProperties () const
StatusCode setProperties ()
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
IMonitorSvcmonitorSvc () const
void declareInfo (const std::string &name, const T &var, const std::string &desc) const
void declareInfo (const std::string &name, const std::string &format, const void *var, int size, const std::string &desc) const
unsigned long addRef ()
StatusCode queryInterface (const InterfaceID &riid, void **)

Static Public Member Functions

static const InterfaceIDinterfaceID ()
static const InterfaceIDinterfaceID ()
static const InterfaceIDinterfaceID ()

Public Attributes

 SUCCESS
 NO_INTERFACE
 VERSMISMATCH
 LAST_ERROR

Protected Types

typedef std::map< std::string,
StatEntity
Statistics
typedef std::map< std::string,
unsigned int > 
Counter
typedef std::vector< IAlgTool * > AlgTools
typedef std::pair< IInterface *,
std::string > 
ServiceEntry
typedef std::vector< ServiceEntryServices

Protected Member Functions

StatusCode releaseTool (const IAlgTool *tool) const
StatusCode releaseSvc (const IInterface *svc) const
bool isInitialized () const
bool isFinalized () const
int outputLevel () const
IntegerPropertyoutputLevelProperty ()
void initOutputLevel (Property &prop)

Static Protected Attributes

static const bool IgnoreRootInTES
static const bool UseRootInTES

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?
ITHistSvcm_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

typedef std::map<DayaBay::Detector,AdExamplePlots*> AdPlotterAlg::PlotMap [private]

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.

00510   : GaudiAlgorithm(name,pSvcLocator)
00511   , m_hsvc(0), m_cable(0), m_coord(0)
00512 {
00513   declareProperty("Location",m_location=DayaBay::ReadoutHeaderLocation::Default,
00514                   "Location in the TES to ReadoutHeaders");
00515   declareProperty("FilePath",m_filepath="/file1/adplotter/",
00516                   "File path of registered histograms.");
00517   declareProperty("FindCoincidence",m_findCoincidence=false,
00518                   "Generate coincidence figures");
00519 }

AdPlotterAlg::~AdPlotterAlg (  )  [virtual]

Definition at line 521 of file AdPlotterAlg.cc.

00522 {
00523 }


Member Function Documentation

StatusCode AdPlotterAlg::initialize (  )  [virtual]

Reimplemented from GaudiAlgorithm.

Definition at line 525 of file AdPlotterAlg.cc.

00526 {
00527   this->GaudiAlgorithm::initialize();
00528   
00529   // Get the histogram service
00530   if ( service("THistSvc", m_hsvc).isFailure()) {
00531     error() << " No THistSvc available." << endreq;
00532     return StatusCode::FAILURE;
00533   } 
00534   // Get the cable service
00535   if ( service("StaticCableSvc", m_cable).isFailure()) {
00536     error() << " No CableService available." << endreq;
00537     return StatusCode::FAILURE;
00538   } 
00539 
00540   // Get the coord sys service
00541   if ( service("CoordSysSvc", m_coord).isFailure()) {
00542     error() << " No CoordSysSvc available." << endreq;
00543     return StatusCode::FAILURE;
00544   } 
00545   
00546   return StatusCode::SUCCESS;
00547 }

StatusCode AdPlotterAlg::execute (  )  [virtual]

Reimplemented from GaudiAlgorithm.

Definition at line 549 of file AdPlotterAlg.cc.

00550 {
00551   DayaBay::ReadoutHeader* roh = get<DayaBay::ReadoutHeader>(m_location);
00552   
00553   const Context &ctx = roh->context();
00554   DayaBay::Detector det(ctx.GetSite(),ctx.GetDetId());
00555   AdExamplePlots* plots = m_plots[det];
00556   if (!plots) {
00557     plots = new AdExamplePlots(det,info());
00558     if(m_findCoincidence){
00559       info() << "Adding IBD coincidence figure generation" << endreq;
00560       plots->findCoincidence = m_findCoincidence;
00561     }else{
00562       info() << "Do not add IBD coincidence figure generation" << endreq;
00563     }
00564     m_plots[det] = plots;
00565     plots->book(m_hsvc, m_filepath);
00566   }
00567   
00568   return plots->fill(m_cable,ServiceMode(ctx,0),m_coord,roh);
00569 }

StatusCode AdPlotterAlg::finalize (  )  [virtual]

Reimplemented from GaudiAlgorithm.

Definition at line 571 of file AdPlotterAlg.cc.

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


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.

bool AdPlotterAlg::m_findCoincidence [private]

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.

ICableSvc* AdPlotterAlg::m_cable [private]

Definition at line 57 of file AdPlotterAlg.h.

ICoordSysSvc* AdPlotterAlg::m_coord [private]

Definition at line 59 of file AdPlotterAlg.h.

PlotMap AdPlotterAlg::m_plots [private]

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 Mon Apr 11 20:33:31 2011 for DataQuality by doxygen 1.4.7