Public Member Functions | Private Attributes | List of all members
brb::ToF Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-30/BeamlineRecoBase/ToF.h"

Public Member Functions

 ToF ()
 
 ToF (float time, std::pair< float, float > timestamps)
 
float Time () const
 
std::pair< float, float > Timestamps () const
 
float Timestamp (unsigned int counter) const
 
void SetTime (float time)
 
void SetTimestamps (std::pair< float, float > timestamps)
 
void SetTimestamp (unsigned int counter, float timestamp)
 

Private Attributes

float fTime
 
std::pair< float, float > fTimestamps
 

Detailed Description

Definition at line 25 of file ToF.h.

Constructor & Destructor Documentation

brb::ToF::ToF ( )

Definition at line 13 of file ToF.cxx.

13  {
14 }
brb::ToF::ToF ( float  time,
std::pair< float, float >  timestamps 
)

Definition at line 17 of file ToF.cxx.

References fTime, and fTimestamps.

17  {
18  fTime = time;
19  fTimestamps = timestamps;
20 }
::xsd::cxx::tree::time< char, simple_type > time
Definition: Database.h:194
std::pair< float, float > fTimestamps
Definition: ToF.h:43
float fTime
Definition: ToF.h:42

Member Function Documentation

void brb::ToF::SetTime ( float  time)

Definition at line 41 of file ToF.cxx.

References fTime.

Referenced by beamlinereco::TimeOfFlightReco::produce(), and beamlinesim::BeamlineSimInput::produce().

41  {
42  fTime = time;
43  return;
44 }
::xsd::cxx::tree::time< char, simple_type > time
Definition: Database.h:194
float fTime
Definition: ToF.h:42
void brb::ToF::SetTimestamp ( unsigned int  counter,
float  timestamp 
)

Definition at line 53 of file ToF.cxx.

References allTimeWatchdog::endl, fTimestamps, and submit_nova_art::timestamp.

53  {
54  if (counter > 1)
55  throw cet::exception("ToF::SetTimestamp") << "Unknown ToF counter " << counter << std::endl
56  << "Expected 0 or 1." << std::endl;
57  counter ? fTimestamps.second = timestamp : fTimestamps.first = timestamp;
58  return;
59 }
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
std::pair< float, float > fTimestamps
Definition: ToF.h:43
void brb::ToF::SetTimestamps ( std::pair< float, float >  timestamps)

Definition at line 47 of file ToF.cxx.

References fTimestamps.

Referenced by beamlinereco::TimeOfFlightReco::produce(), and beamlinesim::BeamlineSimInput::produce().

47  {
48  fTimestamps = timestamps;
49  return;
50 }
std::pair< float, float > fTimestamps
Definition: ToF.h:43
float brb::ToF::Time ( ) const

Definition at line 23 of file ToF.cxx.

References fTime.

23  {
24  return fTime;
25 }
float fTime
Definition: ToF.h:42
float brb::ToF::Timestamp ( unsigned int  counter) const

Definition at line 33 of file ToF.cxx.

References allTimeWatchdog::endl, and fTimestamps.

33  {
34  if (counter > 1)
35  throw cet::exception("ToF::Timestamp") << "Unknown ToF counter " << counter << std::endl
36  << "Expected 0 or 1." << std::endl;
37  return counter ? fTimestamps.second : fTimestamps.first;
38 }
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
std::pair< float, float > fTimestamps
Definition: ToF.h:43
std::pair< float, float > brb::ToF::Timestamps ( ) const

Definition at line 28 of file ToF.cxx.

References fTimestamps.

28  {
29  return fTimestamps;
30 }
std::pair< float, float > fTimestamps
Definition: ToF.h:43

Member Data Documentation

float brb::ToF::fTime
private

Definition at line 42 of file ToF.h.

Referenced by SetTime(), Time(), and ToF().

std::pair<float, float> brb::ToF::fTimestamps
private

Definition at line 43 of file ToF.h.

Referenced by SetTimestamp(), SetTimestamps(), Timestamp(), Timestamps(), and ToF().


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