BOSS 7.1.1
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 ()
 

Detailed Description

Definition at line 67 of file TofData.h.

Constructor & Destructor Documentation

◆ PmtData()

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()

PmtData::~PmtData ( )

Definition at line 255 of file TofData.cxx.

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

Member Function Documentation

◆ adc()

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}
double qtc() const
Definition TofData.h:52
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
double value() const
Definition TofData.h:21
int channel() const
Definition TofData.h:17

Referenced by TofData::adc(), TofData::adc1(), TofData::adc2(), TofData::data(), TofData::data(), setAdc(), and TofRawDataProvider::tofDataMapFull().

◆ adcChannel()

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().

◆ clear()

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
int times() const
Definition TofData.h:18

Referenced by ~PmtData().

◆ iden()

unsigned int PmtData::iden ( ) const
inline

Definition at line 75 of file TofData.h.

75{ return m_iden_value; }

Referenced by setIdentify().

◆ operator=()

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}

◆ qclock()

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}
int clock() const
Definition TofData.h:20

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

◆ qnumber()

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}
int number() const
Definition TofData.h:19

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

◆ qtc()

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().

◆ qtimes()

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}
unsigned int times() const
Definition TofData.h:76

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

◆ qtimesmm()

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().

◆ qtimespp()

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().

◆ quality()

unsigned int PmtData::quality ( ) const
inline

Definition at line 84 of file TofData.h.

84{ return m_quality; }

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

◆ qused()

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
bool used() const
Definition TofData.h:22

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

◆ setAdc()

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().

◆ setIdentify()

void PmtData::setIdentify ( unsigned int iden)
inline

Definition at line 102 of file TofData.h.

102{ m_iden_value = iden; }
unsigned int iden() const
Definition TofData.h:75

Referenced by TofRawDataProvider::tofDataMapFull().

◆ setTdc()

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().

◆ setUsed()

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}
void setUsed(bool used)
Definition TofData.h:28

Referenced by TofData::setUsed().

◆ tclock()

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().

◆ tdc()

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(), TofData::data(), setTdc(), TofData::tdc(), TofData::tdc1(), TofData::tdc2(), and TofRawDataProvider::tofDataMapOnlineMode().

◆ tdcChannel()

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().

◆ times()

unsigned int PmtData::times ( ) const
inline

Definition at line 76 of file TofData.h.

76{ return m_times; }

Referenced by TofData::clear(), TofData::eastTimes(), qtimes(), ttimes(), and TofData::westTimes().

◆ timesmm()

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().

◆ timespp()

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().

◆ tnumber()

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().

◆ ttimes()

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().

◆ ttimesmm()

void PmtData::ttimesmm ( )

Definition at line 394 of file TofData.cxx.

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

◆ ttimespp()

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().

◆ tused()

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().

◆ used()

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().


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