/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
TESDemoFill1 Class Reference

#include <TESDemoFill1.h>

List of all members.

Public Member Functions

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

Private Attributes

IntegerProperty m_percentage
StringProperty m_readoutPath
StringProperty m_positronPath

Detailed Description

Definition at line 6 of file TESDemoFill1.h.


Constructor & Destructor Documentation

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

Definition at line 12 of file TESDemoFill1.cpp.

                                                       :
  GaudiAlgorithm(name,
                 pSvcLocator)
{
  declareProperty("PositronPercentage",
                  m_percentage=50,
                  "Percentage of Readouts to contain Positrons");
  declareProperty("ReadoutPath",
                  m_readoutPath="/Event/TESDemo/Readout",
                  "Path from which to retrieve the Readouts");
  declareProperty("PositronPath",
                  m_positronPath="/Event/TESDemo/Positron",
                  "Path, in the TES, into which the Positron is stored");
}

Member Function Documentation

StatusCode TESDemoFill1::initialize ( )

Definition at line 28 of file TESDemoFill1.cpp.

                                    {

   info() << "in initialize" 
          << endreq;
   info() << m_percentage
          << endreq;
   info() << m_readoutPath 
          << endreq;
   info() << m_positronPath 
          << endreq;
   return StatusCode::SUCCESS;

}
StatusCode TESDemoFill1::execute ( )

Definition at line 42 of file TESDemoFill1.cpp.

                                 {

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

  // Determine whther this readout will contain a positron.
  if (random() % 101 <= m_percentage.value()) {
    return StatusCode::SUCCESS;
  }

  TESDemoPositron* positron = new TESDemoPositron(readout->timeStamp(),
                                                  readout);
  StatusCode status = eventSvc()->registerObject(m_positronPath.value(),
                                                 positron);
  if (status.isFailure()) {
    return Error("Failed to store positron in Event Store",
                 status);
  }

  return StatusCode::SUCCESS;
}
StatusCode TESDemoFill1::finalize ( )

Definition at line 67 of file TESDemoFill1.cpp.

                                  {

  info() << "in finalize"
         << endreq;
  return StatusCode::SUCCESS;

}

Member Data Documentation

IntegerProperty TESDemoFill1::m_percentage [private]

Definition at line 18 of file TESDemoFill1.h.

StringProperty TESDemoFill1::m_readoutPath [private]

Definition at line 20 of file TESDemoFill1.h.

StringProperty TESDemoFill1::m_positronPath [private]

Definition at line 21 of file TESDemoFill1.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