BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
TofRawDataProvider Class Reference

#include <TofRawDataProvider.h>

+ Inheritance diagram for TofRawDataProvider:

Public Member Functions

 TofRawDataProvider ()
 
 TofRawDataProvider (const char *name)
 
 ~TofRawDataProvider ()
 
StatusCode initialize (bool mode=false, ISvcLocator *svcLoc=0, IMessageSvc *pMsg=0)
 
void handle (const Incident &)
 
void tofDataMapFull ()
 
TofDataMaptofDataMapOnlineMode (uint32_t control=1)
 
TofDataVectortofDataVectorOnlineMode (uint32_t control=1)
 
TofDataMaptofDataMapEstime ()
 
TofDataVectortofDataVectorEstime ()
 
TofDataMaptofDataMapTof (double estime=0.0)
 
TofDataVectortofDataVectorTof (double estime=0.0)
 
TofDataMaptofDataMapEmc (double estime=0.0)
 
TofDataVectortofDataVectorEmc (double estime=0.0)
 
- Public Member Functions inherited from RawDataProviderBase
 RawDataProviderBase (const char *name)
 
virtual ~RawDataProviderBase ()
 
StatusCode initialize (ISvcLocator *svcLoc=0, IMessageSvc *pMsg=0)
 
void setSvcLocator (ISvcLocator *svcLoc)
 
void setMsgSvc (IMessageSvc *svc)
 
void setMsgName (const char *name)
 

Additional Inherited Members

- Protected Member Functions inherited from RawDataProviderBase
 RawDataProviderBase ()
 
- Protected Attributes inherited from RawDataProviderBase
ISvcLocator * m_svcLocator
 
IMessageSvc * m_msgSvc
 
std::string m_name
 

Detailed Description

Definition at line 24 of file TofRawDataProvider.h.

Constructor & Destructor Documentation

◆ TofRawDataProvider() [1/2]

TofRawDataProvider::TofRawDataProvider ( )

Definition at line 36 of file TofRawDataProvider.cxx.

36 :
38 m_hasFilled(0)
39{}

◆ TofRawDataProvider() [2/2]

TofRawDataProvider::TofRawDataProvider ( const char * name)

Definition at line 42 of file TofRawDataProvider.cxx.

42 :
43 RawDataProviderBase( name ),
44 m_hasFilled(0)
45{}

◆ ~TofRawDataProvider()

TofRawDataProvider::~TofRawDataProvider ( )

Definition at line 48 of file TofRawDataProvider.cxx.

48 {
49 IterTofDataMap iter = m_tofDataMap.begin();
50 for( ; iter != m_tofDataMap.end(); iter++ ) {
51 delete (*iter).second;
52 }
53 m_tofDataMap.clear();
54
55 m_tofDataMapOnline.clear();
56 m_tofDataVectorOnline.clear();
57 m_tofDataMapEstime.clear();
58 m_tofDataVectorEstime.clear();
59 m_tofDataMapTof.clear();
60 m_tofDataVectorTof.clear();
61 m_tofDataMapEmc.clear();
62 m_tofDataVectorEmc.clear();
63
64 return;
65}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
std::multimap< unsignedint, TofData * >::iterator IterTofDataMap
Definition TofData.h:245

Member Function Documentation

◆ handle()

void TofRawDataProvider::handle ( const Incident & inc)

Definition at line 114 of file TofRawDataProvider.cxx.

114 {
115 MsgStream log( m_msgSvc, m_name );
116 log << MSG::DEBUG << "handle: " << inc.type() << endreq;
117 if ( inc.type() == "BeginEvent" ){
118 log << MSG::DEBUG << "Begin Event" << endreq;
119 IterTofDataMap iter = m_tofDataMap.begin();
120 for( ; iter != m_tofDataMap.end(); iter++ ) {
121 delete (*iter).second;
122 }
123 IterTofDataMap iterOnline = m_tofDataMapOnline.begin();
124 for( ; iterOnline != m_tofDataMapOnline.end(); iterOnline++ ) {
125 delete (*iterOnline).second;
126 }
127 m_tofDataMap.clear();
128 m_tofDataMapOnline.clear();
129 m_tofDataVectorOnline.clear();
130 m_tofDataMapEstime.clear();
131 m_tofDataVectorEstime.clear();
132 m_tofDataMapTof.clear();
133 m_tofDataVectorTof.clear();
134 m_tofDataMapEmc.clear();
135 m_tofDataVectorEmc.clear();
136
137 m_hasFilled = false;
138 }
139 return;
140}

Referenced by RawDataProviderSvc::handle().

◆ initialize()

StatusCode TofRawDataProvider::initialize ( bool mode = false,
ISvcLocator * svcLoc = 0,
IMessageSvc * pMsg = 0 )

Definition at line 68 of file TofRawDataProvider.cxx.

68 {
69 MsgStream log( m_msgSvc, m_name );
70 RawDataProviderBase::initialize( pSvcLoc,pMsg );
71
72 // Get Detector Version Service
73 StatusCode sc_det = m_svcLocator->service("DetVerSvc", detVerSvc);
74 if( sc_det == StatusCode::SUCCESS ) {
75 log << MSG::INFO << "TofRawDataProvider Get Detector Version Service Sucessfully!" << endreq;
76 }
77 else {
78 log << MSG::ERROR << "TofRawDataProvider Can NOT Retrieve DetVerSvc instance" << endreq;
79 return StatusCode::FAILURE;
80 }
81
82 //Get TOF Calibtration Service
83 StatusCode scc = m_svcLocator->service("TofCaliSvc", tofCaliSvc);
84 if( scc == StatusCode::SUCCESS ) {
85 log << MSG::INFO << "TofRec Get Calibration Service Sucessfully!" << endreq;
86 }
87 else if(!mode) {
88 log << MSG::ERROR << "TofRec Get Calibration Service Failed !" << endreq;
89 return StatusCode::FAILURE;
90 }
91
92 //Get TOF Q Correction Service
93 StatusCode scq = m_svcLocator->service("TofQCorrSvc", tofQCorrSvc);
94 if (scq == StatusCode::SUCCESS) {
95 log << MSG::INFO << "TofRec Get Q Correction Service Sucessfully!" << endreq;
96 } else if(!mode){
97 log << MSG::ERROR << "TofRec Get Q Correction Service Failed !" << endreq;
98 return StatusCode::FAILURE;
99 }
100
101 //Get TOF Q Electronics Saturation Service
102 StatusCode sce = m_svcLocator->service("TofQElecSvc", tofQElecSvc);
103 if (sce == StatusCode::SUCCESS) {
104 log << MSG::INFO << "TofRec Get Q Electronics Calibration Service Sucessfully!" << endreq;
105 } else if(!mode){
106 log << MSG::ERROR << "TofRec Get Q Electronics Calibration Service Failed !" << endreq;
107 return StatusCode::FAILURE;
108 }
109
110 return StatusCode::SUCCESS;
111}
ITofQElecSvc * tofQElecSvc
ITofQCorrSvc * tofQCorrSvc
IDetVerSvc * detVerSvc
ITofCaliSvc * tofCaliSvc
StatusCode initialize(ISvcLocator *svcLoc=0, IMessageSvc *pMsg=0)

Referenced by RawDataProviderSvc::initialize().

◆ tofDataMapEmc()

TofDataMap & TofRawDataProvider::tofDataMapEmc ( double estime = 0.0)

Definition at line 1032 of file TofRawDataProvider.cxx.

1032 {
1033
1034 if( !m_hasFilled ) {
1036 m_hasFilled = true;
1037 }
1038
1039 if( !m_tofDataMapEmc.empty() ) {
1040 m_tofDataMapEmc.clear();
1041 }
1042
1043 IterTofDataMap iter = m_tofDataMap.begin();
1044 for( ; iter != m_tofDataMap.end(); iter++ ) {
1045 if( ( ((*iter).second)->quality() & 0xa ) != 0 ) {
1046
1047 if( estime > 1.0e-6 ) {
1048 int t0clock = static_cast<int>(estime/24.0);
1049 int clock1 = ((*iter).second)->qclock1();
1050 int clock2 = ((*iter).second)->qclock2();
1051 bool forward = ( ( ( t0clock - clock1 ) < tClockBackward ) && ( ( clock1 - t0clock ) < tClockForward ) );
1052 bool backward = ( ( ( t0clock - clock2 ) < tClockBackward ) && ( ( clock2 - t0clock ) < tClockForward ) );
1053 if( TofID::is_mrpc( TofID::cell_id((*iter).first) ) && m_run>=43680 && m_run<43809 ) {
1054 double offset = -11.0;
1055 forward = ( ( ( t0clock - clock1 ) < ( tClockBackward -offset ) ) && ( ( clock1 - t0clock ) < ( tClockForward + offset ) ) );
1056 backward = ( ( ( t0clock - clock2 ) < ( tClockBackward - offset ) ) && ( ( clock2 - t0clock ) < ( tClockForward + offset ) ) );
1057 }
1058 if( !forward && !backward ) continue;
1059 }
1060
1061 m_tofDataMapEmc.insert( make_pair( (*iter).first, (*iter).second ) );
1062 }
1063 }
1064
1065 iter = m_tofDataMapEmc.begin();
1066 while( iter != m_tofDataMapEmc.end() ) {
1067 unsigned int iden_value = (*iter).first;
1068 unsigned int count = m_tofDataMapEmc.count( iden_value );
1069 for( unsigned int i=0; i != count; i++, iter++ ) {
1070 ((*iter).second)->setTimes( count );
1071 }
1072 }
1073
1074 return m_tofDataMapEmc;
1075}
DOUBLE_PRECISION count[3]
const double tClockBackward
const double tClockForward
static Identifier cell_id(int barrel_ec, int layer, int phi_module, int end)
For a single crystal.
Definition TofID.cxx:143
static bool is_mrpc(const Identifier &id)
Definition TofID.cxx:113

Referenced by RawDataProviderSvc::tofDataMapEmc(), and tofDataVectorEmc().

◆ tofDataMapEstime()

TofDataMap & TofRawDataProvider::tofDataMapEstime ( )

Definition at line 930 of file TofRawDataProvider.cxx.

930 {
931
932 if( !m_hasFilled ) {
934 m_hasFilled = true;
935 }
936
937 if( !m_tofDataMapEstime.empty() ) {
938 m_tofDataMapEstime.clear();
939 }
940
941 IterTofDataMap iter = m_tofDataMap.begin();
942 for( ; iter != m_tofDataMap.end(); iter++ ) {
943 if( ( ( ((*iter).second)->quality() & 0x5 ) != 0 ) && ((*iter).second)->tmatched() ) {
944 m_tofDataMapEstime.insert( make_pair( (*iter).first, (*iter).second ) );
945 }
946 }
947
948 iter = m_tofDataMapEstime.begin();
949 while( iter != m_tofDataMapEstime.end() ) {
950 unsigned int iden_value = (*iter).first;
951 unsigned int count = m_tofDataMapEstime.count( iden_value );
952 for( unsigned int i=0; i != count; i++, iter++ ) {
953 ((*iter).second)->setTimes( count );
954 }
955 }
956
957 return m_tofDataMapEstime;
958}

Referenced by RawDataProviderSvc::tofDataMapEstime(), and tofDataVectorEstime().

◆ tofDataMapFull()

void TofRawDataProvider::tofDataMapFull ( )

Definition at line 144 of file TofRawDataProvider.cxx.

144 {
145
146 MsgStream log(m_msgSvc, m_name);
147 log << MSG::INFO << "TofRawDataProvider::tofDataMapFull()" << endreq;
148
149 if( !m_tofDataMap.empty() ) {
150
151 log << MSG::WARNING << "TofRawDataProvider::tofDataMapFull: m_tofDataMap is NOT empty!" << endreq;
152
153 IterTofDataMap iter = m_tofDataMap.begin();
154 for( ; iter != m_tofDataMap.end(); iter++ ) {
155 delete (*iter).second;
156 }
157 m_tofDataMap.clear();
158 }
159 // tianhl for mt
160 std::string evtDataSvc_name("EventDataSvc");
161 if(isGaudiThreaded(m_name)){
162 evtDataSvc_name += getGaudiThreadIDfromName(m_name);
163 }
164 // tianhl for mt
165
166 IDataProviderSvc* eventSvc;
167 StatusCode sc = m_svcLocator->service( evtDataSvc_name.c_str(),eventSvc, true );
168 if( !sc.isSuccess() ) {
169 log << MSG::FATAL << "TofRawDataProvider::tofDataMapFull: ERROR Could not load EventDataSvc" << endreq;
170 return;
171 }
172
173 // Event Header
174 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc,"/Event/EventHeader");
175 if( !eventHeader ) {
176 log << MSG::FATAL << "TofRawDataProvider could not find Event Header!" << endreq;
177 return;
178 }
179 m_run = eventHeader->runNumber();
180 m_event = eventHeader->eventNumber();
181
182 if( tofCaliSvc->chooseConstants( m_run, m_event ) == StatusCode:: FAILURE ) { return; }
183 bool mc = ( m_run < 0 ) ? true:false;
184 bool qCorr = bool( tofCaliSvc->QCorr() );
185 qCorr = qCorr && (!mc);
186 bool qElec = bool( tofCaliSvc->QElec() );
187 bool misLable = bool( tofCaliSvc->MisLable() );
188 misLable = ( !mc && misLable );
189
190 int identmp = -1;
191 vector<int> deadId;
192 for( unsigned int i=0; i<5; i++ ) {
193 identmp = tofCaliSvc->BrEast(i);
194 if( identmp != 0x2fffffff ) {
195 deadId.push_back( identmp );
196 }
197 identmp = tofCaliSvc->BrWest(i);
198 if( identmp != 0x2fffffff ) {
199 deadId.push_back( identmp );
200 }
201 }
202 for( unsigned int i=0; i<500; i++ ) {
203 identmp = tofCaliSvc->Endcap(i);
204 if( identmp == 0x2fffffff ) break; // -1
205 else { deadId.push_back( identmp ); }
206 }
207
208 // get TDS data in a common class
209 SmartDataPtr<TofDigiCol> tofDigiCol(eventSvc,"/Event/Digi/TofDigiCol");
210 if( !tofDigiCol ) {
211 log << MSG::WARNING << "TofRawDataProvider::tofDataMapFull: Could not find Tof Digi Data!" << endreq;
212 return;
213 }
214
215 int qnumber = 0;
216 int tnumber = 0;
217
218 std::vector<Adc*> chargeVec;
219 std::vector<Tdc*> timeVec;
220
221 TofDigiCol::iterator iter = tofDigiCol->begin();
222 for( ; iter != tofDigiCol->end(); iter++ ) {
223 Identifier iden = (*iter)->identify();
224 unsigned int iden_value = iden.get_value();
225
226 bool sameId = false;
227 vector<int>::iterator iter_dead = deadId.begin();
228 for( ; iter_dead != deadId.end(); iter_dead++ ) {
229 if( iden_value == (*iter_dead) ) {
230 sameId = true;
231 break;
232 }
233 }
234 if( sameId ) {
235 if( mc ) { continue; }
236 else {
237 std::string bore;
238 int layertmp = -1;
239 int tofidtmp = -1;
240 if( (TofID::barrel_ec(iden))==1 ) {
241 bore = string("Barrel");
242 layertmp = TofID::layer(iden);
243 tofidtmp = TofID::phi_module(iden);
244 }
245 else if( (TofID::barrel_ec(iden))==0 ) {
246 bore=string("East Endcap");
247 tofidtmp = TofID::phi_module(iden);
248 }
249 else if( (TofID::barrel_ec(iden))==2 ) {
250 bore=string("West Endcap");
251 tofidtmp = TofID::phi_module(iden);
252 }
253 else if( (TofID::barrel_ec(iden))==3 ) {
254 bore=string("ETF(MRPC)");
255 tofidtmp = TofID::module(iden);
256 }
257
258 // log << MSG::ERROR << "TofRawDataProvider::tofDataMapFull: Dead Channel Number is not Correct, please check TOF Calibration Constants! " << bore << " layer=" << layertmp << " tofid=" << tofidtmp << endreq;
259 }
260 }
261
262 if( TofID::is_scin(iden) && !(TofID::is_barrel(iden) ) && (TofID::end(iden))==1 ) continue;
263
264 unsigned int overflow = (*iter)->getOverflow();
265 if( TofID::is_scin(iden) && ( ( overflow & 0xfe000000 ) == 0xfe000000 ) ) continue;
266
267
268 // if( ( m_detVerSvc->phase() == 1 ) && TofID::is_mrpc( iden ) ) continue;
269 // if( ( m_detVerSvc->phase() >= 3 ) && TofID::is_scin( iden ) && !( TofID::is_barrel( iden ) ) ) continue;;
270
271 // for 150203 data, 92Scin + 2MRPC
272 // if( !mc && ( m_detVerSvc->phase() == 2 ) && TofID::is_mrpc( iden ) ) {
273 if( m_run>=40203 && m_run<=43253 && TofID::is_mrpc( iden ) ) {
274 // ETF Module 36 ==> 44
275 if( ( iden_value & 0x2fffffe0 ) == 0x2000c800 ) {
276 iden_value = 0x2000c900 + ( iden_value & 0x1f );
277 iden = Identifier( iden_value );
278 }
279 // ETF Module 37 ==> 43
280 if( ( iden_value & 0x2fffffe0 ) == 0x2000c820 ) {
281 iden_value = 0x2000c8e0 + ( iden_value & 0x1f );
282 iden = Identifier( iden_value );
283 }
284 }
285 // end 150203 data
286
287 // overflow 0x 1 1 1 1 1 1
288 // no Q T / multi Q T / overflow Q T
289
290 bool multiQ = ( ( overflow & 0x8 ) != 0 );
291 bool multiT = ( ( overflow & 0x4 ) != 0 );
292
293 unsigned int tdcChannel = (*iter)->getTimeChannel();
294 unsigned int adcChannel = (*iter)->getChargeChannel();
295 if( TofID::is_scin(iden) && ( ( overflow & 0x2 ) != 0 ) ) {
296 adcChannel = ( adcChannel | 0x80000 );
297 }
298
299 if( (adcChannel&0x7fffffff) != 0x7fffffff ) {
300 Adc* adc = new Adc;
301 if( qCorr ) adc->setCorr();
302 if( qElec ) adc->setElec();
303
304 // for 150203 data, 92Scin + 2MRPC
305 // if( !mc && ( m_detVerSvc->phase() == 2 ) && TofID::is_mrpc( iden ) ) {
306 if( m_run>=40203 && m_run<=43253 && TofID::is_mrpc( iden ) ) {
307 adcChannel += 0x18000;
308 }
309 // end 150203 data
310
311 adc->setValue( iden, adcChannel );
312 qnumber++;
313 adc->setNumber( qnumber );
314 chargeVec.push_back( adc );
315 }
316
317 if( tdcChannel != 0x7fffffff ) {
318 Tdc* tdc = new Tdc;
319
320 // for 150203 data, 92Scin + 2MRPC
321 // if( !mc && ( m_detVerSvc->phase(0 == 2 ) && TofID::is_mrpc( iden ) ) {
322 if( m_run>=40203 && m_run<=43253 && TofID::is_mrpc( iden ) ) {
323 tdcChannel += 0x18000;
324 }
325 // end 150203 data
326
327 tdc->setValue( tdcChannel );
328 tnumber++;
329 tdc->setNumber( tnumber );
330 timeVec.push_back( tdc );
331 }
332
333 if( multiT || multiQ ) {
334 TofDigiCol::iterator iter_next = iter + 1;
335 if( iter_next != tofDigiCol->end() ) {
336 unsigned int idenNext_value = ((*iter_next)->identify()).get_value();
337 if( iden_value == idenNext_value ) continue;
338 }
339 }
340
341 qnumber = 0;
342 tnumber = 0;
343
344 std::vector<PmtData*> pmtDataVec;
345 if( TofID::is_scin( iden ) ) {
346 std::vector<Tdc*>::iterator iter_t = timeVec.begin();
347 for( ; iter_t != timeVec.end(); iter_t++ ) {
348 int tclock = (*iter_t)->clock();
349 PmtData* pmt = new PmtData;
350 pmt->setIdentify( iden.get_value() );
351 pmt->setTdc( (*iter_t) );
352 std::vector<Adc*>::iterator iter_q = chargeVec.begin();
353 for( ; iter_q != chargeVec.end(); iter_q++ ) {
354 if( (*iter_q)->times() != -1 ) { continue; }
355 int qclock = (*iter_q)->clock();
356 if( abs(tclock-qclock)<2 ) {
357 if( ( pmt->quality() & 0x2 ) != 0 ) { // pmt has Q
358 if( (*iter_q)->value() > pmt->adc() ) {
359 pmt->qtimesmm();
360 pmt->setAdc( (*iter_q) );
361 }
362 }
363 else { // pmt has no Q
364 pmt->setAdc( (*iter_q) );
365 }
366 }
367 }
368 pmtDataVec.push_back( pmt );
369 }
370
371 std::vector<Adc*>::iterator iter_q = chargeVec.begin();
372 for( ; iter_q != chargeVec.end(); iter_q++ ) {
373 if( (*iter_q)->times() != -1 ) { continue; }
374 PmtData* pmt = new PmtData;
375 pmt->setIdentify( iden.get_value() );
376 pmt->setAdc( (*iter_q) );
377 pmtDataVec.push_back( pmt );
378 }
379
380 }
381
382 if( TofID::is_mrpc( iden ) ) {
383 std::vector<Tdc*>::iterator iter_t = timeVec.begin();
384 for( ; iter_t != timeVec.end(); iter_t++ ) {
385 std::vector<Adc*>::iterator iter_q = chargeVec.begin();
386 for( ; iter_q != chargeVec.end(); iter_q++ ) {
387 if( ( (*iter_q)->qtc() - (*iter_t)->value() ) > totForward && ( (*iter_q)->qtc() - (*iter_t)->value() ) < totBackward ) {
388 PmtData* pmt = new PmtData;
389 pmt->setIdentify( iden.get_value() );
390 pmt->setTdc( (*iter_t) );
391 pmt->setAdc( (*iter_q) );
392 pmtDataVec.push_back( pmt );
393 }
394 }
395 if( (*iter_t)->times() == -1 ) {
396 PmtData* pmt = new PmtData;
397 pmt->setTdc( (*iter_t) );
398 pmtDataVec.push_back( pmt );
399 }
400 }
401
402 std::vector<Adc*>::iterator iter_q = chargeVec.begin();
403 for( ; iter_q != chargeVec.end(); iter_q++ ) {
404 if( (*iter_q)->times() != -1 ) { continue; }
405 PmtData* pmt = new PmtData;
406 pmt->setIdentify( iden.get_value() );
407 pmt->setAdc( (*iter_q) );
408 pmtDataVec.push_back( pmt );
409 }
410
411 }
412
413 chargeVec.clear();
414 timeVec.clear();
415
416 unsigned int iden_value_key = (iden_value & 0xfffffffe );
417 if( TofID::is_scin( iden ) ) {
418 int barrel_ec = TofID::barrel_ec( iden );
419 // int layer = TofID::layer( iden );
420 int tofid = TofID::phi_module( iden );
421 int end = TofID::end( iden );
422 if( ( barrel_ec == 0 ) || ( barrel_ec == 2 ) ) {
423 std::vector<PmtData*>::iterator iter_pmt = pmtDataVec.begin();
424 for( ; iter_pmt != pmtDataVec.end(); iter_pmt++ ) {
425 TofData* tof = new TofData;
426 if( misLable ) {
427 tof->setMisLable();
428 if( barrel_ec==2 && tofid==42 ) {
429 unsigned int iden91 = TofID::getIntID( 2, 0, 91-48, 0 );
430 iden_value_key = iden91;
431 iden = TofID::cell_id( iden91 );
432 }
433 if( barrel_ec==2 && tofid==43 ) {
434 unsigned int iden90 = TofID::getIntID( 2, 0, 90-48, 0 );
435 iden_value_key = iden90;
436 iden = TofID::cell_id( iden90 );
437 }
438 }
439 tof->setIdentify( iden );
440 tof->setForward( (*iter_pmt) );
441 tof->setTMatched( true );
442 m_tofDataMap.insert( make_pair( iden_value_key, tof ) );
443 }
444 }
445 else if( barrel_ec == 1 ) {
446 unsigned int count = m_tofDataMap.count( iden_value_key );
447 if( count == 0 ) {
448 std::vector<PmtData*>::iterator iter_pmt = pmtDataVec.begin();
449 for( ; iter_pmt != pmtDataVec.end(); iter_pmt++ ) {
450 TofData* tof = new TofData;
451 tof->setIdentify( iden );
452 if( end == 0 ) {
453 tof->setForward( (*iter_pmt) );
454 }
455 else {
456 tof->setBackward( (*iter_pmt) );
457 }
458 tof->setTMatched( true );
459 m_tofDataMap.insert( make_pair( iden_value_key, tof ) );
460 }
461 }
462 else {
463 pair< IterTofDataMap, IterTofDataMap > range = m_tofDataMap.equal_range( iden_value_key );
464 std::vector<PmtData*>::iterator iter_pmt = pmtDataVec.begin();
465 for( ; iter_pmt != pmtDataVec.end(); iter_pmt++ ) {
466 bool used = false;
467 IterTofDataMap iter = range.first;
468 for( unsigned int tofDataNumber = 0; tofDataNumber < count; tofDataNumber++, iter++ ) {
469
470 bool matched = false;
471 if( end == 0 ) { // east, forward
472 if( ( (*iter_pmt)->quality() & 0x1 ) != 0 ) { // pmt has east time
473 if( ( ((*iter).second)->quality() & 0x1 ) != 0 ) { // tofmap has west time
474 double time1 = (*iter_pmt)->tdc();
475 double time2 = ((*iter).second)->tdc2();
476 matched = ( abs(time1-time2)<timeDiff );
477 }
478 else { // tofmap has no west time
479 if( ( ((*iter).second)->quality() & 0x2 ) != 0 ) { // tofmap has no west time, but west charge
480 double time1 = (*iter_pmt)->tclock();
481 double time2 = (*iter_pmt)->qclock();
482 double time3 = ((*iter).second)->qclock2();
483 matched = ( ( abs(time1-time3)<=tClockDiff ) || ( abs(time2-time3)<=tClockDiff ) );
484 }
485 }
486 }
487 else { // pmt has no east time
488 if( ( (*iter_pmt)->quality() & 0x2 ) != 0 ) { // pmt has no east time, but east charge
489 if( ( ((*iter).second)->quality() & 0x1 ) != 0 ) { // tofmap has west time
490 if( ( ( ((*iter).second)->quality() & 0x2 ) != 0 ) ) { // tofmap has west time and west charge
491 double time1 = (*iter_pmt)->qclock();
492 double time2 = ((*iter).second)->tclock2();
493 double time3 = ((*iter).second)->qclock2();
494 matched = ( ( abs(time1-time2)<=tClockDiff ) || ( abs(time1-time3)<=tClockDiff ) );
495 }
496 }
497 else { // tofmap has no west time, but west charge
498 if( ( ( ((*iter).second)->quality() & 0x2 ) != 0 ) ) {
499 double time1 = (*iter_pmt)->qclock();
500 double time2 = ((*iter).second)->qclock2();
501 matched = ( abs(time1-time2)<=tClockDiff );
502 }
503 }
504 }
505 }
506
507 if( matched ) {
508 used = true;
509 if( ( ( (*iter).second)->quality() & 0xc ) == 0 ) {
510 ((*iter).second)->setForward( (*iter_pmt) );
511 }
512 else {
513 TofData* tof = new TofData;
514 tof->setIdentify( iden );
515 tof->setForward( (*iter_pmt) );
516 tof->setBackward( ((*iter).second)->backward() );
517 tof->setTMatched( true );
518 m_tofDataMap.insert( make_pair( iden_value_key, tof ) );
519 }
520 }
521
522 } // end east, forward
523 else { // west, backward
524 if( ( (*iter_pmt)->quality() & 0x1 ) != 0 ) { // pmt has west time
525 if( ( ((*iter).second)->quality() & 0x4 ) != 0 ) { // tofmap has east time
526 double time1 = (*iter_pmt)->tdc();
527 double time2 = ((*iter).second)->tdc1();
528 matched = ( abs(time1-time2)<timeDiff );
529 }
530 else { // tofmap has no east time
531 if( ( ((*iter).second)->quality() & 0x8 ) != 0 ) { // tofmap has no east time, but east charge
532 double time1 = (*iter_pmt)->tclock();
533 double time2 = (*iter_pmt)->qclock();
534 double time3 = ((*iter).second)->qclock1();
535 matched = ( ( abs(time1-time3)<=tClockDiff ) || ( abs(time2-time3)<=tClockDiff ) );
536 }
537 }
538 }
539 else { // pmt has no west time
540 if( ( (*iter_pmt)->quality() & 0x2 ) != 0 ) { // pmt has no west time, but west charge
541 if( ( ((*iter).second)->quality() & 0x4 ) != 0 ) { // tofmap has east time
542 if( ( ( ((*iter).second)->quality() & 0x8 ) != 0 ) ) { // tofmap has east time and east charge
543 double time1 = (*iter_pmt)->qclock();
544 double time2 = ((*iter).second)->tclock1();
545 double time3 = ((*iter).second)->qclock1();
546 matched = ( ( abs(time1-time2)<=tClockDiff ) || ( abs(time1-time3)<=tClockDiff ) );
547 }
548 else {
549 }
550 }
551 else { // tofmap has no west time, but west charge
552 if( ( ( ((*iter).second)->quality() & 0x8 ) != 0 ) ) {
553 double time1 = (*iter_pmt)->qclock();
554 double time2 = ((*iter).second)->qclock1();
555 matched = ( abs(time1-time2)<=tClockDiff );
556 }
557 }
558 }
559 }
560
561 if( matched ) {
562 used = true;
563 if( ( ( (*iter).second)->quality() & 0x3 ) == 0 ) {
564 ((*iter).second)->setBackward( (*iter_pmt) );
565 }
566 else {
567 TofData* tof = new TofData;
568 tof->setIdentify( iden );
569 tof->setForward( ((*iter).second)->forward() );
570 tof->setBackward( (*iter_pmt) );
571 tof->setTMatched( true );
572 m_tofDataMap.insert( make_pair( iden_value_key, tof ) );
573 }
574 }
575 }
576 }
577
578 if( ! used ) {
579 TofData* tof = new TofData;
580 tof->setIdentify( iden );
581 if( end == 0 ) {
582 tof->setForward( (*iter_pmt) );
583 }
584 else {
585 tof->setBackward( (*iter_pmt) );
586 }
587 tof->setTMatched( true );
588 m_tofDataMap.insert( make_pair( iden_value_key, tof ) );
589 }
590 }
591 }
592 }
593 }
594 // mrpc endcap tof
595 if( TofID::is_mrpc( iden ) ) {
596 // int barrel_ec = TofID::barrel_ec( iden );
597 int endcap = TofID::endcap( iden );
598 int tofid = TofID::module( iden );
599 int strip = TofID::strip( iden );
600 int end = TofID::end( iden );
601
602 unsigned int count = m_tofDataMap.count( iden_value_key );
603 if( count == 0 ) {
604 std::vector<PmtData*>::iterator iter_pmt = pmtDataVec.begin();
605 for( ; iter_pmt != pmtDataVec.end(); iter_pmt++ ) {
606 TofData* tof = new TofData;
607 tof->setIdentify( iden );
608 if( end == 0 ) {
609 tof->setForward( (*iter_pmt) );
610 }
611 else {
612 tof->setBackward( (*iter_pmt) );
613 }
614 tof->setTMatched( true );
615 m_tofDataMap.insert( make_pair( iden_value_key, tof ) );
616 }
617 }
618 else {
619 pair< IterTofDataMap, IterTofDataMap > range = m_tofDataMap.equal_range( iden_value_key );
620 std::vector<PmtData*>::iterator iter_pmt = pmtDataVec.begin();
621 for( ; iter_pmt != pmtDataVec.end(); iter_pmt++ ) {
622 bool used = false;
623 IterTofDataMap iter = range.first;
624 for( unsigned int tofDataNumber = 0; tofDataNumber < count; tofDataNumber++, iter++ ) {
625 bool matched = false;
626 if( end == 0 ) { // east, forward
627 if( ( (*iter_pmt)->quality() & 0x1 ) != 0 ) { // pmt has east time
628 if( ( ((*iter).second)->quality() & 0x1 ) != 0 ) { // tofmap has west time
629 double time1 = (*iter_pmt)->tdc();
630 double time2 = ((*iter).second)->tdc2();
631 matched = ( abs(time1-time2)<timeDiffMRPC );
632 if( endcap==0 && tofid==13 && strip==5 ) { matched = ( abs(time1-time2)<(100+timeDiffMRPC) ); }
633 }
634 }
635 /*
636 else {
637 if( ( ((*iter).second)->quality() & 0x2 ) != 0 ) {
638 double time1 = (*iter_pmt)->tdc();
639 double time2 = ((*iter).second)->qtc2();
640 matched = ( abs(time1-time2)<timeDiffMRPC );
641 }
642 }
643 }
644 else {
645 if( ( ((*iter).second)->quality() & 0x1 ) != 0 ) {
646 double time1 = (*iter_pmt)->qtc();
647 double time2 = ((*iter).second)->tdc2();
648 matched = ( abs(time1-time2)<timeDiffMRPC );
649 }
650 else {
651 if( ( ((*iter).second)->quality() & 0x2 ) != 0 ) {
652 double time1 = (*iter_pmt)->qtc();
653 double time2 = ((*iter).second)->qtc2();
654 matched = ( abs(time1-time2)<timeDiffMRPC );
655 }
656 }
657 }
658
659 if( ( (*iter_pmt)->quality() & 0x3 ) == 0x3 ) { // pmt has east time
660 if( ( ((*iter).second)->quality() & 0x3 ) == 0x3 ) { // tofmap has west time
661 double time1 = (*iter_pmt)->tdc();
662 double time2 = ((*iter).second)->tdc2();
663 matched = ( abs(time1-time2)<timeDiffMRPC );
664 }
665 }
666 */
667 if( matched ) {
668 used = true;
669 if( ( ( (*iter).second)->quality() & 0xc ) == 0 ) {
670 ((*iter).second)->setForward( (*iter_pmt) );
671 }
672 else {
673 TofData* tof = new TofData;
674 tof->setIdentify( iden );
675 tof->setForward( (*iter_pmt) );
676 tof->setBackward( ((*iter).second)->backward() );
677 tof->setTMatched( true );
678 m_tofDataMap.insert( make_pair( iden_value_key, tof ) );
679 }
680 }
681 } // end east, forward
682 else { // west, backward
683 if( ( (*iter_pmt)->quality() & 0x1 ) != 0 ) { // pmt has west time
684 if( ( ((*iter).second)->quality() & 0x4 ) != 0 ) { // tofmap has east time
685 double time1 = (*iter_pmt)->tdc();
686 double time2 = ((*iter).second)->tdc1();
687 matched = ( abs(time1-time2)<timeDiffMRPC );
688 if( endcap==0 && tofid==13 && strip==5 ) { matched = ( abs(time1-time2)<(100+timeDiffMRPC) ); }
689 }
690 }
691 /*
692 else {
693 if( ( ((*iter).second)->quality() & 0x8 ) != 0 ) {
694 double time1 = (*iter_pmt)->tdc();
695 double time2 = ((*iter).second)->qtc1();
696 matched = ( abs(time1-time2)<timeDiffMRPC );
697 }
698 }
699 }
700 else {
701 if( ( ((*iter).second)->quality() & 0x4 ) != 0 ) {
702 double time1 = (*iter_pmt)->qtc();
703 double time2 = ((*iter).second)->tdc1();
704 matched = ( abs(time1-time2)<timeDiffMRPC );
705 }
706 else {
707 if( ( ((*iter).second)->quality() & 0x8 ) != 0 ) {
708 double time1 = (*iter_pmt)->qtc();
709 double time2 = ((*iter).second)->qtc1();
710 matched = ( abs(time1-time2)<timeDiffMRPC );
711 }
712 }
713 }
714
715 if( ( (*iter_pmt)->quality() & 0x3 ) == 0x3 ) { // pmt has west time
716 if( ( ((*iter).second)->quality() & 0xc ) == 0xc ) { // tofmap has east time
717 double time1 = (*iter_pmt)->tdc();
718 double time2 = ((*iter).second)->tdc1();
719 matched = ( abs(time1-time2)<timeDiffMRPC );
720 }
721 }
722 */
723 if( matched ) {
724 used = true;
725 if( ( ( (*iter).second)->quality() & 0x3 ) == 0 ) {
726 ((*iter).second)->setBackward( (*iter_pmt) );
727 }
728 else {
729 TofData* tof = new TofData;
730 tof->setIdentify( iden );
731 tof->setForward( ((*iter).second)->forward() );
732 tof->setBackward( (*iter_pmt) );
733 tof->setTMatched( true );
734 m_tofDataMap.insert( make_pair( iden_value_key, tof ) );
735 }
736 }
737 }
738 }
739
740 if( ! used ) {
741 TofData* tof = new TofData;
742 tof->setIdentify( iden );
743 if( end == 0 ) {
744 tof->setForward( (*iter_pmt) );
745 }
746 else {
747 tof->setBackward( (*iter_pmt) );
748 }
749 tof->setTMatched( true );
750 m_tofDataMap.insert( make_pair( iden_value_key, tof ) );
751 }
752 }
753 }
754 }
755
756 pmtDataVec.clear();
757
758 }
759
760 return;
761
762}//close tofDataMapFull
const double timeDiff
const double totBackward
const double tClockDiff
const double totForward
const double timeDiffMRPC
Definition TofData.h:43
void setElec()
Definition TofData.h:48
void setCorr()
Definition TofData.h:47
void setValue(Identifier identify, int value)
Definition TofData.cxx:77
virtual const int BrWest(unsigned int No)=0
virtual const int QElec()=0
virtual const int BrEast(unsigned int No)=0
virtual const int QCorr()=0
virtual const int MisLable()=0
virtual StatusCode chooseConstants(int run, int event)=0
virtual const int Endcap(unsigned int No)=0
value_type get_value() const
Definition Identifier.h:163
void setIdentify(unsigned int iden)
Definition TofData.h:102
void setAdc(Adc *adc)
Definition TofData.cxx:468
void qtimesmm()
Definition TofData.cxx:378
double adc()
Definition TofData.cxx:293
void setTdc(Tdc *tdc)
Definition TofData.cxx:478
unsigned int quality() const
Definition TofData.h:84
Definition TofData.h:60
void setValue(int value)
Definition TofData.cxx:49
void setForward(PmtData *pmt)
Definition TofData.cxx:983
void setTMatched(bool tmatched)
Definition TofData.h:205
void setBackward(PmtData *pmt)
Definition TofData.cxx:1001
void setIdentify(Identifier identify)
Definition TofData.cxx:577
void setMisLable()
Definition TofData.h:199
static int endcap(const Identifier &id)
Definition TofID.cxx:124
static int strip(const Identifier &id)
Definition TofID.cxx:136
static bool is_scin(const Identifier &id)
Definition TofID.cxx:102
static int end(const Identifier &id)
Definition TofID.cxx:79
static bool is_barrel(const Identifier &id)
Test for barrel.
Definition TofID.cxx:49
static int phi_module(const Identifier &id)
Definition TofID.cxx:73
static int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
Definition TofID.cxx:61
static value_type getIntID(int barrel_ec, int layer, int phi_module, int end)
Definition TofID.cxx:178
static int layer(const Identifier &id)
Definition TofID.cxx:66
void setNumber(int number)
Definition TofData.h:26

Referenced by tofDataMapEmc(), tofDataMapEstime(), and tofDataMapTof().

◆ tofDataMapOnlineMode()

TofDataMap & TofRawDataProvider::tofDataMapOnlineMode ( uint32_t control = 1)

Definition at line 766 of file TofRawDataProvider.cxx.

766 {
767
768 MsgStream log(m_msgSvc, m_name);
769 log << MSG::INFO << "TofRawDataProvider::tofDataMapOnlineMode()" << endreq;
770
771 if( ! m_tofDataMapOnline.empty() ) {
772 if(control){
773 IterTofDataMap iter = m_tofDataMapOnline.begin();
774 for( ; iter != m_tofDataMapOnline.end(); iter++ ) {
775 delete (*iter).second;
776 }
777 m_tofDataMapOnline.clear();
778 }
779 else return m_tofDataMapOnline;
780 }
781 // tianhl for mt
782 std::string evtDataSvc_name("EventDataSvc");
783 if(isGaudiThreaded(m_name)){
784 evtDataSvc_name += getGaudiThreadIDfromName(m_name);
785 }
786 // tianhl for mt
787
788 IDataProviderSvc* eventSvc;
789 StatusCode sc = m_svcLocator->service( evtDataSvc_name.c_str(), eventSvc, true );
790 if( !sc.isSuccess() ) {
791 log << MSG::FATAL << "TofRawDataProvider::tofDataMapOnlineMode(): ERROR Could not load EventDataSvc" << endreq;
792 return m_tofDataMapOnline;
793 }
794
795 // get TDS data in a common class
796 SmartDataPtr<TofDigiCol> tofDigiCol(eventSvc,"/Event/Digi/TofDigiCol");
797 if( !tofDigiCol ) {
798 log << MSG::WARNING << "TofRawDataProvider::tofDataMapOnlineMode(): Could not find Tof Digi Data!" << endreq;
799 return m_tofDataMapOnline;
800 }
801
802 TofDigiCol::iterator iter = tofDigiCol->begin();
803 for( ; iter != tofDigiCol->end(); iter++ ) {
804 unsigned int overflow = (*iter)->getOverflow();
805 if( ( overflow & 0xfe000000 ) == 0xfe000000 ) continue;
806 // overflow 0x 1 1 1 1 1 1
807 // no Q T / multi Q T / overflow Q T
808
809 bool noT = ( ( overflow & 0x10 ) != 0 );
810 // bool multiQ = ( ( overflow & 0x8 ) != 0 );
811 // bool multiT = ( ( overflow & 0x4 ) != 0 );
812 if( noT ) continue;
813
814 Identifier iden = (*iter)->identify();
815 unsigned int iden_value = iden.get_value();
816 int barrel_ec = TofID::barrel_ec(iden);
817 int id = TofID::phi_module(iden);
818 int end = TofID::end(iden);
819
820 unsigned int tdcChannel = (*iter)->getTimeChannel();
821 if( tdcChannel == 0x7fffffff ) continue;
822
823 Tdc* tdc = new Tdc;
824 tdc->setValue( tdcChannel );
825 PmtData* pmt = new PmtData;
826 pmt->setTdc( tdc );
827
828 unsigned int iden_value_key = ( iden_value & 0xfffffffe );
829 if( barrel_ec == 0 || barrel_ec == 2 ) {
830 TofData* tof = new TofData;
831 tof->setIdentify( iden );
832 tof->setForward( pmt );
833 m_tofDataMapOnline.insert( make_pair( iden_value_key, tof ) );
834 }
835 else if( barrel_ec == 1 || barrel_ec == 3 ) {
836 unsigned int count = m_tofDataMapOnline.count( iden_value_key );
837
838 if( count == 0 ) {
839 TofData* tof = new TofData;
840 tof->setIdentify( iden );
841 if( end == 0 ) {
842 tof->setForward( pmt );
843 }
844 else {
845 tof->setBackward( pmt );
846 }
847 m_tofDataMapOnline.insert( make_pair( iden_value_key, tof ) );
848 }
849 else {
850 bool used = false;
851 pair< IterTofDataMap, IterTofDataMap > range = m_tofDataMapOnline.equal_range( iden_value_key );
852 IterTofDataMap iter = range.first;
853 for( unsigned int i=0; i<count; i++, iter++ ) {
854 if( ( end == 0 ) && ( ( ( (*iter).second)->quality() & 0x1 ) != 0 ) ) {
855 double time1 = pmt->tdc();
856 double time2 = ((*iter).second)->tdc2();
857 if( ( TofID::is_scin( iden ) && abs(time1-time2)<timeDiff ) || ( TofID::is_mrpc( iden ) && abs(time1-time2)<timeDiffMRPC ) ) {
858 used = true;
859 if( ( ( (*iter).second)->quality() & 0x4 ) == 0 ) {
860 ((*iter).second)->setForward( pmt );
861 }
862 else {
863 TofData* tof = new TofData;
864 tof->setIdentify( iden );
865 tof->setForward( pmt );
866 tof->setBackward( ((*iter).second)->backward() );
867 m_tofDataMapOnline.insert( make_pair( iden_value_key, tof ) );
868 }
869 }
870 }
871 else if( ( end == 1 ) && ( ( ((*iter).second)->quality() & 0x4 ) != 0 ) ) {
872 double time1 = ((*iter).second)->tdc1();
873 double time2 = pmt->tdc();
874
875 if( ( TofID::is_scin( iden ) && abs(time1-time2)<timeDiff ) || ( TofID::is_mrpc( iden ) && abs(time1-time2)<timeDiffMRPC ) ) {
876 used = true;
877 if( ( ( (*iter).second)->quality() & 0x1 ) == 0 ) {
878 ((*iter).second)->setBackward( pmt );
879 }
880 else {
881 TofData* tof = new TofData;
882 tof->setIdentify( iden );
883 tof->setForward( ((*iter).second)->forward() );
884 tof->setBackward( pmt );
885 m_tofDataMapOnline.insert( make_pair( iden_value_key, tof ) );
886 }
887 }
888 }
889 }
890 if( ! used ) {
891 TofData* tof = new TofData;
892 tof->setIdentify( iden );
893 if( end == 0 ) {
894 tof->setForward( pmt );
895 }
896 else {
897 tof->setBackward( pmt );
898 }
899 m_tofDataMapOnline.insert( make_pair( iden_value_key, tof ) );
900 }
901 }
902 }
903 }
904
905 return m_tofDataMapOnline;
906
907}
double tdc()
Definition TofData.cxx:340

Referenced by RawDataProviderSvc::tofDataMapOnlineMode(), and tofDataVectorOnlineMode().

◆ tofDataMapTof()

TofDataMap & TofRawDataProvider::tofDataMapTof ( double estime = 0.0)

Definition at line 974 of file TofRawDataProvider.cxx.

974 {
975
976 if( !m_hasFilled ) {
978 m_hasFilled = true;
979 }
980
981 if( !m_tofDataMapTof.empty() ) {
982 m_tofDataMapTof.clear();
983 }
984
985 IterTofDataMap iter = m_tofDataMap.begin();
986 for( ; iter != m_tofDataMap.end(); iter++ ) {
987 if( ( ( ((*iter).second)->quality() & 0xc ) == 0xc ) || ( ( ((*iter).second)->quality() & 0x3 ) == 0x3 ) ) {
988 if( estime > 1.0e-6 ) {
989 double tdc1 = ((*iter).second)->tdc1();
990 double tdc2 = ((*iter).second)->tdc2();
991 bool forward = ( ( ( estime - tdc1 ) < timeBackward ) && ( ( tdc1 - estime ) < timeForward ) );
992 bool backward = ( ( ( estime - tdc2 ) < timeBackward ) && ( ( tdc2 - estime ) < timeForward ) );
993 if( TofID::is_mrpc( TofID::cell_id((*iter).first) ) && m_run>=43680 && m_run<43809 ) {
994 double offset = -264.0;
995 forward = ( ( ( estime - tdc1 ) < ( timeBackward - offset ) ) && ( ( tdc1 - estime ) < ( timeForward + offset ) ) );
996 backward = ( ( ( estime - tdc2 ) < ( timeBackward + offset ) ) && ( ( tdc2 - estime ) < ( timeForward + offset ) ) );
997 }
998 if( !forward && !backward ) continue;
999 }
1000 m_tofDataMapTof.insert( make_pair( (*iter).first, (*iter).second ) );
1001 }
1002 }
1003
1004 iter = m_tofDataMapTof.begin();
1005 while( iter != m_tofDataMapTof.end() ) {
1006 unsigned int iden_value = (*iter).first;
1007 unsigned int count = m_tofDataMapTof.count( iden_value );
1008 for( unsigned int i=0; i != count; i++, iter++ ) {
1009 ((*iter).second)->setTimes( count );
1010 }
1011 }
1012
1013 return m_tofDataMapTof;
1014}
const double timeForward
const double timeBackward

Referenced by RawDataProviderSvc::tofDataMapTof(), and tofDataVectorTof().

◆ tofDataVectorEmc()

TofDataVector & TofRawDataProvider::tofDataVectorEmc ( double estime = 0.0)

Definition at line 1078 of file TofRawDataProvider.cxx.

1078 {
1079 if( m_tofDataVectorEmc.size() != 0 ) {
1080 m_tofDataVectorEmc.clear();
1081 }
1082
1085 for( ; iter != tofDataMapEmc.end(); iter++ ) {
1086 m_tofDataVectorEmc.push_back( iter->second );
1087 }
1088 return m_tofDataVectorEmc;
1089}
std::multimap< unsigned int, TofData * > TofDataMap
Definition TofData.h:244
TofDataMap & tofDataMapEmc(double estime=0.0)

Referenced by RawDataProviderSvc::tofDataVectorEmc().

◆ tofDataVectorEstime()

TofDataVector & TofRawDataProvider::tofDataVectorEstime ( )

Definition at line 961 of file TofRawDataProvider.cxx.

961 {
962 if( m_tofDataVectorEstime.size() != 0 ) return m_tofDataVectorEstime;
963
966 for( ; iter != tofDataMapEstime.end(); iter++ ) {
967 m_tofDataVectorEstime.push_back( iter->second );
968 }
969 return m_tofDataVectorEstime;
970}
TofDataMap & tofDataMapEstime()

Referenced by RawDataProviderSvc::tofDataVectorEstime().

◆ tofDataVectorOnlineMode()

TofDataVector & TofRawDataProvider::tofDataVectorOnlineMode ( uint32_t control = 1)

Definition at line 910 of file TofRawDataProvider.cxx.

910 {
911
912 MsgStream log(m_msgSvc, m_name);
913 log << MSG::INFO << "TofRawDataProvider::tofDataVectorOnlineMode()" << endreq;
914
915 if( m_tofDataVectorOnline.size() != 0 ) {
916 if(!control) return m_tofDataVectorOnline;
917 else m_tofDataVectorOnline.clear();
918 }
920 IterTofDataMap iter = tofRawDataMap.begin();
921 for( ; iter != tofRawDataMap.end(); iter++ ) {
922 m_tofDataVectorOnline.push_back( iter->second );
923 }
924
925 return m_tofDataVectorOnline;
926}
TofDataMap & tofDataMapOnlineMode(uint32_t control=1)

Referenced by RawDataProviderSvc::tofDataVectorOnlineMode().

◆ tofDataVectorTof()

TofDataVector & TofRawDataProvider::tofDataVectorTof ( double estime = 0.0)

Definition at line 1017 of file TofRawDataProvider.cxx.

1017 {
1018 if( m_tofDataVectorTof.size() != 0 ) {
1019 m_tofDataVectorTof.clear();
1020 }
1021
1024 for( ; iter != tofDataMapTof.end(); iter++ ) {
1025 m_tofDataVectorTof.push_back( iter->second );
1026 }
1027 return m_tofDataVectorTof;
1028}
TofDataMap & tofDataMapTof(double estime=0.0)

Referenced by RawDataProviderSvc::tofDataVectorTof().


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