1#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"
42 DataObject*& refpObject) {
44 MsgStream log(
msgSvc(),
"TreeOffEvtFilterCnv");
45 log<<MSG::DEBUG<<
"SetProperty"<<endreq;
49 TBufferFile *buf1 =
new TBufferFile(TBuffer::kRead);
50 TBufferFile *buf2 =
new TBufferFile(TBuffer::kRead);
51 buf1->SetBuffer((*records)[
"data"],512000,kFALSE);
52 buf2->SetBuffer((*records)[
"oef"],512000,kFALSE);
54 std::cout<<
" SftVer is "<<(*records)[
"SftVer"];
55 std::cout<<
" CalVerSft is "<<(*records)[
"CalParVer"];
56 std::cout<<
" File name is "<<(*records)[
"FileName"]<<std::endl;
58 TTree* tree1=
new TTree();
59 tree1->Streamer(*buf1);
60 TTree* tree2=
new TTree();
61 tree2->Streamer(*buf2);
68 int runFrom, runTo, eventFrom, eventTo;
69 tree1->SetBranchAddress(
"runFrom", &runFrom );
70 tree1->SetBranchAddress(
"runTo", &runTo );
71 tree1->SetBranchAddress(
"eventFrom", &eventFrom);
72 tree1->SetBranchAddress(
"eventTo", &eventTo );
78 cout<<
"runFrom in OffEvtFilter is:"<<runFrom<<endl;
79 cout<<
"runTo in OffEvtFilter is:"<<runTo<<endl;
80 cout<<
"EventFrom in OffEvtFilter is:"<<eventFrom<<endl;
81 cout<<
"eventTo in OffEvtFilter is:"<<eventTo<<endl;
85 tree2->SetBranchAddress(
"tbegin", &tBegin);
86 tree2->SetBranchAddress(
"tend", &tEnd);
87 tree2->SetBranchAddress(
"flag", &
flag);
88 no = tree2->GetEntries();
95 cout<<
"OffEvtFilter:i:flag:tBegin:tEnd=="<<i<<
":"<<
flag<<
":"<<tBegin<<
":"<<tEnd<<endl;
102 return StatusCode::SUCCESS;
const CLID CLID_Calib_OffEvtFilter
void setTEnd(const double tEnd)
void setTBegin(const double tBegin)
void setRunTo(const int runTo)
void setFlag(const int flag)
void setNpar(const int npar)
void setRunFrom(const int runFrom)
void setEventTo(const int eventTo)
void setEventFrom(const int eventFrom)
virtual DatabaseRecord * pp()
virtual StatusCode i_createObj(IOpaqueAddress *address, DataObject *&refpObject)
const CLID & objType() const
static const CLID & classID()
TreeOffEvtFilterCnv(ISvcLocator *svc)