BOSS 8.0.0
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 ()
 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/3]

PmtData::PmtData ( )

Definition at line 233 of file TofData.cxx.

233 {
234 m_iden_value = 0;
235 m_times = 0;
236 m_quality = 0;
237 m_adc = 0;
238 m_tdc = 0;
239}

Referenced by operator=().

◆ ~PmtData() [1/3]

PmtData::~PmtData ( )

Definition at line 241 of file TofData.cxx.

241{ PmtData::clear(); }
void clear()
Definition TofData.cxx:421

◆ PmtData() [2/3]

PmtData::PmtData ( )

◆ ~PmtData() [2/3]

PmtData::~PmtData ( )

◆ PmtData() [3/3]

PmtData::PmtData ( )

◆ ~PmtData() [3/3]

PmtData::~PmtData ( )

Member Function Documentation

◆ adc() [1/3]

double PmtData::adc ( )

Definition at line 268 of file TofData.cxx.

268 {
269 double value = -999.0;
270 if ( m_adc )
271 {
272
273 if ( TofID::is_mrpc( TofID::cell_id( m_iden_value ) ) )
274 {
275 if ( m_tdc )
276 {
277 double tleading = m_tdc->value();
278 if ( tleading > 0.0 )
279 {
280 int qchannel = m_adc->channel();
281 if ( qchannel != 10000 && qchannel != -999 )
282 {
283 double ttrailing = m_adc->qtc();
284 value = ttrailing - tleading;
285 }
286 }
287 }
288 }
289 else { value = m_adc->value(); }
290 }
291 else
292 {
293 if ( m_tdc ) { value = 10000.0; }
294 }
295 return value;
296}
static Identifier cell_id(int barrel_ec, int layer, int phi_module, int end)
For a single crystal.
Definition TofID.cxx:126
static bool is_mrpc(const Identifier &id)
Definition TofID.cxx:98

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

◆ adc() [2/3]

double PmtData::adc ( )

◆ adc() [3/3]

double PmtData::adc ( )

◆ adcChannel() [1/3]

int PmtData::adcChannel ( )

Definition at line 252 of file TofData.cxx.

252 {
253 int channel = -999;
254 if ( m_adc ) { channel = m_adc->channel(); }
255 return channel;
256}

◆ adcChannel() [2/3]

int PmtData::adcChannel ( )

◆ adcChannel() [3/3]

int PmtData::adcChannel ( )

◆ clear() [1/3]

void PmtData::clear ( )

Definition at line 421 of file TofData.cxx.

421 {
422 if ( m_adc )
423 {
424 if ( m_adc->times() <= 1 )
425 {
426 delete m_adc;
427 m_adc = 0;
428 }
429 else { m_adc->timesmm(); }
430 }
431 if ( m_tdc )
432 {
433 if ( m_tdc->times() <= 1 )
434 {
435 delete m_tdc;
436 m_tdc = 0;
437 }
438 else { m_tdc->timesmm(); }
439 }
440 return;
441}

Referenced by ~PmtData().

◆ clear() [2/3]

void PmtData::clear ( )

◆ clear() [3/3]

void PmtData::clear ( )

◆ iden() [1/3]

unsigned int PmtData::iden ( ) const
inline

Definition at line 72 of file Event/RawDataProviderSvc/include/RawDataProviderSvc/TofData.h.

72{ return m_iden_value; }

Referenced by setIdentify().

◆ iden() [2/3]

unsigned int PmtData::iden ( ) const
inline

Definition at line 72 of file InstallArea/x86_64-el9-gcc13-dbg/include/RawDataProviderSvc/TofData.h.

72{ return m_iden_value; }

◆ iden() [3/3]

unsigned int PmtData::iden ( ) const
inline

Definition at line 72 of file InstallArea/x86_64-el9-gcc13-opt/include/RawDataProviderSvc/TofData.h.

72{ return m_iden_value; }

◆ operator=() [1/3]

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

Definition at line 243 of file TofData.cxx.

243 {
244 m_iden_value = source.m_iden_value;
245 m_times = source.m_times;
246 m_quality = source.m_quality;
247 m_adc = source.m_adc;
248 m_tdc = source.m_tdc;
249 return *this;
250}

◆ operator=() [2/3]

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

◆ operator=() [3/3]

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

◆ qclock() [1/3]

int PmtData::qclock ( )

Definition at line 298 of file TofData.cxx.

298 {
299 int clock = -999;
300 if ( m_adc ) { clock = m_adc->clock(); }
301 return clock;
302}

◆ qclock() [2/3]

int PmtData::qclock ( )

◆ qclock() [3/3]

int PmtData::qclock ( )

◆ qnumber() [1/3]

int PmtData::qnumber ( )

Definition at line 364 of file TofData.cxx.

364 {
365 int number = 0;
366 if ( m_adc ) { number = m_adc->number(); }
367 return number;
368}

◆ qnumber() [2/3]

int PmtData::qnumber ( )

◆ qnumber() [3/3]

int PmtData::qnumber ( )

◆ qtc() [1/3]

double PmtData::qtc ( )

Definition at line 258 of file TofData.cxx.

258 {
259 double value = -999.0;
260 if ( m_adc ) { value = m_adc->qtc(); }
261 else
262 {
263 if ( m_tdc ) { value = 10000.0; }
264 }
265 return value;
266}

◆ qtc() [2/3]

double PmtData::qtc ( )

◆ qtc() [3/3]

double PmtData::qtc ( )

◆ qtimes() [1/3]

int PmtData::qtimes ( )

Definition at line 352 of file TofData.cxx.

352 {
353 int times = -1;
354 if ( m_adc ) { times = m_adc->times(); }
355 return times;
356}

◆ qtimes() [2/3]

int PmtData::qtimes ( )

◆ qtimes() [3/3]

int PmtData::qtimes ( )

◆ qtimesmm() [1/3]

void PmtData::qtimesmm ( )

Definition at line 337 of file TofData.cxx.

337 {
338 if ( m_adc ) { m_adc->timesmm(); }
339 return;
340}

Referenced by TofRawDataProvider::tofDataMapFull().

◆ qtimesmm() [2/3]

void PmtData::qtimesmm ( )

◆ qtimesmm() [3/3]

void PmtData::qtimesmm ( )

◆ qtimespp() [1/3]

void PmtData::qtimespp ( )

Definition at line 332 of file TofData.cxx.

332 {
333 if ( m_adc ) { m_adc->timespp(); }
334 return;
335}

◆ qtimespp() [2/3]

void PmtData::qtimespp ( )

◆ qtimespp() [3/3]

void PmtData::qtimespp ( )

◆ quality() [1/3]

unsigned int PmtData::quality ( ) const
inline

Definition at line 81 of file Event/RawDataProviderSvc/include/RawDataProviderSvc/TofData.h.

81{ return m_quality; }

Referenced by TofRawDataProvider::tofDataMapFull().

◆ quality() [2/3]

unsigned int PmtData::quality ( ) const
inline

Definition at line 81 of file InstallArea/x86_64-el9-gcc13-dbg/include/RawDataProviderSvc/TofData.h.

81{ return m_quality; }

◆ quality() [3/3]

unsigned int PmtData::quality ( ) const
inline

Definition at line 81 of file InstallArea/x86_64-el9-gcc13-opt/include/RawDataProviderSvc/TofData.h.

81{ return m_quality; }

◆ qused() [1/3]

bool PmtData::qused ( )

Definition at line 376 of file TofData.cxx.

376 {
377 bool used = false;
378 if ( m_adc ) { used = m_adc->used(); }
379 return used;
380}
bool used()
Definition TofData.cxx:388

◆ qused() [2/3]

bool PmtData::qused ( )

◆ qused() [3/3]

bool PmtData::qused ( )

◆ setAdc() [1/3]

void PmtData::setAdc ( Adc * adc)

Definition at line 395 of file TofData.cxx.

395 {
396 m_adc = adc;
397 if ( adc->channel() != -999 )
398 {
399 if ( m_adc->times() == -1 ) { m_adc->timespp(); }
400 m_quality = ( m_quality | 0x2 );
401 }
402 return;
403}
double adc()
Definition TofData.cxx:268

Referenced by TofRawDataProvider::tofDataMapFull().

◆ setAdc() [2/3]

void PmtData::setAdc ( Adc * adc)

◆ setAdc() [3/3]

void PmtData::setAdc ( Adc * adc)

◆ setIdentify() [1/3]

void PmtData::setIdentify ( unsigned int iden)
inline

◆ setIdentify() [2/3]

void PmtData::setIdentify ( unsigned int iden)
inline

Definition at line 99 of file InstallArea/x86_64-el9-gcc13-dbg/include/RawDataProviderSvc/TofData.h.

99{ m_iden_value = iden; }

◆ setIdentify() [3/3]

void PmtData::setIdentify ( unsigned int iden)
inline

Definition at line 99 of file InstallArea/x86_64-el9-gcc13-opt/include/RawDataProviderSvc/TofData.h.

99{ m_iden_value = iden; }

◆ setTdc() [1/3]

void PmtData::setTdc ( Tdc * tdc)

Definition at line 405 of file TofData.cxx.

405 {
406 m_tdc = tdc;
407 if ( tdc->channel() != -999 )
408 {
409 if ( m_tdc->times() == -1 ) { m_tdc->timespp(); }
410 m_quality = ( m_quality | 0x1 );
411 }
412 return;
413}
double tdc()
Definition TofData.cxx:310

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

◆ setTdc() [2/3]

void PmtData::setTdc ( Tdc * tdc)

◆ setTdc() [3/3]

void PmtData::setTdc ( Tdc * tdc)

◆ setUsed() [1/3]

void PmtData::setUsed ( )

Definition at line 415 of file TofData.cxx.

415 {
416 if ( m_adc ) { m_adc->setUsed( true ); }
417 if ( m_tdc ) { m_tdc->setUsed( true ); }
418 return;
419}

◆ setUsed() [2/3]

void PmtData::setUsed ( )

◆ setUsed() [3/3]

void PmtData::setUsed ( )

◆ tclock() [1/3]

int PmtData::tclock ( )

Definition at line 316 of file TofData.cxx.

316 {
317 int clock = -999;
318 if ( m_tdc ) { clock = m_tdc->clock(); }
319 return clock;
320}

◆ tclock() [2/3]

int PmtData::tclock ( )

◆ tclock() [3/3]

int PmtData::tclock ( )

◆ tdc() [1/3]

double PmtData::tdc ( )

Definition at line 310 of file TofData.cxx.

310 {
311 double value = -999.;
312 if ( m_tdc ) { value = m_tdc->value(); }
313 return value;
314}

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

◆ tdc() [2/3]

double PmtData::tdc ( )

◆ tdc() [3/3]

double PmtData::tdc ( )

◆ tdcChannel() [1/3]

int PmtData::tdcChannel ( )

Definition at line 304 of file TofData.cxx.

304 {
305 int channel = -999;
306 if ( m_tdc ) { channel = m_tdc->channel(); }
307 return channel;
308}

◆ tdcChannel() [2/3]

int PmtData::tdcChannel ( )

◆ tdcChannel() [3/3]

int PmtData::tdcChannel ( )

◆ times() [1/3]

unsigned int PmtData::times ( ) const
inline

Definition at line 73 of file Event/RawDataProviderSvc/include/RawDataProviderSvc/TofData.h.

73{ return m_times; }

Referenced by qtimes(), and ttimes().

◆ times() [2/3]

unsigned int PmtData::times ( ) const
inline

Definition at line 73 of file InstallArea/x86_64-el9-gcc13-dbg/include/RawDataProviderSvc/TofData.h.

73{ return m_times; }

◆ times() [3/3]

unsigned int PmtData::times ( ) const
inline

Definition at line 73 of file InstallArea/x86_64-el9-gcc13-opt/include/RawDataProviderSvc/TofData.h.

73{ return m_times; }

◆ timesmm() [1/3]

void PmtData::timesmm ( )

Definition at line 327 of file TofData.cxx.

327 {
328 m_times = m_times - 1;
329 return;
330}

◆ timesmm() [2/3]

void PmtData::timesmm ( )

◆ timesmm() [3/3]

void PmtData::timesmm ( )

◆ timespp() [1/3]

void PmtData::timespp ( )

Definition at line 322 of file TofData.cxx.

322 {
323 m_times = m_times + 1;
324 return;
325}

◆ timespp() [2/3]

void PmtData::timespp ( )

◆ timespp() [3/3]

void PmtData::timespp ( )

◆ tnumber() [1/3]

int PmtData::tnumber ( )

Definition at line 370 of file TofData.cxx.

370 {
371 int number = 0;
372 if ( m_tdc ) { number = m_tdc->number(); }
373 return number;
374}

◆ tnumber() [2/3]

int PmtData::tnumber ( )

◆ tnumber() [3/3]

int PmtData::tnumber ( )

◆ ttimes() [1/3]

int PmtData::ttimes ( )

Definition at line 358 of file TofData.cxx.

358 {
359 int times = -1;
360 if ( m_tdc ) { times = m_tdc->times(); }
361 return times;
362}

◆ ttimes() [2/3]

int PmtData::ttimes ( )

◆ ttimes() [3/3]

int PmtData::ttimes ( )

◆ ttimesmm() [1/3]

void PmtData::ttimesmm ( )

Definition at line 347 of file TofData.cxx.

347 {
348 if ( m_tdc ) { m_tdc->timesmm(); }
349 return;
350}

◆ ttimesmm() [2/3]

void PmtData::ttimesmm ( )

◆ ttimesmm() [3/3]

void PmtData::ttimesmm ( )

◆ ttimespp() [1/3]

void PmtData::ttimespp ( )

Definition at line 342 of file TofData.cxx.

342 {
343 if ( m_tdc ) { m_tdc->timespp(); }
344 return;
345}

◆ ttimespp() [2/3]

void PmtData::ttimespp ( )

◆ ttimespp() [3/3]

void PmtData::ttimespp ( )

◆ tused() [1/3]

bool PmtData::tused ( )

Definition at line 382 of file TofData.cxx.

382 {
383 bool used = false;
384 if ( m_tdc ) { used = m_tdc->used(); }
385 return used;
386}

◆ tused() [2/3]

bool PmtData::tused ( )

◆ tused() [3/3]

bool PmtData::tused ( )

◆ used() [1/3]

bool PmtData::used ( )

Definition at line 388 of file TofData.cxx.

388 {
389 bool used = false;
390 if ( m_adc ) { used = ( used || m_adc->used() ); }
391 if ( m_tdc ) { used = ( used || m_tdc->used() ); }
392 return used;
393}

Referenced by qused(), tused(), and used().

◆ used() [2/3]

bool PmtData::used ( )

◆ used() [3/3]

bool PmtData::used ( )

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