/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 Attributes
TESDemoTrim Class Reference

#include <TESDemoTrim.h>

Collaboration diagram for TESDemoTrim:
Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Private Attributes

StringProperty m_readoutPath
IDataManagerSvc * p_archiveSvc
IArchiveTrimSvcp_trimSvc

Detailed Description

Definition at line 9 of file TESDemoTrim.h.


Constructor & Destructor Documentation

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

Definition at line 14 of file TESDemoTrim.cpp.

                                                       :
  GaudiAlgorithm(name,
                 pSvcLocator),
  p_archiveSvc(0),
  p_trimSvc(0)
{
  declareProperty("ReadoutPath",
                  m_readoutPath="/Event/TESDemo/Readout",
                  "Path from which to retrieve the Readouts");
}

Member Function Documentation

StatusCode TESDemoTrim::initialize ( )

Definition at line 26 of file TESDemoTrim.cpp.

                                   {
  
   info() << "in initialize" 
          << endreq;
   info() << m_readoutPath 
          << endreq;
   
   StatusCode status = service("EventDataArchiveSvc",
                               p_archiveSvc);
   if (status.isFailure()) {
     Error("Service [EventDataArchiveSvc] not found",
           status);
   }

   status = service("ArchiveTrimSvc",
                    p_trimSvc);
   if (status.isFailure()) {
     Error("Service [ArchiveTrimSvc] not found",
           status);
   }

   return StatusCode::SUCCESS;

}
StatusCode TESDemoTrim::execute ( )

Definition at line 51 of file TESDemoTrim.cpp.

                                {

  SmartDataPtr<const TESDemoReadout>  readout(eventSvc(),
                                              m_readoutPath.value());
  if (0 == readout) {
    return Error("Failed to retrieve readout from Event Store");
  }

  return p_trimSvc->trim(p_archiveSvc,
                         readout->timeStamp());
}
StatusCode TESDemoTrim::finalize ( )

Definition at line 63 of file TESDemoTrim.cpp.

                                 {

  info() << "in finalize"
         << endreq;

  if (0 != p_trimSvc) {
    p_trimSvc->release();
  }

  if (0 != p_archiveSvc) {
    p_archiveSvc->release();
  }

return StatusCode::SUCCESS;

}

Member Data Documentation

StringProperty TESDemoTrim::m_readoutPath [private]

Definition at line 22 of file TESDemoTrim.h.

IDataManagerSvc* TESDemoTrim::p_archiveSvc [private]

Definition at line 24 of file TESDemoTrim.h.

Definition at line 25 of file TESDemoTrim.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:09:00 for TESDemo by doxygen 1.7.4