BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TofRawDataProvider.cxx
Go to the documentation of this file.
1#include "RawDataProviderSvc/TofRawDataProvider.h"
2#include "DetVerSvc/IDetVerSvc.h"
3#include "EventModel/EventHeader.h"
4#include "GaudiKernel/DataSvc.h"
5#include "GaudiKernel/IDataProviderSvc.h"
6#include "GaudiKernel/IIncidentListener.h"
7#include "GaudiKernel/IIncidentSvc.h"
8#include "GaudiKernel/IInterface.h"
9#include "GaudiKernel/Incident.h"
10#include "GaudiKernel/Kernel.h"
11#include "GaudiKernel/MsgStream.h"
12#include "GaudiKernel/SmartDataPtr.h"
13#include "GaudiKernel/StatusCode.h"
14#include "Identifier/Identifier.h"
15#include "Identifier/TofID.h"
16#include "TofCaliSvc/ITofCaliSvc.h"
17#include "TofQCorrSvc/ITofQCorrSvc.h"
18#include "TofQElecSvc/ITofQElecSvc.h"
19#include "TofRawEvent/TofDigi.h"
20
21// #include "RawEvent/RawDataUtil.h"
22
23#include <cmath>
24// tianhl for mt
25// #include "GaudiKernel/ThreadGaudi.h"
26// tianhl for mt
27
28using namespace std;
29
34
36
38 : RawDataProviderBase( name ), m_hasFilled( 0 ) {}
39
41 IterTofDataMap iter = m_tofDataMap.begin();
42 for ( ; iter != m_tofDataMap.end(); iter++ ) { delete ( *iter ).second; }
43 m_tofDataMap.clear();
44
45 m_tofDataMapOnline.clear();
46 m_tofDataVectorOnline.clear();
47 m_tofDataMapEstime.clear();
48 m_tofDataVectorEstime.clear();
49 m_tofDataMapTof.clear();
50 m_tofDataVectorTof.clear();
51 m_tofDataMapEmc.clear();
52 m_tofDataVectorEmc.clear();
53
54 return;
55}
56
57StatusCode TofRawDataProvider::initialize( bool mode, ISvcLocator* pSvcLoc,
58 IMessageSvc* pMsg ) {
59 MsgStream log( m_msgSvc, m_name );
60 RawDataProviderBase::initialize( pSvcLoc, pMsg );
61
62 // Get Detector Version Service
63 StatusCode sc_det = m_svcLocator->service( "DetVerSvc", detVerSvc );
64 if ( sc_det == StatusCode::SUCCESS )
65 {
66 log << MSG::INFO << "TofRawDataProvider Get Detector Version Service Sucessfully!"
67 << endmsg;
68 }
69 else
70 {
71 log << MSG::ERROR << "TofRawDataProvider Can NOT Retrieve DetVerSvc instance" << endmsg;
72 return StatusCode::FAILURE;
73 }
74
75 // Get TOF Calibtration Service
76 StatusCode scc = m_svcLocator->service( "TofCaliSvc", tofCaliSvc );
77 if ( scc == StatusCode::SUCCESS )
78 { log << MSG::INFO << "TofRec Get Calibration Service Sucessfully!" << endmsg; }
79 else if ( !mode )
80 {
81 log << MSG::ERROR << "TofRec Get Calibration Service Failed !" << endmsg;
82 return StatusCode::FAILURE;
83 }
84
85 // Get TOF Q Correction Service
86 StatusCode scq = m_svcLocator->service( "TofQCorrSvc", tofQCorrSvc );
87 if ( scq == StatusCode::SUCCESS )
88 { log << MSG::INFO << "TofRec Get Q Correction Service Sucessfully!" << endmsg; }
89 else if ( !mode )
90 {
91 log << MSG::ERROR << "TofRec Get Q Correction Service Failed !" << endmsg;
92 return StatusCode::FAILURE;
93 }
94
95 // Get TOF Q Electronics Saturation Service
96 StatusCode sce = m_svcLocator->service( "TofQElecSvc", tofQElecSvc );
97 if ( sce == StatusCode::SUCCESS )
98 {
99 log << MSG::INFO << "TofRec Get Q Electronics Calibration Service Sucessfully!" << endmsg;
100 }
101 else if ( !mode )
102 {
103 log << MSG::ERROR << "TofRec Get Q Electronics Calibration Service Failed !" << endmsg;
104 return StatusCode::FAILURE;
105 }
106
107 return StatusCode::SUCCESS;
108}
109
110void TofRawDataProvider::handle( const Incident& inc ) {
111 MsgStream log( m_msgSvc, m_name );
112 log << MSG::DEBUG << "handle: " << inc.type() << endmsg;
113 if ( inc.type() == "BeginEvent" )
114 {
115 log << MSG::DEBUG << "Begin Event" << endmsg;
116 IterTofDataMap iter = m_tofDataMap.begin();
117 for ( ; iter != m_tofDataMap.end(); iter++ ) { delete ( *iter ).second; }
118 IterTofDataMap iterOnline = m_tofDataMapOnline.begin();
119 for ( ; iterOnline != m_tofDataMapOnline.end(); iterOnline++ )
120 { delete ( *iterOnline ).second; }
121 m_tofDataMap.clear();
122 m_tofDataMapOnline.clear();
123 m_tofDataVectorOnline.clear();
124 m_tofDataMapEstime.clear();
125 m_tofDataVectorEstime.clear();
126 m_tofDataMapTof.clear();
127 m_tofDataVectorTof.clear();
128 m_tofDataMapEmc.clear();
129 m_tofDataVectorEmc.clear();
130
131 m_hasFilled = false;
132 }
133 return;
134}
135
136// tofDataMapFull includes all possible combinations.
138
139 MsgStream log( m_msgSvc, m_name );
140 log << MSG::INFO << "TofRawDataProvider::tofDataMapFull()" << endmsg;
141
142 if ( !m_tofDataMap.empty() )
143 {
144
145 log << MSG::WARNING << "TofRawDataProvider::tofDataMapFull: m_tofDataMap is NOT empty!"
146 << endmsg;
147
148 IterTofDataMap iter = m_tofDataMap.begin();
149 for ( ; iter != m_tofDataMap.end(); iter++ ) { delete ( *iter ).second; }
150 m_tofDataMap.clear();
151 }
152 // // tianhl for mt
153 std::string evtDataSvc_name( "EventDataSvc" );
154 // if ( isGaudiThreaded( m_name ) ) { evtDataSvc_name +=
155 // getGaudiThreadIDfromName( m_name ); }
156 // // tianhl for mt
157
158 IDataProviderSvc* eventSvc;
159 StatusCode sc = m_svcLocator->service( evtDataSvc_name, eventSvc, true );
160 if ( !sc.isSuccess() )
161 {
162 log << MSG::FATAL
163 << "TofRawDataProvider::tofDataMapFull: ERROR Could not load "
164 "EventDataSvc"
165 << endmsg;
166 return;
167 }
168
169 // Event Header
170 SmartDataPtr<Event::EventHeader> eventHeader( eventSvc, "/Event/EventHeader" );
171 if ( !eventHeader )
172 {
173 log << MSG::FATAL << "TofRawDataProvider could not find Event Header!" << endmsg;
174 return;
175 }
176 m_run = eventHeader->runNumber();
177 m_event = eventHeader->eventNumber();
178
179 if ( tofCaliSvc->chooseConstants( m_run, m_event ) == StatusCode::FAILURE ) { return; }
180 bool mc = ( m_run < 0 ) ? true : false;
181 bool qCorr = bool( tofCaliSvc->QCorr() );
182 qCorr = qCorr && ( !mc );
183 bool qElec = bool( tofCaliSvc->QElec() );
184 bool misLable = bool( tofCaliSvc->MisLable() );
185 misLable = ( !mc && misLable );
186
187 int identmp = -1;
188 vector<int> deadId;
189 for ( unsigned int i = 0; i < 5; i++ )
190 {
191 identmp = tofCaliSvc->BrEast( i );
192 if ( identmp != 0x2fffffff ) { deadId.push_back( identmp ); }
193 identmp = tofCaliSvc->BrWest( i );
194 if ( identmp != 0x2fffffff ) { deadId.push_back( identmp ); }
195 }
196 for ( unsigned int i = 0; i < 500; i++ )
197 {
198 identmp = tofCaliSvc->Endcap( i );
199 if ( identmp == 0x2fffffff ) break; // -1
200 else { deadId.push_back( identmp ); }
201 }
202
203 // get TDS data in a common class
204 SmartDataPtr<TofDigiCol> tofDigiCol( eventSvc, "/Event/Digi/TofDigiCol" );
205 if ( !tofDigiCol )
206 {
207 log << MSG::WARNING << "TofRawDataProvider::tofDataMapFull: Could not find Tof Digi Data!"
208 << endmsg;
209 return;
210 }
211
212 int qnumber = 0;
213 int tnumber = 0;
214
215 std::vector<Adc*> chargeVec;
216 std::vector<Tdc*> timeVec;
217
218 TofDigiCol::iterator iter = tofDigiCol->begin();
219 for ( ; iter != tofDigiCol->end(); iter++ )
220 {
221 Identifier iden = ( *iter )->identify();
222 unsigned int iden_value = iden.get_value();
223
224 bool sameId = false;
225 vector<int>::iterator iter_dead = deadId.begin();
226 for ( ; iter_dead != deadId.end(); iter_dead++ )
227 {
228 if ( iden_value == ( *iter_dead ) )
229 {
230 sameId = true;
231 break;
232 }
233 }
234 if ( sameId )
235 {
236 if ( mc ) { continue; }
237 else
238 {
239 std::string bore;
240 int layertmp = -1;
241 int tofidtmp = -1;
242 if ( ( TofID::barrel_ec( iden ) ) == 1 )
243 {
244 bore = string( "Barrel" );
245 layertmp = TofID::layer( iden );
246 tofidtmp = TofID::phi_module( iden );
247 }
248 else if ( ( TofID::barrel_ec( iden ) ) == 0 )
249 {
250 bore = string( "East Endcap" );
251 tofidtmp = TofID::phi_module( iden );
252 }
253 else if ( ( TofID::barrel_ec( iden ) ) == 2 )
254 {
255 bore = string( "West Endcap" );
256 tofidtmp = TofID::phi_module( iden );
257 }
258 else if ( ( TofID::barrel_ec( iden ) ) == 3 )
259 {
260 bore = string( "ETF(MRPC)" );
261 tofidtmp = TofID::module( iden );
262 }
263
264 // log << MSG::ERROR << "TofRawDataProvider::tofDataMapFull: Dead
265 // Channel Number is not Correct, please
266 // check TOF Calibration Constants! " << bore << " layer=" << layertmp
267 // << " tofid=" << tofidtmp << endmsg;
268 }
269 }
270
271 if ( TofID::is_scin( iden ) && !( TofID::is_barrel( iden ) ) &&
272 ( TofID::end( iden ) ) == 1 )
273 continue;
274
275 unsigned int overflow = ( *iter )->getOverflow();
276 if ( TofID::is_scin( iden ) && ( ( overflow & 0xfe000000 ) == 0xfe000000 ) ) continue;
277
278 // if( ( m_detVerSvc->phase() == 1 ) && TofID::is_mrpc( iden ) )
279 // continue; if( ( m_detVerSvc->phase() >= 3 ) && TofID::is_scin( iden )
280 // && !( TofID::is_barrel( iden ) ) ) continue;;
281
282 // for 150203 data, 92Scin + 2MRPC
283 // if( !mc && ( m_detVerSvc->phase() == 2 ) && TofID::is_mrpc( iden ) ) {
284 if ( m_run >= 40203 && m_run <= 43253 && TofID::is_mrpc( iden ) )
285 {
286 // ETF Module 36 ==> 44
287 if ( ( iden_value & 0x2fffffe0 ) == 0x2000c800 )
288 {
289 iden_value = 0x2000c900 + ( iden_value & 0x1f );
290 iden = Identifier( iden_value );
291 }
292 // ETF Module 37 ==> 43
293 if ( ( iden_value & 0x2fffffe0 ) == 0x2000c820 )
294 {
295 iden_value = 0x2000c8e0 + ( iden_value & 0x1f );
296 iden = Identifier( iden_value );
297 }
298 }
299 // end 150203 data
300
301 // overflow 0x 1 1 1 1 1 1
302 // no Q T / multi Q T / overflow Q T
303
304 bool multiQ = ( ( overflow & 0x8 ) != 0 );
305 bool multiT = ( ( overflow & 0x4 ) != 0 );
306
307 unsigned int tdcChannel = ( *iter )->getTimeChannel();
308 unsigned int adcChannel = ( *iter )->getChargeChannel();
309 if ( TofID::is_scin( iden ) && ( ( overflow & 0x2 ) != 0 ) )
310 { adcChannel = ( adcChannel | 0x80000 ); }
311
312 if ( ( adcChannel & 0x7fffffff ) != 0x7fffffff )
313 {
314 Adc* adc = new Adc;
315 if ( qCorr ) adc->setCorr();
316 if ( qElec ) adc->setElec();
317
318 // for 150203 data, 92Scin + 2MRPC
319 // if( !mc && ( m_detVerSvc->phase() == 2 ) && TofID::is_mrpc( iden )
320 // ) {
321 if ( m_run >= 40203 && m_run <= 43253 && TofID::is_mrpc( iden ) )
322 { adcChannel += 0x18000; }
323 // end 150203 data
324
325 adc->setValue( iden, adcChannel );
326 qnumber++;
327 adc->setNumber( qnumber );
328 chargeVec.push_back( adc );
329 }
330
331 if ( tdcChannel != 0x7fffffff )
332 {
333 Tdc* tdc = new Tdc;
334
335 // for 150203 data, 92Scin + 2MRPC
336 // if( !mc && ( m_detVerSvc->phase(0 == 2 ) && TofID::is_mrpc( iden )
337 // ) {
338 if ( m_run >= 40203 && m_run <= 43253 && TofID::is_mrpc( iden ) )
339 { tdcChannel += 0x18000; }
340 // end 150203 data
341
342 tdc->setValue( tdcChannel );
343 tnumber++;
344 tdc->setNumber( tnumber );
345 timeVec.push_back( tdc );
346 }
347
348 if ( multiT || multiQ )
349 {
350 TofDigiCol::iterator iter_next = iter + 1;
351 if ( iter_next != tofDigiCol->end() )
352 {
353 unsigned int idenNext_value = ( ( *iter_next )->identify() ).get_value();
354 if ( iden_value == idenNext_value ) continue;
355 }
356 }
357
358 qnumber = 0;
359 tnumber = 0;
360
361 std::vector<PmtData*> pmtDataVec;
362 if ( TofID::is_scin( iden ) )
363 {
364 std::vector<Tdc*>::iterator iter_t = timeVec.begin();
365 for ( ; iter_t != timeVec.end(); iter_t++ )
366 {
367 int tclock = ( *iter_t )->clock();
368 PmtData* pmt = new PmtData;
369 pmt->setIdentify( iden.get_value() );
370 pmt->setTdc( ( *iter_t ) );
371 std::vector<Adc*>::iterator iter_q = chargeVec.begin();
372 for ( ; iter_q != chargeVec.end(); iter_q++ )
373 {
374 if ( ( *iter_q )->times() != -1 ) { continue; }
375 int qclock = ( *iter_q )->clock();
376 if ( abs( tclock - qclock ) < 2 )
377 {
378 if ( ( pmt->quality() & 0x2 ) != 0 )
379 { // pmt has Q
380 if ( ( *iter_q )->value() > pmt->adc() )
381 {
382 pmt->qtimesmm();
383 pmt->setAdc( ( *iter_q ) );
384 }
385 }
386 else
387 { // pmt has no Q
388 pmt->setAdc( ( *iter_q ) );
389 }
390 }
391 }
392 pmtDataVec.push_back( pmt );
393 }
394
395 std::vector<Adc*>::iterator iter_q = chargeVec.begin();
396 for ( ; iter_q != chargeVec.end(); iter_q++ )
397 {
398 if ( ( *iter_q )->times() != -1 ) { continue; }
399 PmtData* pmt = new PmtData;
400 pmt->setIdentify( iden.get_value() );
401 pmt->setAdc( ( *iter_q ) );
402 pmtDataVec.push_back( pmt );
403 }
404 }
405
406 if ( TofID::is_mrpc( iden ) )
407 {
408 std::vector<Tdc*>::iterator iter_t = timeVec.begin();
409 for ( ; iter_t != timeVec.end(); iter_t++ )
410 {
411 std::vector<Adc*>::iterator iter_q = chargeVec.begin();
412 for ( ; iter_q != chargeVec.end(); iter_q++ )
413 {
414 if ( ( ( *iter_q )->qtc() - ( *iter_t )->value() ) > totForward &&
415 ( ( *iter_q )->qtc() - ( *iter_t )->value() ) < totBackward )
416 {
417 PmtData* pmt = new PmtData;
418 pmt->setIdentify( iden.get_value() );
419 pmt->setTdc( ( *iter_t ) );
420 pmt->setAdc( ( *iter_q ) );
421 pmtDataVec.push_back( pmt );
422 }
423 }
424 if ( ( *iter_t )->times() == -1 )
425 {
426 PmtData* pmt = new PmtData;
427 pmt->setTdc( ( *iter_t ) );
428 pmtDataVec.push_back( pmt );
429 }
430 }
431
432 std::vector<Adc*>::iterator iter_q = chargeVec.begin();
433 for ( ; iter_q != chargeVec.end(); iter_q++ )
434 {
435 if ( ( *iter_q )->times() != -1 ) { continue; }
436 PmtData* pmt = new PmtData;
437 pmt->setIdentify( iden.get_value() );
438 pmt->setAdc( ( *iter_q ) );
439 pmtDataVec.push_back( pmt );
440 }
441 }
442
443 chargeVec.clear();
444 timeVec.clear();
445
446 unsigned int iden_value_key = ( iden_value & 0xfffffffe );
447 if ( TofID::is_scin( iden ) )
448 {
449 int barrel_ec = TofID::barrel_ec( iden );
450 // int layer = TofID::layer( iden );
451 int tofid = TofID::phi_module( iden );
452 int end = TofID::end( iden );
453 if ( ( barrel_ec == 0 ) || ( barrel_ec == 2 ) )
454 {
455 std::vector<PmtData*>::iterator iter_pmt = pmtDataVec.begin();
456 for ( ; iter_pmt != pmtDataVec.end(); iter_pmt++ )
457 {
458 TofData* tof = new TofData;
459 if ( misLable )
460 {
461 tof->setMisLable();
462 if ( barrel_ec == 2 && tofid == 42 )
463 {
464 unsigned int iden91 = TofID::getIntID( 2, 0, 91 - 48, 0 );
465 iden_value_key = iden91;
466 iden = TofID::cell_id( iden91 );
467 }
468 if ( barrel_ec == 2 && tofid == 43 )
469 {
470 unsigned int iden90 = TofID::getIntID( 2, 0, 90 - 48, 0 );
471 iden_value_key = iden90;
472 iden = TofID::cell_id( iden90 );
473 }
474 }
475 tof->setIdentify( iden );
476 tof->setForward( ( *iter_pmt ) );
477 tof->setTMatched( true );
478 m_tofDataMap.insert( make_pair( iden_value_key, tof ) );
479 }
480 }
481 else if ( barrel_ec == 1 )
482 {
483 unsigned int count = m_tofDataMap.count( iden_value_key );
484 if ( count == 0 )
485 {
486 std::vector<PmtData*>::iterator iter_pmt = pmtDataVec.begin();
487 for ( ; iter_pmt != pmtDataVec.end(); iter_pmt++ )
488 {
489 TofData* tof = new TofData;
490 tof->setIdentify( iden );
491 if ( end == 0 ) { tof->setForward( ( *iter_pmt ) ); }
492 else { tof->setBackward( ( *iter_pmt ) ); }
493 tof->setTMatched( true );
494 m_tofDataMap.insert( make_pair( iden_value_key, tof ) );
495 }
496 }
497 else
498 {
499 pair<IterTofDataMap, IterTofDataMap> range =
500 m_tofDataMap.equal_range( iden_value_key );
501 std::vector<PmtData*>::iterator iter_pmt = pmtDataVec.begin();
502 for ( ; iter_pmt != pmtDataVec.end(); iter_pmt++ )
503 {
504 bool used = false;
505 IterTofDataMap iter = range.first;
506 for ( unsigned int tofDataNumber = 0; tofDataNumber < count;
507 tofDataNumber++, iter++ )
508 {
509
510 bool matched = false;
511 if ( end == 0 )
512 { // east, forward
513 if ( ( ( *iter_pmt )->quality() & 0x1 ) != 0 )
514 { // pmt has east time
515 if ( ( ( ( *iter ).second )->quality() & 0x1 ) != 0 )
516 { // tofmap has west time
517 double time1 = ( *iter_pmt )->tdc();
518 double time2 = ( ( *iter ).second )->tdc2();
519 matched = ( abs( time1 - time2 ) < timeDiff );
520 }
521 else
522 { // tofmap has no west time
523 if ( ( ( ( *iter ).second )->quality() & 0x2 ) != 0 )
524 { // tofmap has no west time, but west charge
525 double time1 = ( *iter_pmt )->tclock();
526 double time2 = ( *iter_pmt )->qclock();
527 double time3 = ( ( *iter ).second )->qclock2();
528 matched = ( ( abs( time1 - time3 ) <= tClockDiff ) ||
529 ( abs( time2 - time3 ) <= tClockDiff ) );
530 }
531 }
532 }
533 else
534 { // pmt has no east time
535 if ( ( ( *iter_pmt )->quality() & 0x2 ) != 0 )
536 { // pmt has no east time, but east charge
537 if ( ( ( ( *iter ).second )->quality() & 0x1 ) != 0 )
538 { // tofmap has west time
539 if ( ( ( ( ( *iter ).second )->quality() & 0x2 ) != 0 ) )
540 { // tofmap has west time and west charge
541 double time1 = ( *iter_pmt )->qclock();
542 double time2 = ( ( *iter ).second )->tclock2();
543 double time3 = ( ( *iter ).second )->qclock2();
544 matched = ( ( abs( time1 - time2 ) <= tClockDiff ) ||
545 ( abs( time1 - time3 ) <= tClockDiff ) );
546 }
547 }
548 else
549 { // tofmap has no west time, but west charge
550 if ( ( ( ( ( *iter ).second )->quality() & 0x2 ) != 0 ) )
551 {
552 double time1 = ( *iter_pmt )->qclock();
553 double time2 = ( ( *iter ).second )->qclock2();
554 matched = ( abs( time1 - time2 ) <= tClockDiff );
555 }
556 }
557 }
558 }
559
560 if ( matched )
561 {
562 used = true;
563 if ( ( ( ( *iter ).second )->quality() & 0xc ) == 0 )
564 { ( ( *iter ).second )->setForward( ( *iter_pmt ) ); }
565 else
566 {
567 TofData* tof = new TofData;
568 tof->setIdentify( iden );
569 tof->setForward( ( *iter_pmt ) );
570 tof->setBackward( ( ( *iter ).second )->backward() );
571 tof->setTMatched( true );
572 m_tofDataMap.insert( make_pair( iden_value_key, tof ) );
573 }
574 }
575
576 } // end east, forward
577 else
578 { // west, backward
579 if ( ( ( *iter_pmt )->quality() & 0x1 ) != 0 )
580 { // pmt has west time
581 if ( ( ( ( *iter ).second )->quality() & 0x4 ) != 0 )
582 { // tofmap has east time
583 double time1 = ( *iter_pmt )->tdc();
584 double time2 = ( ( *iter ).second )->tdc1();
585 matched = ( abs( time1 - time2 ) < timeDiff );
586 }
587 else
588 { // tofmap has no east time
589 if ( ( ( ( *iter ).second )->quality() & 0x8 ) != 0 )
590 { // tofmap has no east time, but east charge
591 double time1 = ( *iter_pmt )->tclock();
592 double time2 = ( *iter_pmt )->qclock();
593 double time3 = ( ( *iter ).second )->qclock1();
594 matched = ( ( abs( time1 - time3 ) <= tClockDiff ) ||
595 ( abs( time2 - time3 ) <= tClockDiff ) );
596 }
597 }
598 }
599 else
600 { // pmt has no west time
601 if ( ( ( *iter_pmt )->quality() & 0x2 ) != 0 )
602 { // pmt has no west time, but west charge
603 if ( ( ( ( *iter ).second )->quality() & 0x4 ) != 0 )
604 { // tofmap has east time
605 if ( ( ( ( ( *iter ).second )->quality() & 0x8 ) != 0 ) )
606 { // tofmap has east time and east charge
607 double time1 = ( *iter_pmt )->qclock();
608 double time2 = ( ( *iter ).second )->tclock1();
609 double time3 = ( ( *iter ).second )->qclock1();
610 matched = ( ( abs( time1 - time2 ) <= tClockDiff ) ||
611 ( abs( time1 - time3 ) <= tClockDiff ) );
612 }
613 else {}
614 }
615 else
616 { // tofmap has no west time, but west charge
617 if ( ( ( ( ( *iter ).second )->quality() & 0x8 ) != 0 ) )
618 {
619 double time1 = ( *iter_pmt )->qclock();
620 double time2 = ( ( *iter ).second )->qclock1();
621 matched = ( abs( time1 - time2 ) <= tClockDiff );
622 }
623 }
624 }
625 }
626
627 if ( matched )
628 {
629 used = true;
630 if ( ( ( ( *iter ).second )->quality() & 0x3 ) == 0 )
631 { ( ( *iter ).second )->setBackward( ( *iter_pmt ) ); }
632 else
633 {
634 TofData* tof = new TofData;
635 tof->setIdentify( iden );
636 tof->setForward( ( ( *iter ).second )->forward() );
637 tof->setBackward( ( *iter_pmt ) );
638 tof->setTMatched( true );
639 m_tofDataMap.insert( make_pair( iden_value_key, tof ) );
640 }
641 }
642 }
643 }
644
645 if ( !used )
646 {
647 TofData* tof = new TofData;
648 tof->setIdentify( iden );
649 if ( end == 0 ) { tof->setForward( ( *iter_pmt ) ); }
650 else { tof->setBackward( ( *iter_pmt ) ); }
651 tof->setTMatched( true );
652 m_tofDataMap.insert( make_pair( iden_value_key, tof ) );
653 }
654 }
655 }
656 }
657 }
658 // mrpc endcap tof
659 if ( TofID::is_mrpc( iden ) )
660 {
661 // int barrel_ec = TofID::barrel_ec( iden );
662 int endcap = TofID::endcap( iden );
663 int tofid = TofID::module( iden );
664 int strip = TofID::strip( iden );
665 int end = TofID::end( iden );
666
667 unsigned int count = m_tofDataMap.count( iden_value_key );
668 if ( count == 0 )
669 {
670 std::vector<PmtData*>::iterator iter_pmt = pmtDataVec.begin();
671 for ( ; iter_pmt != pmtDataVec.end(); iter_pmt++ )
672 {
673 TofData* tof = new TofData;
674 tof->setIdentify( iden );
675 if ( end == 0 ) { tof->setForward( ( *iter_pmt ) ); }
676 else { tof->setBackward( ( *iter_pmt ) ); }
677 tof->setTMatched( true );
678 m_tofDataMap.insert( make_pair( iden_value_key, tof ) );
679 }
680 }
681 else
682 {
683 pair<IterTofDataMap, IterTofDataMap> range =
684 m_tofDataMap.equal_range( iden_value_key );
685 std::vector<PmtData*>::iterator iter_pmt = pmtDataVec.begin();
686 for ( ; iter_pmt != pmtDataVec.end(); iter_pmt++ )
687 {
688 bool used = false;
689 IterTofDataMap iter = range.first;
690 for ( unsigned int tofDataNumber = 0; tofDataNumber < count;
691 tofDataNumber++, iter++ )
692 {
693 bool matched = false;
694 if ( end == 0 )
695 { // east, forward
696 if ( ( ( *iter_pmt )->quality() & 0x1 ) != 0 )
697 { // pmt has east time
698 if ( ( ( ( *iter ).second )->quality() & 0x1 ) != 0 )
699 { // tofmap has west time
700 double time1 = ( *iter_pmt )->tdc();
701 double time2 = ( ( *iter ).second )->tdc2();
702 matched = ( abs( time1 - time2 ) < timeDiffMRPC );
703 if ( endcap == 0 && tofid == 13 && strip == 5 )
704 { matched = ( abs( time1 - time2 ) < ( 100 + timeDiffMRPC ) ); }
705 }
706 }
707 /*
708 else {
709 if( ( ((*iter).second)->quality() & 0x2 ) != 0 ) {
710 double time1 = (*iter_pmt)->tdc();
711 double time2 = ((*iter).second)->qtc2();
712 matched = ( abs(time1-time2)<timeDiffMRPC );
713 }
714 }
715 }
716 else {
717 if( ( ((*iter).second)->quality() & 0x1 ) != 0 ) {
718 double time1 = (*iter_pmt)->qtc();
719 double time2 = ((*iter).second)->tdc2();
720 matched = ( abs(time1-time2)<timeDiffMRPC );
721 }
722 else {
723 if( ( ((*iter).second)->quality() & 0x2 ) != 0 ) {
724 double time1 = (*iter_pmt)->qtc();
725 double time2 = ((*iter).second)->qtc2();
726 matched = ( abs(time1-time2)<timeDiffMRPC );
727 }
728 }
729 }
730
731 if( ( (*iter_pmt)->quality() & 0x3 ) == 0x3 ) { // pmt has east time
732 if( ( ((*iter).second)->quality() & 0x3 ) == 0x3 ) { // tofmap has
733 west time double time1 = (*iter_pmt)->tdc(); double time2 =
734 ((*iter).second)->tdc2(); matched = ( abs(time1-time2)<timeDiffMRPC
735 );
736 }
737 }
738 */
739 if ( matched )
740 {
741 used = true;
742 if ( ( ( ( *iter ).second )->quality() & 0xc ) == 0 )
743 { ( ( *iter ).second )->setForward( ( *iter_pmt ) ); }
744 else
745 {
746 TofData* tof = new TofData;
747 tof->setIdentify( iden );
748 tof->setForward( ( *iter_pmt ) );
749 tof->setBackward( ( ( *iter ).second )->backward() );
750 tof->setTMatched( true );
751 m_tofDataMap.insert( make_pair( iden_value_key, tof ) );
752 }
753 }
754 } // end east, forward
755 else
756 { // west, backward
757 if ( ( ( *iter_pmt )->quality() & 0x1 ) != 0 )
758 { // pmt has west time
759 if ( ( ( ( *iter ).second )->quality() & 0x4 ) != 0 )
760 { // tofmap has east time
761 double time1 = ( *iter_pmt )->tdc();
762 double time2 = ( ( *iter ).second )->tdc1();
763 matched = ( abs( time1 - time2 ) < timeDiffMRPC );
764 if ( endcap == 0 && tofid == 13 && strip == 5 )
765 { matched = ( abs( time1 - time2 ) < ( 100 + timeDiffMRPC ) ); }
766 }
767 }
768 /*
769 else {
770 if( ( ((*iter).second)->quality() & 0x8 ) != 0 ) {
771 double time1 = (*iter_pmt)->tdc();
772 double time2 = ((*iter).second)->qtc1();
773 matched = ( abs(time1-time2)<timeDiffMRPC );
774 }
775 }
776 }
777 else {
778 if( ( ((*iter).second)->quality() & 0x4 ) != 0 ) {
779 double time1 = (*iter_pmt)->qtc();
780 double time2 = ((*iter).second)->tdc1();
781 matched = ( abs(time1-time2)<timeDiffMRPC );
782 }
783 else {
784 if( ( ((*iter).second)->quality() & 0x8 ) != 0 ) {
785 double time1 = (*iter_pmt)->qtc();
786 double time2 = ((*iter).second)->qtc1();
787 matched = ( abs(time1-time2)<timeDiffMRPC );
788 }
789 }
790 }
791
792 if( ( (*iter_pmt)->quality() & 0x3 ) == 0x3 ) { // pmt has west time
793 if( ( ((*iter).second)->quality() & 0xc ) == 0xc ) { // tofmap has
794 east time double time1 = (*iter_pmt)->tdc(); double time2 =
795 ((*iter).second)->tdc1(); matched = ( abs(time1-time2)<timeDiffMRPC
796 );
797 }
798 }
799 */
800 if ( matched )
801 {
802 used = true;
803 if ( ( ( ( *iter ).second )->quality() & 0x3 ) == 0 )
804 { ( ( *iter ).second )->setBackward( ( *iter_pmt ) ); }
805 else
806 {
807 TofData* tof = new TofData;
808 tof->setIdentify( iden );
809 tof->setForward( ( ( *iter ).second )->forward() );
810 tof->setBackward( ( *iter_pmt ) );
811 tof->setTMatched( true );
812 m_tofDataMap.insert( make_pair( iden_value_key, tof ) );
813 }
814 }
815 }
816 }
817
818 if ( !used )
819 {
820 TofData* tof = new TofData;
821 tof->setIdentify( iden );
822 if ( end == 0 ) { tof->setForward( ( *iter_pmt ) ); }
823 else { tof->setBackward( ( *iter_pmt ) ); }
824 tof->setTMatched( true );
825 m_tofDataMap.insert( make_pair( iden_value_key, tof ) );
826 }
827 }
828 }
829 }
830
831 pmtDataVec.clear();
832 }
833
834 return;
835
836} // close tofDataMapFull
837
838// onlineMode only T is combined, no Q reserved
840
841 MsgStream log( m_msgSvc, m_name );
842 log << MSG::INFO << "TofRawDataProvider::tofDataMapOnlineMode()" << endmsg;
843
844 if ( !m_tofDataMapOnline.empty() )
845 {
846 if ( control )
847 {
848 IterTofDataMap iter = m_tofDataMapOnline.begin();
849 for ( ; iter != m_tofDataMapOnline.end(); iter++ ) { delete ( *iter ).second; }
850 m_tofDataMapOnline.clear();
851 }
852 else return m_tofDataMapOnline;
853 }
854 // // tianhl for mt
855 std::string evtDataSvc_name( "EventDataSvc" );
856 // if ( isGaudiThreaded( m_name ) ) { evtDataSvc_name +=
857 // getGaudiThreadIDfromName( m_name ); }
858 // // tianhl for mt
859
860 IDataProviderSvc* eventSvc;
861 StatusCode sc = m_svcLocator->service( evtDataSvc_name, eventSvc, true );
862 if ( !sc.isSuccess() )
863 {
864 log << MSG::FATAL
865 << "TofRawDataProvider::tofDataMapOnlineMode(): ERROR Could not load "
866 "EventDataSvc"
867 << endmsg;
868 return m_tofDataMapOnline;
869 }
870
871 // get TDS data in a common class
872 SmartDataPtr<TofDigiCol> tofDigiCol( eventSvc, "/Event/Digi/TofDigiCol" );
873 if ( !tofDigiCol )
874 {
875 log << MSG::WARNING
876 << "TofRawDataProvider::tofDataMapOnlineMode(): Could not find Tof "
877 "Digi Data!"
878 << endmsg;
879 return m_tofDataMapOnline;
880 }
881
882 TofDigiCol::iterator iter = tofDigiCol->begin();
883 for ( ; iter != tofDigiCol->end(); iter++ )
884 {
885 unsigned int overflow = ( *iter )->getOverflow();
886 if ( ( overflow & 0xfe000000 ) == 0xfe000000 ) continue;
887 // overflow 0x 1 1 1 1 1 1
888 // no Q T / multi Q T / overflow Q T
889
890 bool noT = ( ( overflow & 0x10 ) != 0 );
891 // bool multiQ = ( ( overflow & 0x8 ) != 0 );
892 // bool multiT = ( ( overflow & 0x4 ) != 0 );
893 if ( noT ) continue;
894
895 Identifier iden = ( *iter )->identify();
896 unsigned int iden_value = iden.get_value();
897 int barrel_ec = TofID::barrel_ec( iden );
898 int id = TofID::phi_module( iden );
899 int end = TofID::end( iden );
900
901 unsigned int tdcChannel = ( *iter )->getTimeChannel();
902 if ( tdcChannel == 0x7fffffff ) continue;
903
904 Tdc* tdc = new Tdc;
905 tdc->setValue( tdcChannel );
906 PmtData* pmt = new PmtData;
907 pmt->setTdc( tdc );
908
909 unsigned int iden_value_key = ( iden_value & 0xfffffffe );
910 if ( barrel_ec == 0 || barrel_ec == 2 )
911 {
912 TofData* tof = new TofData;
913 tof->setIdentify( iden );
914 tof->setForward( pmt );
915 m_tofDataMapOnline.insert( make_pair( iden_value_key, tof ) );
916 }
917 else if ( barrel_ec == 1 || barrel_ec == 3 )
918 {
919 unsigned int count = m_tofDataMapOnline.count( iden_value_key );
920
921 if ( count == 0 )
922 {
923 TofData* tof = new TofData;
924 tof->setIdentify( iden );
925 if ( end == 0 ) { tof->setForward( pmt ); }
926 else { tof->setBackward( pmt ); }
927 m_tofDataMapOnline.insert( make_pair( iden_value_key, tof ) );
928 }
929 else
930 {
931 bool used = false;
932 pair<IterTofDataMap, IterTofDataMap> range =
933 m_tofDataMapOnline.equal_range( iden_value_key );
934 IterTofDataMap iter = range.first;
935 for ( unsigned int i = 0; i < count; i++, iter++ )
936 {
937 if ( ( end == 0 ) && ( ( ( ( *iter ).second )->quality() & 0x1 ) != 0 ) )
938 {
939 double time1 = pmt->tdc();
940 double time2 = ( ( *iter ).second )->tdc2();
941 if ( ( TofID::is_scin( iden ) && abs( time1 - time2 ) < timeDiff ) ||
942 ( TofID::is_mrpc( iden ) && abs( time1 - time2 ) < timeDiffMRPC ) )
943 {
944 used = true;
945 if ( ( ( ( *iter ).second )->quality() & 0x4 ) == 0 )
946 { ( ( *iter ).second )->setForward( pmt ); }
947 else
948 {
949 TofData* tof = new TofData;
950 tof->setIdentify( iden );
951 tof->setForward( pmt );
952 tof->setBackward( ( ( *iter ).second )->backward() );
953 m_tofDataMapOnline.insert( make_pair( iden_value_key, tof ) );
954 }
955 }
956 }
957 else if ( ( end == 1 ) && ( ( ( ( *iter ).second )->quality() & 0x4 ) != 0 ) )
958 {
959 double time1 = ( ( *iter ).second )->tdc1();
960 double time2 = pmt->tdc();
961
962 if ( ( TofID::is_scin( iden ) && abs( time1 - time2 ) < timeDiff ) ||
963 ( TofID::is_mrpc( iden ) && abs( time1 - time2 ) < timeDiffMRPC ) )
964 {
965 used = true;
966 if ( ( ( ( *iter ).second )->quality() & 0x1 ) == 0 )
967 { ( ( *iter ).second )->setBackward( pmt ); }
968 else
969 {
970 TofData* tof = new TofData;
971 tof->setIdentify( iden );
972 tof->setForward( ( ( *iter ).second )->forward() );
973 tof->setBackward( pmt );
974 m_tofDataMapOnline.insert( make_pair( iden_value_key, tof ) );
975 }
976 }
977 }
978 }
979 if ( !used )
980 {
981 TofData* tof = new TofData;
982 tof->setIdentify( iden );
983 if ( end == 0 ) { tof->setForward( pmt ); }
984 else { tof->setBackward( pmt ); }
985 m_tofDataMapOnline.insert( make_pair( iden_value_key, tof ) );
986 }
987 }
988 }
989 }
990
991 return m_tofDataMapOnline;
992}
993
995
996 MsgStream log( m_msgSvc, m_name );
997 log << MSG::INFO << "TofRawDataProvider::tofDataVectorOnlineMode()" << endmsg;
998
999 if ( m_tofDataVectorOnline.size() != 0 )
1000 {
1001 if ( !control ) return m_tofDataVectorOnline;
1002 else m_tofDataVectorOnline.clear();
1003 }
1004 TofDataMap tofRawDataMap = TofRawDataProvider::tofDataMapOnlineMode( control );
1005 IterTofDataMap iter = tofRawDataMap.begin();
1006 for ( ; iter != tofRawDataMap.end(); iter++ )
1007 { m_tofDataVectorOnline.push_back( iter->second ); }
1008
1009 return m_tofDataVectorOnline;
1010}
1011
1012// Event Start Time, only Time is required.
1014
1015 if ( !m_hasFilled )
1016 {
1018 m_hasFilled = true;
1019 }
1020
1021 if ( !m_tofDataMapEstime.empty() ) { m_tofDataMapEstime.clear(); }
1022
1023 IterTofDataMap iter = m_tofDataMap.begin();
1024 for ( ; iter != m_tofDataMap.end(); iter++ )
1025 {
1026 if ( ( ( ( ( *iter ).second )->quality() & 0x5 ) != 0 ) &&
1027 ( ( *iter ).second )->tmatched() )
1028 { m_tofDataMapEstime.insert( make_pair( ( *iter ).first, ( *iter ).second ) ); }
1029 }
1030
1031 iter = m_tofDataMapEstime.begin();
1032 while ( iter != m_tofDataMapEstime.end() )
1033 {
1034 unsigned int iden_value = ( *iter ).first;
1035 unsigned int count = m_tofDataMapEstime.count( iden_value );
1036 for ( unsigned int i = 0; i != count; i++, iter++ )
1037 { ( ( *iter ).second )->setTimes( count ); }
1038 }
1039
1040 return m_tofDataMapEstime;
1041}
1042
1044 if ( m_tofDataVectorEstime.size() != 0 ) return m_tofDataVectorEstime;
1045
1048 for ( ; iter != tofDataMapEstime.end(); iter++ )
1049 { m_tofDataVectorEstime.push_back( iter->second ); }
1050 return m_tofDataVectorEstime;
1051}
1052
1053// TOF reconstruction, both time and charge are required
1055
1056 if ( !m_hasFilled )
1057 {
1059 m_hasFilled = true;
1060 }
1061
1062 if ( !m_tofDataMapTof.empty() ) { m_tofDataMapTof.clear(); }
1063
1064 IterTofDataMap iter = m_tofDataMap.begin();
1065 for ( ; iter != m_tofDataMap.end(); iter++ )
1066 {
1067 if ( ( ( ( ( *iter ).second )->quality() & 0xc ) == 0xc ) ||
1068 ( ( ( ( *iter ).second )->quality() & 0x3 ) == 0x3 ) )
1069 {
1070 if ( estime > 1.0e-6 )
1071 {
1072 double tdc1 = ( ( *iter ).second )->tdc1();
1073 double tdc2 = ( ( *iter ).second )->tdc2();
1074 bool forward =
1075 ( ( ( estime - tdc1 ) < timeBackward ) && ( ( tdc1 - estime ) < timeForward ) );
1076 bool backward =
1077 ( ( ( estime - tdc2 ) < timeBackward ) && ( ( tdc2 - estime ) < timeForward ) );
1078 if ( TofID::is_mrpc( TofID::cell_id( ( *iter ).first ) ) && m_run >= 43680 &&
1079 m_run < 43809 )
1080 {
1081 double offset = -264.0;
1082 forward = ( ( ( estime - tdc1 ) < ( timeBackward - offset ) ) &&
1083 ( ( tdc1 - estime ) < ( timeForward + offset ) ) );
1084 backward = ( ( ( estime - tdc2 ) < ( timeBackward + offset ) ) &&
1085 ( ( tdc2 - estime ) < ( timeForward + offset ) ) );
1086 }
1087 if ( !forward && !backward ) continue;
1088 }
1089 m_tofDataMapTof.insert( make_pair( ( *iter ).first, ( *iter ).second ) );
1090 }
1091 }
1092
1093 iter = m_tofDataMapTof.begin();
1094 while ( iter != m_tofDataMapTof.end() )
1095 {
1096 unsigned int iden_value = ( *iter ).first;
1097 unsigned int count = m_tofDataMapTof.count( iden_value );
1098 for ( unsigned int i = 0; i != count; i++, iter++ )
1099 { ( ( *iter ).second )->setTimes( count ); }
1100 }
1101
1102 return m_tofDataMapTof;
1103}
1104
1106 if ( m_tofDataVectorTof.size() != 0 ) { m_tofDataVectorTof.clear(); }
1107
1110 for ( ; iter != tofDataMapTof.end(); iter++ )
1111 { m_tofDataVectorTof.push_back( iter->second ); }
1112 return m_tofDataVectorTof;
1113}
1114
1115// EMC reconstruction, only charge are required
1117
1118 if ( !m_hasFilled )
1119 {
1121 m_hasFilled = true;
1122 }
1123
1124 if ( !m_tofDataMapEmc.empty() ) { m_tofDataMapEmc.clear(); }
1125
1126 IterTofDataMap iter = m_tofDataMap.begin();
1127 for ( ; iter != m_tofDataMap.end(); iter++ )
1128 {
1129 if ( ( ( ( *iter ).second )->quality() & 0xa ) != 0 )
1130 {
1131
1132 if ( estime > 1.0e-6 )
1133 {
1134 int t0clock = static_cast<int>( estime / 24.0 );
1135 int clock1 = ( ( *iter ).second )->qclock1();
1136 int clock2 = ( ( *iter ).second )->qclock2();
1137 bool forward = ( ( ( t0clock - clock1 ) < tClockBackward ) &&
1138 ( ( clock1 - t0clock ) < tClockForward ) );
1139 bool backward = ( ( ( t0clock - clock2 ) < tClockBackward ) &&
1140 ( ( clock2 - t0clock ) < tClockForward ) );
1141 if ( TofID::is_mrpc( TofID::cell_id( ( *iter ).first ) ) && m_run >= 43680 &&
1142 m_run < 43809 )
1143 {
1144 double offset = -11.0;
1145 forward = ( ( ( t0clock - clock1 ) < ( tClockBackward - offset ) ) &&
1146 ( ( clock1 - t0clock ) < ( tClockForward + offset ) ) );
1147 backward = ( ( ( t0clock - clock2 ) < ( tClockBackward - offset ) ) &&
1148 ( ( clock2 - t0clock ) < ( tClockForward + offset ) ) );
1149 }
1150 if ( !forward && !backward ) continue;
1151 }
1152
1153 m_tofDataMapEmc.insert( make_pair( ( *iter ).first, ( *iter ).second ) );
1154 }
1155 }
1156
1157 iter = m_tofDataMapEmc.begin();
1158 while ( iter != m_tofDataMapEmc.end() )
1159 {
1160 unsigned int iden_value = ( *iter ).first;
1161 unsigned int count = m_tofDataMapEmc.count( iden_value );
1162 for ( unsigned int i = 0; i != count; i++, iter++ )
1163 { ( ( *iter ).second )->setTimes( count ); }
1164 }
1165
1166 return m_tofDataMapEmc;
1167}
1168
1170 if ( m_tofDataVectorEmc.size() != 0 ) { m_tofDataVectorEmc.clear(); }
1171
1174 for ( ; iter != tofDataMapEmc.end(); iter++ )
1175 { m_tofDataVectorEmc.push_back( iter->second ); }
1176 return m_tofDataVectorEmc;
1177}
std::multimap< unsigned int, TofData * > TofDataMap
std::multimap< unsignedint, TofData * >::iterator IterTofDataMap
DOUBLE_PRECISION count[3]
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
ITofQElecSvc * tofQElecSvc
ITofQCorrSvc * tofQCorrSvc
IDetVerSvc * detVerSvc
ITofCaliSvc * tofCaliSvc
void setValue(Identifier identify, int value)
Definition TofData.cxx:73
void setAdc(Adc *adc)
Definition TofData.cxx:395
double tdc()
Definition TofData.cxx:310
void qtimesmm()
Definition TofData.cxx:337
double adc()
Definition TofData.cxx:268
void setTdc(Tdc *tdc)
Definition TofData.cxx:405
StatusCode initialize(ISvcLocator *svcLoc=0, IMessageSvc *pMsg=0)
RawDataProviderBase(const char *name)
void setValue(int value)
Definition TofData.cxx:44
void setForward(PmtData *pmt)
Definition TofData.cxx:784
void setBackward(PmtData *pmt)
Definition TofData.cxx:798
void setIdentify(Identifier identify)
Definition TofData.cxx:494
static int endcap(const Identifier &id)
Definition TofID.cxx:108
static int strip(const Identifier &id)
Definition TofID.cxx:120
static Identifier cell_id(int barrel_ec, int layer, int phi_module, int end)
For a single crystal.
Definition TofID.cxx:126
static bool is_scin(const Identifier &id)
Definition TofID.cxx:88
static int end(const Identifier &id)
Definition TofID.cxx:71
static bool is_barrel(const Identifier &id)
Test for barrel.
Definition TofID.cxx:40
static bool is_mrpc(const Identifier &id)
Definition TofID.cxx:98
static int phi_module(const Identifier &id)
Definition TofID.cxx:65
static int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0).
Definition TofID.cxx:54
static value_type getIntID(int barrel_ec, int layer, int phi_module, int end)
Definition TofID.cxx:147
static int layer(const Identifier &id)
Definition TofID.cxx:59
static int module(const Identifier &id)
Definition TofID.cxx:114
TofDataMap & tofDataMapTof(double estime=0.0)
void handle(const Incident &)
TofDataVector & tofDataVectorTof(double estime=0.0)
TofDataMap & tofDataMapOnlineMode(uint32_t control=1)
TofDataMap & tofDataMapEstime()
TofDataVector & tofDataVectorEmc(double estime=0.0)
TofDataVector & tofDataVectorEstime()
TofDataVector & tofDataVectorOnlineMode(uint32_t control=1)
StatusCode initialize(bool mode=false, ISvcLocator *svcLoc=0, IMessageSvc *pMsg=0)
TofDataMap & tofDataMapEmc(double estime=0.0)