Jpp  18.2.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Functions | Variables
Ars.hh File Reference
#include <ostream>
#include <iomanip>
#include <TROOT.h>
#include <TObject.h>
#include "antares-dataformat/DataTypes.hh"

Go to the source code of this file.

Classes

class  ARS_Item
 ARS item interface. More...
 
class  Status_Item
 ARS STATUS. More...
 
class  RTS_Item
 ARS RTS. More...
 
class  CRM_Item
 ARS CRM. More...
 
class  SPE_Item
 ARS SPE. More...
 
class  AWF_Sample
 Anode waveform sample. More...
 
class  DWF_Sample
 Dynode waveform sample. More...
 
class  WF_Header
 ARS WF header interface. More...
 
class  WF_Item< T >
 ARS waveform. More...
 
class  AWF_Item
 ARS Anode waveform. More...
 
class  DWF_Item
 ARS Dynode waveform. More...
 

Functions

 ClassDefT2 (WF_Item, T)
 
 ClassImpT (WF_Item, T)
 
int getTVC (const unsigned int timestamp, const unsigned char tvc)
 Determine the TVC number. More...
 
bool operator== (const Status_Item &first, const Status_Item &second)
 equal operator for Status item More...
 
bool operator!= (const Status_Item &first, const Status_Item &second)
 not-equal operator for Status item More...
 
bool operator< (const Status_Item &first, const Status_Item &second)
 comparator for Status item; earliest hit first More...
 
bool operator== (const SPE_Item &first, const SPE_Item &second)
 equal operator for SPE item More...
 
bool operator!= (const SPE_Item &first, const SPE_Item &second)
 not-equal operator for SPE item More...
 
bool operator< (const SPE_Item &first, const SPE_Item &second)
 comparator for SPE item; earliest hit first More...
 
bool operator< (const SPE_Item &first, const unsigned int second)
 comparator for SPE item; earliest hit first More...
 
bool operator< (const unsigned int first, const SPE_Item &second)
 comparator for SPE item; earliest hit first More...
 

Variables

static const double ARS_TIMESTAMP_NS = 25.0
 ARS timestamp LSB [ns]. More...
 

Function Documentation

ClassDefT2 ( WF_Item  ,
T   
)
ClassImpT ( WF_Item  ,
T   
)
int getTVC ( const unsigned int  timestamp,
const unsigned char  tvc 
)
inline

Determine the TVC number.

Parameters
timestampARS time stamp
tvcARS TVC value
Returns
0/1

Definition at line 348 of file Ars.hh.

350 {
351  switch (timestamp & 0x3) {
352 
353  case 0:
354  if (tvc & 0x80)
355  return 1;
356  else
357  return 0;
358  break;
359 
360  case 1:
361  return 0;
362  break;
363 
364  case 2:
365  if (tvc & 0x80)
366  return 0;
367  else
368  return 1;
369  break;
370 
371  case 3:
372  return 1;
373  break;
374  }
375 
376  return 0;
377 }
bool operator== ( const Status_Item first,
const Status_Item second 
)
inline

equal operator for Status item

Parameters
firstStatus item
secondStatus item
Returns
true if first equals second; else false

Definition at line 387 of file Ars.hh.

388 {
389  return (first.timestamp == second.timestamp);
390 }
unsigned int timestamp
ARS timestamp (24 bits)
Definition: Ars.hh:44
bool operator!= ( const Status_Item first,
const Status_Item second 
)
inline

not-equal operator for Status item

Parameters
firstStatus item
secondStatus item
Returns
true if first not equals second; else false

Definition at line 400 of file Ars.hh.

401 {
402  return (first.timestamp != second.timestamp);
403 }
unsigned int timestamp
ARS timestamp (24 bits)
Definition: Ars.hh:44
bool operator< ( const Status_Item first,
const Status_Item second 
)
inline

comparator for Status item; earliest hit first

Parameters
firstStatus item
secondStatus item
Returns
true if first earlier than second; else false

Definition at line 413 of file Ars.hh.

414 {
415  return (first.timestamp < second.timestamp);
416 }
unsigned int timestamp
ARS timestamp (24 bits)
Definition: Ars.hh:44
bool operator== ( const SPE_Item first,
const SPE_Item second 
)
inline

equal operator for SPE item

Parameters
firstSPE item
secondSPE item
Returns
true if first equals second; else false

Definition at line 426 of file Ars.hh.

427 {
428  return (first.timestamp == second.timestamp &&
429  first.tvc == second.tvc);
430 }
unsigned char tvc
ARS Time to Voltage Convertor.
Definition: Ars.hh:145
unsigned int timestamp
ARS timestamp (24 bits)
Definition: Ars.hh:44
bool operator!= ( const SPE_Item first,
const SPE_Item second 
)
inline

not-equal operator for SPE item

Parameters
firstSPE item
secondSPE item
Returns
true if first not equals second; else false

Definition at line 440 of file Ars.hh.

441 {
442  return (first.timestamp != second.timestamp ||
443  first.tvc != second.tvc);
444 }
unsigned char tvc
ARS Time to Voltage Convertor.
Definition: Ars.hh:145
unsigned int timestamp
ARS timestamp (24 bits)
Definition: Ars.hh:44
bool operator< ( const SPE_Item first,
const SPE_Item second 
)
inline

comparator for SPE item; earliest hit first

Parameters
firstSPE item
secondSPE item
Returns
true if first earlier than second; else false

Definition at line 454 of file Ars.hh.

455 {
456  if (first.timestamp == second.timestamp) {
457 
458  const int firstTvcInUse = getTVC(first.timestamp, first.tvc);
459  const int secondTvcInUse = getTVC(second.timestamp, second.tvc);
460 
461  if (firstTvcInUse == secondTvcInUse)
462  return first.tvc < second.tvc;
463  else
464  return firstTvcInUse < secondTvcInUse; //!
465 
466  } else {
467  return first.timestamp < second.timestamp;
468  }
469 }
unsigned char tvc
ARS Time to Voltage Convertor.
Definition: Ars.hh:145
unsigned int timestamp
ARS timestamp (24 bits)
Definition: Ars.hh:44
int getTVC(const unsigned int timestamp, const unsigned char tvc)
Determine the TVC number.
Definition: Ars.hh:348
bool operator< ( const SPE_Item first,
const unsigned int  second 
)
inline

comparator for SPE item; earliest hit first

Parameters
firstSPE item
secondtimestamp
Returns
true if first earlier than second; else false

Definition at line 479 of file Ars.hh.

480 {
481  return first.timestamp < second;
482 }
unsigned int timestamp
ARS timestamp (24 bits)
Definition: Ars.hh:44
bool operator< ( const unsigned int  first,
const SPE_Item second 
)
inline

comparator for SPE item; earliest hit first

Parameters
firsttimestamp
secondSPE item
Returns
true if first earlier than second; else false

Definition at line 492 of file Ars.hh.

493 {
494  return first < second.timestamp;
495 }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
unsigned int timestamp
ARS timestamp (24 bits)
Definition: Ars.hh:44

Variable Documentation

const double ARS_TIMESTAMP_NS = 25.0
static

ARS timestamp LSB [ns].

Definition at line 16 of file Ars.hh.