2#include "GaudiKernel/MsgStream.h"
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"
46 DataObject*& refpObject) {
48 MsgStream log(
msgSvc(),
"RootEmcCalibDataCnv");
49 log<<MSG::DEBUG<<
"SetProperty"<<endreq;
53 { log<<MSG::ERROR<<
"unable to open files"<<endreq;
62 double EmcCalibConst[6240];
63 int EmcIxtalNumber[6240];
64 vector<double> DigiCalibConst;
65 vector<int> IxtalNumber;
66 TTree *Digitree = (TTree*)
m_inFile -> Get(
"DigiCalibConst");
70 for(i=0; i<6240; i++){
71 DigiCalibConst.push_back(EmcCalibConst[i]);
72 IxtalNumber.push_back(EmcIxtalNumber[i]);
74 tmpObject -> setDigiCalibConst(&DigiCalibConst);
75 tmpObject -> setIxtalNumber(&IxtalNumber);
79 return StatusCode::SUCCESS;
85 MsgStream log(
msgSvc(),
"RootEmcCalibDataCnv");
90 { log<<MSG::ERROR<<
"unable to open files"<<endreq;
100 TTree *Digitree =
new TTree(
"DigiCalibConst",
"DigiCalibConst");
101 Digitree -> Branch(
"DigiCalibConst", &EmcCalibConst,
"EmcCalibConst/D");
102 Digitree -> Branch(
"IxtalNumber", &EmcIxtalNumber,
"IxtalNumber/I");
103 tmpNo = tmpObject -> getDigiCalibConstNo();
104 for(i=0; i<tmpNo; i++){
105 EmcCalibConst = tmpObject -> getDigiCalibConst(i);
106 EmcIxtalNumber = tmpObject -> getIxtalNumber(i);
117 log<<MSG::INFO<<
"successfully create RootFile"<<endreq;
const CLID CLID_Calib_EmcCal
data SetBranchAddress("time",&time)
StatusCode openRead(const std::string &fname)
virtual StatusCode openWrite(const std::string &fname)
virtual StatusCode i_createObj(const std::string &fname, DataObject *&refpObject)
const CLID & objType() const
virtual StatusCode createRoot(const std::string &fname, CalibData::CalibBase1 *pTDSObj)
RootEmcCalibDataCnv(ISvcLocator *svc)
static const CLID & classID()