ATLAS Offline Software
Classes | Typedefs | Functions
LVL1CTP Namespace Reference

Classes

class  BunchGroupTrigger
 Class for simulating the internal bunch group trigger. More...
 
class  CTPSimulation
 
class  CTPSLink
 CTP RoI output. More...
 
class  CTPTriggerItem
 Class storing information helping to make the CTP decision. More...
 
class  CTPTriggerThreshold
 Helper class holding trigger threshold multiplicity. More...
 
class  CTPUtil
 Class grouping useful functions together. More...
 
class  ISpecialTrigger
 
class  ItemMap
 Map associating item name to CTPTriggerItem objects. More...
 
class  Lvl1Item
 
class  Lvl1Result
 
class  Lvl1Result_p1
 
class  Lvl1Result_p2
 
class  Lvl1ResultCnv_p1
 
class  Lvl1ResultCnv_p2
 
class  RandomTrigger
 
class  ResultBuilder
 Class used to create the CTP output (RDO, SLink and TriggerInfo) More...
 
class  SlinkWord
 Simple wrapper around a 32-bit integer. More...
 
class  ThresholdMap
 Access to TrigConf::CTPTriggerThreshold by name. More...
 
class  TrigT1CTPDefs
 Class holding common constants for the CTP simulation. More...
 

Typedefs

typedef std::vector< uint32_t >(ResultBuilder::* Result) () const
 
typedef std::map< std::string, const ISpecialTrigger * > InternalTriggerMap
 

Functions

const std::string convertRawCTPData (const std::vector< uint32_t > &data, const bool longFormat=false, int ctpVersionNumber=4)
 helper function to dump raw CTP content More...
 
const std::string convertToHex (const uint32_t word)
 helper function to dump a number in hex format More...
 
const std::string convertToHex (const std::vector< uint32_t > &words)
 helper function to dump a vector of numbers in hex format More...
 
std::ostream & operator<< (std::ostream &os, std::vector< unsigned int > rhs)
 operator to dump a vector of numbers More...
 

Typedef Documentation

◆ InternalTriggerMap

typedef std::map< std::string, const ISpecialTrigger*> LVL1CTP::InternalTriggerMap

Definition at line 17 of file SpecialTrigger.h.

◆ Result

typedef std::vector<uint32_t>(ResultBuilder::* LVL1CTP::Result) () const

Definition at line 99 of file ResultBuilder.h.

Function Documentation

◆ convertRawCTPData()

const std::string LVL1CTP::convertRawCTPData ( const std::vector< uint32_t > &  data,
const bool  longFormat,
int  ctpFormatVersionNumber 
)

helper function to dump raw CTP content

Definition at line 13 of file TrigT1CTPDefs.cxx.

14  {
15  std::ostringstream s;
16 
17 
18  CTPdataformatVersion ctpVersion(ctpFormatVersionNumber);
19 
20  // time is only stored once for the whole fragment
21  for (size_t i(0); (i < ctpVersion.getNumberTimeWords() ) && (i < data.size()); ++i) {
22  if (i == 0 || longFormat) s << "\nTime";
23  if (longFormat) s << std::setw(1) << i;
24  s << " " << std::setw(8) << data[i];
25  if (longFormat) s << std::endl;
26  }
27 
28  // return if data content is too short
29  if (data.size() < 2) return s.str();
30 
31 
32  // loop over the rest of the data fragment
33  for (unsigned int k(0); k < (data.size()-2)/ctpVersion.getDAQwordsPerBunch(); ++k) {
34 
35  // print single fragment
36 
37  // PIT
38  for (size_t i(0), p(k*ctpVersion.getDAQwordsPerBunch() + ctpVersion.getTIPpos());
39  (i < ctpVersion.getTIPwords() ) && (p < data.size());
40  ++i, ++p) {
41  if (i == 0 || longFormat) s << "\nTIP";
42  if (longFormat) s << std::setw(1) << i;
43  s << " 0x" << std::hex << std::setw(8) << std::setfill( '0' ) << data[p] << std::dec << std::setfill(' ');
44  if (longFormat) s << std::endl;
45  }
46 
47  // TBP
48  for (size_t i(0), p(k*ctpVersion.getDAQwordsPerBunch() + ctpVersion.getTBPpos());
49  (i < ctpVersion.getTBPwords() ) && (p < data.size());
50  ++i, ++p) {
51  if (i == 0 || longFormat) s << "\nTBP";
52  if (longFormat) s << std::setw(1) << i;
53  s << " 0x" << std::hex << std::setw(8) << std::setfill( '0' ) << data[p] << std::dec << std::setfill(' ');
54  if (longFormat) s << std::endl;
55  }
56 
57  // TAP
58  for (size_t i(0), p(k*ctpVersion.getDAQwordsPerBunch() + ctpVersion.getTAPpos());
59  (i < ctpVersion.getTAPwords() ) && (p < data.size());
60  ++i, ++p) {
61  if (i == 0 || longFormat) s << "\nTAP";
62  if (longFormat) s << std::setw(1) << i;
63  s << " 0x" << std::hex << std::setw(8) << std::setfill( '0' ) << data[p] << std::dec << std::setfill(' ');
64  if (longFormat) s << std::endl;
65  }
66 
67  // TAV
68  for (size_t i(0), p(k*ctpVersion.getDAQwordsPerBunch() + ctpVersion.getTAVpos());
69  (i < ctpVersion.getTAVwords() ) && (p < data.size());
70  ++i, ++p) {
71  if (i == 0 || longFormat) s << "\nTAV";
72  if (longFormat) s << std::setw(1) << i;
73  s << " 0x" << std::hex << std::setw(8) << std::setfill( '0' ) << data[p] << std::dec << std::setfill(' ');
74  if (longFormat) s << std::endl;
75  }
76 
77  }
78 
79  return s.str();
80  }

◆ convertToHex() [1/2]

const std::string LVL1CTP::convertToHex ( const std::vector< uint32_t > &  words)
inline

helper function to dump a vector of numbers in hex format

Definition at line 50 of file TrigT1CTPDefs.h.

51  {
52  std::ostringstream s;
53 
54  // switch to hex format
55  s << std::hex << std::setfill( '0' );
56 
57  if (words.size() > 0)
58  s << " 0x" << std::setw(8) << words[0];
59  for (size_t i(1); i < words.size(); ++i)
60  s << ", 0x" << std::setw(8) << words[i];
61 
62  // switch back to normal format
63  s << std::dec << std::setfill(' ');
64 
65  return s.str();
66  }

◆ convertToHex() [2/2]

const std::string LVL1CTP::convertToHex ( const uint32_t  word)
inline

helper function to dump a number in hex format

Definition at line 41 of file TrigT1CTPDefs.h.

42  {
43  std::ostringstream s;
44  s << " 0x" << std::hex << std::setw(8) << std::setfill( '0' ) << word;
45  // s << std::dec << std::setfill(' ');
46  return s.str();
47  }

◆ operator<<()

std::ostream& LVL1CTP::operator<< ( std::ostream &  os,
std::vector< unsigned int >  rhs 
)
inline

operator to dump a vector of numbers

Definition at line 69 of file TrigT1CTPDefs.h.

70  {
71  for (std::vector<unsigned int>::const_iterator i(rhs.begin()); i != rhs.end(); ++i) {
72  os << " " << *i;
73  }
74 
75  return os;
76  }
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
lumiFormat.i
int i
Definition: lumiFormat.py:92
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
checkFileSG.words
words
Definition: checkFileSG.py:76
fitman.k
k
Definition: fitman.py:528