ATLAS Offline Software
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
ROIB::Header Class Reference

Header models the LVL1 ROD Header. More...

#include <Header.h>

Collaboration diagram for ROIB::Header:

Public Member Functions

 Header ()
 default constructor: empty object More...
 
 Header (std::vector< uint32_t > &&v)
 constructor which fully specifies the initialiser values More...
 
 Header (Header &&) noexcept=default
 
 Header (const Header &)=default
 
Headeroperator= (Header &&) noexcept=default
 
Headeroperator= (const Header &)=default
 
 Header (const uint32_t, const uint32_t, const uint32_t)
 constructor specifying subdet ID, event ID and version More...
 
 Header (const uint32_t, const uint32_t)
 constructor specifying subdet ID, event ID More...
 
 Header (const uint32_t)
 constructor specifying subdet ID only More...
 
 ~Header ()=default
 empty default desctructor More...
 
const std::vector< uint32_t > & header () const
 get full header More...
 
int size () const
 get header(data) size More...
 
uint32_t headerMarker () const
 get header marker word More...
 
uint32_t headerSize () const
 get number of words in header More...
 
uint32_t formatVersion () const
 get version of header format More...
 
uint32_t sourceID () const
 get sub detector source ID More...
 
uint32_t runNumber () const
 get run number More...
 
uint32_t L1ID () const
 get extended LVL1 ID More...
 
uint32_t BCID () const
 get bunch crossing ID More...
 
uint32_t triggerType () const
 get LVL1 trigger type More...
 
uint32_t eventType () const
 get LVL1 event type More...
 
void setRunNumber (const uint32_t)
 set run number More...
 
void setL1ID (const uint32_t)
 set extended LVL1 ID More...
 
void setBCID (const uint32_t i)
 set bunch crossing ID More...
 
void setTriggerType (const uint32_t i)
 set LVL1 trigger type More...
 
void setEventType (const uint32_t i)
 set LVL1 event type More...
 
const std::string dump () const
 dump raw object content to string More...
 
const std::string print (const bool longFormat=false) const
 print object content in a human readable format to string More...
 
void dumpData () const
 print object content to default message stream More...
 
void dumpData (MsgStream &) const
 print object content to given message stream More...
 

Static Public Attributes

static constexpr unsigned int wordsPerHeader = 8
 a ROD header as used in the LVL1 has 8 words, not counting the one hardware word in the beginning More...
 

Private Attributes

std::vector< uint32_t > m_header
 vector of unsigned ints - the only data member More...
 

Detailed Description

Header models the LVL1 ROD Header.

   Header is a class equivalent to the ROD header 
   from the eformat lib, just much simpler and adapted 
   to the LVL1 needs.
See also
ROIB::Header
Author
Thomas Schoerner-Sadenius thoma.nosp@m.s.sc.nosp@m.hoern.nosp@m.er@c.nosp@m.ern.c.nosp@m.h
Version
$Id: Header.h,v 1.11 2008-12-18 13:35:00 dquarrie Exp $

Definition at line 37 of file TrigT1Result/TrigT1Result/Header.h.

Constructor & Destructor Documentation

◆ Header() [1/7]

ROIB::Header::Header ( )
inline

default constructor: empty object

Definition at line 46 of file TrigT1Result/TrigT1Result/Header.h.

47  : m_header() {}

◆ Header() [2/7]

ROIB::Header::Header ( std::vector< uint32_t > &&  v)
inline

constructor which fully specifies the initialiser values

Definition at line 50 of file TrigT1Result/TrigT1Result/Header.h.

51  : m_header( std::move(v) ) {}

◆ Header() [3/7]

ROIB::Header::Header ( Header &&  )
defaultnoexcept

◆ Header() [4/7]

ROIB::Header::Header ( const Header )
default

◆ Header() [5/7]

ROIB::Header::Header ( const uint32_t  i1,
const uint32_t  i2,
const uint32_t  i3 
)

constructor specifying subdet ID, event ID and version

Definition at line 26 of file TrigT1Result/src/Header.cxx.

26  {
27 
28  m_header.push_back( eformat::ROD ); // start of header marker
29  m_header.push_back( 8 ); // header size xxx needs update to adjusted
30  m_header.push_back( i3 ); // format version number
31  m_header.push_back( i1 ); // source identifier
32  m_header.push_back( i2 ); // extended level 1 ID
33  m_header.push_back( 0 ); // bunch crossing ID
34  m_header.push_back( 0 ); // level 1 trigger type
35  m_header.push_back( 0 ); // detector event type
36 
37  // m_header.push_back( 0 ); // run number xxx needs to be added for eformat v3
38  }

◆ Header() [6/7]

ROIB::Header::Header ( const uint32_t  i1,
const uint32_t  i2 
)

constructor specifying subdet ID, event ID

Definition at line 40 of file TrigT1Result/src/Header.cxx.

40  {
41 
42  m_header.push_back( eformat::ROD ); // start of header marker
43  m_header.push_back( 8 ); // header size xxx needs update
44  m_header.push_back( eformat::DEFAULT_VERSION ); // format version number
45  m_header.push_back( i1 ); // source identifier
46  m_header.push_back( i2 ); // extended level 1 ID
47  m_header.push_back( 0 ); // bunch crossing ID
48  m_header.push_back( 0 ); // level 1 trigger type
49  m_header.push_back( 0 ); // detector event type
50 
51  // m_header.push_back( 0 ); // run number xxx needs to be added for eformat v3
52  }

◆ Header() [7/7]

ROIB::Header::Header ( const uint32_t  i)

constructor specifying subdet ID only

Constructor specifying subdet ID only.

Definition at line 55 of file TrigT1Result/src/Header.cxx.

55  {
56 
57  m_header.push_back( eformat::ROD ); // start of header marker
58  m_header.push_back( 8 ); // header size xxx needs update
59  m_header.push_back( eformat::DEFAULT_VERSION ); // format version number
60  m_header.push_back( i ); // source identifier
61  m_header.push_back( 0 ); // extended level 1 ID
62  m_header.push_back( 0 ); // bunch crossing ID
63  m_header.push_back( 0 ); // level 1 trigger type
64  m_header.push_back( 0 ); // detector event type
65 
66  // m_header.push_back( 0 ); // run number xxx needs to be added for eformat v3
67  }

◆ ~Header()

ROIB::Header::~Header ( )
default

empty default desctructor

Member Function Documentation

◆ BCID()

uint32_t ROIB::Header::BCID ( ) const

get bunch crossing ID

◆ dump()

const std::string ROIB::Header::dump ( ) const

dump raw object content to string

Definition at line 69 of file TrigT1Result/src/Header.cxx.

70  {
71  std::ostringstream s;
72 
73  for (std::vector< uint32_t >::size_type i(0); i < m_header.size(); ++i) {
75  }
76 
77  return s.str();
78  }

◆ dumpData() [1/2]

void ROIB::Header::dumpData ( ) const

print object content to default message stream

Definition at line 103 of file TrigT1Result/src/Header.cxx.

104  {
105  SmartIF<IMessageSvc> msgSvc{Gaudi::svcLocator()->service("MessageSvc")};
106  if ( !msgSvc ) {
107  return;
108  }
109  MsgStream log(msgSvc, "ROIB::Header");
110  dumpData(log);
111  }

◆ dumpData() [2/2]

void ROIB::Header::dumpData ( MsgStream &  log) const

print object content to given message stream

Definition at line 113 of file TrigT1Result/src/Header.cxx.

114  {
115  log << MSG::DEBUG << "*BEGIN* ROIB::Header" << endmsg;
116  log << MSG::DEBUG << "Header marker : " << MSG::hex << headerMarker() << MSG::dec << endmsg;
117  log << MSG::DEBUG << "Header size : " << headerSize() << endmsg;
118  log << MSG::DEBUG << "Source ID : 0x" << MSG::hex << sourceID() << MSG::dec << endmsg;
119  log << MSG::DEBUG << "Ext. LVL1 ID : " << L1ID() << endmsg;
120  log << MSG::DEBUG << "BCID : " << BCID() << endmsg;
121  log << MSG::DEBUG << "Trigger type : " << triggerType() << endmsg;
122  log << MSG::DEBUG << "Det. event type : " << eventType() << endmsg;
123  log << MSG::DEBUG << "*END* ROIB::Header" << endmsg;
124  }

◆ eventType()

uint32_t ROIB::Header::eventType ( ) const

get LVL1 event type

◆ formatVersion()

uint32_t ROIB::Header::formatVersion ( ) const

get version of header format

◆ header()

const std::vector<uint32_t>& ROIB::Header::header ( ) const

get full header

◆ headerMarker()

uint32_t ROIB::Header::headerMarker ( ) const

get header marker word

◆ headerSize()

uint32_t ROIB::Header::headerSize ( ) const

get number of words in header

◆ L1ID()

uint32_t ROIB::Header::L1ID ( ) const

get extended LVL1 ID

◆ operator=() [1/2]

Header& ROIB::Header::operator= ( const Header )
default

◆ operator=() [2/2]

Header& ROIB::Header::operator= ( Header &&  )
defaultnoexcept

◆ print()

const std::string ROIB::Header::print ( const bool  longFormat = false) const

print object content in a human readable format to string

Definition at line 80 of file TrigT1Result/src/Header.cxx.

81  {
82  std::ostringstream s;
83 
84  if (longFormat) {
85  s << "Size: " << size() << std::endl;
86  s << std::setw(2) << 0 << "Marker:" << headerMarker() << std::endl;
87  s << std::setw(2) << 1 << "Size:" << headerSize() << std::endl;
88  s << std::setw(2) << 2 << "Version:" << formatVersion() << std::endl;
89  s << std::setw(2) << 3 << "SourceID:" << sourceID() << std::endl;
90  s << std::setw(2) << 4 << "L1ID:" << L1ID() << std::endl;
91  s << std::setw(2) << 5 << "BCID:" << BCID() << std::endl;
92  s << std::setw(2) << 6 << "TriggerType:" << triggerType() << std::endl;
93  s << std::setw(2) << 7 << "EventType:" << eventType() << std::endl;
94  } else {
95  for (size_t i(0); i < m_header.size(); ++i) {
97  }
98  }
99 
100  return s.str();
101  }

◆ runNumber()

uint32_t ROIB::Header::runNumber ( ) const

get run number

◆ setBCID()

void ROIB::Header::setBCID ( const uint32_t  i)

set bunch crossing ID

◆ setEventType()

void ROIB::Header::setEventType ( const uint32_t  i)

set LVL1 event type

◆ setL1ID()

void ROIB::Header::setL1ID ( const uint32_t  )

set extended LVL1 ID

◆ setRunNumber()

void ROIB::Header::setRunNumber ( const uint32_t  )

set run number

◆ setTriggerType()

void ROIB::Header::setTriggerType ( const uint32_t  i)

set LVL1 trigger type

◆ size()

int ROIB::Header::size ( ) const

get header(data) size

◆ sourceID()

uint32_t ROIB::Header::sourceID ( ) const

get sub detector source ID

◆ triggerType()

uint32_t ROIB::Header::triggerType ( ) const

get LVL1 trigger type

Member Data Documentation

◆ m_header

std::vector< uint32_t > ROIB::Header::m_header
private

vector of unsigned ints - the only data member

Definition at line 120 of file TrigT1Result/TrigT1Result/Header.h.

◆ wordsPerHeader

constexpr unsigned int ROIB::Header::wordsPerHeader = 8
staticconstexpr

a ROD header as used in the LVL1 has 8 words, not counting the one hardware word in the beginning

number of words in header (Ref: ATL-DA-ES-0029)

Definition at line 43 of file TrigT1Result/TrigT1Result/Header.h.


The documentation for this class was generated from the following files:
ROIB::Header::sourceID
uint32_t sourceID() const
get sub detector source ID
ROIB::Header::eventType
uint32_t eventType() const
get LVL1 event type
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
ROIB::Header::formatVersion
uint32_t formatVersion() const
get version of header format
ROIB::Header::size
int size() const
get header(data) size
ROIB::Header::L1ID
uint32_t L1ID() const
get extended LVL1 ID
LVL1CTP::convertToHex
const std::string convertToHex(const uint32_t word)
helper function to dump a number in hex format
Definition: TrigT1CTPDefs.h:41
ROIB::Header::headerMarker
uint32_t headerMarker() const
get header marker word
ROIB::Header::BCID
uint32_t BCID() const
get bunch crossing ID
ROIB::Header::triggerType
uint32_t triggerType() const
get LVL1 trigger type
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
lumiFormat.i
int i
Definition: lumiFormat.py:85
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
python.PyAthena.v
v
Definition: PyAthena.py:154
ROIB::Header::m_header
std::vector< uint32_t > m_header
vector of unsigned ints - the only data member
Definition: TrigT1Result/TrigT1Result/Header.h:120
ROIB::Header::dumpData
void dumpData() const
print object content to default message stream
Definition: TrigT1Result/src/Header.cxx:103
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
ROIB::Header::headerSize
uint32_t headerSize() const
get number of words in header