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

In This Package:

DaqFormatConversionSvc.cc

Go to the documentation of this file.
00001 /*
00002  *  DaqFormatConversionSvc.cc
00003  *  DaqFormatModules
00004  *
00005  *  Created by Simon Patton on 7/22/10.
00006  *  Copyright 2010 DayaBay Collaboration. All rights reserved.
00007  *
00008  */
00009 #include "DaqFormatConversionSvc.h"
00010 
00011 #include "DaqEventConverter.h"
00012 #include "StructureConverter.h"
00013 
00014 #include "GaudiKernel/MsgStream.h"
00015 #include "Event/ReadoutHeader.h"
00016 
00017 using DybDaq::DaqFormatConversionSvc;
00018 using DybDaq::DaqEventConverter;
00019 using DybDaq::StructureConverter;
00020 
00021 DaqFormatConversionSvc::DaqFormatConversionSvc(const std::string& name,
00022                                                ISvcLocator* svc) :
00023     ConversionSvc(name,
00024                   svc,
00025                   DAQ_FORMAT_DATA) {
00026     declareProperty("CnvServices",
00027                     m_svcNames);
00028     m_svcNames.declareUpdateHandler(&DaqFormatConversionSvc::svcNamesHandler,
00029                                     this );
00030 }
00031 
00032 DaqFormatConversionSvc::~DaqFormatConversionSvc() {
00033 }
00034 
00035 IConverter* DaqFormatConversionSvc::createConverter(long svcType,
00036                                                     const CLID& clID,
00037                                                     const ICnvFactory*) {
00038     if (svcType != DAQ_FORMAT_DATA) {
00039         return 0;
00040     }
00041     if (clID == CLID_DataObject) {
00042         return new StructureConverter(svcType,
00043                                       clID,
00044                                       serviceLocator());
00045     }
00046     if (clID == DayaBay::CLID_ReadoutHeader) {
00047         return new DaqEventConverter(svcType,
00048                                      clID,
00049                                      serviceLocator());
00050     }
00051     return 0;
00052 }
00053 
00054 void DaqFormatConversionSvc::svcNamesHandler(Property& p) {
00055     MsgStream log( msgSvc(),
00056                    name() );
00057     log << MSG::WARNING << "Ignoring: " << p << endreq ;
00058 }
00059 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

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