|
BOSS 8.0.0
BESIII Offline Software System
|
#include <RootCalBaseCnv.h>
Public Member Functions | |
| virtual | ~RootCalBaseCnv () |
| virtual StatusCode | initialize () |
| virtual StatusCode | finalize () |
| virtual StatusCode | createObj (IOpaqueAddress *addr, DataObject *&refpObject) |
| ICalibRootSvc * | getCalibRootSvc () |
| RootCalBaseCnv (ISvcLocator *svc, const CLID &clid) | |
| virtual StatusCode | createRoot (const std::string &fname, CalibData::CalibBase1 *pTDSObj) |
| virtual StatusCode | readRootObj (const std::string &treename, const std::string &branch, TObject *&pCalib, unsigned index=0) |
| virtual StatusCode | readRootObj (TTree *tree, const std::string &branch, TObject *&pCalib, unsigned index=0) |
| Public Member Functions inherited from Converter< Ty1, Ty2 > | |
| destination * | operator (const source &) const |
| destination * | operator (const source &) const |
| destination * | operator (const source &) const |
Static Public Member Functions | |
| static const unsigned char | storageType () |
Protected Member Functions | |
| virtual StatusCode | internalCreateObj (const std::string &fname, DataObject *&refpObject, IOpaqueAddress *address) |
| virtual StatusCode | i_createObj (const std::string &fname, 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) |
| virtual StatusCode | openWrite (const std::string &fname) |
| StatusCode | closeWrite () |
| StatusCode | openRead (const std::string &fname) |
| StatusCode | closeRead () |
| void | setBaseInfo (CalibData::CalibBase1 *pObj) |
| Another utility for derived classes to use. | |
| Protected Member Functions inherited from Converter< Ty1, Ty2 > | |
| virtual destination * | convert (const source &) const =0 |
| virtual destination * | convert (const source &) const =0 |
| virtual destination * | convert (const source &) const =0 |
Protected Attributes | |
| ICalibRootSvc * | m_rootSvc |
| ICalibMetaCnvSvc * | m_metaSvc |
| IInstrumentName * | m_instrSvc |
| int | m_serNo |
| ITime * | m_vstart |
| ITime * | m_vend |
| int | m_runfrm |
| int | m_runto |
| TFile * | m_outFile |
| TTree * | m_ttree |
| TFile * | m_inFile |
| TDirectory * | m_saveDir |
Additional Inherited Members | |
| Public Types inherited from Converter< Ty1, Ty2 > | |
| typedef Ty1 | source |
| typedef Ty2 | destination |
| typedef Ty1 | source |
| typedef Ty2 | destination |
| typedef Ty1 | source |
| typedef Ty2 | destination |
Base class for calibration converters from XML files to TCDS. All such converters need to do certain things, which are handled here.
Definition at line 39 of file RootCalBaseCnv.h.
|
virtual |
@file RootCalBaseCnv.cxx
Implementation file for Root calibration converter base class
Definition at line 30 of file RootCalBaseCnv.cxx.
| RootCalBaseCnv::RootCalBaseCnv | ( | ISvcLocator * | svc, |
| const CLID & | clid ) |
Constructor for this converter
| svc | a ISvcLocator interface to find services |
| clid | the type of object the converter is able to convert |
Definition at line 39 of file RootCalBaseCnv.cxx.
Referenced by internalCreateObj(), RootCorrectedETSCnv::RootCorrectedETSCnv(), RootDedxCalibDataCnv::RootDedxCalibDataCnv(), RootDedxSimDataCnv::RootDedxSimDataCnv(), RootEmcCalibDataCnv::RootEmcCalibDataCnv(), RootEsTimeCalibDataCnv::RootEsTimeCalibDataCnv(), RootEstTofCalibDataCnv::RootEstTofCalibDataCnv(), RootInjSigIntervalCnv::RootInjSigIntervalCnv(), RootInjSigTimeCnv::RootInjSigTimeCnv(), RootMdcCalibDataCnv::RootMdcCalibDataCnv(), RootMucCalibDataCnv::RootMucCalibDataCnv(), RootOffEvtFilterCnv::RootOffEvtFilterCnv(), RootTofCalibDataCnv::RootTofCalibDataCnv(), RootTofElecDataCnv::RootTofElecDataCnv(), and RootTofSimDataCnv::RootTofSimDataCnv().
|
protected |
Clean up when we've finished reading in
Definition at line 126 of file RootCalBaseCnv.cxx.
Referenced by internalCreateObj().
|
protected |
Finish up writing file opened with openWrite: fill the tree write the file close the file Delete TFile (causes associated Tree to be deleted)
Definition at line 172 of file RootCalBaseCnv.cxx.
Referenced by RootDedxCalibDataCnv::createRoot(), RootEmcCalibDataCnv::createRoot(), RootEstTofCalibDataCnv::createRoot(), RootMdcCalibDataCnv::createRoot(), and RootTofCalibDataCnv::createRoot().
|
virtual |
Create the transient representation of an object, given an opaque address. This and the following update method comprise the core functionality of calibration converters.
Definition at line 241 of file RootCalBaseCnv.cxx.
|
virtual |
Create ROOT file corresponding to TDS object input. Default implementation is to return an error. Must be separately implemented for each calibration type.
| fname | Filename for output file |
| pTDSObj | Pointer to tds object to be converted |
Reimplemented in RootCorrectedETSCnv, RootDedxCalibDataCnv, RootDedxSimDataCnv, RootEmcCalibDataCnv, RootEsTimeCalibDataCnv, RootEstTofCalibDataCnv, RootInjSigIntervalCnv, RootInjSigTimeCnv, RootMdcCalibDataCnv, RootMucCalibDataCnv, RootOffEvtFilterCnv, RootTofCalibDataCnv, and RootTofSimDataCnv.
Definition at line 85 of file RootCalBaseCnv.cxx.
Referenced by CalibRootCnvSvc::writeToRoot().
|
protectedvirtual |
Given a pointer to a TDS object which can be cast to "our" type, fill in corresponding information in the corresponding root class
| pTDSObj | Pointer to tds object to be converted |
| pRootObj | Pointer to destination root object |
...maybe don't need pRootObj argument; keep this as the (protected) data member m_rootObj. Or else this routine could set the protected member to this passed-in value
Definition at line 230 of file RootCalBaseCnv.cxx.
|
virtual |
Definition at line 81 of file RootCalBaseCnv.cxx.
|
inline |
Definition at line 55 of file RootCalBaseCnv.h.
|
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.
| fname | The ROOT file to be read in to be used to builds the object |
| refpObject | the object to be built |
Reimplemented in RootCorrectedETSCnv, RootDedxCalibDataCnv, RootDedxSimDataCnv, RootEmcCalibDataCnv, RootEsTimeCalibDataCnv, RootEstTofCalibDataCnv, RootInjSigIntervalCnv, RootInjSigTimeCnv, RootMdcCalibDataCnv, RootMucCalibDataCnv, RootOffEvtFilterCnv, RootTofCalibDataCnv, RootTofElecDataCnv, and RootTofSimDataCnv.
Definition at line 302 of file RootCalBaseCnv.cxx.
Referenced by internalCreateObj().
|
protectedvirtual |
In case there is additional work to do on the created object.
Definition at line 308 of file RootCalBaseCnv.cxx.
Referenced by internalCreateObj().
|
virtual |
Definition at line 51 of file RootCalBaseCnv.cxx.
|
protectedvirtual |
This creates the transient representation of an object from the corresponding ROOT object it, then fills it and process it. This implementation actually only calls the i_* methods of the "right" converter to do the job; so the very first thing it does is get a pointer to the appropriate derived converter. Converters typically don't need to override this method but only to override/implement some of the i_* methods.
| pRootObj | pointer to the ROOT object |
| refpObject | the object to be built |
| address | the opaque address for this object |
Definition at line 255 of file RootCalBaseCnv.cxx.
Referenced by createObj().
|
protected |
Utility for "leaf" converters to call @param Root file to open for read
| Name | of branch to be read in |
| ref. | to pCalib pointer which will be set to address of read-in object |
Definition at line 92 of file RootCalBaseCnv.cxx.
Referenced by RootCorrectedETSCnv::i_createObj(), RootDedxCalibDataCnv::i_createObj(), RootDedxSimDataCnv::i_createObj(), RootEmcCalibDataCnv::i_createObj(), RootEsTimeCalibDataCnv::i_createObj(), RootEstTofCalibDataCnv::i_createObj(), RootInjSigIntervalCnv::i_createObj(), RootInjSigTimeCnv::i_createObj(), RootMdcCalibDataCnv::i_createObj(), RootMucCalibDataCnv::i_createObj(), RootOffEvtFilterCnv::i_createObj(), RootTofCalibDataCnv::i_createObj(), RootTofElecDataCnv::i_createObj(), and RootTofSimDataCnv::i_createObj().
|
protectedvirtual |
Utility used by derived converters to start writing a ROOT file (open TFile, make a TTree, give it a branch)
| fname | Name for new file |
| className | Name of class for object specified in next parameter; used to name branch as well) |
| pCalib | pointer to object used to create the branch |
Definition at line 140 of file RootCalBaseCnv.cxx.
Referenced by RootCorrectedETSCnv::createRoot(), RootDedxCalibDataCnv::createRoot(), RootDedxSimDataCnv::createRoot(), RootEmcCalibDataCnv::createRoot(), RootEsTimeCalibDataCnv::createRoot(), RootEstTofCalibDataCnv::createRoot(), RootInjSigIntervalCnv::createRoot(), RootInjSigTimeCnv::createRoot(), RootMdcCalibDataCnv::createRoot(), RootOffEvtFilterCnv::createRoot(), RootTofCalibDataCnv::createRoot(), and RootTofSimDataCnv::createRoot().
|
virtual |
Read in object (by default the first) from specified branch.
Definition at line 187 of file RootCalBaseCnv.cxx.
Referenced by readRootObj().
|
virtual |
Definition at line 194 of file RootCalBaseCnv.cxx.
|
protected |
Another utility for derived classes to use.
Another convenience for derived classes: sets information belonging to the calibration base class, namely validity interval and serial number.
Definition at line 314 of file RootCalBaseCnv.cxx.
Referenced by internalCreateObj().
|
inlinestatic |
Definition at line 57 of file RootCalBaseCnv.h.
|
protected |
Definition at line 193 of file RootCalBaseCnv.h.
Referenced by closeRead(), RootCorrectedETSCnv::i_createObj(), RootDedxCalibDataCnv::i_createObj(), RootDedxSimDataCnv::i_createObj(), RootEmcCalibDataCnv::i_createObj(), RootEsTimeCalibDataCnv::i_createObj(), RootEstTofCalibDataCnv::i_createObj(), RootInjSigIntervalCnv::i_createObj(), RootInjSigTimeCnv::i_createObj(), RootMdcCalibDataCnv::i_createObj(), RootMucCalibDataCnv::i_createObj(), RootOffEvtFilterCnv::i_createObj(), RootTofCalibDataCnv::i_createObj(), RootTofElecDataCnv::i_createObj(), RootTofSimDataCnv::i_createObj(), openRead(), readRootObj(), and RootCalBaseCnv().
|
protected |
Definition at line 181 of file RootCalBaseCnv.h.
Referenced by initialize(), and RootCalBaseCnv().
|
protected |
Definition at line 180 of file RootCalBaseCnv.h.
Referenced by initialize(), and RootCalBaseCnv().
|
protected |
Definition at line 190 of file RootCalBaseCnv.h.
Referenced by closeWrite(), openWrite(), and RootCalBaseCnv().
|
protected |
Definition at line 179 of file RootCalBaseCnv.h.
Referenced by getCalibRootSvc(), initialize(), and RootCalBaseCnv().
|
protected |
Definition at line 186 of file RootCalBaseCnv.h.
Referenced by internalCreateObj(), and setBaseInfo().
|
protected |
Definition at line 187 of file RootCalBaseCnv.h.
Referenced by internalCreateObj(), and setBaseInfo().
|
protected |
Definition at line 195 of file RootCalBaseCnv.h.
Referenced by closeRead(), closeWrite(), openRead(), openWrite(), and RootCalBaseCnv().
|
protected |
Definition at line 183 of file RootCalBaseCnv.h.
|
protected |
Definition at line 191 of file RootCalBaseCnv.h.
Referenced by RootCalBaseCnv().
|
protected |
Definition at line 185 of file RootCalBaseCnv.h.
Referenced by RootCalBaseCnv().
|
protected |
Definition at line 184 of file RootCalBaseCnv.h.
Referenced by RootCalBaseCnv().