BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
RootCnvSvc.cxx
Go to the documentation of this file.
1#define RootCnvSvc_CXX
2#include "GaudiKernel/SmartIF.h"
3#include <filesystem>
4#include <iostream>
5
6#include "GaudiKernel/GenericAddress.h"
7#include "GaudiKernel/IDataManagerSvc.h"
8#include "GaudiKernel/IDataProviderSvc.h"
9#include "GaudiKernel/ISvcLocator.h"
10#include "GaudiKernel/MsgStream.h"
11#include "GaudiKernel/RegistryEntry.h"
12
13#include "DstEvent/DstEvent.h"
14#include "HltEvent/HltEvent.h" //fucd
15#include "McTruth/McEvent.h"
16#include "RawEvent/DigiEvent.h"
17#include "RootCnvSvc/RootInterface.h"
18#include "TrigEvent/TrigEvent.h" //caogf
19
20#include "RootCnvSvc/RootAddress.h"
21#include "RootCnvSvc/RootCnvSvc.h"
22#include "RootCnvSvc/RootEvtSelector.h"
23
24#include "RootCnvSvc/Digi/DigiCnv.h"
25#include "RootCnvSvc/Digi/EmcDigiCnv.h"
26#include "RootCnvSvc/Digi/LumiDigiCnv.h"
27#include "RootCnvSvc/Digi/MdcDigiCnv.h"
28#include "RootCnvSvc/Digi/MucDigiCnv.h"
29#include "RootCnvSvc/Digi/TofDigiCnv.h"
30#include "RootCnvSvc/Dst/DstCnv.h"
31#include "RootCnvSvc/Dst/EmcTrackCnv.h"
32#include "RootCnvSvc/Dst/ExtTrackCnv.h"
33#include "RootCnvSvc/Dst/MdcDedxCnv.h"
34#include "RootCnvSvc/Dst/MdcKalTrackCnv.h"
35#include "RootCnvSvc/Dst/MdcTrackCnv.h"
36#include "RootCnvSvc/Dst/MucTrackCnv.h"
37#include "RootCnvSvc/Dst/TofTrackCnv.h"
38#include "RootCnvSvc/EventCnv.h"
39#include "RootCnvSvc/Mc/EmcMcHitCnv.h"
40#include "RootCnvSvc/Mc/McCnv.h"
41#include "RootCnvSvc/Mc/McParticleCnv.h"
42#include "RootCnvSvc/Mc/MdcMcHitCnv.h"
43#include "RootCnvSvc/Mc/MucMcHitCnv.h"
44#include "RootCnvSvc/Mc/TofMcHitCnv.h"
45
46#include "RootCnvSvc/Rec/RecBTofCalHitCnv.h"
47#include "RootCnvSvc/Rec/RecETofCalHitCnv.h"
48#include "RootCnvSvc/Rec/RecEmcClusterCnv.h"
49#include "RootCnvSvc/Rec/RecEmcHitCnv.h"
50#include "RootCnvSvc/Rec/RecEmcShowerCnv.h"
51#include "RootCnvSvc/Rec/RecEvTimeCnv.h"
52#include "RootCnvSvc/Rec/RecExtTrackCnv.h"
53#include "RootCnvSvc/Rec/RecMdcDedxCnv.h"
54#include "RootCnvSvc/Rec/RecMdcDedxHitCnv.h"
55#include "RootCnvSvc/Rec/RecMdcHitCnv.h"
56#include "RootCnvSvc/Rec/RecMdcKalHelixSegCnv.h"
57#include "RootCnvSvc/Rec/RecMdcKalTrackCnv.h"
58#include "RootCnvSvc/Rec/RecMdcTrackCnv.h"
59#include "RootCnvSvc/Rec/RecMucRecHitCnv.h"
60#include "RootCnvSvc/Rec/RecMucTrackCnv.h"
61#include "RootCnvSvc/Rec/RecTofTrackCnv.h"
62#include "RootCnvSvc/Rec/RecTrackCnv.h"
63
64#include "RootCnvSvc/EvtRec/EvtRecCnv.h"
65#include "RootCnvSvc/EvtRec/EvtRecDTagCnv.h"
66#include "RootCnvSvc/EvtRec/EvtRecEtaToGGCnv.h"
67#include "RootCnvSvc/EvtRec/EvtRecEventCnv.h"
68#include "RootCnvSvc/EvtRec/EvtRecPi0Cnv.h"
69#include "RootCnvSvc/EvtRec/EvtRecPrimaryVertexCnv.h"
70#include "RootCnvSvc/EvtRec/EvtRecTrackCnv.h"
71#include "RootCnvSvc/EvtRec/EvtRecVeeVertexCnv.h"
72#include "RootCnvSvc/Rec/RecZddChannelCnv.h"
73
74#include "RootCnvSvc/Trig/TrigCnv.h"
75#include "RootCnvSvc/Trig/TrigDataCnv.h"
76
77#include "RootCnvSvc/Hlt/DstHltInfCnv.h"
78#include "RootCnvSvc/Hlt/HltCnv.h"
79#include "RootCnvSvc/Hlt/HltInfCnv.h"
80#include "RootCnvSvc/Hlt/HltRawCnv.h"
81
82#include "RootCnvSvc/EvtHeaderCnv.h"
83#include "RootCnvSvc/EvtNavigatorCnv.h"
84
85#include <math.h>
86
87using namespace std;
88
89// RCS Id for identification of object version
90static const char* rcsid = "$Id: RootCnvSvc.cxx,v 1.74 2022/02/21 22:04:49 maqm Exp $";
91
93
94// Instantiation of a static factory class used by clients to create
95// instances of this service
96// static const SvcFactory<RootCnvSvc> s_RootCnvSvcFactory;
97// const ISvcFactory& RootCnvSvcFactory = s_RootCnvSvcFactory;
98
99RootCnvSvc::RootCnvSvc( const std::string& name, ISvcLocator* svc )
100 : base_class( name, svc, ROOT_StorageType ), m_minSplit( 1 ), m_evtsel( 0 ) {
101
102 // Digi
103 declareProperty( "digiTreeName", m_dtreeName = "Event" ); //"Rec"->"Event"
104
105 declareProperty( "digiRootInputFile", m_difileName );
106 declareProperty( "digiRootOutputFile", m_dofileName = "" );
107
108 // Split mode for writing the TTree [0,99]
109 declareProperty( "digiSplitMode", m_dsplitMode = m_minSplit );
110 // Buffer size for writing ROOT data
111 declareProperty( "digiBufferSize", m_dbufSize = 3200000 );
112 // ROOT default compression
113 declareProperty( "digiCompressionLevel", m_dcompressionLevel = 1 );
114 declareProperty( "selectFromTag", m_selectFromTag = 0 );
115 declareProperty( "tagInputFile", m_tagInputFile );
116 // declareProperty("tagFileFormat", m_tagFileFormat=1);
117
118 declareProperty( "readETS", m_readETS = false );
119}
120
122 // Purpose and Method: Setup GLAST's Event Converter Service.
123 // Associate RootCnvSvc with the EventDataSvc
124 // Associate the list of known converters with this RootCnvSvc
125 // configure map of leaves
126
127 MsgStream log( msgSvc(), name() );
128
129 StatusCode sc;
130 log << MSG::DEBUG << "RootCnvSvc::initialize" << endmsg;
131
132 IService* isvc = 0;
133 sc = serviceLocator()->getService( "RootEvtSelector", isvc, false );
134 if ( !sc.isSuccess() ) sc = serviceLocator()->getService( "EventSelector", isvc, false );
135 if ( sc.isSuccess() )
136 { sc = isvc->queryInterface( IID_IRootEvtSelector, (void**)&m_evtsel ); }
137 if ( sc.isFailure() )
138 {
139 log << MSG::WARNING << "Unable to start event selector service within RootCnvSvc"
140 << endmsg;
141 }
142
143 m_rootInterface = RootInterface::Instance( name() );
144 if ( !m_rootInterface )
145 log << MSG::ERROR << "Unable to start Root service within RootCnvSvc" << endmsg;
146
147 StatusCode status = ConversionSvc::initialize();
148 if ( status.isSuccess() )
149 {
150 // ISvcLocator* svclocator = serviceLocator(); [unused for now]
151 IDataProviderSvc* pIDP = 0;
152 // Set event data service
153 status = service( "EventDataSvc", pIDP, true );
154 if ( status.isSuccess() ) { status = setDataProvider( pIDP ); }
155 else { return status; }
156
157 // Add converters to the service
158 status = addConverters();
159 if ( !status.isSuccess() )
160 {
161 log << MSG::ERROR << "Unable to add converters to the service" << endmsg;
162 return status;
163 }
164
165 // Now we have to configure the map of leaves
166 // Which should contain the association of converters with
167 // paths on the TDS
168 for ( LeafMap::iterator k = m_leaves.begin(); k != m_leaves.end(); k++ )
169 {
170 std::string path = ( *k ).first;
171 for ( LeafMap::iterator j = m_leaves.begin(); j != m_leaves.end(); j++ )
172 {
173 std::string path2 = ( *j ).first;
174 std::string pp = ( *j ).first.substr( 0, ( *j ).first.rfind( "/" ) );
175 if ( path == pp && path != ( *j ).first )
176 { ( *k ).second->push_back( ( *j ).second ); }
177 }
178 }
179 }
180
181 // get properties and tell RootInterface about files
182 status = initFiles();
183
184 m_rootInterface->setSelectFromTag( m_selectFromTag );
185 if ( m_selectFromTag && m_tagInputFile.empty() ) { m_tagInputFile = m_difileName; }
186 m_rootInterface->setTagInputFile( m_tagInputFile );
187 // m_rootInterface->setTagFileFormat(m_tagFileFormat);
188
189 return status;
190}
191
193 MsgStream log( msgSvc(), name() );
194 log << MSG::DEBUG << "RootCnvSvc::finalize" << endmsg;
195
196 ConversionSvc::finalize();
197 // log << MSG::INFO<<"this is the end of RootCnvsvc finalize"<<endmsg;
198 for ( LeafMap::iterator k = m_leaves.begin(); k != m_leaves.end(); k++ )
199 { delete ( *k ).second; }
200 m_leaves.erase( m_leaves.begin(), m_leaves.end() );
201
202 return m_rootInterface->finalize();
203}
204
205StatusCode RootCnvSvc::initFiles() {
206 MsgStream log( msgSvc(), name() );
207 log << MSG::DEBUG << "RootCnvSvc::initFiles" << endmsg;
208 StatusCode sc = StatusCode::SUCCESS;
209
210 // Use the Job options service to set the Algorithm's parameters
211 // This will retrieve parameters set in the job options file
212 // setProperties();
213
214 // Read inpout files files from job options
215 int nSize = m_difileName.size();
216 log << MSG::INFO << "Root Input files " << nSize << endmsg;
217 if ( nSize == 0 )
218 {
219 log << MSG::INFO << "Unable to find input file" << endmsg;
220 // return StatusCode::FAILURE;
221 }
222
223 for ( int i = 0; i < nSize; i++ )
224 {
225 facilities::Util::expandEnvVar( &m_difileName[i] );
226 /*std::string s=m_difileName[i];
227 std::vector<int> wildcardPos;
228 for(int pos=0;pos<s.size();pos++) {
229 pos=s.find_first_of('?',pos);
230 if(pos!=-1) {
231 wildcardPos.push_back(pos);
232 }
233 else{
234 break;
235 }
236 }
237 if(wildcardPos.size()!=0) {
238 int nEnd=facilities::Util::catchOptionVal(&s)+1;
239 int maxNo=pow(10.,(int)wildcardPos.size());
240 if(nEnd!=0&&nEnd<maxNo) maxNo=nEnd;
241 int nStart=facilities::Util::catchOptionVal(&s,0,"&(",")");
242 int i=1;
243 if(nStart!=-1) i=nStart;
244 if(nStart>nEnd) log<<MSG::WARNING<<"file's StartNo>EndNo"<<endmsg;
245 for(;i<maxNo;i++){
246 std::vector<int>::iterator it=wildcardPos.end();
247 int id=i;
248 while(it!=wildcardPos.begin()){
249 it--;
250 char c=id%10+48;
251 id /=10;
252 s.replace((*it),1,1,c);
253 }
254 if(access(s.c_str(),0)!=-1) {
255 sc = m_rootInterface->addInput(m_dtreeName,s);
256 if (sc.isFailure()) return sc;
257 }
258 }
259 }
260 else {*/
261
262 // Check if the file exists
263 if ( !filesystem::is_regular_file( m_difileName[i] ) )
264 {
265 error() << "Input file does not exist: " << m_difileName[i] << endmsg;
266 return StatusCode::FAILURE;
267 }
268
269 sc = m_rootInterface->addInput( m_dtreeName, m_difileName[i] );
270 if ( sc.isFailure() ) return sc;
271 // }
272 }
273
274 // facilities::Util::expandEnvVar(&m_difileName[0]);
275 // sc = m_rootInterface->addInput(m_dtreeName,m_difileName[0]);
276 // if (sc.isFailure()) return sc;
277
278 // Digi
279 // facilities::Util::expandEnvVar(&m_difileName);
280 facilities::Util::expandEnvVar( &m_dofileName );
281 // sc = m_rootInterface->addInput(m_dtreeName,m_difileName);
282 // if (sc.isFailure()) return sc;
283
284 if ( m_dsplitMode < m_minSplit )
285 {
286 log << MSG::WARNING << "RootCnvSvc::initFiles Recon splitlevel cant be lower than "
287 << m_minSplit << ", reset" << endmsg;
288 m_dsplitMode = m_minSplit;
289 }
290
291 if ( "" != m_dofileName )
292 {
293 sc = m_rootInterface->addOutput( m_dtreeName, m_dofileName, m_dsplitMode, m_dbufSize,
294 m_dcompressionLevel );
295 }
296 else { log << MSG::WARNING << "No specified digiRootOutputFile!" << endmsg; }
297
298 return sc;
299}
300
301StatusCode RootCnvSvc::declareObject( const Leaf& leaf ) {
302 // Purpose and Method: Callback from each of the individual converters that allows
303 // association of TDS path and converter.
304 MsgStream log( msgSvc(), name() );
305 log << MSG::DEBUG << "RootCnvSvc::declareObject " << leaf.path << " classid: " << leaf.clid
306 << endmsg;
307 Leaf* ll = new Leaf( leaf );
308 std::pair<LeafMap::iterator, bool> p =
309 m_leaves.insert( LeafMap::value_type( leaf.path, ll ) );
310 if ( p.second ) { return StatusCode::SUCCESS; }
311 delete ll;
312 return StatusCode::FAILURE;
313}
314
315/// Update state of the service
316StatusCode RootCnvSvc::updateServiceState( IOpaqueAddress* pAddress ) {
317
318 // not sure about the use of recid or bank...
319 MsgStream log( msgSvc(), name() );
320
321 log << MSG::DEBUG << "RootCnvSvc::updateServiceState" << endmsg;
322
323 StatusCode status = StatusCode::FAILURE;
324 IRegistry* ent = pAddress->registry();
325 if ( 0 != ent )
326 {
327 SmartIF<IDataManagerSvc> iaddrReg( dataProvider() );
328 // if ( 0 != iaddrReg ) {
329 status = StatusCode::SUCCESS;
330 std::string path = ent->identifier();
331 LeafMap::iterator itm = m_leaves.find( path );
332 if ( itm != m_leaves.end() )
333 {
334 Leaf* leaf = ( *itm ).second;
335 if ( 0 != leaf )
336 {
337 for ( Leaf::iterator il = leaf->begin(); il != leaf->end(); il++ )
338 {
339 IOpaqueAddress* newAddr = 0;
340 unsigned long ipars[2] = { 0, 0 }; //
341 if ( m_evtsel ) ipars[0] = m_evtsel->getRecId();
342
343 std::string spars[3] = { ( *il )->path, ( *il )->treename, ( *il )->branchname };
344
345 StatusCode ir =
346 createAddress( ROOT_StorageType, ( *il )->clid, spars, ipars, newAddr );
347 log << MSG::DEBUG << "RootCnvSvc::updateService "
348 << " ***** " << ( *il )->clid << " ***** " << ( *il )->path << endmsg;
349
350 if ( ir.isSuccess() )
351 {
352 ir = iaddrReg->registerAddress( ( *il )->path, newAddr );
353 if ( !ir.isSuccess() )
354 {
355 newAddr->release();
356 status = ir;
357 }
358 }
359 }
360 }
361 }
362 }
363 return StatusCode::SUCCESS;
364}
365
366// StatusCode RootCnvSvc::queryInterface( const InterfaceID& riid, void** ppvInterface ) {
367
368// if ( IID_IRootCnvSvc == riid ) { *ppvInterface = (RootCnvSvc*)this; }
369// else
370// {
371// // Interface is not directly availible: try out a base class
372// return ConversionSvc::queryInterface( riid, ppvInterface );
373// }
374// addRef();
375// return StatusCode::SUCCESS;
376// }
377
378StatusCode RootCnvSvc::createAddress( long int svc_type, const CLID& clid,
379 const std::string* spars, const unsigned long* ipars,
380 IOpaqueAddress*& refpAddress ) {
381 MsgStream log( msgSvc(), name() );
382
383 if ( svc_type != repSvcType() )
384 {
385 log << MSG::ERROR << "RootCnvSvc::bad storage type" << svc_type << endmsg;
386 return StatusCode::FAILURE;
387 }
388
389 std::string path = spars[0];
390 std::string treename = spars[1];
391 std::string branchname = spars[2];
392 int entry = ipars[0];
393 if ( path.size() == 0 ) path = "/Event";
394 refpAddress = new RootAddress( ROOT_StorageType, clid, path, treename, branchname, entry );
395 return StatusCode::SUCCESS;
396}
397
398StatusCode RootCnvSvc::commitOutput( const std::string& output, bool do_commit ) {
399
400 MsgStream log( msgSvc(), name() );
401 log << MSG::INFO << "RootCnvSvc::commitOutput starts." << endmsg;
402
403 StatusCode sc = m_rootInterface->fillTrees();
404 if ( sc.isFailure() ) log << MSG::ERROR << "No Root tree was filled" << endmsg;
405
406 // objects must be cleared after fill
407 else
408 {
409 TObject* oEvtHeader = m_evtheaderCnv->getWriteObject();
410 if ( oEvtHeader ) oEvtHeader->Clear();
411 TObject* oEvtNavigator = m_evtnavigatorCnv->getWriteObject();
412 if ( oEvtNavigator ) oEvtNavigator->Clear();
413 TObject* o = m_dCnv->getWriteObject();
414 if ( o ) o->Clear();
415 TObject* oDst = m_dstCnv->getWriteObject();
416 if ( oDst ) oDst->Clear();
417 TObject* oMc = m_mcCnv->getWriteObject();
418 if ( oMc ) oMc->Clear();
419 TObject* oRecTrack = m_rectrackCnv->getWriteObject();
420 if ( oRecTrack ) oRecTrack->Clear();
421 TObject* oEvtRecEvent = m_evtRecCnv->getWriteObject();
422 if ( oEvtRecEvent ) oEvtRecEvent->Clear();
423 TObject* oTrig = m_trigCnv->getWriteObject();
424 if ( oTrig ) oTrig->Clear();
425 TObject* oHlt = m_hltCnv->getWriteObject();
426 if ( oHlt ) oHlt->Clear();
427 }
428 m_common.clear();
429
430 return sc;
431}
432
433StatusCode RootCnvSvc::createAddress( DataObject* obj, IOpaqueAddress*& newAddr ) {
434
435 // create address for this object
436 MsgStream log( msgSvc(), name() );
437
438 log << MSG::DEBUG << "RootCnvSvc::createAddress" << endmsg;
439
440 StatusCode status = StatusCode::FAILURE;
441 IRegistry* ent = obj->registry();
442
443 if ( 0 != ent )
444 {
445 SmartIF<IDataManagerSvc> iaddrReg( dataProvider() );
446 std::string path = ent->identifier();
447 LeafMap::iterator itm = m_leaves.find( path );
448
449 if ( itm != m_leaves.end() )
450 {
451 Leaf* leaf = ( *itm ).second;
452 if ( 0 != leaf )
453 {
454 std::string spars[3];
455 spars[0] = path;
456 spars[1] = leaf->treename;
457 spars[2] = leaf->branchname;
458
459 unsigned long ipars[2] = { 0, 0 };
460 if ( m_evtsel ) ipars[0] = m_evtsel->getRecId();
461
462 status = addressCreator()->createAddress( ROOT_StorageType, leaf->clid, spars, ipars,
463 newAddr );
464 if ( status.isSuccess() )
465 {
466 status = iaddrReg->registerAddress( (IRegistry*)0, path, newAddr );
467 if ( !status.isSuccess() ) { newAddr->release(); }
468 }
469 return StatusCode::SUCCESS;
470 }
471 }
472 else { log << MSG::ERROR << "Leaf not found for path: " << path << endmsg; }
473 }
474 return status;
475}
476
477StatusCode RootCnvSvc::createAddress( std::string path, IOpaqueAddress*& newAddr ) {
478
479 // create address for this object
480 MsgStream log( msgSvc(), name() );
481
482 StatusCode status;
483 LeafMap::iterator itm = m_leaves.find( path );
484 SmartIF<IDataManagerSvc> iaddrReg( dataProvider() );
485 if ( itm != m_leaves.end() )
486 {
487 Leaf* leaf = ( *itm ).second;
488 if ( 0 != leaf )
489 {
490 std::string spars[3];
491 spars[0] = path;
492 spars[1] = leaf->treename;
493 spars[2] = leaf->branchname;
494
495 unsigned long ipars[2] = { 0, 0 };
496 if ( m_evtsel ) ipars[0] = m_evtsel->getRecId();
497 status = addressCreator()->createAddress( ROOT_StorageType, leaf->clid, spars, ipars,
498 newAddr );
499 if ( status.isSuccess() )
500 {
501 status = iaddrReg->registerAddress( (IRegistry*)0, path, newAddr );
502 if ( !status.isSuccess() ) { newAddr->release(); }
503 }
504 return StatusCode::SUCCESS;
505 }
506 }
507
508 return StatusCode::FAILURE;
509}
510
511/// Add converters to the service
512StatusCode RootCnvSvc::addConverters() {
513 MsgStream log( msgSvc(), name() );
515 Leaf( EventModel::Dst::DstMdcDedxCol, MdcDedxCnv::classID(), "Event", "m_mdcDedxCol" ) );
516 declareObject( Leaf( EventModel::Dst::Event, DstCnv::classID(), "Event", "" ) );
518 Leaf( EventModel::Digi::EmcDigiCol, EmcDigiCnv::classID(), "Event", "m_emcDigiCol" ) );
520 Leaf( EventModel::MC::EmcMcHitCol, EmcMcHitCnv::classID(), "Event", "m_emcMcHitCol" ) );
522 "m_emcTrackCol" ) );
523
524 declareObject( Leaf( "/Event", EventCnv::classID(), "", "" ) );
525 if ( m_readETS )
526 {
528 Leaf( EventModel::EventHeader, EvtHeaderCnv::classID(), "Event",
529 "m_runId:m_eventId:m_time:m_eventTag:m_flag1:m_flag2:m_etsT1:m_etsT2" ) );
530 }
531 else
532 {
533 declareObject( Leaf( EventModel::EventHeader, EvtHeaderCnv::classID(), "Event",
534 "m_runId:m_eventId:m_time:m_eventTag:m_flag1:m_flag2" ) );
535 }
536 declareObject( Leaf( EventModel::Navigator, EvtNavigatorCnv::classID(), "Event",
537 "m_mcMdcMcHits:m_mcMdcTracks:m_mcEmcMcHits:m_mcEmcRecShowers" ) );
539 "m_extTrackCol" ) );
542 "m_mcParticleCol" ) );
544 Leaf( EventModel::Digi::MdcDigiCol, MdcDigiCnv::classID(), "Event", "m_mdcDigiCol" ) );
546 "m_mdcKalTrackCol" ) );
548 Leaf( EventModel::MC::MdcMcHitCol, MdcMcHitCnv::classID(), "Event", "m_mdcMcHitCol" ) );
550 "m_mdcTrackCol" ) );
552 Leaf( EventModel::Digi::MucDigiCol, MucDigiCnv::classID(), "Event", "m_mucDigiCol" ) );
554 Leaf( EventModel::MC::MucMcHitCol, MucMcHitCnv::classID(), "Event", "m_mucMcHitCol" ) );
556 "m_mucTrackCol" ) );
557 declareObject( Leaf( EventModel::Digi::Event, DigiCnv::classID(), "Event", "m_fromMc" ) );
559 Leaf( EventModel::Digi::TofDigiCol, TofDigiCnv::classID(), "Event", "m_tofDigiCol" ) );
561 Leaf( EventModel::MC::TofMcHitCol, TofMcHitCnv::classID(), "Event", "m_tofMcHitCol" ) );
563 "m_tofTrackCol" ) );
564 // declareObject(Leaf("/Event/Digi/LumiDigiCol", LumiDigiCnv::classID(), "Event",
565 // "m_lumiDigiCol"));
567 "m_lumiDigiCol" ) );
568
571 Leaf( EventModel::Trig::TrigData, TrigDataCnv::classID(), "Event", "m_trigData" ) );
572
575 Leaf( EventModel::Hlt::HltRawCol, HltRawCnv::classID(), "Event", "m_hltRawCol" ) );
576 declareObject( Leaf( EventModel::Hlt::HltInf, HltInfCnv::classID(), "Event", "m_hltInf" ) );
578 Leaf( EventModel::Hlt::DstHltInf, DstHltInfCnv::classID(), "Event", "m_dstHltInf" ) );
579
581
583 "m_recMdcTrackCol" ) );
585 "m_recMdcHitCol" ) );
587 "Event", "m_recMdcKalTrackCol" ) );
589 RecMdcKalHelixSegCnv::classID(), "Event", "m_recMdcKalHelixSegCol" ) );
591 "m_recMdcDedxCol" ) );
593 "Event", "m_recMdcDedxHitCol" ) );
594
596 "m_recEvTimeCol" ) );
598 "m_recTofTrackCol" ) );
600 "Event", "m_recBTofCalHitCol" ) );
602 "Event", "m_recETofCalHitCol" ) );
604 "m_recEmcHitCol" ) );
606 "Event", "m_recEmcClusterCol" ) );
608 "m_recEmcShowerCol" ) );
610 "m_recMucTrackCol" ) );
612 "m_recMucHitCol" ) );
614 "m_recExtTrackCol" ) );
616 "Event", "m_recZddChannelCol" ) );
619 "m_evtRecEvent" ) );
621 "m_evtRecTrackCol" ) );
623 EvtRecPrimaryVertexCnv::classID(), "Event", "m_evtRecPrimaryVertex" ) );
625 "Event", "m_evtRecVeeVertexCol" ) );
627 "m_evtRecPi0Col" ) );
629 "Event", "m_evtRecEtaToGGCol" ) );
631 "m_evtRecDTagCol" ) );
632
633 return StatusCode::SUCCESS;
634}
635
636IConverter* RootCnvSvc::createConverter( long typ, const CLID& wanted,
637 const ICnvFactory* fac ) {
638 if ( wanted == MdcDedxCnv::classID() ) return new MdcDedxCnv( serviceLocator().get() );
639 if ( wanted == DstCnv::classID() ) return new DstCnv( serviceLocator().get() );
640 if ( wanted == EmcDigiCnv::classID() ) return new EmcDigiCnv( serviceLocator().get() );
641 if ( wanted == EmcMcHitCnv::classID() ) return new EmcMcHitCnv( serviceLocator().get() );
642 if ( wanted == EmcTrackCnv::classID() ) return new EmcTrackCnv( serviceLocator().get() );
643 if ( wanted == EventCnv::classID() ) return new EventCnv( serviceLocator().get() );
644 if ( wanted == EvtHeaderCnv::classID() ) return new EvtHeaderCnv( serviceLocator().get() );
645 if ( wanted == EvtNavigatorCnv::classID() )
646 return new EvtNavigatorCnv( serviceLocator().get() );
647 if ( wanted == ExtTrackCnv::classID() ) return new ExtTrackCnv( serviceLocator().get() );
648 if ( wanted == McCnv::classID() ) return new McCnv( serviceLocator().get() );
649 if ( wanted == McParticleCnv::classID() ) return new McParticleCnv( serviceLocator().get() );
650 if ( wanted == MdcDigiCnv::classID() ) return new MdcDigiCnv( serviceLocator().get() );
651 if ( wanted == MdcKalTrackCnv::classID() )
652 return new MdcKalTrackCnv( serviceLocator().get() );
653 if ( wanted == MdcMcHitCnv::classID() ) return new MdcMcHitCnv( serviceLocator().get() );
654 if ( wanted == MdcTrackCnv::classID() ) return new MdcTrackCnv( serviceLocator().get() );
655 if ( wanted == MucDigiCnv::classID() ) return new MucDigiCnv( serviceLocator().get() );
656 if ( wanted == MucMcHitCnv::classID() ) return new MucMcHitCnv( serviceLocator().get() );
657 if ( wanted == MucTrackCnv::classID() ) return new MucTrackCnv( serviceLocator().get() );
658 if ( wanted == DigiCnv::classID() ) return new DigiCnv( serviceLocator().get() );
659 if ( wanted == TofDigiCnv::classID() ) return new TofDigiCnv( serviceLocator().get() );
660 if ( wanted == TofMcHitCnv::classID() ) return new TofMcHitCnv( serviceLocator().get() );
661 if ( wanted == TofTrackCnv::classID() ) return new TofTrackCnv( serviceLocator().get() );
662 if ( wanted == LumiDigiCnv::classID() ) return new LumiDigiCnv( serviceLocator().get() );
663 if ( wanted == TrigCnv::classID() ) return new TrigCnv( serviceLocator().get() );
664 if ( wanted == TrigDataCnv::classID() ) return new TrigDataCnv( serviceLocator().get() );
665 if ( wanted == HltCnv::classID() ) return new HltCnv( serviceLocator().get() );
666 if ( wanted == HltRawCnv::classID() ) return new HltRawCnv( serviceLocator().get() );
667 if ( wanted == HltInfCnv::classID() ) return new HltInfCnv( serviceLocator().get() );
668 if ( wanted == DstHltInfCnv::classID() ) return new DstHltInfCnv( serviceLocator().get() );
669 if ( wanted == RecTrackCnv::classID() ) return new RecTrackCnv( serviceLocator().get() );
670 if ( wanted == RecMdcTrackCnv::classID() )
671 return new RecMdcTrackCnv( serviceLocator().get() );
672 if ( wanted == RecMdcHitCnv::classID() ) return new RecMdcHitCnv( serviceLocator().get() );
673 if ( wanted == RecMdcKalTrackCnv::classID() )
674 return new RecMdcKalTrackCnv( serviceLocator().get() );
675 if ( wanted == RecMdcKalHelixSegCnv::classID() )
676 return new RecMdcKalHelixSegCnv( serviceLocator().get() );
677 if ( wanted == RecMdcDedxCnv::classID() ) return new RecMdcDedxCnv( serviceLocator().get() );
678 if ( wanted == RecMdcDedxHitCnv::classID() )
679 return new RecMdcDedxHitCnv( serviceLocator().get() );
680 if ( wanted == RecEvTimeCnv::classID() ) return new RecEvTimeCnv( serviceLocator().get() );
681 if ( wanted == RecTofTrackCnv::classID() )
682 return new RecTofTrackCnv( serviceLocator().get() );
683 if ( wanted == RecBTofCalHitCnv::classID() )
684 return new RecBTofCalHitCnv( serviceLocator().get() );
685 if ( wanted == RecETofCalHitCnv::classID() )
686 return new RecETofCalHitCnv( serviceLocator().get() );
687 if ( wanted == RecEmcHitCnv::classID() ) return new RecEmcHitCnv( serviceLocator().get() );
688 if ( wanted == RecEmcClusterCnv::classID() )
689 return new RecEmcClusterCnv( serviceLocator().get() );
690 if ( wanted == RecEmcShowerCnv::classID() )
691 return new RecEmcShowerCnv( serviceLocator().get() );
692 if ( wanted == RecMucTrackCnv::classID() )
693 return new RecMucTrackCnv( serviceLocator().get() );
694 if ( wanted == RecMucRecHitCnv::classID() )
695 return new RecMucRecHitCnv( serviceLocator().get() );
696 if ( wanted == RecExtTrackCnv::classID() )
697 return new RecExtTrackCnv( serviceLocator().get() );
698 if ( wanted == RecZddChannelCnv::classID() )
699 return new RecZddChannelCnv( serviceLocator().get() );
700 if ( wanted == EvtRecCnv::classID() ) return new EvtRecCnv( serviceLocator().get() );
701 if ( wanted == EvtRecEventCnv::classID() )
702 return new EvtRecEventCnv( serviceLocator().get() );
703 if ( wanted == EvtRecTrackCnv::classID() )
704 return new EvtRecTrackCnv( serviceLocator().get() );
705 if ( wanted == EvtRecPrimaryVertexCnv::classID() )
706 return new EvtRecPrimaryVertexCnv( serviceLocator().get() );
707 if ( wanted == EvtRecVeeVertexCnv::classID() )
708 return new EvtRecVeeVertexCnv( serviceLocator().get() );
709 if ( wanted == EvtRecPi0Cnv::classID() ) return new EvtRecPi0Cnv( serviceLocator().get() );
710 if ( wanted == EvtRecEtaToGGCnv::classID() )
711 return new EvtRecEtaToGGCnv( serviceLocator().get() );
712 if ( wanted == EvtRecDTagCnv::classID() ) return new EvtRecDTagCnv( serviceLocator().get() );
713
714 return ConversionSvc::createConverter( typ, wanted, fac );
715}
DECLARE_COMPONENT(BesBdkRc)
const long int ROOT_StorageType
*******INTEGER m_nBinMax INTEGER m_NdiMax !No of bins in histogram for cell exploration division $ !Last vertex $ !Last active cell $ !Last cell in buffer $ !No of sampling when dividing cell $ !No of function total $ !Flag for random ceel for $ !Flag for type of for WtMax $ !Flag which decides whether vertices are included in the sampling $ entire domain is hyp !Maximum effective eevents per saves r n generator level $ !Flag for chat level in output
Definition FoamA.h:89
IMessageSvc * msgSvc()
Concrete converter for the Rec branch.
Concrete converter for the Dst branch.
Concrete converter for the DstHltInf.
Concrete converter for the EmcDigi collection.
Concrete converter for the Event header stored in the TDS /Event Based on the EventCnv of GLAST.
Concrete converter for the EvtHeader branch.
Concrete converter for the EvtNavigator branch.
Concrete converter for the Rec branch.
Concrete converter for the HltInf.
Concrete converter for the HltRaw collection.
Concrete converter for the Mc branch.
Concrete converter for the McParticle collection.
Concrete converter for the MdcDigi collection.
Definition of a Root address, derived from IOpaqueAddress.
object regrouping CLID and pathname with treename/branchname
Root Event Conversion Service which coordinates all of our converters.
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 initialize()
virtual StatusCode updateServiceState(IOpaqueAddress *pAddress)
Update state of the service.
virtual StatusCode commitOutput(const std::string &output, bool do_commit)
Commit pending output (fill the TTrees).
IConverter * createConverter(long typ, const CLID &wanted, const ICnvFactory *fac) override
RootCnvSvc(const std::string &name, ISvcLocator *svc)
virtual StatusCode declareObject(const Leaf &leaf)
Override inherited queryInterface due to enhanced interface.
virtual StatusCode finalize()
static RootInterface * Instance(const std::string &name)
singleton behaviour
Concrete converter for the Rec branch.
Concrete converter for the TrigData.
static int expandEnvVar(std::string *toExpand, const std::string &openDel=std::string("$("), const std::string &closeDel=std::string(")"))