ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1CTP Namespace Reference

Classes

class  BunchGroupTrigger
 Class for simulating the internal bunch group trigger. More...
class  CTPSimulation
 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
const std::string convertToHex (const uint32_t word)
 helper function to dump a number in hex format
const std::string convertToHex (const std::vector< uint32_t > &words)
 helper function to dump a vector of numbers in hex format
std::ostream & operator<< (std::ostream &os, const std::vector< unsigned int > &rhs)
 operator to dump a vector of numbers

Variables

static const std::string DEFAULT_CTPSLinkLocation = "CTPSLinkLocation"
 default StoreGate location for CTPSLink
static const std::string DEFAULT_CTPSLinkLocation_Rerun = "CTPSLinkLocation_Rerun"
 default StoreGate location for CTPSLink for simulation rerun on data
static const std::string DEFAULT_RDOOutputLocation = "CTP_RDO"
 location of CTP RDO output in StoreGate
static const std::string DEFAULT_RDOOutputLocation_Rerun = "CTP_RDO_Rerun"
 location of CTP RDO output in StoreGate for simulation rerun on data
static const std::string DEFAULT_CTPResultOutputLocation = "CTPResult"
 location of CTPResult output in StoreGate
static const std::string DEFAULT_CTPResultOutputLocation_Rerun = "CTPResult_Rerun"
 location of CTPResult output in StoreGate for simulation rerun on data

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 117 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 }
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11

◆ 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,
const 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 }

Variable Documentation

◆ DEFAULT_CTPResultOutputLocation

const std::string LVL1CTP::DEFAULT_CTPResultOutputLocation = "CTPResult"
static

location of CTPResult output in StoreGate

Definition at line 66 of file TrigT1StoreGateKeys.h.

◆ DEFAULT_CTPResultOutputLocation_Rerun

const std::string LVL1CTP::DEFAULT_CTPResultOutputLocation_Rerun = "CTPResult_Rerun"
static

location of CTPResult output in StoreGate for simulation rerun on data

Definition at line 68 of file TrigT1StoreGateKeys.h.

◆ DEFAULT_CTPSLinkLocation

const std::string LVL1CTP::DEFAULT_CTPSLinkLocation = "CTPSLinkLocation"
static

default StoreGate location for CTPSLink

Definition at line 57 of file TrigT1StoreGateKeys.h.

◆ DEFAULT_CTPSLinkLocation_Rerun

const std::string LVL1CTP::DEFAULT_CTPSLinkLocation_Rerun = "CTPSLinkLocation_Rerun"
static

default StoreGate location for CTPSLink for simulation rerun on data

Definition at line 59 of file TrigT1StoreGateKeys.h.

◆ DEFAULT_RDOOutputLocation

const std::string LVL1CTP::DEFAULT_RDOOutputLocation = "CTP_RDO"
static

location of CTP RDO output in StoreGate

Definition at line 62 of file TrigT1StoreGateKeys.h.

◆ DEFAULT_RDOOutputLocation_Rerun

const std::string LVL1CTP::DEFAULT_RDOOutputLocation_Rerun = "CTP_RDO_Rerun"
static

location of CTP RDO output in StoreGate for simulation rerun on data

Definition at line 64 of file TrigT1StoreGateKeys.h.