1#include "GaudiKernel/MsgStream.h"
11#include "GaudiKernel/CnvFactory.h"
12#include "GaudiKernel/IOpaqueAddress.h"
13#include "GaudiKernel/DataObject.h"
14#include "GaudiKernel/IAddressCreator.h"
15#include "GaudiKernel/IDataProviderSvc.h"
16#include "GaudiKernel/IConversionSvc.h"
17#include "GaudiKernel/GenericAddress.h"
45 DataObject*& refpObject) {
47 MsgStream log(
msgSvc(),
"RootEsTimeCalibDataCnv");
48 log<<MSG::DEBUG<<
"SetProperty"<<endreq;
52 { log<<MSG::ERROR<<
"unable to open files"<<endreq;
63 double EsTimeCalibConst;
64 vector<double> TestCalibConst;
66 TTree *Testtree = (TTree*)
m_inFile -> Get(
"h2");
69 no= Testtree -> GetEntries();
71 Testtree->GetEntry(i);
72 TestCalibConst.push_back(EsTimeCalibConst);
76 double t0offsete,t0offsetb;
77 int bunchtime, runFrom, runTo, eventFrom, eventTo;
78 TTree *tree2 = (TTree*)
m_inFile -> Get(
"calibconst");
79 tree2->SetBranchAddress(
"t0offsete", &t0offsete);
80 tree2->SetBranchAddress(
"t0offsetb", &t0offsetb);
81 tree2->SetBranchAddress(
"bunchtime", &bunchtime);
82 if( tree2->GetBranchStatus(
"runFrom" ) ) {
83 tree2->SetBranchAddress(
"runFrom", &runFrom );
84 tree2->SetBranchAddress(
"runTo", &runTo );
85 tree2->SetBranchAddress(
"eventFrom", &eventFrom );
86 tree2->SetBranchAddress(
"eventTo", &eventTo );
95 no = tree2->GetEntries();
107 tmpObject -> setTestCalibConst(&TestCalibConst);
108 refpObject=tmpObject;
110 return StatusCode::SUCCESS;
116 MsgStream log(
msgSvc(),
"RootEsTimeCalibDataCnv");
121 { log<<MSG::ERROR<<
"unable to open files"<<endreq;
145 log<<MSG::INFO<<
"successfully create RootFile"<<endreq;
const CLID CLID_Calib_EsTimeCal
void setRunFrom(const int runFrom)
void setEventTo(const int eventTo)
void setToffsetb(const double toffsetb)
void setEventFrom(const int eventFrom)
void setBunchTime(const int bunchtime)
void setRunTo(const int runTo)
void setToffsete(const double toffsete)
StatusCode openRead(const std::string &fname)
virtual StatusCode openWrite(const std::string &fname)
const CLID & objType() const
RootEsTimeCalibDataCnv(ISvcLocator *svc)
virtual StatusCode i_createObj(const std::string &fname, DataObject *&refpObject)
virtual StatusCode createRoot(const std::string &fname, CalibData::CalibBase1 *pTDSObj)
static const CLID & classID()
curve SetBranchAddress("CurveSize",&CurveSize)