#include <RunDataCnv.h>
Inheritance diagram for RunHeaderCnv:
Definition at line 20 of file RunDataCnv.h.
RunHeaderCnv::RunHeaderCnv | ( | ISvcLocator * | svc | ) |
Definition at line 7 of file RunDataCnv.cc.
00008 : RootIOTypedCnv<PerRunHeader,RunHeader>("PerRunHeader", 00009 classID(),svc) 00010 { 00011 }
RunHeaderCnv::~RunHeaderCnv | ( | ) | [virtual] |
static const CLID& RunHeaderCnv::classID | ( | ) | [inline, static] |
StatusCode RunHeaderCnv::PerToTran | ( | const PerRunHeader & | perobj, | |
DayaBay::RunHeader & | tranobj | |||
) | [virtual] |
Copy data from TObject based class of type TType to DataObject based class of type DOType.
Implements RootIOTypedCnv< PerRunHeader, DayaBay::RunHeader >.
Definition at line 18 of file RunDataCnv.cc.
00020 { 00021 MsgStream log(msgSvc(), "RunHeaderCnv::PerToTran"); 00022 00023 log << MSG::DEBUG << "Converting persistent to transient object" << endreq; 00024 00025 StatusCode sc = HeaderObjectCnv::toTran(perobj,tranobj); 00026 if (sc.isFailure()) return sc; 00027 00028 vector<PerRunData*> in_vec = perobj.runDataList; 00029 vector<PerRunData*>::iterator it; 00030 00031 for(it = in_vec.begin(); it != in_vec.end(); ++it) 00032 { 00033 RunData* runData = convert(**it); 00034 tranobj.runDataList().push_back(runData); 00035 } 00036 return StatusCode::SUCCESS; 00037 }
StatusCode RunHeaderCnv::TranToPer | ( | const DayaBay::RunHeader & | tranobj, | |
PerRunHeader & | perobj | |||
) | [virtual] |
Copy data from DataObject based class of type DOType to TObject based class of type TType.
Implements RootIOTypedCnv< PerRunHeader, DayaBay::RunHeader >.
Definition at line 39 of file RunDataCnv.cc.
00042 { 00043 MsgStream log(msgSvc(), "RunHeaderCnv::TranToPer"); 00044 00045 log << MSG::DEBUG << "Converting transient to persistent object" << endreq; 00046 00047 perobj.clear(); 00048 StatusCode sc = HeaderObjectCnv::toPer(tranobj,perobj); 00049 if (sc.isFailure()) return sc; 00050 00051 vector<RunData*> in_vec = tranobj.runDataList(); 00052 vector<RunData*>::iterator it; 00053 00054 for(it=in_vec.begin();it!=in_vec.end();++it){ 00055 perobj.runDataList.push_back( convert(**it) ); 00056 } 00057 return StatusCode::SUCCESS; 00058 00059 }
StatusCode RunHeaderCnv::fillRepRefs | ( | IOpaqueAddress * | addr, | |
DataObject * | dobj | |||
) | [virtual] |
Reimplemented from RootIOTypedCnv< PerRunHeader, DayaBay::RunHeader >.
Definition at line 61 of file RunDataCnv.cc.
00062 { 00063 MsgStream log(msgSvc(), "RunHeaderCnv::fillRepRefs"); 00064 RunHeader* rh = dynamic_cast<RunHeader*>(dobj); 00065 00066 log << MSG::INFO 00067 << "Got " << rh->inputHeaders().size() << " headers" << endreq; 00068 00069 00070 StatusCode sc = HeaderObjectCnv::fillPer(m_rioSvc,*rh,*m_perOutObj); 00071 if (sc.isFailure()) { 00072 log << MSG::ERROR << "Failed to fill HeaderObject part" << endreq; 00073 return sc; 00074 } 00075 00076 // ... fill RunHeader part... 00077 return sc; 00078 }
StatusCode RunHeaderCnv::fillObjRefs | ( | IOpaqueAddress * | addr, | |
DataObject * | dobj | |||
) | [virtual] |
Reimplemented from RootIOTypedCnv< PerRunHeader, DayaBay::RunHeader >.
Definition at line 80 of file RunDataCnv.cc.
00081 { 00082 MsgStream log(msgSvc(), "RunHeaderCnv::fillObjRefs"); 00083 HeaderObject* hobj = dynamic_cast<HeaderObject*>(dobj); 00084 StatusCode sc = HeaderObjectCnv::fillTran(m_rioSvc,*m_perInObj,*hobj); 00085 if (sc.isFailure()) { 00086 log << MSG::ERROR << "Failed to fill HeaderObject part" << endreq; 00087 return sc; 00088 } 00089 00090 log << MSG::INFO 00091 << "Got " << hobj->inputHeaders().size() << " headers" << endreq; 00092 00093 // ... fill RunHeader part... 00094 return sc; 00095 }
PerRunData * RunHeaderCnv::convert | ( | const DayaBay::RunData & | runData | ) |
Definition at line 97 of file RunDataCnv.cc.
00097 { 00098 std::vector<PerCalibSource> calibSources; 00099 int nSources = runData.calibSources().size(); 00100 for(int srcIdx=0; srcIdx<nSources; srcIdx++){ 00101 const CalibSource& source = (runData.calibSources())[srcIdx]; 00102 PerCalibSource perSource(source.id(), source.ledFrequency(), 00103 source.adZPosition()); 00104 calibSources.push_back(perSource); 00105 } 00106 return (new PerRunData(runData.runNumber(), runData.runType(), 00107 runData.detectors(), runData.startTime(), 00108 runData.endTime(), calibSources)); 00109 }
RunData * RunHeaderCnv::convert | ( | const PerRunData & | perRunData | ) |
Definition at line 111 of file RunDataCnv.cc.
00112 { 00113 RunData* runData = new RunData(); 00114 runData->setRunNumber(perRunData.runNumber); 00115 runData->setRunType(perRunData.runType); 00116 runData->setDetectors(perRunData.detectors); 00117 runData->setStartTime(perRunData.startTime); 00118 runData->setEndTime(perRunData.endTime); 00119 int nSources = perRunData.calibSources.size(); 00120 DayaBay::RunData::CalibSources calibSources; 00121 for(int srcIdx=0; srcIdx<nSources; srcIdx++){ 00122 const PerCalibSource& perSource = perRunData.calibSources[srcIdx]; 00123 CalibSource source; 00124 source.setId(perSource.id); 00125 source.setLedFrequency(perSource.ledFrequency); 00126 source.setAdZPosition(perSource.adZPosition); 00127 calibSources.push_back(source); 00128 } 00129 runData->setCalibSources(calibSources); 00130 return runData; 00131 }
PerRunHeader & RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::getPerInputObject | ( | ) | [inherited] |
PerRunHeader & RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::getPerOutputObject | ( | ) | [inherited] |
const RootIOBaseObject * RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::getBaseInputObject | ( | ) | [virtual, inherited] |
Implements RootIOBaseCnv.
const RootIOBaseObject * RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::getBaseOutputObject | ( | ) | [virtual, inherited] |
Implements RootIOBaseCnv.
virtual StatusCode RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::TranObjectToPerObject | ( | DataObject & | dat, | |
const RootOutputAddress & | ||||
) | [virtual, inherited] |
Implements RootIOBaseCnv.
virtual StatusCode RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::PerObjectToTranObject | ( | DataObject *& | dat | ) | [virtual, inherited] |
Implements RootIOBaseCnv.
virtual RootInputStream * RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::makeInputStream | ( | const RootInputAddress & | ria | ) | [virtual, inherited] |
Implements RootIOBaseCnv.
virtual RootOutputStream * RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::makeOutputStream | ( | const RootOutputAddress & | ria | ) | [virtual, inherited] |
Implements RootIOBaseCnv.
virtual long RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::repSvcType | ( | ) | const [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
virtual StatusCode RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::initialize | ( | ) | [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
virtual StatusCode RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::finalize | ( | ) | [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
virtual StatusCode RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::createObj | ( | IOpaqueAddress * | addr, | |
DataObject *& | dat | |||
) | [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
virtual StatusCode RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::createRep | ( | DataObject * | pObject, | |
IOpaqueAddress *& | refpAddress | |||
) | [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
int RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::commit | ( | const RootOutputAddress & | roa | ) | [inherited] |
Reimplemented from RootIOBaseCnv.
RootIOBaseCnv * RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::otherConverter | ( | int | clID | ) | [inherited] |
Reimplemented from RootIOBaseCnv.
virtual StatusCode RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::queryInterface | ( | const InterfaceID & | riid, | |
void ** | ppvInterface | |||
) | [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
virtual unsigned long RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::addRef | ( | ) | [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
virtual unsigned long RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::release | ( | ) | [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
virtual StatusCode RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::setDataProvider | ( | IDataProviderSvc * | svc | ) | [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
virtual IDataProviderSvc * RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::dataProvider | ( | ) | const [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
virtual StatusCode RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::setConversionSvc | ( | IConversionSvc * | svc | ) | [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
virtual IConversionSvc * RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::conversionSvc | ( | ) | const [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
virtual StatusCode RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::setAddressCreator | ( | IAddressCreator * | creator | ) | [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
virtual IAddressCreator * RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::addressCreator | ( | ) | const [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
virtual const CLID & RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::objType | ( | ) | const [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
virtual long RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::i_repSvcType | ( | ) | const [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
virtual StatusCode RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::updateObj | ( | IOpaqueAddress * | pAddress, | |
DataObject * | refpObject | |||
) | [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
virtual StatusCode RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::updateObjRefs | ( | IOpaqueAddress * | pAddress, | |
DataObject * | pObject | |||
) | [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
virtual StatusCode RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::updateRep | ( | IOpaqueAddress * | pAddress, | |
DataObject * | pObject | |||
) | [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
virtual StatusCode RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::updateRepRefs | ( | IOpaqueAddress * | pAddress, | |
DataObject * | pObject | |||
) | [virtual, inherited] |
Reimplemented from RootIOBaseCnv.
StatusCode RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::service | ( | const std::string & | name, | |
T *& | psvc, | |||
bool | createIf = false | |||
) | const [inherited] |
Reimplemented from RootIOBaseCnv.
StatusCode RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::service | ( | const std::string & | type, | |
const std::string & | name, | |||
T *& | psvc | |||
) | const [inherited] |
Reimplemented from RootIOBaseCnv.
static unsigned char RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::storageType | ( | ) | [static, inherited] |
Reimplemented from RootIOBaseCnv.
static const InterfaceID & RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::interfaceID | ( | ) | [static, inherited] |
Reimplemented from RootIOBaseCnv.
static const InterfaceID & RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::interfaceID | ( | ) | [static, inherited] |
Reimplemented from RootIOBaseCnv.
ISvcLocator * RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::serviceLocator | ( | ) | const [protected, inherited] |
Reimplemented from RootIOBaseCnv.
IMessageSvc * RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::msgSvc | ( | ) | const [protected, inherited] |
Reimplemented from RootIOBaseCnv.
IMessageSvc * RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::messageService | ( | ) | const [protected, inherited] |
Reimplemented from RootIOBaseCnv.
IDataManagerSvc * RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::dataManager | ( | ) | const [protected, inherited] |
Reimplemented from RootIOBaseCnv.
RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::INVALID_ADDRESS [inherited] |
Reimplemented from RootIOBaseCnv.
RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::INVALID_OBJECT [inherited] |
Reimplemented from RootIOBaseCnv.
RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::NO_MEMORY [inherited] |
Reimplemented from RootIOBaseCnv.
RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::BAD_STORAGE_TYPE [inherited] |
Reimplemented from RootIOBaseCnv.
RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::NO_SOURCE_OBJECT [inherited] |
Reimplemented from RootIOBaseCnv.
RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::ICONVERSIONSVC_LAST_ERROR [inherited] |
Reimplemented from RootIOBaseCnv.
std::string RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::m_perclassName [protected, inherited] |
PerRunHeader * RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::m_perInObj [protected, inherited] |
PerRunHeader * RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::m_perOutObj [protected, inherited] |
IRootIOSvc * RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::m_rioSvc [protected, inherited] |
Reimplemented from RootIOBaseCnv.
IConversionSvc * RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::m_cnvSvc [protected, inherited] |
Reimplemented from RootIOBaseCnv.
RootInputStream * RootIOTypedCnv< PerRunHeader , DayaBay::RunHeader >::m_ris [protected, inherited] |
Reimplemented from RootIOBaseCnv.