BOSS 7.1.0
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)
ISvcLocator * m_svcLocator

Referenced by RawDataProviderSvc::initialize().

◆ tofDataMapEmc()

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

Definition at line 1016 of file TofRawDataProvider.cxx.

1016 {
1017
1018 if( !m_hasFilled ) {
1020 m_hasFilled = true;
1021 }
1022
1023 if( !m_tofDataMapEmc.empty() ) {
1024 m_tofDataMapEmc.clear();
1025 }
1026
1027 IterTofDataMap iter = m_tofDataMap.begin();
1028 for( ; iter != m_tofDataMap.end(); iter++ ) {
1029 if( ( ((*iter).second)->quality() & 0xa ) != 0 ) {
1030
1031 if( estime > 1.0e-6 ) {
1032 int t0clock = static_cast<int>(estime/24.0);
1033 int clock1 = ((*iter).second)->qclock1();
1034 int clock2 = ((*iter).second)->qclock2();
1035 bool forward = ( ( ( t0clock - clock1 ) < tClockBackward ) && ( ( clock1 - t0clock ) < tClockForward ) );
1036 bool backward = ( ( ( t0clock - clock2 ) < tClockBackward ) && ( ( clock2 - t0clock ) < tClockForward ) );
1037 if( TofID::is_mrpc( TofID::cell_id((*iter).first) ) && m_run>=43680 && m_run<43809 ) {
1038 double offset = -11.0;
1039 forward = ( ( ( t0clock - clock1 ) < ( tClockBackward -offset ) ) && ( ( clock1 - t0clock ) < ( tClockForward + offset ) ) );
1040 backward = ( ( ( t0clock - clock2 ) < ( tClockBackward - offset ) ) && ( ( clock2 - t0clock ) < ( tClockForward + offset ) ) );
1041 }
1042 if( !forward && !backward ) continue;
1043 }
1044
1045 m_tofDataMapEmc.insert( make_pair( (*iter).first, (*iter).second ) );
1046 }
1047 }
1048
1049 iter = m_tofDataMapEmc.begin();
1050 while( iter != m_tofDataMapEmc.end() ) {
1051 unsigned int iden_value = (*iter).first;
1052 unsigned int count = m_tofDataMapEmc.count( iden_value );
1053 for( unsigned int i=0; i != count; i++, iter++ ) {
1054 ((*iter).second)->setTimes( count );
1055 }
1056 }
1057
1058 return m_tofDataMapEmc;
1059}
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 914 of file TofRawDataProvider.cxx.

914 {
915
916 if( !m_hasFilled ) {
918 m_hasFilled = true;
919 }
920
921 if( !m_tofDataMapEstime.empty() ) {
922 m_tofDataMapEstime.clear();
923 }
924
925 IterTofDataMap iter = m_tofDataMap.begin();
926 for( ; iter != m_tofDataMap.end(); iter++ ) {
927 if( ( ( ((*iter).second)->quality() & 0x5 ) != 0 ) && ((*iter).second)->tmatched() ) {
928 m_tofDataMapEstime.insert( make_pair( (*iter).first, (*iter).second ) );
929 }
930 }
931
932 iter = m_tofDataMapEstime.begin();
933 while( iter != m_tofDataMapEstime.end() ) {
934 unsigned int iden_value = (*iter).first;
935 unsigned int count = m_tofDataMapEstime.count( iden_value );
936 for( unsigned int i=0; i != count; i++, iter++ ) {
937 ((*iter).second)->setTimes( count );
938 }
939 }
940
941 return m_tofDataMapEstime;
942}

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

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

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

◆ tofDataMapTof()

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

Definition at line 958 of file TofRawDataProvider.cxx.

958 {
959
960 if( !m_hasFilled ) {
962 m_hasFilled = true;
963 }
964
965 if( !m_tofDataMapTof.empty() ) {
966 m_tofDataMapTof.clear();
967 }
968
969 IterTofDataMap iter = m_tofDataMap.begin();
970 for( ; iter != m_tofDataMap.end(); iter++ ) {
971 if( ( ( ((*iter).second)->quality() & 0xc ) == 0xc ) || ( ( ((*iter).second)->quality() & 0x3 ) == 0x3 ) ) {
972 if( estime > 1.0e-6 ) {
973 double tdc1 = ((*iter).second)->tdc1();
974 double tdc2 = ((*iter).second)->tdc2();
975 bool forward = ( ( ( estime - tdc1 ) < timeBackward ) && ( ( tdc1 - estime ) < timeForward ) );
976 bool backward = ( ( ( estime - tdc2 ) < timeBackward ) && ( ( tdc2 - estime ) < timeForward ) );
977 if( TofID::is_mrpc( TofID::cell_id((*iter).first) ) && m_run>=43680 && m_run<43809 ) {
978 double offset = -264.0;
979 forward = ( ( ( estime - tdc1 ) < ( timeBackward - offset ) ) && ( ( tdc1 - estime ) < ( timeForward + offset ) ) );
980 backward = ( ( ( estime - tdc2 ) < ( timeBackward + offset ) ) && ( ( tdc2 - estime ) < ( timeForward + offset ) ) );
981 }
982 if( !forward && !backward ) continue;
983 }
984 m_tofDataMapTof.insert( make_pair( (*iter).first, (*iter).second ) );
985 }
986 }
987
988 iter = m_tofDataMapTof.begin();
989 while( iter != m_tofDataMapTof.end() ) {
990 unsigned int iden_value = (*iter).first;
991 unsigned int count = m_tofDataMapTof.count( iden_value );
992 for( unsigned int i=0; i != count; i++, iter++ ) {
993 ((*iter).second)->setTimes( count );
994 }
995 }
996
997 return m_tofDataMapTof;
998}
const double timeForward
const double timeBackward

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

◆ tofDataVectorEmc()

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

Definition at line 1062 of file TofRawDataProvider.cxx.

1062 {
1063 if( m_tofDataVectorEmc.size() != 0 ) {
1064 m_tofDataVectorEmc.clear();
1065 }
1066
1069 for( ; iter != tofDataMapEmc.end(); iter++ ) {
1070 m_tofDataVectorEmc.push_back( iter->second );
1071 }
1072 return m_tofDataVectorEmc;
1073}
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 945 of file TofRawDataProvider.cxx.

945 {
946 if( m_tofDataVectorEstime.size() != 0 ) return m_tofDataVectorEstime;
947
950 for( ; iter != tofDataMapEstime.end(); iter++ ) {
951 m_tofDataVectorEstime.push_back( iter->second );
952 }
953 return m_tofDataVectorEstime;
954}
TofDataMap & tofDataMapEstime()

Referenced by RawDataProviderSvc::tofDataVectorEstime().

◆ tofDataVectorOnlineMode()

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

Definition at line 894 of file TofRawDataProvider.cxx.

894 {
895
896 MsgStream log(m_msgSvc, m_name);
897 log << MSG::INFO << "TofRawDataProvider::tofDataVectorOnlineMode()" << endreq;
898
899 if( m_tofDataVectorOnline.size() != 0 ) {
900 if(!control) return m_tofDataVectorOnline;
901 else m_tofDataVectorOnline.clear();
902 }
904 IterTofDataMap iter = tofRawDataMap.begin();
905 for( ; iter != tofRawDataMap.end(); iter++ ) {
906 m_tofDataVectorOnline.push_back( iter->second );
907 }
908
909 return m_tofDataVectorOnline;
910}
TofDataMap & tofDataMapOnlineMode(uint32_t control=1)

Referenced by RawDataProviderSvc::tofDataVectorOnlineMode().

◆ tofDataVectorTof()

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

Definition at line 1001 of file TofRawDataProvider.cxx.

1001 {
1002 if( m_tofDataVectorTof.size() != 0 ) {
1003 m_tofDataVectorTof.clear();
1004 }
1005
1008 for( ; iter != tofDataMapTof.end(); iter++ ) {
1009 m_tofDataVectorTof.push_back( iter->second );
1010 }
1011 return m_tofDataVectorTof;
1012}
TofDataMap & tofDataMapTof(double estime=0.0)

Referenced by RawDataProviderSvc::tofDataVectorTof().


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