CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
bak_RootCnvSvc-04-01-14/src/RootCnvSvc.cxx
Go to the documentation of this file.
1#define RootCnvSvc_CXX
2#include <iostream>
3#include "GaudiKernel/SmartIF.h"
4#include "GaudiKernel/SvcFactory.h"
5
6#include "GaudiKernel/MsgStream.h"
7#include "GaudiKernel/ISvcLocator.h"
8#include "GaudiKernel/IDataProviderSvc.h"
9#include "GaudiKernel/IDataManagerSvc.h"
10#include "GaudiKernel/RegistryEntry.h"
11#include "GaudiKernel/GenericAddress.h"
12
13#include "RawEvent/DigiEvent.h"
14#include "DstEvent/DstEvent.h"
15#include "McTruth/McEvent.h"
16#include "TrigEvent/TrigEvent.h"//caogf
17#include "HltEvent/HltEvent.h"//fucd
18#include "RootCnvSvc/RootInterface.h"
19
20#include "RootCnvSvc/RootAddress.h"
21#include "RootCnvSvc/RootCnvSvc.h"
22#include "RootCnvSvc/RootEvtSelector.h"
23
24
25#include "RootCnvSvc/Dst/MdcDedxCnv.h"
26#include "RootCnvSvc/Dst/CgemDedxCnv.h"
27#include "RootCnvSvc/Dst/DstCnv.h"
28#include "RootCnvSvc/Digi/EmcDigiCnv.h"
29#include "RootCnvSvc/Mc/EmcMcHitCnv.h"
30#include "RootCnvSvc/Dst/EmcTrackCnv.h"
31#include "RootCnvSvc/EventCnv.h"
32#include "RootCnvSvc/Dst/ExtTrackCnv.h"
33#include "RootCnvSvc/Mc/McCnv.h"
34#include "RootCnvSvc/Mc/McParticleCnv.h"
35#include "RootCnvSvc/Digi/MdcDigiCnv.h"
36#include "RootCnvSvc/Dst/MdcKalTrackCnv.h"
37#include "RootCnvSvc/Mc/MdcMcHitCnv.h"
38#include "RootCnvSvc/Dst/MdcTrackCnv.h"
39#include "RootCnvSvc/Digi/CgemDigiCnv.h"
40#include "RootCnvSvc/Dst/CgemKalTrackCnv.h"
41#include "RootCnvSvc/Mc/CgemMcHitCnv.h"
42#include "RootCnvSvc/Dst/CgemTrackCnv.h"
43#include "RootCnvSvc/Dst/CgemSegmentCnv.h"
44#include "RootCnvSvc/Digi/MucDigiCnv.h"
45#include "RootCnvSvc/Mc/MucMcHitCnv.h"
46#include "RootCnvSvc/Dst/MucTrackCnv.h"
47#include "RootCnvSvc/Digi/DigiCnv.h"
48#include "RootCnvSvc/Digi/TofDigiCnv.h"
49#include "RootCnvSvc/Mc/TofMcHitCnv.h"
50#include "RootCnvSvc/Dst/TofTrackCnv.h"
51#include "RootCnvSvc/Digi/LumiDigiCnv.h"
52
53#include "RootCnvSvc/Rec/RecMucTrackCnv.h"
54#include "RootCnvSvc/Rec/RecMdcTrackCnv.h"
55#include "RootCnvSvc/Rec/RecMdcHitCnv.h"
56#include "RootCnvSvc/Rec/RecMdcKalTrackCnv.h"
57#include "RootCnvSvc/Rec/RecMdcKalHelixSegCnv.h"
58#include "RootCnvSvc/Rec/RecMdcDedxCnv.h"
59#include "RootCnvSvc/Rec/RecMdcDedxHitCnv.h"
60#include "RootCnvSvc/Rec/RecCgemTrackCnv.h"
61#include "RootCnvSvc/Rec/RecCgemSegmentCnv.h"
62#include "RootCnvSvc/Rec/RecCgemHitCnv.h"
63#include "RootCnvSvc/Rec/RecCgemKalTrackCnv.h"
64#include "RootCnvSvc/Rec/RecCgemKalHelixSegCnv.h"
65#include "RootCnvSvc/Rec/RecCgemDedxCnv.h"
66#include "RootCnvSvc/Rec/RecCgemDedxHitCnv.h"
67#include "RootCnvSvc/Rec/RecCgemClusterCnv.h"
68#include "RootCnvSvc/Rec/RecTofTrackCnv.h"
69#include "RootCnvSvc/Rec/RecBTofCalHitCnv.h"
70#include "RootCnvSvc/Rec/RecETofCalHitCnv.h"
71#include "RootCnvSvc/Rec/RecMucRecHitCnv.h"
72#include "RootCnvSvc/Rec/RecEmcHitCnv.h"
73#include "RootCnvSvc/Rec/RecEmcClusterCnv.h"
74#include "RootCnvSvc/Rec/RecEmcShowerCnv.h"
75#include "RootCnvSvc/Rec/RecEvTimeCnv.h"
76#include "RootCnvSvc/Rec/RecExtTrackCnv.h"
77#include "RootCnvSvc/Rec/RecTrackCnv.h"
78
79#include "RootCnvSvc/EvtRec/EvtRecCnv.h"
80#include "RootCnvSvc/EvtRec/EvtRecEventCnv.h"
81#include "RootCnvSvc/EvtRec/EvtRecTrackCnv.h"
82#include "RootCnvSvc/EvtRec/EvtRecPrimaryVertexCnv.h"
83#include "RootCnvSvc/EvtRec/EvtRecVeeVertexCnv.h"
84#include "RootCnvSvc/EvtRec/EvtRecPi0Cnv.h"
85#include "RootCnvSvc/EvtRec/EvtRecEtaToGGCnv.h"
86#include "RootCnvSvc/EvtRec/EvtRecDTagCnv.h"
87#include "RootCnvSvc/Rec/RecZddChannelCnv.h"
88
89
90#include "RootCnvSvc/Trig/TrigCnv.h"
91#include "RootCnvSvc/Trig/TrigDataCnv.h"
92
93#include "RootCnvSvc/Hlt/HltCnv.h"
94#include "RootCnvSvc/Hlt/HltRawCnv.h"
95#include "RootCnvSvc/Hlt/HltInfCnv.h"
96#include "RootCnvSvc/Hlt/DstHltInfCnv.h"
97
98#include "RootCnvSvc/EvtHeaderCnv.h"
99#include "RootCnvSvc/EvtNavigatorCnv.h"
100
101#include <math.h>
102
103using namespace std;
104
105// RCS Id for identification of object version
106static const char* rcsid = "$Id: RootCnvSvc.cxx,v 1.4 2015/09/11 23:43:52 wulh Exp $";
107
108
109// Instantiation of a static factory class used by clients to create
110// instances of this service
111//static const SvcFactory<RootCnvSvc> s_RootCnvSvcFactory;
112//const ISvcFactory& RootCnvSvcFactory = s_RootCnvSvcFactory;
113
114RootCnvSvc::RootCnvSvc(const std::string& name, ISvcLocator* svc)
115 : ConversionSvc(name, svc, ROOT_StorageType), m_minSplit(1), m_evtsel(0)
116{
117 StatusCode sc;
118 MsgStream log(msgSvc(), "RootCnvSvc");
119 log << MSG::DEBUG << "RootCnvSvc::constructor" << endreq;
120
121 IService* isvc = 0;
122 sc = serviceLocator()->getService ("RootEvtSelector", isvc, false);
123 if (!sc.isSuccess()) sc = serviceLocator()->getService ("EventSelector", isvc, false);
124 if (sc.isSuccess()) {
125 sc = isvc->queryInterface(IID_IRootEvtSelector, (void**)&m_evtsel);
126 }
127 if(sc.isFailure()) {
128 log << MSG::WARNING << "Unable to start event selector service within RootCnvSvc" << endreq;
129 }
130
131 m_rootInterface= RootInterface::Instance(log);
132 if (!m_rootInterface) log << MSG::ERROR << "Unable to start Root service within RootCnvSvc" << endreq;
133
134
135
136 //Digi
137 declareProperty("digiTreeName", m_dtreeName="Event"); //"Rec"->"Event"
138
139 declareProperty("digiRootInputFile",m_difileName);
140 if (m_difileName.size()==0){
141 m_difileName.push_back("digi.root");
142 }
143 declareProperty("digiRootOutputFile",m_dofileName = "");
144
145 // Split mode for writing the TTree [0,99]
146 declareProperty("digiSplitMode", m_dsplitMode=m_minSplit);
147 // Buffer size for writing ROOT data
148 declareProperty("digiBufferSize", m_dbufSize=3200000);
149 // ROOT default compression
150 declareProperty("digiCompressionLevel", m_dcompressionLevel=1);
151
152}
153
155 // Purpose and Method: Setup GLAST's Event Converter Service.
156 // Associate RootCnvSvc with the EventDataSvc
157 // Associate the list of known converters with this RootCnvSvc
158 // configure map of leaves
159
160 MsgStream log(msgSvc(), name());
161 log << MSG::DEBUG << "RootCnvSvc::initialize" << endreq;
162 StatusCode status = ConversionSvc::initialize();
163 if ( status.isSuccess() ) {
164 // ISvcLocator* svclocator = serviceLocator(); [unused for now]
165 IDataProviderSvc *pIDP = 0;
166 // Set event data service
167 status = service("EventDataSvc", pIDP, true);
168 if ( status.isSuccess() ) {
169 status = setDataProvider ( pIDP );
170 }
171 else {
172 return status;
173 }
174
175
176 // Add converters to the service
177 status = addConverters();
178 if ( !status.isSuccess() ) {
179 log << MSG::ERROR << "Unable to add converters to the service" << endreq;
180 return status;
181 }
182
183
184 // Now we have to configure the map of leaves
185 // Which should contain the association of converters with
186 // paths on the TDS
187 for (LeafMap::iterator k = m_leaves.begin(); k != m_leaves.end(); k++ ) {
188 std::string path = (*k).first;
189 for (LeafMap::iterator j = m_leaves.begin(); j != m_leaves.end(); j++ ) {
190 std::string path2 = (*j).first;
191 std::string pp = (*j).first.substr(0, (*j).first.rfind("/"));
192 if ( path == pp && path != (*j).first ) {
193 (*k).second->push_back((*j).second);
194 }
195 }
196 }
197 }
198
199 // get properties and tell RootInterface about files
200 status=initFiles();
201
202
203 return status;
204}
205
207 MsgStream log(msgSvc(), name());
208 log << MSG::DEBUG << "RootCnvSvc::finalize" << endreq;
209
210 ConversionSvc::finalize();
211 // log << MSG::INFO<<"this is the end of RootCnvsvc finalize"<<endreq;
212 for (LeafMap::iterator k = m_leaves.begin(); k != m_leaves.end(); k++ ) {
213 delete (*k).second;
214 }
215 m_leaves.erase(m_leaves.begin(), m_leaves.end());
216
217 return m_rootInterface->finalize();
218}
219
220StatusCode RootCnvSvc::initFiles () {
221 MsgStream log(msgSvc(), name());
222 log << MSG::DEBUG << "RootCnvSvc::initFiles" << endreq;
223 StatusCode sc=StatusCode::SUCCESS;
224
225 // Use the Job options service to set the Algorithm's parameters
226 // This will retrieve parameters set in the job options file
227 setProperties();
228
229 //Read inpout files files from job options
230 int nSize = m_difileName.size();
231 log<<MSG::INFO<<"Root Input files "<<nSize<<endreq;
232 if(nSize == 0){
233 log<<MSG::INFO<<"Unable to find input file"<<endreq;
234 return StatusCode::FAILURE;
235 }
236
237 for(int i = 0;i<nSize;i++){
238 facilities::Util::expandEnvVar(&m_difileName[i]);
239 std::string s=m_difileName[i];
240 std::vector<int> wildcardPos;
241 for(int pos=0;pos<s.size();pos++) {
242 pos=s.find_first_of('?',pos);
243 if(pos!=-1) {
244 wildcardPos.push_back(pos);
245 }
246 else{
247 break;
248 }
249 }
250 if(wildcardPos.size()!=0) {
252 int maxNo=pow(10.,(int)wildcardPos.size());
253 if(nEnd!=0&&nEnd<maxNo) maxNo=nEnd;
254 int nStart=facilities::Util::catchOptionVal(&s,0,"&(",")");
255 int i=1;
256 if(nStart!=-1) i=nStart;
257 if(nStart>nEnd) log<<MSG::WARNING<<"file's StartNo>EndNo"<<endreq;
258 for(;i<maxNo;i++){
259 std::vector<int>::iterator it=wildcardPos.end();
260 int id=i;
261 while(it!=wildcardPos.begin()){
262 it--;
263 char c=id%10+48;
264 id /=10;
265 s.replace((*it),1,1,c);
266 }
267 if(access(s.c_str(),0)!=-1) {
268 sc = m_rootInterface->addInput(m_dtreeName,s);
269 if (sc.isFailure()) return sc;
270 }
271 }
272 }
273 else {
274 sc = m_rootInterface->addInput(m_dtreeName,m_difileName[i]);
275 if (sc.isFailure()) return sc;
276 }
277 }
278
279 //facilities::Util::expandEnvVar(&m_difileName[0]);
280 //sc = m_rootInterface->addInput(m_dtreeName,m_difileName[0]);
281 //if (sc.isFailure()) return sc;
282
283
284 //Digi
285 //facilities::Util::expandEnvVar(&m_difileName);
286 facilities::Util::expandEnvVar(&m_dofileName);
287 // sc = m_rootInterface->addInput(m_dtreeName,m_difileName);
288 // if (sc.isFailure()) return sc;
289
290 if (m_dsplitMode<m_minSplit) {
291 log << MSG::WARNING << "RootCnvSvc::initFiles Recon splitlevel cant be lower than "<<m_minSplit<<", reset" << endreq;
292 m_dsplitMode=m_minSplit;
293 }
294
295 if( "" != m_dofileName ){
296 sc=m_rootInterface->addOutput(m_dtreeName,m_dofileName,m_dsplitMode,m_dbufSize,m_dcompressionLevel);
297 }else{
298 log << MSG::WARNING << "No specified digiRootOutputFile!" << endreq;
299 }
300
301 return sc;
302}
303
304
305StatusCode RootCnvSvc::declareObject(const Leaf& leaf) {
306 // Purpose and Method: Callback from each of the individual converters that allows
307 // association of TDS path and converter.
308 MsgStream log(msgSvc(), name());
309 log << MSG::DEBUG << "RootCnvSvc::declareObject " << leaf.path << " classid: " << leaf.clid << endreq;
310 Leaf* ll = new Leaf(leaf);
311 std::pair<LeafMap::iterator, bool> p = m_leaves.insert(LeafMap::value_type( leaf.path, ll) );
312 if( p.second ) {
313 return StatusCode::SUCCESS;
314 }
315 delete ll;
316 return StatusCode::FAILURE;
317}
318
319/// Update state of the service
320StatusCode RootCnvSvc::updateServiceState(IOpaqueAddress* pAddress) {
321
322 // not sure about the use of recid or bank...
323 MsgStream log(msgSvc(), name());
324
325 log << MSG::DEBUG << "RootCnvSvc::updateServiceState" << endreq;
326
327 StatusCode status = INVALID_ADDRESS;
328 IRegistry* ent = pAddress->registry();
329 if ( 0 != ent ) {
330 SmartIF<IDataManagerSvc> iaddrReg(dataProvider());
331 // if ( 0 != iaddrReg ) {
332 status = StatusCode::SUCCESS;
333 std::string path = ent->identifier();
334 LeafMap::iterator itm = m_leaves.find(path);
335 if ( itm != m_leaves.end() ) {
336 Leaf* leaf = (*itm).second;
337 if ( 0 != leaf ) {
338 for ( Leaf::iterator il = leaf->begin(); il != leaf->end(); il++ ) {
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 =createAddress(ROOT_StorageType,
346 (*il)->clid,
347 spars,
348 ipars,
349 newAddr);
350 log << MSG::DEBUG << "RootCnvSvc::updateService " << " ***** " <<
351 (*il)->clid << " ***** " << (*il)->path <<endreq;
352
353 if ( ir.isSuccess() ) {
354 ir = iaddrReg->registerAddress((*il)->path, newAddr);
355 if ( !ir.isSuccess() ) {
356 newAddr->release();
357 status = ir;
358 }
359 }
360 }
361 }
362 }
363 }
364 return StatusCode::SUCCESS;
365 }
366
367 StatusCode RootCnvSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
368
369 if ( IID_IRootCnvSvc == riid ) {
370 *ppvInterface = (RootCnvSvc*)this;
371 }
372 else {
373 // Interface is not directly availible: try out a base class
374 return ConversionSvc::queryInterface(riid, ppvInterface);
375 }
376 addRef();
377 return StatusCode::SUCCESS;
378 }
379
380 StatusCode RootCnvSvc::createAddress(long int svc_type,
381 const CLID& clid,
382 const std::string* spars,
383 const unsigned long* ipars,
384 IOpaqueAddress*& refpAddress)
385 {
386 MsgStream log( msgSvc(), name() );
387
388 if (svc_type != repSvcType() ) {
389 log << MSG::ERROR << "RootCnvSvc::bad storage type" << svc_type << endreq;
390 return StatusCode::FAILURE;
391 }
392
393 std::string path = spars[0];
394 std::string treename = spars[1];
395 std::string branchname = spars[2];
396 int entry=ipars[0];
397 if (path.size()==0) path="/Event";
398 refpAddress = new RootAddress(ROOT_StorageType,
399 clid,
400 path,treename,branchname,entry);
401 return StatusCode::SUCCESS;
402 }
403
404
405 StatusCode RootCnvSvc::commitOutput(const std::string& output, bool do_commit)
406 {
407
408
409
410 MsgStream log( msgSvc(), name() );
411 log << MSG::INFO << "RootCnvSvc::commitOutput starts." << endreq;
412
413 StatusCode sc=m_rootInterface->fillTrees();
414 if (sc.isFailure())
415 log << MSG::ERROR << "No Root tree was filled" << endreq;
416
417 // objects must be cleared after fill
418 else{
419 TObject* oEvtHeader = m_evtheaderCnv->getWriteObject();
420 if (oEvtHeader) oEvtHeader->Clear();
421 TObject* oEvtNavigator = m_evtnavigatorCnv->getWriteObject();
422 if (oEvtNavigator) oEvtNavigator->Clear();
423 TObject* o=m_dCnv->getWriteObject();
424 if (o) o->Clear();
425 TObject* oDst=m_dstCnv->getWriteObject();
426 if (oDst) oDst->Clear();
427 TObject* oMc=m_mcCnv->getWriteObject();
428 if (oMc) oMc->Clear();
429 TObject* oRecTrack=m_rectrackCnv->getWriteObject();
430 if (oRecTrack) oRecTrack->Clear();
431 TObject* oEvtRecEvent = m_evtRecCnv->getWriteObject();
432 if (oEvtRecEvent) oEvtRecEvent->Clear();
433 TObject* oTrig = m_trigCnv->getWriteObject();
434 if(oTrig) oTrig->Clear();
435 TObject* oHlt = m_hltCnv->getWriteObject();
436 if(oHlt) oHlt->Clear();
437 }
438 m_common.clear();
439
440 return sc;
441 }
442
443 StatusCode RootCnvSvc::createAddress(DataObject *obj,IOpaqueAddress*& newAddr) {
444
445 // create address for this object
446 MsgStream log(msgSvc(), name());
447
448
449 log << MSG::DEBUG << "RootCnvSvc::createAddress"<<endreq;
450
451 StatusCode status = INVALID_ADDRESS;
452 IRegistry* ent = obj->registry();
453
454 if ( 0 != ent ) {
455 SmartIF<IDataManagerSvc> iaddrReg(dataProvider());
456 std::string path = ent->identifier();
457 LeafMap::iterator itm = m_leaves.find(path);
458
459
460 if ( itm != m_leaves.end() ) {
461 Leaf* leaf = (*itm).second;
462 if ( 0 != leaf ) {
463 std::string spars[3] ;
464 spars[0]=path;
465 spars[1]=leaf->treename;
466 spars[2]=leaf->branchname;
467
468
469 unsigned long ipars[2] ={0,0};
470 if (m_evtsel) ipars[0]=m_evtsel->getRecId();
471
472 status=addressCreator()->createAddress(ROOT_StorageType,leaf->clid,spars,ipars,newAddr);
473 if ( status.isSuccess() ) {
474 status = iaddrReg->registerAddress((IRegistry*)0,path, newAddr);
475 if ( !status.isSuccess() ) {
476 newAddr->release();
477 }
478 }
479 return StatusCode::SUCCESS;
480 }
481 }
482 }
483 return status;
484 }
485
486 StatusCode RootCnvSvc::createAddress(std::string path,IOpaqueAddress*& newAddr) {
487
488 // create address for this object
489 MsgStream log(msgSvc(), name());
490
491 StatusCode status;
492 LeafMap::iterator itm = m_leaves.find(path);
493 SmartIF<IDataManagerSvc> iaddrReg(dataProvider());
494 if ( itm != m_leaves.end() ) {
495 Leaf* leaf = (*itm).second;
496 if ( 0 != leaf ) {
497 std::string spars[3] ;
498 spars[0]=path;
499 spars[1]=leaf->treename;
500 spars[2]=leaf->branchname;
501
502 unsigned long ipars[2] = {0,0};
503 if (m_evtsel) ipars[0]=m_evtsel->getRecId();
504 status=addressCreator()->createAddress(ROOT_StorageType,leaf->clid,spars,ipars,newAddr);
505 if ( status.isSuccess() ) {
506 status = iaddrReg->registerAddress((IRegistry*)0,path, newAddr);
507 if ( !status.isSuccess() ) {
508 newAddr->release();
509 }
510 }
511 return StatusCode::SUCCESS;
512 }
513 }
514
515
516 return StatusCode::FAILURE;
517 }
518
519
520 /// Add converters to the service
521 StatusCode RootCnvSvc::addConverters () {
522 MsgStream log(msgSvc(), name());
523 declareObject(Leaf(EventModel::Dst::DstMdcDedxCol, MdcDedxCnv::classID(), "Event", "m_mdcDedxCol"));
524 declareObject(Leaf(EventModel::Dst::DstCgemDedxCol, CgemDedxCnv::classID(), "Event", "m_cgemDedxCol"));
526 declareObject(Leaf(EventModel::Digi::EmcDigiCol, EmcDigiCnv::classID(), "Event", "m_emcDigiCol"));
527 declareObject(Leaf(EventModel::MC::EmcMcHitCol, EmcMcHitCnv::classID(), "Event", "m_emcMcHitCol"));
528 declareObject(Leaf(EventModel::Dst::DstEmcShowerCol, EmcTrackCnv::classID(), "Event", "m_emcTrackCol"));
529
530 declareObject(Leaf("/Event", EventCnv::classID(), "", ""));
531 declareObject(Leaf(EventModel::EventHeader, EvtHeaderCnv::classID(), "Event", "m_runId:m_eventId:m_time:m_eventTag:m_flag1:m_flag2"));
532 declareObject(Leaf(EventModel::Navigator, EvtNavigatorCnv::classID(), "Event", "m_mcMdcMcHits:m_mcMdcTracks:m_mcEmcMcHits:m_mcEmcRecShowers"));
533 declareObject(Leaf(EventModel::Dst::DstExtTrackCol, ExtTrackCnv::classID(), "Event", "m_extTrackCol"));
535 declareObject(Leaf(EventModel::MC::McParticleCol, McParticleCnv::classID(), "Event", "m_mcParticleCol"));
536 declareObject(Leaf(EventModel::Digi::MdcDigiCol, MdcDigiCnv::classID(), "Event", "m_mdcDigiCol"));
537 declareObject(Leaf(EventModel::Dst::DstMdcKalTrackCol, MdcKalTrackCnv::classID(), "Event", "m_mdcKalTrackCol"));
538 declareObject(Leaf(EventModel::MC::MdcMcHitCol, MdcMcHitCnv::classID(), "Event", "m_mdcMcHitCol"));
539 declareObject(Leaf(EventModel::Dst::DstMdcTrackCol, MdcTrackCnv::classID(), "Event", "m_mdcTrackCol"));
540 declareObject(Leaf(EventModel::Digi::CgemDigiCol, CgemDigiCnv::classID(), "Event", "m_cgemDigiCol"));
541 declareObject(Leaf(EventModel::Dst::DstCgemKalTrackCol, CgemKalTrackCnv::classID(), "Event", "m_cgemKalTrackCol"));
542 declareObject(Leaf(EventModel::MC::CgemMcHitCol, CgemMcHitCnv::classID(), "Event", "m_cgemMcHitCol"));
543 declareObject(Leaf(EventModel::Dst::DstCgemTrackCol, CgemTrackCnv::classID(), "Event", "m_cgemTrackCol"));
544 declareObject(Leaf(EventModel::Dst::DstCgemSegmentCol, CgemSegmentCnv::classID(), "Event", "m_cgemSegmentCol"));
545 declareObject(Leaf(EventModel::Digi::MucDigiCol, MucDigiCnv::classID(), "Event", "m_mucDigiCol"));
546 declareObject(Leaf(EventModel::MC::MucMcHitCol, MucMcHitCnv::classID(), "Event", "m_mucMcHitCol"));
547 declareObject(Leaf(EventModel::Dst::DstMucTrackCol, MucTrackCnv::classID(), "Event", "m_mucTrackCol"));
548 declareObject(Leaf(EventModel::Digi::Event, DigiCnv::classID(), "Event", "m_fromMc"));
549 declareObject(Leaf(EventModel::Digi::TofDigiCol, TofDigiCnv::classID(), "Event", "m_tofDigiCol"));
550 declareObject(Leaf(EventModel::MC::TofMcHitCol, TofMcHitCnv::classID(), "Event", "m_tofMcHitCol"));
551 declareObject(Leaf(EventModel::Dst::DstTofTrackCol, TofTrackCnv::classID(), "Event", "m_tofTrackCol"));
552 //declareObject(Leaf("/Event/Digi/LumiDigiCol", LumiDigiCnv::classID(), "Event", "m_lumiDigiCol"));
553 declareObject(Leaf(EventModel::Digi::LumiDigiCol, LumiDigiCnv::classID(), "Event", "m_lumiDigiCol"));
554
556 declareObject(Leaf(EventModel::Trig::TrigData, TrigDataCnv::classID(), "Event", "m_trigData"));
557
559 declareObject(Leaf(EventModel::Hlt::HltRawCol, HltRawCnv::classID(), "Event", "m_hltRawCol"));
560 declareObject(Leaf(EventModel::Hlt::HltInf, HltInfCnv::classID(), "Event", "m_hltInf"));
561 declareObject(Leaf(EventModel::Hlt::DstHltInf, DstHltInfCnv::classID(), "Event", "m_dstHltInf"));
562
564
565 declareObject(Leaf(EventModel::Recon::RecMdcTrackCol, RecMdcTrackCnv::classID(), "Event", "m_recMdcTrackCol"));
566 declareObject(Leaf(EventModel::Recon::RecMdcHitCol, RecMdcHitCnv::classID(), "Event", "m_recMdcHitCol"));
569 declareObject(Leaf(EventModel::Recon::RecMdcDedxCol, RecMdcDedxCnv::classID(),"Event", "m_recMdcDedxCol"));
571
572 declareObject(Leaf(EventModel::Recon::RecCgemTrackCol, RecCgemTrackCnv::classID(), "Event", "m_recCgemTrackCol"));
573 declareObject(Leaf(EventModel::Recon::RecCgemSegmentCol, RecCgemSegmentCnv::classID(), "Event", "m_recCgemSegmentCol"));
574 declareObject(Leaf(EventModel::Recon::RecCgemHitCol, RecCgemHitCnv::classID(), "Event", "m_recCgemHitCol"));
577 declareObject(Leaf(EventModel::Recon::RecCgemDedxCol, RecCgemDedxCnv::classID(),"Event", "m_recCgemDedxCol"));
579 declareObject(Leaf(EventModel::Recon::RecCgemClusterCol, RecCgemClusterCnv::classID(), "Event", "m_recCgemClusterCol"));
580 declareObject(Leaf(EventModel::Recon::RecEsTimeCol, RecEvTimeCnv::classID(),"Event", "m_recEvTimeCol"));
581 declareObject(Leaf(EventModel::Recon::RecTofTrackCol, RecTofTrackCnv::classID(), "Event", "m_recTofTrackCol"));
582 declareObject(Leaf(EventModel::Recon::RecBTofCalHitCol, RecBTofCalHitCnv::classID(), "Event", "m_recBTofCalHitCol"));
583 declareObject(Leaf(EventModel::Recon::RecETofCalHitCol, RecETofCalHitCnv::classID(), "Event", "m_recETofCalHitCol"));
584 declareObject(Leaf(EventModel::Recon::RecEmcHitCol, RecEmcHitCnv::classID(), "Event", "m_recEmcHitCol"));
585 declareObject(Leaf(EventModel::Recon::RecEmcClusterCol, RecEmcClusterCnv::classID(), "Event", "m_recEmcClusterCol"));
586 declareObject(Leaf(EventModel::Recon::RecEmcShowerCol, RecEmcShowerCnv::classID(), "Event", "m_recEmcShowerCol"));
587 declareObject(Leaf(EventModel::Recon::RecMucTrackCol, RecMucTrackCnv::classID(), "Event", "m_recMucTrackCol"));
589 declareObject(Leaf(EventModel::Recon::RecExtTrackCol, RecExtTrackCnv::classID(),"Event", "m_recExtTrackCol"));
590 declareObject(Leaf(EventModel::Recon::RecZddChannelCol, RecZddChannelCnv::classID(), "Event", "m_recZddChannelCol"));
593 declareObject(Leaf(EventModel::EvtRec::EvtRecTrackCol, EvtRecTrackCnv::classID(), "Event", "m_evtRecTrackCol"));
595 declareObject(Leaf(EventModel::EvtRec::EvtRecVeeVertexCol, EvtRecVeeVertexCnv::classID(), "Event", "m_evtRecVeeVertexCol"));
596 declareObject(Leaf(EventModel::EvtRec::EvtRecPi0Col, EvtRecPi0Cnv::classID(), "Event", "m_evtRecPi0Col"));
597 declareObject(Leaf(EventModel::EvtRec::EvtRecEtaToGGCol, EvtRecEtaToGGCnv::classID(), "Event", "m_evtRecEtaToGGCol"));
598 declareObject(Leaf(EventModel::EvtRec::EvtRecDTagCol, EvtRecDTagCnv::classID(), "Event", "m_evtRecDTagCol"));
599
600 return StatusCode::SUCCESS;
601
602 }
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
XmlRpcServer s
Definition: HelloServer.cpp:11
const InterfaceID IID_IRootCnvSvc
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)
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 updateServiceState(IOpaqueAddress *pAddress)
Update state of the service.
virtual StatusCode commitOutput(const std::string &output, bool do_commit)
Commit pending output (fill the TTrees).
RootCnvSvc(const std::string &name, ISvcLocator *svc)
virtual StatusCode declareObject(const Leaf &leaf)
Associates a path on TDS with a particular converter.
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
Override inherited queryInterface due to enhanced interface.
virtual StatusCode addInput(const std::string &treename, const std::string &file)
add input tree to the list
static RootInterface * Instance(MsgStream log)
singleton behaviour
virtual StatusCode addOutput(const std::string &treename, const std::string &file, int splitx, int bufsize, int compression)
add output tree to the list
virtual StatusCode fillTrees()
fill in all trees
void Clear(Option_t *option="")
void Clear(Option_t *option="")
void Clear(Option_t *option="")
static TTrigEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
static int expandEnvVar(std::string *toExpand, const std::string &openDel=std::string("$("), const std::string &closeDel=std::string(")"))
static int catchOptionVal(std::string *toCatch, const int ops=0, const std::string &openDel=std::string("#("), const std::string &closeDel=std::string(")"))