BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
PmtData Class Reference

#include <TofData.h>

Public Member Functions

 PmtData ()
 
 ~PmtData ()
 
PmtDataoperator= (const PmtData &source)
 
unsigned int iden () const
 
unsigned int times () const
 
int adcChannel ()
 
double qtc ()
 
double adc ()
 
int qclock ()
 
int tdcChannel ()
 
double tdc ()
 
int tclock ()
 
unsigned int quality () const
 
void timespp ()
 
void timesmm ()
 
int qtimes ()
 
void qtimespp ()
 
void qtimesmm ()
 
int ttimes ()
 
void ttimespp ()
 
void ttimesmm ()
 
int qnumber ()
 
int tnumber ()
 
bool qused ()
 
bool tused ()
 
bool used ()
 
void setIdentify (unsigned int iden)
 
void setAdc (Adc *adc)
 
void setTdc (Tdc *tdc)
 
void setUsed ()
 
void clear ()
 
 PmtData ()
 
 ~PmtData ()
 
PmtDataoperator= (const PmtData &source)
 
unsigned int iden () const
 
unsigned int times () const
 
int adcChannel ()
 
double qtc ()
 
double adc ()
 
int qclock ()
 
int tdcChannel ()
 
double tdc ()
 
int tclock ()
 
unsigned int quality () const
 
void timespp ()
 
void timesmm ()
 
int qtimes ()
 
void qtimespp ()
 
void qtimesmm ()
 
int ttimes ()
 
void ttimespp ()
 
void ttimesmm ()
 
int qnumber ()
 
int tnumber ()
 
bool qused ()
 
bool tused ()
 
bool used ()
 
void setIdentify (unsigned int iden)
 
void setAdc (Adc *adc)
 
void setTdc (Tdc *tdc)
 
void setUsed ()
 
void clear ()
 

Detailed Description

Constructor & Destructor Documentation

◆ PmtData() [1/2]

PmtData::PmtData ( )

Definition at line 246 of file TofData.cxx.

246 {
247 m_iden_value = 0;
248 m_times = 0;
249 m_quality = 0;
250 m_adc = 0;
251 m_tdc = 0;
252}

◆ ~PmtData() [1/2]

PmtData::~PmtData ( )

Definition at line 255 of file TofData.cxx.

255 {
257}
void clear()
Definition: TofData.cxx:499

◆ PmtData() [2/2]

PmtData::PmtData ( )

◆ ~PmtData() [2/2]

PmtData::~PmtData ( )

Member Function Documentation

◆ adc() [1/2]

double PmtData::adc ( )

Definition at line 293 of file TofData.cxx.

293 {
294 double value = -999.0;
295 if( m_adc ) {
296
297 if( TofID::is_mrpc( TofID::cell_id( m_iden_value ) ) ) {
298 if( m_tdc ) {
299 double tleading = m_tdc->value();
300 if( tleading>0.0 ) {
301 int qchannel = m_adc->channel();
302 if( qchannel!=10000 && qchannel!=-999 ) {
303 double ttrailing = m_adc->qtc();
304 value = ttrailing - tleading;
305 }
306 }
307 }
308 }
309 else {
310 value = m_adc->value();
311 }
312 }
313 else {
314 if( m_tdc ) {
315 value = 10000.0;
316 }
317 }
318 return value;
319}
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 TofData::adc(), TofData::adc1(), TofData::adc2(), TofData::data(), setAdc(), and TofRawDataProvider::tofDataMapFull().

◆ adc() [2/2]

double PmtData::adc ( )

◆ adcChannel() [1/2]

int PmtData::adcChannel ( )

Definition at line 270 of file TofData.cxx.

270 {
271 int channel = -999;
272 if( m_adc ) {
273 channel = m_adc->channel();
274 }
275 return channel;
276}

Referenced by TofData::adcChannel(), TofData::adcChannelEast(), and TofData::adcChannelWest().

◆ adcChannel() [2/2]

int PmtData::adcChannel ( )

◆ clear() [1/2]

void PmtData::clear ( )

Definition at line 499 of file TofData.cxx.

499 {
500 if( m_adc ) {
501 if( m_adc->times() <= 1 ) {
502 delete m_adc;
503 m_adc = 0;
504 }
505 else {
506 m_adc->timesmm();
507 }
508 }
509 if( m_tdc ) {
510 if( m_tdc->times() <= 1 ) {
511 delete m_tdc;
512 m_tdc = 0;
513 }
514 else {
515 m_tdc->timesmm();
516 }
517 }
518 return;
519}
void timesmm()
Definition: TofData.cxx:43

Referenced by ~PmtData().

◆ clear() [2/2]

void PmtData::clear ( )

◆ iden() [1/2]

unsigned int PmtData::iden ( ) const
inline

Definition at line 75 of file Event/RawDataProviderSvc/RawDataProviderSvc-00-03-47/RawDataProviderSvc/TofData.h.

75{ return m_iden_value; }

Referenced by setIdentify().

◆ iden() [2/2]

unsigned int PmtData::iden ( ) const
inline

Definition at line 75 of file InstallArea/include/RawDataProviderSvc/RawDataProviderSvc/TofData.h.

75{ return m_iden_value; }

◆ operator=() [1/2]

PmtData & PmtData::operator= ( const PmtData source)

Definition at line 260 of file TofData.cxx.

260 {
261 m_iden_value = source.m_iden_value;
262 m_times = source.m_times;
263 m_quality = source.m_quality;
264 m_adc = source.m_adc;
265 m_tdc = source.m_tdc;
266 return *this;
267}

◆ operator=() [2/2]

PmtData & PmtData::operator= ( const PmtData source)

◆ qclock() [1/2]

int PmtData::qclock ( )

Definition at line 322 of file TofData.cxx.

322 {
323 int clock = -999;
324 if( m_adc ) {
325 clock = m_adc->clock();
326 }
327 return clock;
328}

Referenced by TofData::qclock(), TofData::qclock1(), and TofData::qclock2().

◆ qclock() [2/2]

int PmtData::qclock ( )

◆ qnumber() [1/2]

int PmtData::qnumber ( )

Definition at line 420 of file TofData.cxx.

420 {
421 int number = 0;
422 if( m_adc ) {
423 number = m_adc->number();
424 }
425 return number;
426}

Referenced by TofData::qnumber1(), and TofData::qnumber2().

◆ qnumber() [2/2]

int PmtData::qnumber ( )

◆ qtc() [1/2]

double PmtData::qtc ( )

Definition at line 279 of file TofData.cxx.

279 {
280 double value = -999.0;
281 if( m_adc ) {
282 value = m_adc->qtc();
283 }
284 else {
285 if( m_tdc ) {
286 value = 10000.0;
287 }
288 }
289 return value;
290}

Referenced by TofData::qtc(), TofData::qtc1(), and TofData::qtc2().

◆ qtc() [2/2]

double PmtData::qtc ( )

◆ qtimes() [1/2]

int PmtData::qtimes ( )

Definition at line 402 of file TofData.cxx.

402 {
403 int times = -1;
404 if( m_adc ) {
405 times = m_adc->times();
406 }
407 return times;
408}

Referenced by TofData::qtimes1(), and TofData::qtimes2().

◆ qtimes() [2/2]

int PmtData::qtimes ( )

◆ qtimesmm() [1/2]

void PmtData::qtimesmm ( )

Definition at line 378 of file TofData.cxx.

378 {
379 if( m_adc ) {
380 m_adc->timesmm();
381 }
382 return;
383}

Referenced by TofRawDataProvider::tofDataMapFull().

◆ qtimesmm() [2/2]

void PmtData::qtimesmm ( )

◆ qtimespp() [1/2]

void PmtData::qtimespp ( )

Definition at line 370 of file TofData.cxx.

370 {
371 if( m_adc ) {
372 m_adc->timespp();
373 }
374 return;
375}
void timespp()
Definition: TofData.cxx:37

Referenced by TofData::setBackward(), and TofData::setForward().

◆ qtimespp() [2/2]

void PmtData::qtimespp ( )

◆ quality() [1/2]

unsigned int PmtData::quality ( ) const
inline

◆ quality() [2/2]

unsigned int PmtData::quality ( ) const
inline

Definition at line 84 of file InstallArea/include/RawDataProviderSvc/RawDataProviderSvc/TofData.h.

84{ return m_quality; }

◆ qused() [1/2]

bool PmtData::qused ( )

Definition at line 438 of file TofData.cxx.

438 {
439 bool used = false;
440 if( m_adc ) {
441 used = m_adc->used();
442 }
443 return used;
444}
bool used()
Definition: TofData.cxx:456

Referenced by TofData::qused1(), and TofData::qused2().

◆ qused() [2/2]

bool PmtData::qused ( )

◆ setAdc() [1/2]

void PmtData::setAdc ( Adc adc)

Definition at line 468 of file TofData.cxx.

468 {
469 m_adc = adc;
470 if( adc->channel() != -999 ) {
471 if( m_adc->times() == -1 ) { m_adc->timespp(); }
472 m_quality = ( m_quality | 0x2 );
473 }
474 return;
475}
double adc()
Definition: TofData.cxx:293

Referenced by TofRawDataProvider::tofDataMapFull().

◆ setAdc() [2/2]

void PmtData::setAdc ( Adc adc)

◆ setIdentify() [1/2]

void PmtData::setIdentify ( unsigned int  iden)
inline

◆ setIdentify() [2/2]

void PmtData::setIdentify ( unsigned int  iden)
inline

Definition at line 102 of file InstallArea/include/RawDataProviderSvc/RawDataProviderSvc/TofData.h.

102{ m_iden_value = iden; }

◆ setTdc() [1/2]

void PmtData::setTdc ( Tdc tdc)

Definition at line 478 of file TofData.cxx.

478 {
479 m_tdc = tdc;
480 if( tdc->channel() != -999 ) {
481 if( m_tdc->times() == -1 ) { m_tdc->timespp(); }
482 m_quality = ( m_quality | 0x1 );
483 }
484 return;
485}
double tdc()
Definition: TofData.cxx:340

Referenced by TofRawDataProvider::tofDataMapFull(), and TofRawDataProvider::tofDataMapOnlineMode().

◆ setTdc() [2/2]

void PmtData::setTdc ( Tdc tdc)

◆ setUsed() [1/2]

void PmtData::setUsed ( )

Definition at line 488 of file TofData.cxx.

488 {
489 if( m_adc ) {
490 m_adc->setUsed( true );
491 }
492 if( m_tdc ) {
493 m_tdc->setUsed( true );
494 }
495 return;
496}

Referenced by TofData::setUsed().

◆ setUsed() [2/2]

void PmtData::setUsed ( )

◆ tclock() [1/2]

int PmtData::tclock ( )

Definition at line 349 of file TofData.cxx.

349 {
350 int clock = -999;
351 if( m_tdc ) {
352 clock = m_tdc->clock();
353 }
354 return clock;
355}

Referenced by TofData::tclock(), TofData::tclock1(), and TofData::tclock2().

◆ tclock() [2/2]

int PmtData::tclock ( )

◆ tdc() [1/2]

double PmtData::tdc ( )

Definition at line 340 of file TofData.cxx.

340 {
341 double value = -999.;
342 if( m_tdc ) {
343 value = m_tdc->value();
344 }
345 return value;
346}

Referenced by TofData::data(), setTdc(), TofData::tdc(), TofData::tdc1(), TofData::tdc2(), and TofRawDataProvider::tofDataMapOnlineMode().

◆ tdc() [2/2]

double PmtData::tdc ( )

◆ tdcChannel() [1/2]

int PmtData::tdcChannel ( )

Definition at line 331 of file TofData.cxx.

331 {
332 int channel = -999;
333 if( m_tdc ) {
334 channel = m_tdc->channel();
335 }
336 return channel;
337}

Referenced by TofData::tdcChannel(), TofData::tdcChannelEast(), and TofData::tdcChannelWest().

◆ tdcChannel() [2/2]

int PmtData::tdcChannel ( )

◆ times() [1/2]

unsigned int PmtData::times ( ) const
inline

◆ times() [2/2]

unsigned int PmtData::times ( ) const
inline

Definition at line 76 of file InstallArea/include/RawDataProviderSvc/RawDataProviderSvc/TofData.h.

76{ return m_times; }

◆ timesmm() [1/2]

void PmtData::timesmm ( )

Definition at line 364 of file TofData.cxx.

364 {
365 m_times = m_times - 1;
366 return;
367}

Referenced by TofData::clear().

◆ timesmm() [2/2]

void PmtData::timesmm ( )

◆ timespp() [1/2]

void PmtData::timespp ( )

Definition at line 358 of file TofData.cxx.

358 {
359 m_times = m_times + 1;
360 return;
361}

Referenced by TofData::setBackward(), and TofData::setForward().

◆ timespp() [2/2]

void PmtData::timespp ( )

◆ tnumber() [1/2]

int PmtData::tnumber ( )

Definition at line 429 of file TofData.cxx.

429 {
430 int number = 0;
431 if( m_tdc ) {
432 number = m_tdc->number();
433 }
434 return number;
435}

Referenced by TofData::tnumber1(), and TofData::tnumber2().

◆ tnumber() [2/2]

int PmtData::tnumber ( )

◆ ttimes() [1/2]

int PmtData::ttimes ( )

Definition at line 411 of file TofData.cxx.

411 {
412 int times = -1;
413 if( m_tdc ) {
414 times = m_tdc->times();
415 }
416 return times;
417}

Referenced by TofData::ttimes1(), and TofData::ttimes2().

◆ ttimes() [2/2]

int PmtData::ttimes ( )

◆ ttimesmm() [1/2]

void PmtData::ttimesmm ( )

Definition at line 394 of file TofData.cxx.

394 {
395 if( m_tdc ) {
396 m_tdc->timesmm();
397 }
398 return;
399}

◆ ttimesmm() [2/2]

void PmtData::ttimesmm ( )

◆ ttimespp() [1/2]

void PmtData::ttimespp ( )

Definition at line 386 of file TofData.cxx.

386 {
387 if( m_tdc ) {
388 m_tdc->timespp();
389 }
390 return;
391}

Referenced by TofData::setBackward(), and TofData::setForward().

◆ ttimespp() [2/2]

void PmtData::ttimespp ( )

◆ tused() [1/2]

bool PmtData::tused ( )

Definition at line 447 of file TofData.cxx.

447 {
448 bool used = false;
449 if( m_tdc ) {
450 used = m_tdc->used();
451 }
452 return used;
453}

Referenced by TofData::tused1(), and TofData::tused2().

◆ tused() [2/2]

bool PmtData::tused ( )

◆ used() [1/2]

bool PmtData::used ( )

Definition at line 456 of file TofData.cxx.

456 {
457 bool used = false;
458 if( m_adc ) {
459 used = ( used || m_adc->used() );
460 }
461 if( m_tdc ) {
462 used = ( used || m_tdc->used() );
463 }
464 return used;
465}

Referenced by qused(), tused(), used(), TofData::used(), TofData::used1(), and TofData::used2().

◆ used() [2/2]

bool PmtData::used ( )

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