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

Class holding the RoIs from the MuCTPI collected by the RoIB. More...

#include <MuCTPIResult.h>

Collaboration diagram for ROIB::MuCTPIResult:

Public Member Functions

 MuCTPIResult (Header &&head, Trailer &&trail, std::vector< MuCTPIRoI > &&roIVector)
 Constructor with header, trailer and RoI vector. More...
 
 MuCTPIResult ()
 Default constructor. More...
 
 ~MuCTPIResult ()=default
 Destructor. More...
 
 MuCTPIResult (MuCTPIResult &&) noexcept=default
 
MuCTPIResultoperator= (MuCTPIResult &&) noexcept=default
 
const Headerheader () const
 Member function returning the header. More...
 
const Trailertrailer () const
 Member function returning the trailer. More...
 
const std::vector< MuCTPIRoI > & roIVec () const
 Member function returning the RoI vector. 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
 Function dumping the stored information to the message stream. More...
 
void dumpData (MsgStream &) const
 Function dumping the stored information to the message stream. More...
 

Private Attributes

Header m_MuCTPIResultHeader
 Variable storing the header for the MuCTPI block. More...
 
Trailer m_MuCTPIResultTrailer
 Variable storing the trailer for the MuCTPI block. More...
 
std::vector< MuCTPIRoIm_MuCTPIResultRoIVec
 Variable storing the MuCTPI RoIs collected by the RoIB. More...
 

Detailed Description

Class holding the RoIs from the MuCTPI collected by the RoIB.

Date
2008-02-01 17:04:19
   The RoIBuilder receives input from the LVL1 calorimeter trigger,
   the CTP and the MuCTPI. In its output the RoIs coming from the
   MuCTPI are stored in one of these objects.
See also
ROIB::RoIBuilder
ROIB::RoIBResult
ROIB::Header
ROIB::Trailer
ROIB::MuCTPIRoI
Author
Thomas Schoerner-Sadenius thoma.nosp@m.s.sc.nosp@m.hoern.nosp@m.er@c.nosp@m.ern.c.nosp@m.h
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h
David Berge David.nosp@m..Ber.nosp@m.ge@ce.nosp@m.rn.c.nosp@m.h
Version
Revision
1.7

Definition at line 44 of file MuCTPIResult.h.

Constructor & Destructor Documentation

◆ MuCTPIResult() [1/3]

ROIB::MuCTPIResult::MuCTPIResult ( Header &&  head,
Trailer &&  trail,
std::vector< MuCTPIRoI > &&  roIVector 
)

Constructor with header, trailer and RoI vector.

This constructor is used by the RoIB simulation to create the object from the class.

Parameters
headReference to the header to be used by the object
trailReference to the trailer to be used by the object
roIVectorVector of muon RoIs collected from the MuCTPI

Definition at line 31 of file MuCTPIResult.cxx.

32  : m_MuCTPIResultHeader( std::move(head) ), m_MuCTPIResultTrailer( std::move(trail) ),
33  m_MuCTPIResultRoIVec( std::move(roIVector) ) {
34 
35  }

◆ MuCTPIResult() [2/3]

ROIB::MuCTPIResult::MuCTPIResult ( )

Default constructor.

Empty constructor needed by POOL to be able to stream the objects.

Definition at line 40 of file MuCTPIResult.cxx.

◆ ~MuCTPIResult()

ROIB::MuCTPIResult::~MuCTPIResult ( )
default

Destructor.

◆ MuCTPIResult() [3/3]

ROIB::MuCTPIResult::MuCTPIResult ( MuCTPIResult &&  )
defaultnoexcept

Member Function Documentation

◆ dump()

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

dump raw object content to string

method used for read/write testing and T/P separation

Definition at line 73 of file MuCTPIResult.cxx.

74  {
75  std::ostringstream s;
76 
77  s << " [" << this->header().dump() << "] ";
78  s << " [";
79  for (std::vector<MuCTPIRoI>::size_type i(0); i < roIVec().size(); ++i) {
80  s << LVL1CTP::convertToHex(roIVec()[i].roIWord());
81  }
82  s << "] ";
83  s << " [" << this->trailer().dump() << "] ";
84 
85  return s.str();
86  }

◆ dumpData() [1/2]

void ROIB::MuCTPIResult::dumpData ( ) const

Function dumping the stored information to the message stream.

This function is not responsible for actually printing the information, it just creates a message stream to print the information to with MuCTPIResult::dumpData(MsgStream&) const.

Definition at line 140 of file MuCTPIResult.cxx.

140  {
141 
142  IMessageSvc* msgSvc;
143  ISvcLocator* svcLoc = Gaudi::svcLocator( );
144  StatusCode sc = svcLoc->service( "MessageSvc", msgSvc );
145  if( sc.isFailure() ) {
146  return;
147  }
148  MsgStream log( msgSvc, "MuCTPIResult" );
149  dumpData( log );
150 
151  return;
152  }

◆ dumpData() [2/2]

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

Function dumping the stored information to the message stream.

Function printing the information stored in the object in an easy-to-read fashion.

It calls Header::dumpData(MsgStream&) const and Trailer::dumpData(MsgStream&) const to print their information as well.

Parameters
logA message stream to print the information to

Definition at line 161 of file MuCTPIResult.cxx.

161  {
162 
163  log << MSG::DEBUG << "*BEGIN* MuCTPIResult" << endmsg;
164 
166  int counter = 0;
167  std::vector< MuCTPIRoI >::const_iterator it = m_MuCTPIResultRoIVec.begin();
168  for( ; it != m_MuCTPIResultRoIVec.end(); ++it, ++counter ) {
169 
170  std::string loc = "UNDEFINED";
171  if( it->getSectorLocation() == MuCTPI_RDO::ENDCAP )
172  loc = "ENDCAP";
173  else if( it->getSectorLocation() == MuCTPI_RDO::FORWARD )
174  loc = "FORWARD";
175  else if( it->getSectorLocation() == MuCTPI_RDO::BARREL )
176  loc = "BARREL";
177 
178  log << MSG::DEBUG << "RoI word[" << counter << "] : 0x"
179  << MSG::hex << it->roIWord() << MSG::dec << endmsg;
180  log << MSG::DEBUG << "Threshold : pt" << it->pt() << endmsg;
181  log << MSG::DEBUG << "Sector location : " << loc << endmsg;
182  log << MSG::DEBUG << "Sector ID : " << it->getSectorID() << endmsg;
183  log << MSG::DEBUG << "Sector addr : 0x" << MSG::hex
184  << it->getSectorID() << MSG::dec << endmsg;
185  log << MSG::DEBUG << "Sector overflow : " << it->getSectorOverflow() << endmsg;
186  log << MSG::DEBUG << "RoI overflow : " << it->getRoiOverflow() << endmsg;
187  log << MSG::DEBUG << "RoI number : " << it->getRoiNumber() << endmsg;
188  //log << MSG::DEBUG << "IsHighestPt : " << it->getCandidateIsHighestPt() << endmsg;
189  log << MSG::DEBUG << "Overlap : " << it->getOverlapBits() << endmsg;
190 
191  }
193  log << MSG::DEBUG << "*END* MuCTPIResult" << endmsg;
194 
195  return;
196  }

◆ header()

const Header & ROIB::MuCTPIResult::header ( ) const

Member function returning the header.

Simply returning a constant reference to the variable.

Returns
Constant reference to the header

Definition at line 51 of file MuCTPIResult.cxx.

51  {
52  return m_MuCTPIResultHeader;
53  }

◆ operator=()

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

◆ print()

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

print object content in a human readable format to string

Definition at line 88 of file MuCTPIResult.cxx.

89  {
90  std::ostringstream s;
91 
92  s << "header [" << this->header().print(longFormat) << "] ";
93  if (longFormat) s << std::endl;
94 
95  for(std::vector< MuCTPIRoI >::size_type i(0); i < roIVec().size(); ++i ) {
96 
97  std::string loc = "UNDEFINED";
98  if( roIVec()[i].getSectorLocation() == MuCTPI_RDO::ENDCAP )
99  loc = "ENDCAP";
100  else if( roIVec()[i].getSectorLocation() == MuCTPI_RDO::FORWARD )
101  loc = "FORWARD";
102  else if( roIVec()[i].getSectorLocation() == MuCTPI_RDO::BARREL )
103  loc = "BARREL";
104 
105  if (i == 0 || longFormat) s << "data";
106  if (longFormat) s << "[" << std::setw(2) << i << "]";
107 
108  s << " [";
109  if (longFormat) s << LVL1CTP::convertToHex(roIVec()[i].roIWord());
110  if (longFormat) s << std::setw(12) << "\n Threshold: ";
111  s << " " << roIVec()[i].pt();
112  if (longFormat) s << std::setw(12) << "\n Sector location: ";
113  s << " " << loc;
114  if (longFormat) s << std::setw(12) << "\n Sector ID:";
115  s << " " << roIVec()[i].getSectorID();
116  if (longFormat) s << std::setw(12) << "\n Sector addr:";
117  s << " " << LVL1CTP::convertToHex(roIVec()[i].getSectorID());
118  if (longFormat) s << std::setw(12) << "\n Sector overflow:";
119  s << " " << roIVec()[i].getSectorOverflow();
120  if (longFormat) s << std::setw(12) << "\n RoI overflow:";
121  s << " " << roIVec()[i].getRoiOverflow();
122  if (longFormat) s << std::setw(12) << "\n RoI number:";
123  s << " " << roIVec()[i].getRoiNumber();
124  //if (longFormat) s << std::setw(12) << "\n IsHighestPt:";
125  //s << " " << roIVec()[i].getCandidateIsHighestPt();
126  if (longFormat) s << std::setw(12) << "\n Overlap:";
127  s << " " << roIVec()[i].getOverlapBits();
128  s << "] ";
129  }
130  s << "trailer [" << this->trailer().print(longFormat) << "] ";
131 
132  return s.str();
133  }

◆ roIVec()

const vector< MuCTPIRoI > & ROIB::MuCTPIResult::roIVec ( ) const

Member function returning the RoI vector.

Simply returning a constant reference to the variable.

Returns
Constant reference to the RoI vector

Definition at line 69 of file MuCTPIResult.cxx.

69  {
70  return m_MuCTPIResultRoIVec;
71  }

◆ trailer()

const Trailer & ROIB::MuCTPIResult::trailer ( ) const

Member function returning the trailer.

Simply returning a constant reference to the variable.

Returns
Constant reference to the trailer

Definition at line 60 of file MuCTPIResult.cxx.

60  {
61  return m_MuCTPIResultTrailer;
62  }

Member Data Documentation

◆ m_MuCTPIResultHeader

Header ROIB::MuCTPIResult::m_MuCTPIResultHeader
private

Variable storing the header for the MuCTPI block.

Definition at line 77 of file MuCTPIResult.h.

◆ m_MuCTPIResultRoIVec

std::vector< MuCTPIRoI > ROIB::MuCTPIResult::m_MuCTPIResultRoIVec
private

Variable storing the MuCTPI RoIs collected by the RoIB.

Definition at line 81 of file MuCTPIResult.h.

◆ m_MuCTPIResultTrailer

Trailer ROIB::MuCTPIResult::m_MuCTPIResultTrailer
private

Variable storing the trailer for the MuCTPI block.

Definition at line 79 of file MuCTPIResult.h.


The documentation for this class was generated from the following files:
ROIB::Trailer::dumpData
void dumpData() const
print object content to default message stream
Definition: Trailer.cxx:76
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
ROIB::MuCTPIResult::dumpData
void dumpData() const
Function dumping the stored information to the message stream.
Definition: MuCTPIResult.cxx:140
ROIB::Header::print
const std::string print(const bool longFormat=false) const
print object content in a human readable format to string
Definition: TrigT1Result/src/Header.cxx:80
ROIB::MuCTPIResult::m_MuCTPIResultRoIVec
std::vector< MuCTPIRoI > m_MuCTPIResultRoIVec
Variable storing the MuCTPI RoIs collected by the RoIB.
Definition: MuCTPIResult.h:81
ROIB::MuCTPIResult::m_MuCTPIResultTrailer
Trailer m_MuCTPIResultTrailer
Variable storing the trailer for the MuCTPI block.
Definition: MuCTPIResult.h:79
skel.it
it
Definition: skel.GENtoEVGEN.py:423
MuCTPI_RDO::BARREL
@ BARREL
Definition: MuCTPI_RDO.h:45
MuCTPI_RDO::FORWARD
@ FORWARD
Definition: MuCTPI_RDO.h:45
ROIB::MuCTPIResult::m_MuCTPIResultHeader
Header m_MuCTPIResultHeader
Variable storing the header for the MuCTPI block.
Definition: MuCTPIResult.h:77
ROIB::MuCTPIResult::header
const Header & header() const
Member function returning the header.
Definition: MuCTPIResult.cxx:51
LVL1CTP::convertToHex
const std::string convertToHex(const uint32_t word)
helper function to dump a number in hex format
Definition: TrigT1CTPDefs.h:41
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
MuCTPI_RDO::ENDCAP
@ ENDCAP
Definition: MuCTPI_RDO.h:45
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
ROIB::MuCTPIResult::trailer
const Trailer & trailer() const
Member function returning the trailer.
Definition: MuCTPIResult.cxx:60
ROIB::Trailer::print
const std::string print(const bool longFormat=false) const
print object content in a human readable format to string
Definition: Trailer.cxx:56
lumiFormat.i
int i
Definition: lumiFormat.py:92
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ROIB::Header::dump
const std::string dump() const
dump raw object content to string
Definition: TrigT1Result/src/Header.cxx:69
ROIB::Trailer::dump
const std::string dump() const
dump raw object content to string
Definition: Trailer.cxx:45
head
std::string head(std::string s, const std::string &pattern)
head of a string
Definition: computils.cxx:310
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::MuCTPIResult::roIVec
const std::vector< MuCTPIRoI > & roIVec() const
Member function returning the RoI vector.
Definition: MuCTPIResult.cxx:69
test_pyathena.counter
counter
Definition: test_pyathena.py:15