BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
CalibTreeCnv-00-02-04/src/cnv/TreeMdcAlignDataCnv.cxx
Go to the documentation of this file.
1#include "GaudiKernel/MsgStream.h"
6#include "TFile.h"
7#include "TTree.h"
8#include "TDirectory.h"
9#include "TObject.h"
10#include "TBuffer.h"
11
12#include "GaudiKernel/CnvFactory.h"
13#include "GaudiKernel/IOpaqueAddress.h"
14#include "GaudiKernel/DataObject.h"
15#include "GaudiKernel/IAddressCreator.h"
16#include "GaudiKernel/IDataProviderSvc.h"
17#include "GaudiKernel/IConversionSvc.h"
18#include "GaudiKernel/GenericAddress.h"
19
20#include "CalibDataSvc/ICalibTreeSvc.h" //maybe
22
23// Temporary. Hope to find a better way to do this
25using namespace CalibData;
26//static CnvFactory<TreeMdcAlignDataCnv> DedxCal_factory;
27//const ICnvFactory& TreeMdcAlignDataCnvFactory = DedxCal_factory;
28
29
30
33
34 }
35
36
37const CLID& TreeMdcAlignDataCnv::objType() const {
39}
40
41const CLID& TreeMdcAlignDataCnv::classID() {
43}
44
45StatusCode TreeMdcAlignDataCnv::i_createObj(IOpaqueAddress* addr,
46 DataObject*& refpObject) {
47
48 MsgStream log(msgSvc(), "TreeMdcAlignDataCnv");
49 log<<MSG::DEBUG<<"SetProperty"<<endreq;
50
52 TreeAddress* add = dynamic_cast<TreeAddress*>(addr);
53
54 DatabaseRecord *records=add->pp();
55 std::cout<<" SftVer is "<<(*records)["SftVer"];
56 std::cout<<" CalVerSft is "<<(*records)["MdcAlignVer"];
57 std::cout<<" File name is "<<(*records)["AlignEPFileName"]<<std::endl;
58
59 /*char mem[1024000];
60 char mem1[1024000];
61 char mem2[1024000];
62
63 memcpy(mem,par0,treesize[0]);
64 memcpy(mem1,par0+1024000,treesize[1]);
65 memcpy(mem2,par0+1024000*2,treesize[2]);*/
66 // std::cout<<"mem="<<mem<<" mem1:"<<mem1<<"mem2:"<<mem2<<std::endl;
67 tmpObject->readPar((*records)["AlignEndPlate"],(*records)["WirePos"],(*records)["WireTension"]);
68 refpObject=tmpObject;
69 return StatusCode::SUCCESS;
70
71
72}
73
const CLID CLID_Calib_MdcAlign
Definition: CalibModel.h:55
IMessageSvc * msgSvc()
void readPar(char *p1, char *p2, char *p3)
virtual DatabaseRecord * pp()
Definition: TreeAddress.h:130
virtual StatusCode i_createObj(IOpaqueAddress *address, DataObject *&refpObject)