BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
TreeCorrectedETSCnv Class Reference

#include <TreeCorrectedETSCnv.h>

+ Inheritance diagram for TreeCorrectedETSCnv:

Public Member Functions

const CLID & objType () const
 
 TreeCorrectedETSCnv (ISvcLocator *svc)
 
virtual ~TreeCorrectedETSCnv ()
 
virtual long repSvcType () const
 
const CLID & objType () const
 
 TreeCorrectedETSCnv (ISvcLocator *svc)
 
virtual ~TreeCorrectedETSCnv ()
 
virtual long repSvcType () const
 
const CLID & objType () const
 
 TreeCorrectedETSCnv (ISvcLocator *svc)
 
virtual ~TreeCorrectedETSCnv ()
 
virtual long repSvcType () const
 
- Public Member Functions inherited from TreeCalBaseCnv
virtual ~TreeCalBaseCnv ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
virtual StatusCode createObj (IOpaqueAddress *addr, DataObject *&refpObject)
 
ICalibTreeSvcgetCalibTreeSvc ()
 
 TreeCalBaseCnv (ISvcLocator *svc, const CLID &clid)
 
virtual StatusCode createRoot (const std::string &fname, CalibData::CalibBase1 *pTDSObj)
 
virtual ~TreeCalBaseCnv ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
virtual StatusCode createObj (IOpaqueAddress *addr, DataObject *&refpObject)
 
ICalibTreeSvcgetCalibTreeSvc ()
 
 TreeCalBaseCnv (ISvcLocator *svc, const CLID &clid)
 
virtual StatusCode createRoot (const std::string &fname, CalibData::CalibBase1 *pTDSObj)
 
virtual ~TreeCalBaseCnv ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
virtual StatusCode createObj (IOpaqueAddress *addr, DataObject *&refpObject)
 
ICalibTreeSvcgetCalibTreeSvc ()
 
 TreeCalBaseCnv (ISvcLocator *svc, const CLID &clid)
 
virtual StatusCode createRoot (const std::string &fname, CalibData::CalibBase1 *pTDSObj)
 
- Public Member Functions inherited from Converter< Ty1, Ty2 >
destinationoperator (const source &) const
 

Static Public Member Functions

static const CLID & classID ()
 
static const CLID & classID ()
 
static const CLID & classID ()
 
- Static Public Member Functions inherited from TreeCalBaseCnv
static const unsigned char storageType ()
 
static const unsigned char storageType ()
 
static const unsigned char storageType ()
 

Protected Member Functions

virtual StatusCode i_createObj (IOpaqueAddress *address, DataObject *&refpObject)
 
virtual StatusCode i_createObj (IOpaqueAddress *address, DataObject *&refpObject)
 
virtual StatusCode i_createObj (IOpaqueAddress *address, DataObject *&refpObject)
 
- Protected Member Functions inherited from TreeCalBaseCnv
virtual StatusCode internalCreateObj (DataObject *&refpObject, IOpaqueAddress *address)
 
virtual StatusCode i_createObj (IOpaqueAddress *address, DataObject *&refpObject)
 
virtual StatusCode i_processObj (DataObject *pObject, IOpaqueAddress *address)
 In case there is additional work to do on the created object.
 
virtual StatusCode fillRoot (CalibData::CalibBase *pTDSObj, TObject *pRootObj)
 
void setBaseInfo (CalibData::CalibBase1 *pObj)
 Another utility for derived classes to use.
 
virtual StatusCode internalCreateObj (DataObject *&refpObject, IOpaqueAddress *address)
 
virtual StatusCode i_createObj (IOpaqueAddress *address, DataObject *&refpObject)
 
virtual StatusCode i_processObj (DataObject *pObject, IOpaqueAddress *address)
 In case there is additional work to do on the created object.
 
virtual StatusCode fillRoot (CalibData::CalibBase *pTDSObj, TObject *pRootObj)
 
void setBaseInfo (CalibData::CalibBase1 *pObj)
 
virtual StatusCode internalCreateObj (DataObject *&refpObject, IOpaqueAddress *address)
 
virtual StatusCode i_createObj (IOpaqueAddress *address, DataObject *&refpObject)
 
virtual StatusCode i_processObj (DataObject *pObject, IOpaqueAddress *address)
 In case there is additional work to do on the created object.
 
virtual StatusCode fillRoot (CalibData::CalibBase *pTDSObj, TObject *pRootObj)
 
void setBaseInfo (CalibData::CalibBase1 *pObj)
 
- Protected Member Functions inherited from Converter< Ty1, Ty2 >
virtual destinationconvert (const source &) const =0
 

Friends

class CnvFactory< TreeCorrectedETSCnv >
 

Additional Inherited Members

- Public Types inherited from Converter< Ty1, Ty2 >
typedef Ty1 source
 
typedef Ty2 destination
 
- Protected Attributes inherited from TreeCalBaseCnv
ICalibTreeSvcm_treeSvc
 
ICalibMetaCnvSvcm_metaSvc
 
IInstrumentNamem_instrSvc
 
int m_serNo
 
int m_runfrm
 
int m_runto
 
TFile * m_outFile
 
TTree * m_ttree
 
TFile * m_inFile
 
TDirectory * m_saveDir
 

Detailed Description

Base class for CAL calibration converters from Ttrees to TCDS. All such converters need to do certain things, which are handled here. Methods common to all calibrations are in the base class TreeCalBaseCnv

Author
huang bin

Definition at line 20 of file CalibTreeCnv-00-02-02-bak/src/cnv/TreeCorrectedETSCnv.h.

Constructor & Destructor Documentation

◆ TreeCorrectedETSCnv() [1/3]

TreeCorrectedETSCnv::TreeCorrectedETSCnv ( ISvcLocator *  svc)

◆ ~TreeCorrectedETSCnv() [1/3]

virtual TreeCorrectedETSCnv::~TreeCorrectedETSCnv ( )
inlinevirtual

◆ TreeCorrectedETSCnv() [2/3]

TreeCorrectedETSCnv::TreeCorrectedETSCnv ( ISvcLocator *  svc)

◆ ~TreeCorrectedETSCnv() [2/3]

virtual TreeCorrectedETSCnv::~TreeCorrectedETSCnv ( )
inlinevirtual

◆ TreeCorrectedETSCnv() [3/3]

TreeCorrectedETSCnv::TreeCorrectedETSCnv ( ISvcLocator *  svc)

◆ ~TreeCorrectedETSCnv() [3/3]

virtual TreeCorrectedETSCnv::~TreeCorrectedETSCnv ( )
inlinevirtual

Definition at line 29 of file CalibTreeCnv-00-02-04/src/cnv/TreeCorrectedETSCnv.h.

29{};

Member Function Documentation

◆ classID() [1/3]

const CLID & TreeCorrectedETSCnv::classID ( )
static

◆ classID() [2/3]

static const CLID & TreeCorrectedETSCnv::classID ( )
static

◆ classID() [3/3]

static const CLID & TreeCorrectedETSCnv::classID ( )
static

◆ i_createObj() [1/3]

StatusCode TreeCorrectedETSCnv::i_createObj ( IOpaqueAddress *  address,
DataObject *&  refpObject 
)
protectedvirtual

This creates the transient representation of an object from the corresponding ROOT object. This actually does the "new" operation and deals with the attributes of the node. This base class implementation does nothing; it should not normally be called because it doesn't correspond to any TCDS class. Instead, i_createObj of some derived class will be called.

Parameters
fnameThe ROOT file to be read in to be used to builds the object
refpObjectthe object to be built
Returns
status depending on the completion of the call

Reimplemented from TreeCalBaseCnv.

Definition at line 41 of file CalibTreeCnv-00-02-02-bak/src/cnv/TreeCorrectedETSCnv.cxx.

42 {
43
44 MsgStream log(msgSvc(), "TreeCorrectedETSCnv");
45 log<<MSG::DEBUG<<"SetProperty"<<endreq;
46 TreeAddress* add = dynamic_cast<TreeAddress*>(addr);
47 DatabaseRecord *records=add->pp();
48
49 TBufferFile *buf = new TBufferFile(TBuffer::kRead);
50 buf->SetBuffer((*records)["FinalETS"],51200000,kFALSE);
51
52 //std::cout<<" SftVer is "<<(*records)["SftVer"];
53 //std::cout<<" CalVerSft is "<<(*records)["CalParVer"];
54 std::cout<<" File name is "<<(*records)["FileName"]<<std::endl;
55
56 TTree* tree= new TTree();
57 tree->Streamer(*buf);
58
60 // Read in our object
61 int i,no;
62
63 // read TestCalibConst ------------------------------------------------------------
64 ULong64_t ets1,ets2_pre,flag_pre;
65 int trigChannel_9,evt;
66 tree->SetBranchAddress("ets1", &ets1);
67 tree->SetBranchAddress("ets2_pre", &ets2_pre);
68 tree->SetBranchAddress("flag_pre", &flag_pre);
69 tree->SetBranchAddress("trigChannel_9", &trigChannel_9);
70 tree->SetBranchAddress("evt", &evt);
71 no = tree->GetEntries();
72 tmpObject->setNpar(no);
73 for(i=0; i<no; i++){
74 tree->GetEntry(i);
75 tmpObject ->setEts1(ets1);
76 tmpObject ->setEts2_pre(ets2_pre);
77 tmpObject ->setFlag_pre(flag_pre);
78 tmpObject ->setTrigChannel_9(trigChannel_9);
79 tmpObject ->setEvt(evt);
80 }
81
82 refpObject=tmpObject;
83
84 delete tree;
85 return StatusCode::SUCCESS;
86
87
88}
const int no
IMessageSvc * msgSvc()
void setFlag_pre(unsigned long flag_pre)
void setTrigChannel_9(int trigChannel_9)
void setEts1(unsigned long ets1)
void setNpar(const int npar)
void setEts2_pre(unsigned long ets2_pre)
virtual DatabaseRecord * pp()
Definition: TreeAddress.h:130

◆ i_createObj() [2/3]

virtual StatusCode TreeCorrectedETSCnv::i_createObj ( IOpaqueAddress *  address,
DataObject *&  refpObject 
)
protectedvirtual

This creates the transient representation of an object from the corresponding ROOT object. This actually does the "new" operation and deals with the attributes of the node. This base class implementation does nothing; it should not normally be called because it doesn't correspond to any TCDS class. Instead, i_createObj of some derived class will be called.

Parameters
fnameThe ROOT file to be read in to be used to builds the object
refpObjectthe object to be built
Returns
status depending on the completion of the call

Reimplemented from TreeCalBaseCnv.

◆ i_createObj() [3/3]

virtual StatusCode TreeCorrectedETSCnv::i_createObj ( IOpaqueAddress *  address,
DataObject *&  refpObject 
)
protectedvirtual

This creates the transient representation of an object from the corresponding ROOT object. This actually does the "new" operation and deals with the attributes of the node. This base class implementation does nothing; it should not normally be called because it doesn't correspond to any TCDS class. Instead, i_createObj of some derived class will be called.

Parameters
fnameThe ROOT file to be read in to be used to builds the object
refpObjectthe object to be built
Returns
status depending on the completion of the call

Reimplemented from TreeCalBaseCnv.

◆ objType() [1/3]

const CLID & TreeCorrectedETSCnv::objType ( ) const

◆ objType() [2/3]

const CLID & TreeCorrectedETSCnv::objType ( ) const

◆ objType() [3/3]

const CLID & TreeCorrectedETSCnv::objType ( ) const

◆ repSvcType() [1/3]

virtual long TreeCorrectedETSCnv::repSvcType ( ) const
inlinevirtual

Definition at line 34 of file CalibTreeCnv-00-02-02-bak/src/cnv/TreeCorrectedETSCnv.h.

34 {
36 }
unsigned const char CALIBTREE_StorageType
Definition: ICalibTreeSvc.h:20

◆ repSvcType() [2/3]

virtual long TreeCorrectedETSCnv::repSvcType ( ) const
inlinevirtual

Definition at line 34 of file CalibTreeCnv-00-02-03-bak/src/cnv/TreeCorrectedETSCnv.h.

34 {
36 }

◆ repSvcType() [3/3]

virtual long TreeCorrectedETSCnv::repSvcType ( ) const
inlinevirtual

Definition at line 34 of file CalibTreeCnv-00-02-04/src/cnv/TreeCorrectedETSCnv.h.

34 {
36 }

Friends And Related Function Documentation

◆ CnvFactory< TreeCorrectedETSCnv >


The documentation for this class was generated from the following files: