BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
RootCnvSvc Class Reference

Root Event Conversion Service which coordinates all of our converters. More...

#include <RootCnvSvc.h>

+ Inheritance diagram for RootCnvSvc:

Classes

class  Leaf
 object regrouping CLID and pathname with treename/branchname More...
 

Public Member Functions

RootInterfacegetRootInterface ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
virtual StatusCode updateServiceState (IOpaqueAddress *pAddress)
 Update state of the service.
 
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface)
 Override inherited queryInterface due to enhanced interface.
 
virtual StatusCode declareObject (const Leaf &leaf)
 Associates a path on TDS with a particular converter.
 
virtual StatusCode commitOutput (const std::string &output, bool do_commit)
 Commit pending output (fill the TTrees).
 
virtual StatusCode createAddress (long int svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress)
 create address containing ROOT treename, branchname, entry number
 
virtual StatusCode createAddress (DataObject *obj, IOpaqueAddress *&refpAddress)
 
virtual StatusCode createAddress (std::string path, IOpaqueAddress *&refpAddress)
 
DigiCnvgetDigiCnv ()
 
DstCnvgetDstCnv ()
 
McCnvgetMcCnv ()
 
TrigCnvgetTrigCnv ()
 
HltCnvgetHltCnv ()
 
EvtRecCnvgetEvtRecCnv ()
 
void setDigiCnv (DigiCnv *reccnv)
 
void setDstCnv (DstCnv *dstcnv)
 
void setMcCnv (McCnv *mccnv)
 
void setTrigCnv (TrigCnv *trigcnv)
 
void setHltCnv (HltCnv *hltcnv)
 
void setEvtRecCnv (EvtRecCnv *evtreccnv)
 
void setRecTrackCnv (RecTrackCnv *rectrackcnv)
 
void setEvtHeaderCnv (EvtHeaderCnv *evtheadercnv)
 
void setEvtNavigatorCnv (EvtNavigatorCnv *evtnavigatorcnv)
 
void setEventCnv (EventCnv *eventCnv)
 
RecTrackCnvgetRecTrackCnv ()
 
EvtHeaderCnvgetEvtHeaderCnv ()
 
EvtNavigatorCnvgetEvtNavigatorCnv ()
 
EventCnvgetEventCnv ()
 
RootInterfacegetRootInterface ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
virtual StatusCode updateServiceState (IOpaqueAddress *pAddress)
 
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface)
 Override inherited queryInterface due to enhanced interface.
 
virtual StatusCode declareObject (const Leaf &leaf)
 Associates a path on TDS with a particular converter.
 
virtual StatusCode commitOutput (const std::string &output, bool do_commit)
 Commit pending output (fill the TTrees).
 
virtual StatusCode createAddress (long int svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress)
 create address containing ROOT treename, branchname, entry number
 
virtual StatusCode createAddress (DataObject *obj, IOpaqueAddress *&refpAddress)
 
virtual StatusCode createAddress (std::string path, IOpaqueAddress *&refpAddress)
 
DigiCnvgetDigiCnv ()
 
DstCnvgetDstCnv ()
 
McCnvgetMcCnv ()
 
TrigCnvgetTrigCnv ()
 
HltCnvgetHltCnv ()
 
EvtRecCnvgetEvtRecCnv ()
 
void setDigiCnv (DigiCnv *reccnv)
 
void setDstCnv (DstCnv *dstcnv)
 
void setMcCnv (McCnv *mccnv)
 
void setTrigCnv (TrigCnv *trigcnv)
 
void setHltCnv (HltCnv *hltcnv)
 
void setEvtRecCnv (EvtRecCnv *evtreccnv)
 
void setRecTrackCnv (RecTrackCnv *rectrackcnv)
 
void setEvtHeaderCnv (EvtHeaderCnv *evtheadercnv)
 
void setEvtNavigatorCnv (EvtNavigatorCnv *evtnavigatorcnv)
 
void setEventCnv (EventCnv *eventCnv)
 
RecTrackCnvgetRecTrackCnv ()
 
EvtHeaderCnvgetEvtHeaderCnv ()
 
EvtNavigatorCnvgetEvtNavigatorCnv ()
 
EventCnvgetEventCnv ()
 

Protected Member Functions

 RootCnvSvc (const std::string &name, ISvcLocator *svc)
 
virtual ~RootCnvSvc ()
 
 RootCnvSvc (const std::string &name, ISvcLocator *svc)
 
virtual ~RootCnvSvc ()
 

Friends

class SvcFactory< RootCnvSvc >
 

Detailed Description

Root Event Conversion Service which coordinates all of our converters.

When a component requests an item not yet available on the TDS, the RootcnvSvc is called to find the appropriiate converter to gain access to the data and put it on the TDS. Based on SICb service written by Markus Frank. If an item is mentioned in the jobOptions as one to be written out, it will be converted from TDS to ROOT by the appropriate converter

Based on the RootCnvSvc of GLast.

Definition at line 40 of file Event/RootCnvSvc/RootCnvSvc-02-01-12/RootCnvSvc/RootCnvSvc.h.

Constructor & Destructor Documentation

◆ RootCnvSvc() [1/2]

RootCnvSvc::RootCnvSvc ( const std::string &  name,
ISvcLocator *  svc 
)
protected

Definition at line 100 of file RootCnvSvc.cxx.

101 : ConversionSvc(name, svc, ROOT_StorageType), m_minSplit(1), m_evtsel(0)
102{
103 StatusCode sc;
104 MsgStream log(msgSvc(), "RootCnvSvc");
105 log << MSG::DEBUG << "RootCnvSvc::constructor" << endreq;
106
107 IService* isvc = 0;
108 sc = serviceLocator()->getService ("RootEvtSelector", isvc, false);
109 if (!sc.isSuccess()) sc = serviceLocator()->getService ("EventSelector", isvc, false);
110 if (sc.isSuccess()) {
111 sc = isvc->queryInterface(IID_IRootEvtSelector, (void**)&m_evtsel);
112 }
113 if(sc.isFailure()) {
114 log << MSG::WARNING << "Unable to start event selector service within RootCnvSvc" << endreq;
115 }
116
117 m_rootInterface= RootInterface::Instance(log);
118 if (!m_rootInterface) log << MSG::ERROR << "Unable to start Root service within RootCnvSvc" << endreq;
119
120
121
122 //Digi
123 declareProperty("digiTreeName", m_dtreeName="Event"); //"Rec"->"Event"
124
125 declareProperty("digiRootInputFile",m_difileName);
126 //if (m_difileName.size()==0){
127 // m_difileName.push_back("digi.root");
128 //}
129 declareProperty("digiRootOutputFile",m_dofileName = "");
130
131 // Split mode for writing the TTree [0,99]
132 declareProperty("digiSplitMode", m_dsplitMode=m_minSplit);
133 // Buffer size for writing ROOT data
134 declareProperty("digiBufferSize", m_dbufSize=3200000);
135 // ROOT default compression
136 declareProperty("digiCompressionLevel", m_dcompressionLevel=1);
137 declareProperty("selectFromTag", m_selectFromTag=0);
138 declareProperty("tagInputFile", m_tagInputFile);
139 //declareProperty("tagFileFormat", m_tagFileFormat=1);
140
141}
const long int ROOT_StorageType
static RootInterface * Instance(MsgStream log)
singleton behaviour

◆ ~RootCnvSvc() [1/2]

virtual RootCnvSvc::~RootCnvSvc ( )
inlineprotectedvirtual

◆ RootCnvSvc() [2/2]

RootCnvSvc::RootCnvSvc ( const std::string &  name,
ISvcLocator *  svc 
)
protected

◆ ~RootCnvSvc() [2/2]

virtual RootCnvSvc::~RootCnvSvc ( )
inlineprotectedvirtual

Definition at line 179 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

179{ };

Member Function Documentation

◆ commitOutput() [1/2]

StatusCode RootCnvSvc::commitOutput ( const std::string &  output,
bool  do_commit 
)
virtual

Commit pending output (fill the TTrees).

Definition at line 397 of file RootCnvSvc.cxx.

398 {
399
400
401
402 MsgStream log( msgSvc(), name() );
403 log << MSG::INFO << "RootCnvSvc::commitOutput starts." << endreq;
404
405 StatusCode sc=m_rootInterface->fillTrees();
406 if (sc.isFailure())
407 log << MSG::ERROR << "No Root tree was filled" << endreq;
408
409 // objects must be cleared after fill
410 else{
411 TObject* oEvtHeader = m_evtheaderCnv->getWriteObject();
412 if (oEvtHeader) oEvtHeader->Clear();
413 TObject* oEvtNavigator = m_evtnavigatorCnv->getWriteObject();
414 if (oEvtNavigator) oEvtNavigator->Clear();
415 TObject* o=m_dCnv->getWriteObject();
416 if (o) o->Clear();
417 TObject* oDst=m_dstCnv->getWriteObject();
418 if (oDst) oDst->Clear();
419 TObject* oMc=m_mcCnv->getWriteObject();
420 if (oMc) oMc->Clear();
421 TObject* oRecTrack=m_rectrackCnv->getWriteObject();
422 if (oRecTrack) oRecTrack->Clear();
423 TObject* oEvtRecEvent = m_evtRecCnv->getWriteObject();
424 if (oEvtRecEvent) oEvtRecEvent->Clear();
425 TObject* oTrig = m_trigCnv->getWriteObject();
426 if(oTrig) oTrig->Clear();
427 TObject* oHlt = m_hltCnv->getWriteObject();
428 if(oHlt) oHlt->Clear();
429 }
430 m_common.clear();
431
432 return sc;
433 }
static TDigiEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
static TDstEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
static TEvtHeader * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
static TEvtNavigator * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
static THltEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
static TMcEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
static TRecTrackEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
virtual StatusCode fillTrees()
fill in all trees
void Clear(Option_t *option="")
Definition: TDigiEvent.cxx:83
void Clear(Option_t *option="")
Definition: TDstEvent.cxx:108
void Clear(Option_t *option="")
Definition: TEvtHeader.cxx:30
void Clear(Option_t *option="")
void Clear(Option_t *option="")
void Clear(Option_t *option="")
Definition: THltEvent.cxx:55
void Clear(Option_t *option="")
Definition: TMcEvent.cxx:93
void Clear(Option_t *option="")
void Clear(Option_t *option="")
Definition: TTrigEvent.cxx:35
static TTrigEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
void clear()
Definition: commonData.cxx:150

◆ commitOutput() [2/2]

virtual StatusCode RootCnvSvc::commitOutput ( const std::string &  output,
bool  do_commit 
)
virtual

Commit pending output (fill the TTrees).

◆ createAddress() [1/6]

StatusCode RootCnvSvc::createAddress ( DataObject *  obj,
IOpaqueAddress *&  refpAddress 
)
virtual

Definition at line 435 of file RootCnvSvc.cxx.

435 {
436
437 // create address for this object
438 MsgStream log(msgSvc(), name());
439
440
441 log << MSG::DEBUG << "RootCnvSvc::createAddress"<<endreq;
442
443 StatusCode status = INVALID_ADDRESS;
444 IRegistry* ent = obj->registry();
445
446 if ( 0 != ent ) {
447 SmartIF<IDataManagerSvc> iaddrReg(dataProvider());
448 std::string path = ent->identifier();
449 LeafMap::iterator itm = m_leaves.find(path);
450
451
452 if ( itm != m_leaves.end() ) {
453 Leaf* leaf = (*itm).second;
454 if ( 0 != leaf ) {
455 std::string spars[3] ;
456 spars[0]=path;
457 spars[1]=leaf->treename;
458 spars[2]=leaf->branchname;
459
460
461 unsigned long ipars[2] ={0,0};
462 if (m_evtsel) ipars[0]=m_evtsel->getRecId();
463
464 status=addressCreator()->createAddress(ROOT_StorageType,leaf->clid,spars,ipars,newAddr);
465 if ( status.isSuccess() ) {
466 status = iaddrReg->registerAddress((IRegistry*)0,path, newAddr);
467 if ( !status.isSuccess() ) {
468 newAddr->release();
469 }
470 }
471 return StatusCode::SUCCESS;
472 }
473 }
474 }
475 return status;
476 }

◆ createAddress() [2/6]

virtual StatusCode RootCnvSvc::createAddress ( DataObject *  obj,
IOpaqueAddress *&  refpAddress 
)
virtual

◆ createAddress() [3/6]

StatusCode RootCnvSvc::createAddress ( long int  svc_type,
const CLID &  clid,
const std::string *  par,
const unsigned long *  ip,
IOpaqueAddress *&  refpAddress 
)
virtual

create address containing ROOT treename, branchname, entry number

Definition at line 372 of file RootCnvSvc.cxx.

377 {
378 MsgStream log( msgSvc(), name() );
379
380 if (svc_type != repSvcType() ) {
381 log << MSG::ERROR << "RootCnvSvc::bad storage type" << svc_type << endreq;
382 return StatusCode::FAILURE;
383 }
384
385 std::string path = spars[0];
386 std::string treename = spars[1];
387 std::string branchname = spars[2];
388 int entry=ipars[0];
389 if (path.size()==0) path="/Event";
390 refpAddress = new RootAddress(ROOT_StorageType,
391 clid,
392 path,treename,branchname,entry);
393 return StatusCode::SUCCESS;
394 }
Definition of a Root address, derived from IOpaqueAddress.

Referenced by RootEventBaseCnv::createRep(), and updateServiceState().

◆ createAddress() [4/6]

virtual StatusCode RootCnvSvc::createAddress ( long int  svc_type,
const CLID &  clid,
const std::string *  par,
const unsigned long *  ip,
IOpaqueAddress *&  refpAddress 
)
virtual

create address containing ROOT treename, branchname, entry number

◆ createAddress() [5/6]

StatusCode RootCnvSvc::createAddress ( std::string  path,
IOpaqueAddress *&  refpAddress 
)
virtual

Definition at line 478 of file RootCnvSvc.cxx.

478 {
479
480 // create address for this object
481 MsgStream log(msgSvc(), name());
482
483 StatusCode status;
484 LeafMap::iterator itm = m_leaves.find(path);
485 SmartIF<IDataManagerSvc> iaddrReg(dataProvider());
486 if ( itm != m_leaves.end() ) {
487 Leaf* leaf = (*itm).second;
488 if ( 0 != leaf ) {
489 std::string spars[3] ;
490 spars[0]=path;
491 spars[1]=leaf->treename;
492 spars[2]=leaf->branchname;
493
494 unsigned long ipars[2] = {0,0};
495 if (m_evtsel) ipars[0]=m_evtsel->getRecId();
496 status=addressCreator()->createAddress(ROOT_StorageType,leaf->clid,spars,ipars,newAddr);
497 if ( status.isSuccess() ) {
498 status = iaddrReg->registerAddress((IRegistry*)0,path, newAddr);
499 if ( !status.isSuccess() ) {
500 newAddr->release();
501 }
502 }
503 return StatusCode::SUCCESS;
504 }
505 }
506
507
508 return StatusCode::FAILURE;
509 }

◆ createAddress() [6/6]

virtual StatusCode RootCnvSvc::createAddress ( std::string  path,
IOpaqueAddress *&  refpAddress 
)
virtual

◆ declareObject() [1/2]

StatusCode RootCnvSvc::declareObject ( const Leaf leaf)
virtual

Associates a path on TDS with a particular converter.

Definition at line 297 of file RootCnvSvc.cxx.

297 {
298 // Purpose and Method: Callback from each of the individual converters that allows
299 // association of TDS path and converter.
300 MsgStream log(msgSvc(), name());
301 log << MSG::DEBUG << "RootCnvSvc::declareObject " << leaf.path << " classid: " << leaf.clid << endreq;
302 Leaf* ll = new Leaf(leaf);
303 std::pair<LeafMap::iterator, bool> p = m_leaves.insert(LeafMap::value_type( leaf.path, ll) );
304 if( p.second ) {
305 return StatusCode::SUCCESS;
306 }
307 delete ll;
308 return StatusCode::FAILURE;
309}

◆ declareObject() [2/2]

virtual StatusCode RootCnvSvc::declareObject ( const Leaf leaf)
virtual

Associates a path on TDS with a particular converter.

◆ finalize() [1/2]

StatusCode RootCnvSvc::finalize ( )
virtual

Definition at line 198 of file RootCnvSvc.cxx.

198 {
199 MsgStream log(msgSvc(), name());
200 log << MSG::DEBUG << "RootCnvSvc::finalize" << endreq;
201
202 ConversionSvc::finalize();
203 // log << MSG::INFO<<"this is the end of RootCnvsvc finalize"<<endreq;
204 for (LeafMap::iterator k = m_leaves.begin(); k != m_leaves.end(); k++ ) {
205 delete (*k).second;
206 }
207 m_leaves.erase(m_leaves.begin(), m_leaves.end());
208
209 return m_rootInterface->finalize();
210}
virtual StatusCode finalize()

◆ finalize() [2/2]

virtual StatusCode RootCnvSvc::finalize ( )
virtual

◆ getDigiCnv() [1/2]

◆ getDigiCnv() [2/2]

DigiCnv * RootCnvSvc::getDigiCnv ( )
inline

Definition at line 151 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

151{return m_dCnv;}

◆ getDstCnv() [1/2]

◆ getDstCnv() [2/2]

DstCnv * RootCnvSvc::getDstCnv ( )
inline

Definition at line 152 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

152{return m_dstCnv;}

◆ getEventCnv() [1/2]

EventCnv * RootCnvSvc::getEventCnv ( )
inline

Definition at line 173 of file Event/RootCnvSvc/RootCnvSvc-02-01-12/RootCnvSvc/RootCnvSvc.h.

173{return m_eventCnv;}

◆ getEventCnv() [2/2]

EventCnv * RootCnvSvc::getEventCnv ( )
inline

Definition at line 173 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

173{return m_eventCnv;}

◆ getEvtHeaderCnv() [1/2]

EvtHeaderCnv * RootCnvSvc::getEvtHeaderCnv ( )
inline

Definition at line 171 of file Event/RootCnvSvc/RootCnvSvc-02-01-12/RootCnvSvc/RootCnvSvc.h.

171{return m_evtheaderCnv;}

◆ getEvtHeaderCnv() [2/2]

EvtHeaderCnv * RootCnvSvc::getEvtHeaderCnv ( )
inline

Definition at line 171 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

171{return m_evtheaderCnv;}

◆ getEvtNavigatorCnv() [1/2]

EvtNavigatorCnv * RootCnvSvc::getEvtNavigatorCnv ( )
inline

Definition at line 172 of file Event/RootCnvSvc/RootCnvSvc-02-01-12/RootCnvSvc/RootCnvSvc.h.

172{return m_evtnavigatorCnv;}

◆ getEvtNavigatorCnv() [2/2]

EvtNavigatorCnv * RootCnvSvc::getEvtNavigatorCnv ( )
inline

Definition at line 172 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

172{return m_evtnavigatorCnv;}

◆ getEvtRecCnv() [1/2]

◆ getEvtRecCnv() [2/2]

EvtRecCnv * RootCnvSvc::getEvtRecCnv ( )
inline

Definition at line 156 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

156{ return m_evtRecCnv; } //zoujh

◆ getHltCnv() [1/2]

HltCnv * RootCnvSvc::getHltCnv ( )
inline

◆ getHltCnv() [2/2]

HltCnv * RootCnvSvc::getHltCnv ( )
inline

Definition at line 155 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

155{ return m_hltCnv; } //fucd

◆ getMcCnv() [1/2]

◆ getMcCnv() [2/2]

McCnv * RootCnvSvc::getMcCnv ( )
inline

Definition at line 153 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

153{return m_mcCnv;}

◆ getRecTrackCnv() [1/2]

◆ getRecTrackCnv() [2/2]

RecTrackCnv * RootCnvSvc::getRecTrackCnv ( )
inline

Definition at line 170 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

170{return m_rectrackCnv;} //*******liangyt

◆ getRootInterface() [1/2]

RootInterface * RootCnvSvc::getRootInterface ( )
inline

Definition at line 124 of file Event/RootCnvSvc/RootCnvSvc-02-01-12/RootCnvSvc/RootCnvSvc.h.

124{return m_rootInterface;}

◆ getRootInterface() [2/2]

RootInterface * RootCnvSvc::getRootInterface ( )
inline

Definition at line 124 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

124{return m_rootInterface;}

◆ getTrigCnv() [1/2]

TrigCnv * RootCnvSvc::getTrigCnv ( )
inline

Definition at line 154 of file Event/RootCnvSvc/RootCnvSvc-02-01-12/RootCnvSvc/RootCnvSvc.h.

154{ return m_trigCnv; } //caogf

Referenced by TrigDataCnv::DataObjectToTObject().

◆ getTrigCnv() [2/2]

TrigCnv * RootCnvSvc::getTrigCnv ( )
inline

Definition at line 154 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

154{ return m_trigCnv; } //caogf

◆ initialize() [1/2]

StatusCode RootCnvSvc::initialize ( )
virtual

Definition at line 143 of file RootCnvSvc.cxx.

143 {
144 // Purpose and Method: Setup GLAST's Event Converter Service.
145 // Associate RootCnvSvc with the EventDataSvc
146 // Associate the list of known converters with this RootCnvSvc
147 // configure map of leaves
148
149 MsgStream log(msgSvc(), name());
150 log << MSG::DEBUG << "RootCnvSvc::initialize" << endreq;
151 StatusCode status = ConversionSvc::initialize();
152 if ( status.isSuccess() ) {
153 // ISvcLocator* svclocator = serviceLocator(); [unused for now]
154 IDataProviderSvc *pIDP = 0;
155 // Set event data service
156 status = service("EventDataSvc", pIDP, true);
157 if ( status.isSuccess() ) {
158 status = setDataProvider ( pIDP );
159 }
160 else {
161 return status;
162 }
163
164
165 // Add converters to the service
166 status = addConverters();
167 if ( !status.isSuccess() ) {
168 log << MSG::ERROR << "Unable to add converters to the service" << endreq;
169 return status;
170 }
171
172
173 // Now we have to configure the map of leaves
174 // Which should contain the association of converters with
175 // paths on the TDS
176 for (LeafMap::iterator k = m_leaves.begin(); k != m_leaves.end(); k++ ) {
177 std::string path = (*k).first;
178 for (LeafMap::iterator j = m_leaves.begin(); j != m_leaves.end(); j++ ) {
179 std::string path2 = (*j).first;
180 std::string pp = (*j).first.substr(0, (*j).first.rfind("/"));
181 if ( path == pp && path != (*j).first ) {
182 (*k).second->push_back((*j).second);
183 }
184 }
185 }
186 }
187
188 // get properties and tell RootInterface about files
189 status=initFiles();
190
191 m_rootInterface->setSelectFromTag(m_selectFromTag);
192 m_rootInterface->setTagInputFile(m_tagInputFile);
193 //m_rootInterface->setTagFileFormat(m_tagFileFormat);
194
195 return status;
196}
virtual void setTagInputFile(std::vector< std::string > input)

◆ initialize() [2/2]

virtual StatusCode RootCnvSvc::initialize ( )
virtual

◆ queryInterface() [1/2]

StatusCode RootCnvSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvInterface 
)
virtual

Override inherited queryInterface due to enhanced interface.

Definition at line 359 of file RootCnvSvc.cxx.

359 {
360
361 if ( IID_IRootCnvSvc == riid ) {
362 *ppvInterface = (RootCnvSvc*)this;
363 }
364 else {
365 // Interface is not directly availible: try out a base class
366 return ConversionSvc::queryInterface(riid, ppvInterface);
367 }
368 addRef();
369 return StatusCode::SUCCESS;
370 }
const InterfaceID IID_IRootCnvSvc
Root Event Conversion Service which coordinates all of our converters.

◆ queryInterface() [2/2]

virtual StatusCode RootCnvSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvInterface 
)
virtual

Override inherited queryInterface due to enhanced interface.

◆ setDigiCnv() [1/2]

void RootCnvSvc::setDigiCnv ( DigiCnv reccnv)
inline

Definition at line 158 of file Event/RootCnvSvc/RootCnvSvc-02-01-12/RootCnvSvc/RootCnvSvc.h.

158{m_dCnv=reccnv;}

Referenced by DigiCnv::initialize().

◆ setDigiCnv() [2/2]

void RootCnvSvc::setDigiCnv ( DigiCnv reccnv)
inline

Definition at line 158 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

158{m_dCnv=reccnv;}

◆ setDstCnv() [1/2]

void RootCnvSvc::setDstCnv ( DstCnv dstcnv)
inline

Definition at line 159 of file Event/RootCnvSvc/RootCnvSvc-02-01-12/RootCnvSvc/RootCnvSvc.h.

159{m_dstCnv=dstcnv;}

Referenced by DstCnv::initialize().

◆ setDstCnv() [2/2]

void RootCnvSvc::setDstCnv ( DstCnv dstcnv)
inline

Definition at line 159 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

159{m_dstCnv=dstcnv;}

◆ setEventCnv() [1/2]

void RootCnvSvc::setEventCnv ( EventCnv eventCnv)
inline

Definition at line 167 of file Event/RootCnvSvc/RootCnvSvc-02-01-12/RootCnvSvc/RootCnvSvc.h.

167{m_eventCnv=eventCnv;}

◆ setEventCnv() [2/2]

void RootCnvSvc::setEventCnv ( EventCnv eventCnv)
inline

Definition at line 167 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

167{m_eventCnv=eventCnv;}

◆ setEvtHeaderCnv() [1/2]

void RootCnvSvc::setEvtHeaderCnv ( EvtHeaderCnv evtheadercnv)
inline

Definition at line 165 of file Event/RootCnvSvc/RootCnvSvc-02-01-12/RootCnvSvc/RootCnvSvc.h.

165{m_evtheaderCnv=evtheadercnv;}

Referenced by EvtHeaderCnv::initialize().

◆ setEvtHeaderCnv() [2/2]

void RootCnvSvc::setEvtHeaderCnv ( EvtHeaderCnv evtheadercnv)
inline

Definition at line 165 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

165{m_evtheaderCnv=evtheadercnv;}

◆ setEvtNavigatorCnv() [1/2]

void RootCnvSvc::setEvtNavigatorCnv ( EvtNavigatorCnv evtnavigatorcnv)
inline

Definition at line 166 of file Event/RootCnvSvc/RootCnvSvc-02-01-12/RootCnvSvc/RootCnvSvc.h.

166{m_evtnavigatorCnv=evtnavigatorcnv;}

Referenced by EvtNavigatorCnv::initialize().

◆ setEvtNavigatorCnv() [2/2]

void RootCnvSvc::setEvtNavigatorCnv ( EvtNavigatorCnv evtnavigatorcnv)
inline

Definition at line 166 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

166{m_evtnavigatorCnv=evtnavigatorcnv;}

◆ setEvtRecCnv() [1/2]

void RootCnvSvc::setEvtRecCnv ( EvtRecCnv evtreccnv)
inline

Definition at line 163 of file Event/RootCnvSvc/RootCnvSvc-02-01-12/RootCnvSvc/RootCnvSvc.h.

163{ m_evtRecCnv = evtreccnv; } //zoujh

Referenced by EvtRecCnv::initialize().

◆ setEvtRecCnv() [2/2]

void RootCnvSvc::setEvtRecCnv ( EvtRecCnv evtreccnv)
inline

Definition at line 163 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

163{ m_evtRecCnv = evtreccnv; } //zoujh

◆ setHltCnv() [1/2]

void RootCnvSvc::setHltCnv ( HltCnv hltcnv)
inline

Definition at line 162 of file Event/RootCnvSvc/RootCnvSvc-02-01-12/RootCnvSvc/RootCnvSvc.h.

162{ m_hltCnv = hltcnv; } //fucd

Referenced by HltCnv::initialize().

◆ setHltCnv() [2/2]

void RootCnvSvc::setHltCnv ( HltCnv hltcnv)
inline

Definition at line 162 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

162{ m_hltCnv = hltcnv; } //fucd

◆ setMcCnv() [1/2]

void RootCnvSvc::setMcCnv ( McCnv mccnv)
inline

Definition at line 160 of file Event/RootCnvSvc/RootCnvSvc-02-01-12/RootCnvSvc/RootCnvSvc.h.

160{m_mcCnv=mccnv;}

Referenced by McCnv::initialize().

◆ setMcCnv() [2/2]

void RootCnvSvc::setMcCnv ( McCnv mccnv)
inline

Definition at line 160 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

160{m_mcCnv=mccnv;}

◆ setRecTrackCnv() [1/2]

void RootCnvSvc::setRecTrackCnv ( RecTrackCnv rectrackcnv)
inline

Definition at line 164 of file Event/RootCnvSvc/RootCnvSvc-02-01-12/RootCnvSvc/RootCnvSvc.h.

164{m_rectrackCnv=rectrackcnv;}

Referenced by RecTrackCnv::initialize().

◆ setRecTrackCnv() [2/2]

void RootCnvSvc::setRecTrackCnv ( RecTrackCnv rectrackcnv)
inline

Definition at line 164 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

164{m_rectrackCnv=rectrackcnv;}

◆ setTrigCnv() [1/2]

void RootCnvSvc::setTrigCnv ( TrigCnv trigcnv)
inline

Definition at line 161 of file Event/RootCnvSvc/RootCnvSvc-02-01-12/RootCnvSvc/RootCnvSvc.h.

161{ m_trigCnv = trigcnv; } //caogf

Referenced by TrigCnv::initialize().

◆ setTrigCnv() [2/2]

void RootCnvSvc::setTrigCnv ( TrigCnv trigcnv)
inline

Definition at line 161 of file InstallArea/include/RootCnvSvc/RootCnvSvc/RootCnvSvc.h.

161{ m_trigCnv = trigcnv; } //caogf

◆ updateServiceState() [1/2]

StatusCode RootCnvSvc::updateServiceState ( IOpaqueAddress *  pAddress)
virtual

Update state of the service.

Definition at line 312 of file RootCnvSvc.cxx.

312 {
313
314 // not sure about the use of recid or bank...
315 MsgStream log(msgSvc(), name());
316
317 log << MSG::DEBUG << "RootCnvSvc::updateServiceState" << endreq;
318
319 StatusCode status = INVALID_ADDRESS;
320 IRegistry* ent = pAddress->registry();
321 if ( 0 != ent ) {
322 SmartIF<IDataManagerSvc> iaddrReg(dataProvider());
323 // if ( 0 != iaddrReg ) {
324 status = StatusCode::SUCCESS;
325 std::string path = ent->identifier();
326 LeafMap::iterator itm = m_leaves.find(path);
327 if ( itm != m_leaves.end() ) {
328 Leaf* leaf = (*itm).second;
329 if ( 0 != leaf ) {
330 for ( Leaf::iterator il = leaf->begin(); il != leaf->end(); il++ ) {
331 IOpaqueAddress* newAddr = 0;
332 unsigned long ipars[2] = {0, 0}; //
333 if (m_evtsel) ipars[0]=m_evtsel->getRecId();
334
335 std::string spars[3]={(*il)->path,(*il)->treename,(*il)->branchname};
336
337 StatusCode ir =createAddress(ROOT_StorageType,
338 (*il)->clid,
339 spars,
340 ipars,
341 newAddr);
342 log << MSG::DEBUG << "RootCnvSvc::updateService " << " ***** " <<
343 (*il)->clid << " ***** " << (*il)->path <<endreq;
344
345 if ( ir.isSuccess() ) {
346 ir = iaddrReg->registerAddress((*il)->path, newAddr);
347 if ( !ir.isSuccess() ) {
348 newAddr->release();
349 status = ir;
350 }
351 }
352 }
353 }
354 }
355 }
356 return StatusCode::SUCCESS;
357 }
virtual StatusCode createAddress(long int svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress)
create address containing ROOT treename, branchname, entry number
Definition: RootCnvSvc.cxx:372

◆ updateServiceState() [2/2]

virtual StatusCode RootCnvSvc::updateServiceState ( IOpaqueAddress *  pAddress)
virtual

Friends And Related Function Documentation

◆ SvcFactory< RootCnvSvc >

friend class SvcFactory< RootCnvSvc >
friend

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