ATLAS Offline Software
Loading...
Searching...
No Matches
AFP_ToFRawData_v2 Class Reference

Class representing data record for time-of-flight detectors. More...

#include <AFP_ToFRawData_v2.h>

Inheritance diagram for AFP_ToFRawData_v2:
Collaboration diagram for AFP_ToFRawData_v2:

Public Member Functions

 AFP_ToFRawData_v2 ()
 AFP_ToFRawData_v2 (const AFP_ToFRawData_v2 &copy)
uint16_t header () const
 Value of 9-11 (HPTDC) or 9 (picoTDC) most significant bit(s)
void setHeader (const uint16_t header)
uint16_t edge () const
 Value of 12 most significant bit.
void setEdge (const uint16_t edge)
uint16_t channel () const
 Value of 13-17 (HPTDC) or 14-19 (picoTDC) most significant bits.
void setChannel (const uint16_t channel)
void setTrigger ()
bool isTrigger () const
uint32_t time () const
 Value of 10 (HPTDC) or 13 (picoTDC) least significant bits for time; value of 14-16 (picoTDC) most significant bits for delayed trigger.
void setTime (const uint32_t time)
uint32_t pulseLength () const
 Value of 11-16 (HPTDC) or 13 (picoTDC) least significant bits for signal lenght; value of 16 (picoTDC) least significant bits for trigger pattern.
void setPulseLength (const uint32_t pulseLength)
uint16_t delayedTrigger () const
 Value of 10 (HPTDC) or 13 (picoTDC) least significant bits for time; value of 14-16 (picoTDC) most significant bits for delayed trigger.
void setDelayedTrigger (const uint32_t delayedTrigger)
uint32_t triggerPattern () const
 Value of 11-16 (HPTDC) or 13 (picoTDC) least significant bits for signal lenght; value of 16 (picoTDC) least significant bits for trigger pattern.
void setTriggerPattern (const uint32_t triggerPattern)
uint16_t hitDiscConfig () const
 Value of third and forth most significant bits.
void setHitDiscConfig (const uint16_t hitDiscConfig)
uint16_t link () const
void setLink (const uint16_t outlink)
bool msgLvl (const MSG::Level lvl) const
 Test the output level.
MsgStream & msg () const
 The standard message stream.
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream.
void setLevel (MSG::Level lvl)
 Change the current logging level.

Private Member Functions

void initMessaging () const
 Initialize our message level and MessageSvc.

Private Attributes

uint16_t m_header = 0U
 Value of 9-11 (HPTDC) or 9 (picoTDC) most significant bit(s)
uint16_t m_edge = 0U
 Value of 12 most significant bit.
uint16_t m_channel = 0U
 Value of 13-17 (HPTDC) or 14-19 (picoTDC) most significant bits.
const uint16_t m_triggerChannel = 65535
 Special value for channel number, denoting the entry is actually a trigger word.
uint32_t m_time_or_delayedTrigger = 0U
 Value of 10 (HPTDC) or 13 (picoTDC) least significant bits for time; value of 14-16 (picoTDC) most significant bits for delayed trigger.
uint32_t m_pulseLength_or_triggerPattern = 0U
 Value of 11-16 (HPTDC) or 13 (picoTDC) least significant bits for signal lenght; value of 16 (picoTDC) least significant bits for trigger pattern.
uint16_t m_hitDiscConfig = 0
 Value of third and forth most significant bits.
uint16_t m_link = 0
 Values of the 5-8 most significant bits.
std::string m_nm
 Message source name.
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels)
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer.
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level.
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging)

Detailed Description

Class representing data record for time-of-flight detectors.

Documentation of the format is available in the twiki page: https://twiki.cern.ch/twiki/bin/view/Atlas/AFPHPTDC#Data_Encoding

Definition at line 21 of file AFP_ToFRawData_v2.h.

Constructor & Destructor Documentation

◆ AFP_ToFRawData_v2() [1/2]

AFP_ToFRawData_v2::AFP_ToFRawData_v2 ( )

Definition at line 9 of file AFP_ToFRawData_v2.cxx.

9 : AFP_RawDataCommonHead(),
10 AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >("MessageSvc"),"AFP_ToFRawData_v2")
11{}
AthMessaging()
Default constructor:

◆ AFP_ToFRawData_v2() [2/2]

AFP_ToFRawData_v2::AFP_ToFRawData_v2 ( const AFP_ToFRawData_v2 & copy)

Definition at line 14 of file AFP_ToFRawData_v2.cxx.

14 : AFP_RawDataCommonHead(copy),
15 AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >("MessageSvc"),"AFP_ToFRawData_v2")
16{
17 m_header=copy.m_header;
18 m_edge=copy.m_edge;
19 m_channel=copy.m_channel;
20 m_time_or_delayedTrigger=copy.m_time_or_delayedTrigger;
21 m_pulseLength_or_triggerPattern=copy.m_pulseLength_or_triggerPattern;
22}
uint32_t m_pulseLength_or_triggerPattern
Value of 11-16 (HPTDC) or 13 (picoTDC) least significant bits for signal lenght; value of 16 (picoTDC...
uint32_t m_time_or_delayedTrigger
Value of 10 (HPTDC) or 13 (picoTDC) least significant bits for time; value of 14-16 (picoTDC) most si...
uint16_t m_edge
Value of 12 most significant bit.
uint16_t m_channel
Value of 13-17 (HPTDC) or 14-19 (picoTDC) most significant bits.
uint16_t m_header
Value of 9-11 (HPTDC) or 9 (picoTDC) most significant bit(s)
bool copy
Definition calibdata.py:26

Member Function Documentation

◆ channel()

uint16_t AFP_ToFRawData_v2::channel ( ) const
inline

Value of 13-17 (HPTDC) or 14-19 (picoTDC) most significant bits.

In the following records: HPTDC 2017: xxxx xxxx xxxx CCCC xxxx xxxx xxxx xxxx picoTDC #1+#2: xxxx xxxx xxxx xCCC CCCx xxxx xxxx xxxx it means bits marked with C. Contains information about channel of the time measurement.

Definition at line 38 of file AFP_ToFRawData_v2.h.

38{return m_channel;}

◆ delayedTrigger()

uint16_t AFP_ToFRawData_v2::delayedTrigger ( ) const

Value of 10 (HPTDC) or 13 (picoTDC) least significant bits for time; value of 14-16 (picoTDC) most significant bits for delayed trigger.

In the following records: HPTDC 2017: xxxx xxxx xxxx xxxx xxxx xxtt tttt tttt picoTDC #1: xxxx xxxx xxxx xxxx xxxt tttt tttt tttt Trigger: xxxx xxxx xxxx xTTT xxxx xxxx xxxx xxxx it means bits marked with t or T. Contains information about time (t) or about delayed trigger (T).

Definition at line 69 of file AFP_ToFRawData_v2.cxx.

70{
71 if(!this->isTrigger())
72 {
73 ATH_MSG_WARNING("asking for delayedTrigger but this is not a trigger word, returning 0");
74 return 0;
75 }
77}
#define ATH_MSG_WARNING(x)

◆ edge()

uint16_t AFP_ToFRawData_v2::edge ( ) const
inline

Value of 12 most significant bit.

In the following record: xxxx xxxx xxxE xxxx xxxx xxxx xxxx xxxx it means bits marked with E. Contains information about signal beginning or end. Always set to 0 for picoTDC.

Definition at line 34 of file AFP_ToFRawData_v2.h.

34{return m_edge;}

◆ header()

uint16_t AFP_ToFRawData_v2::header ( ) const
inline

Value of 9-11 (HPTDC) or 9 (picoTDC) most significant bit(s)

In the following records: HPTDC 2017: xxxx xxxx hhhx xxxx xxxx xxxx xxxx xxxx picoTDC: xxxx xxxx hxxx xxxx xxxx xxxx xxxx xxxx it means bits marked with h. Contains information about time-of-flight data type or error:

  • value 0 means HPTDC header
  • value 1 meas picoTDC header
  • value 2 means hit measurement (only HPTDC)
  • value 3 is per event error (only HPTDC)

Definition at line 30 of file AFP_ToFRawData_v2.h.

30{return m_header;}

◆ hitDiscConfig()

uint16_t AFP_RawDataCommonHead::hitDiscConfig ( ) const
inlineinherited

Value of third and forth most significant bits.

In the following record: xxdd xxxx xxxx xxxx xxxx xxxx xxxx xxxx it means bits marked with d.

  • values 0-2 are used by silicon detectors
  • value 3 represent time-of-flight detector

Definition at line 20 of file AFP_RawDataCommonHead.h.

20{return m_hitDiscConfig;};
uint16_t m_hitDiscConfig
Value of third and forth most significant bits.

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40{
42 // If user did not set an explicit level, set a default
43 if (m_lvl == MSG::NIL) {
44 m_lvl = m_imsg ?
45 static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
46 MSG::INFO;
47 }
48}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)

◆ isTrigger()

bool AFP_ToFRawData_v2::isTrigger ( ) const
inline

Definition at line 41 of file AFP_ToFRawData_v2.h.

const uint16_t m_triggerChannel
Special value for channel number, denoting the entry is actually a trigger word.

◆ link()

uint16_t AFP_RawDataCommonHead::link ( ) const
inlineinherited

Definition at line 23 of file AFP_RawDataCommonHead.h.

23{return m_link;};
uint16_t m_link
Values of the 5-8 most significant bits.

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 163 of file AthMessaging.h.

164{
165 MsgStream* ms = m_msg_tls.get();
166 if (!ms) {
167 if (!m_initialized.test_and_set()) initMessaging();
168 ms = new MsgStream(m_imsg,m_nm);
169 m_msg_tls.reset( ms );
170 }
171
172 ms->setLevel (m_lvl);
173 return *ms;
174}
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
void initMessaging() const
Initialize our message level and MessageSvc.

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 178 of file AthMessaging.h.

179{ return msg() << lvl; }
MsgStream & msg() const
The standard message stream.

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 151 of file AthMessaging.h.

152{
153 if (m_lvl <= lvl) {
154 msg() << lvl;
155 return true;
156 } else {
157 return false;
158 }
159}

◆ pulseLength()

uint32_t AFP_ToFRawData_v2::pulseLength ( ) const

Value of 11-16 (HPTDC) or 13 (picoTDC) least significant bits for signal lenght; value of 16 (picoTDC) least significant bits for trigger pattern.

In the following record: HPTDC 2017: xxxx xxxx xxxx xxxx LLLL LLxx xxxx xxxx picoTDC #2: xxxx xxxx xxxx xxxx xxxx LLLL LLLL LLLL Trigger: xxxx xxxx xxxx xxxx PPPP PPPP PPPP PPPP it means bits marked with L or P. Contains information how long signal from the bar was above threshold (L) or information about the trigger pattern (P).

Definition at line 47 of file AFP_ToFRawData_v2.cxx.

48{
49 if(this->isTrigger())
50 {
51 ATH_MSG_WARNING("asking for pulseLength but this is a trigger word, returning 0");
52 return 0;
53 }
55}

◆ setChannel()

void AFP_ToFRawData_v2::setChannel ( const uint16_t channel)
inline

Definition at line 39 of file AFP_ToFRawData_v2.h.

uint16_t channel() const
Value of 13-17 (HPTDC) or 14-19 (picoTDC) most significant bits.

◆ setDelayedTrigger()

void AFP_ToFRawData_v2::setDelayedTrigger ( const uint32_t delayedTrigger)

Definition at line 80 of file AFP_ToFRawData_v2.cxx.

81{
82 if(!this->isTrigger())
83 {
84 ATH_MSG_WARNING("trying to set delayedTrigger but this is not a trigger word, not setting anything");
85 return;
86 }
88}
uint16_t delayedTrigger() const
Value of 10 (HPTDC) or 13 (picoTDC) least significant bits for time; value of 14-16 (picoTDC) most si...

◆ setEdge()

void AFP_ToFRawData_v2::setEdge ( const uint16_t edge)
inline

Definition at line 35 of file AFP_ToFRawData_v2.h.

35{m_edge = edge;}
uint16_t edge() const
Value of 12 most significant bit.

◆ setHeader()

void AFP_ToFRawData_v2::setHeader ( const uint16_t header)
inline

Definition at line 31 of file AFP_ToFRawData_v2.h.

uint16_t header() const
Value of 9-11 (HPTDC) or 9 (picoTDC) most significant bit(s)

◆ setHitDiscConfig()

void AFP_RawDataCommonHead::setHitDiscConfig ( const uint16_t hitDiscConfig)
inlineinherited

Definition at line 21 of file AFP_RawDataCommonHead.h.

uint16_t hitDiscConfig() const
Value of third and forth most significant bits.

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29{
30 m_lvl = lvl;
31}

◆ setLink()

void AFP_RawDataCommonHead::setLink ( const uint16_t outlink)
inlineinherited

Definition at line 24 of file AFP_RawDataCommonHead.h.

24{m_link = outlink;}

◆ setPulseLength()

void AFP_ToFRawData_v2::setPulseLength ( const uint32_t pulseLength)

Definition at line 58 of file AFP_ToFRawData_v2.cxx.

59{
60 if(this->isTrigger())
61 {
62 ATH_MSG_WARNING("trying to set pulseLength but this is a trigger word, not setting anything");
63 return;
64 }
66}
uint32_t pulseLength() const
Value of 11-16 (HPTDC) or 13 (picoTDC) least significant bits for signal lenght; value of 16 (picoTDC...

◆ setTime()

void AFP_ToFRawData_v2::setTime ( const uint32_t time)

Definition at line 36 of file AFP_ToFRawData_v2.cxx.

37{
38 if(this->isTrigger())
39 {
40 ATH_MSG_WARNING("trying to set time but this is a trigger word, not setting anything");
41 return;
42 }
44}
uint32_t time() const
Value of 10 (HPTDC) or 13 (picoTDC) least significant bits for time; value of 14-16 (picoTDC) most si...

◆ setTrigger()

void AFP_ToFRawData_v2::setTrigger ( )
inline

Definition at line 40 of file AFP_ToFRawData_v2.h.

◆ setTriggerPattern()

void AFP_ToFRawData_v2::setTriggerPattern ( const uint32_t triggerPattern)

Definition at line 102 of file AFP_ToFRawData_v2.cxx.

103{
104 if(!this->isTrigger())
105 {
106 ATH_MSG_WARNING("trying to set triggerPattern but this is not a trigger word, not setting anything");
107 return;
108 }
110}
uint32_t triggerPattern() const
Value of 11-16 (HPTDC) or 13 (picoTDC) least significant bits for signal lenght; value of 16 (picoTDC...

◆ time()

uint32_t AFP_ToFRawData_v2::time ( ) const

Value of 10 (HPTDC) or 13 (picoTDC) least significant bits for time; value of 14-16 (picoTDC) most significant bits for delayed trigger.

In the following records: HPTDC 2017: xxxx xxxx xxxx xxxx xxxx xxtt tttt tttt picoTDC #1: xxxx xxxx xxxx xxxx xxxt tttt tttt tttt Trigger: xxxx xxxx xxxx xTTT xxxx xxxx xxxx xxxx it means bits marked with t or T. Contains information about time (t) or about delayed trigger (T).

Definition at line 25 of file AFP_ToFRawData_v2.cxx.

26{
27 if(this->isTrigger())
28 {
29 ATH_MSG_WARNING("asking for time but this is a trigger word, returning 0");
30 return 0;
31 }
33}

◆ triggerPattern()

uint32_t AFP_ToFRawData_v2::triggerPattern ( ) const

Value of 11-16 (HPTDC) or 13 (picoTDC) least significant bits for signal lenght; value of 16 (picoTDC) least significant bits for trigger pattern.

In the following record: HPTDC 2017: xxxx xxxx xxxx xxxx LLLL LLxx xxxx xxxx picoTDC #2: xxxx xxxx xxxx xxxx xxxx LLLL LLLL LLLL Trigger: xxxx xxxx xxxx xxxx PPPP PPPP PPPP PPPP it means bits marked with L or P. Contains information how long signal from the bar was above threshold (L) or information about the trigger pattern (P).

Definition at line 91 of file AFP_ToFRawData_v2.cxx.

92{
93 if(!this->isTrigger())
94 {
95 ATH_MSG_WARNING("asking for triggerPattern but this is not a trigger word, returning 0");
96 return 0;
97 }
99}

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_channel

uint16_t AFP_ToFRawData_v2::m_channel = 0U
private

Value of 13-17 (HPTDC) or 14-19 (picoTDC) most significant bits.

In the following records: HPTDC 2017: xxxx xxxx xxxx CCCC xxxx xxxx xxxx xxxx picoTDC #1+#2: xxxx xxxx xxxx xCCC CCCx xxxx xxxx xxxx it means bits marked with C. Contains information about channel of the time measurement.

Definition at line 86 of file AFP_ToFRawData_v2.h.

◆ m_edge

uint16_t AFP_ToFRawData_v2::m_edge = 0U
private

Value of 12 most significant bit.

In the following record: xxxx xxxx xxxE xxxx xxxx xxxx xxxx xxxx it means bits marked with E. Contains information about signal beginning or end. Always set to 0 for picoTDC.

Definition at line 77 of file AFP_ToFRawData_v2.h.

◆ m_header

uint16_t AFP_ToFRawData_v2::m_header = 0U
private

Value of 9-11 (HPTDC) or 9 (picoTDC) most significant bit(s)

In the following records: HPTDC 2017: xxxx xxxx hhhx xxxx xxxx xxxx xxxx xxxx picoTDC: xxxx xxxx hxxx xxxx xxxx xxxx xxxx xxxx it means bits marked with h. Contains information about time-of-flight data type or error:

  • value 0 means HPTDC header
  • value 1 meas picoTDC header
  • value 2 means hit measurement (only HPTDC)
  • value 3 is per event error (only HPTDC)

Definition at line 70 of file AFP_ToFRawData_v2.h.

◆ m_hitDiscConfig

uint16_t AFP_RawDataCommonHead::m_hitDiscConfig = 0
privateinherited

Value of third and forth most significant bits.

In the following record: xxdd xxxx xxxx xxxx xxxx xxxx xxxx xxxx it means bits marked with d.

  • values 0-2 are used by silicon detectors
  • value 3 represent time-of-flight detector

Definition at line 33 of file AFP_RawDataCommonHead.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

135{ nullptr };

◆ m_link

uint16_t AFP_RawDataCommonHead::m_link = 0
privateinherited

Values of the 5-8 most significant bits.

In the following record: xxxx LLLL xxxx xxxx xxxx xxxx xxxx xxxx it means bits marked with L.

Definition at line 39 of file AFP_RawDataCommonHead.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

138{ MSG::NIL };

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels)

Definition at line 132 of file AthMessaging.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_pulseLength_or_triggerPattern

uint32_t AFP_ToFRawData_v2::m_pulseLength_or_triggerPattern = 0U
private

Value of 11-16 (HPTDC) or 13 (picoTDC) least significant bits for signal lenght; value of 16 (picoTDC) least significant bits for trigger pattern.

In the following record: HPTDC 2017: xxxx xxxx xxxx xxxx LLLL LLxx xxxx xxxx picoTDC #2: xxxx xxxx xxxx xxxx xxxx LLLL LLLL LLLL Trigger: xxxx xxxx xxxx xxxx PPPP PPPP PPPP PPPP it means bits marked with L or P. Contains information how long signal from the bar was above threshold (L) or information about the trigger pattern (P).

Definition at line 110 of file AFP_ToFRawData_v2.h.

◆ m_time_or_delayedTrigger

uint32_t AFP_ToFRawData_v2::m_time_or_delayedTrigger = 0U
private

Value of 10 (HPTDC) or 13 (picoTDC) least significant bits for time; value of 14-16 (picoTDC) most significant bits for delayed trigger.

In the following records: HPTDC 2017: xxxx xxxx xxxx xxxx xxxx xxtt tttt tttt picoTDC #1: xxxx xxxx xxxx xxxx xxxt tttt tttt tttt Trigger: xxxx xxxx xxxx xTTT xxxx xxxx xxxx xxxx it means bits marked with t or T. Contains information about time (t) or about delayed trigger (T).

Definition at line 100 of file AFP_ToFRawData_v2.h.

◆ m_triggerChannel

const uint16_t AFP_ToFRawData_v2::m_triggerChannel = 65535
private

Special value for channel number, denoting the entry is actually a trigger word.

Data cannot have this channel number as there are no more than 6 bit, meaning maximum channel number is 63

Definition at line 91 of file AFP_ToFRawData_v2.h.


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