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

In This Package:

DaqXmlDump Namespace Reference


Classes

class  DaqXmlDump

Functions

 DaqXmlDump (const std::string &name, ISvcLocator *pSvcLocator)
 ~DaqXmlDump ()
StatusCode initialize ()
StatusCode execute ()
StatusCode finalize ()
def configure
def run

Variables

 dumpOpts = None

Function Documentation

DaqXmlDump::DaqXmlDump ( const std::string &  name,
ISvcLocator pSvcLocator 
)

Definition at line 19 of file DaqXmlDump.cc.

00020                                                  :
00021     DybAlgorithm<DayaBay::ReadoutHeader>(name,
00022                                          pSvcLocator) {
00023 }

DaqXmlDump::~DaqXmlDump (  ) 

Definition at line 25 of file DaqXmlDump.cc.

00025                         {
00026 }

StatusCode DaqXmlDump::initialize (  ) 

Definition at line 28 of file DaqXmlDump.cc.

00028                                   {
00029     StatusCode status = DybAlgorithm<DayaBay::ReadoutHeader>::initialize();
00030     if (status.isFailure()) {
00031         return status;
00032     }
00033     info() << "initializing" << endreq;
00034     return StatusCode::SUCCESS;
00035 }

StatusCode DaqXmlDump::execute (  ) 

Definition at line 37 of file DaqXmlDump.cc.

00037                                {
00038     const ReadoutHeader* readoutHeader = get<ReadoutHeader>("/Event/Readout/ReadoutHeader");
00039     if (0 == readoutHeader) {
00040         error() << "Failed to get current readout header" << endreq;
00041         return StatusCode::FAILURE;
00042     }
00043     //const Readout* readout = readoutHeader->readout();
00044     //if (0 == readout) {
00045         const DaqCrate* daqCrate = readoutHeader->daqCrate();
00046         if (0 == daqCrate) {
00047             error() << "Failed to get readout from header" << endreq;
00048             return StatusCode::FAILURE;
00049         }
00050         std::stringstream message;
00051         message << '\n';
00052         DaqXmlStream xmlStream(message,
00053                                twoSpaces,
00054                                true);
00055         xmlStream.dumpElement(daqCrate->eventReadout());
00056         info() << message.str() << endreq;
00057         return StatusCode::SUCCESS;
00058         //}
00059         //return StatusCode::SUCCESS;
00060 }

StatusCode DaqXmlDump::finalize (  ) 

Definition at line 62 of file DaqXmlDump.cc.

00062                                 {
00063     info() << "finalizing" << endreq;
00064     StatusCode status = DybAlgorithm<DayaBay::ReadoutHeader>::finalize();
00065     return status;
00066 }

def DaqXmlDump::configure (   argv = []  ) 

Example python algorithm

Definition at line 45 of file DaqXmlDump.py.

00045                         :
00046     '''
00047     Example python algorithm
00048     '''
00049     from optparse import OptionParser, OptionGroup, IndentedHelpFormatter
00050     parser = OptionParser(usage="-m \"DaqXmlDump [-p]\"",
00051                           version="%prog 1.0")
00052     parser.add_option('-p',
00053                       '--python',
00054                       dest='USE_PYTHON',
00055                       action='store_true',
00056                       help='Use the python implementation, not the C++ one.',
00057                       default = False)
00058     global dumpOpts
00059     (dumpOpts, args) = parser.parse_args(argv)
00060 
00061     from Gaudi.Configuration import ApplicationMgr
00062     app = ApplicationMgr()
00063     if not dumpOpts.USE_PYTHON:
00064         from DaqFormatModules.DaqFormatModulesConf import DybDaq__DaqXmlDump
00065         daqXmlDump = DybDaq__DaqXmlDump("DaqXmlDump - C++")
00066         app.TopAlg.append(daqXmlDump)
00067 
00068 
def run(app):

def DaqXmlDump::run (   app  ) 

Configure and add the algorithm to job

Definition at line 69 of file DaqXmlDump.py.

00069             :
00070     '''
00071     Configure and add the algorithm to job
00072     '''
00073     global dumpOpts
00074     if dumpOpts.USE_PYTHON:
00075         daqXmlDump = DaqXmlDump("DaqXmlDump Python")
00076         app.addAlgorithm(daqXmlDump)
        app.addAlgorithm(daqXmlDump)


Variable Documentation

DaqXmlDump::dumpOpts = None [static]

Definition at line 43 of file DaqXmlDump.py.

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

Generated on Mon Apr 11 20:46:30 2011 for DaqFormatModules by doxygen 1.4.7