|
ATLAS Offline Software
|
Tool to perform ROB fragments to CPM towers, CPM hits and CMM-CP hits, and CP container to raw data conversions.
More...
#include <CpByteStreamV1Tool.h>
|
| CpByteStreamV1Tool (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~CpByteStreamV1Tool () |
|
virtual StatusCode | initialize () override |
|
StatusCode | convert (const std::string &sgKey, const IROBDataProviderSvc::VROBFRAG &robFrags, DataVector< LVL1::CPMTower > *ttCollection) const |
| Convert ROB fragments to CPM towers. More...
|
|
StatusCode | convert (const std::string &sgKey, const IROBDataProviderSvc::VROBFRAG &robFrags, DataVector< LVL1::CPMHits > *hitCollection) const |
| Convert ROB fragments to CPM hits. More...
|
|
StatusCode | convert (const std::string &sgKey, const IROBDataProviderSvc::VROBFRAG &robFrags, DataVector< LVL1::CMMCPHits > *hitCollection) const |
| Convert ROB fragments to CMM-CP hits. More...
|
|
StatusCode | convert (const LVL1::CPBSCollectionV1 *cp) const |
| Convert CP Container to bytestream. More...
|
|
const std::vector< uint32_t > & | sourceIDs () const |
| Return reference to vector with all possible Source Identifiers. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
std::vector< uint32_t > | makeSourceIDs () const |
| Create list of all source IDs. More...
|
|
StatusCode | convertBs (const std::string &sgKey, const IROBDataProviderSvc::VROBFRAG &robFrags, CpByteStreamToolData &data) const |
| Convert bytestream to given container type. More...
|
|
void | decodeCmmCp (CmmCpSubBlock *subBlock, int trigCmm, CmmHitsData &data, LocalData &ld) const |
| Unpack CMM-CP sub-block. More...
|
|
void | decodeCpm (CpmSubBlockV1 *subBlock, int trigCpm, CpByteStreamToolData &data, LocalData &ld) const |
| Unpack CPM sub-block. More...
|
|
const LVL1::CPMTower * | findCpmTower (unsigned int key, const ConstCpmTowerMap &ttMap) const |
| Find a CPM tower for given key. More...
|
|
LVL1::CPMTower * | findCpmTower (const CpmTowerData &data, unsigned int key) const |
|
const LVL1::CPMHits * | findCpmHits (int crate, int module, const ConstCpmHitsMap &hitsMap) const |
| Find CPM hits for given crate, module. More...
|
|
LVL1::CPMHits * | findCpmHits (const CpmHitsData &data, int crate, int module) const |
|
const LVL1::CMMCPHits * | findCmmCpHits (int crate, int dataID, const ConstCmmCpHitsMap &cmmHitsMap) const |
| Find CMM-CP hits for given crate, data ID. More...
|
|
LVL1::CMMCPHits * | findCmmCpHits (const CmmHitsData &data, int crate, int dataID) const |
|
void | setupCpmTowerMap (const CpmTowerCollection *ttCollection, ConstCpmTowerMap &ttMap, LVL1::TriggerTowerKey &towerKey) const |
| Set up CPM tower map. More...
|
|
void | setupCpmHitsMap (const CpmHitsCollection *hitCollection, ConstCpmHitsMap &hitsMap) const |
| Set up CPM hits map. More...
|
|
void | setupCmmCpHitsMap (const CmmCpHitsCollection *hitCollection, ConstCmmCpHitsMap &cmmHitsMap) const |
| Set up CMM-CP hits map. More...
|
|
bool | slinkSlices (int crate, int module, int modulesPerSlink, int ×lices, int &trigJem, const ConstCpmTowerMap &ttMap, const ConstCpmHitsMap &hitsMap, const ConstCmmCpHitsMap &cmmHitsMap, LVL1::TriggerTowerKey &towerKey) const |
| Get number of slices and triggered slice offset for next slink. More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Tool to perform ROB fragments to CPM towers, CPM hits and CMM-CP hits, and CP container to raw data conversions.
Based on ROD document version 1_09h.
- Author
- Peter Faulkner
Definition at line 54 of file CpByteStreamV1Tool.h.
◆ CmmCpHitsCollection
◆ CmmCpHitsMap
◆ ConstCmmCpHitsMap
◆ ConstCpmHitsMap
◆ ConstCpmTowerMap
◆ CpmHitsCollection
◆ CpmHitsMap
◆ CpmTowerCollection
◆ CpmTowerMap
◆ ROBIterator
◆ ROBPointer
◆ RODPointer
◆ StoreGateSvc_t
◆ CollectionType
◆ CpByteStreamV1Tool()
LVL1BS::CpByteStreamV1Tool::CpByteStreamV1Tool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Definition at line 47 of file CpByteStreamV1Tool.cxx.
51 m_cpmMaps(
"LVL1::CpmMappingTool/CpmMappingTool"),
52 m_errorTool(
"LVL1BS::L1CaloErrorByteStreamTool/L1CaloErrorByteStreamTool"),
56 declareInterface<CpByteStreamV1Tool>(
this);
59 "Crate/Module/Channel to Eta/Phi/Layer mapping tool");
61 "Tool to collect errors for monitoring");
64 "Offset of CP crate numbers in bytestream");
66 "Offset of CP crate numbers in RDOs");
70 "ROB fragment source identifiers");
74 "Format version number in sub-block header");
76 "Format identifier (0-1) in sub-block header");
78 "The number of S-Links per crate");
80 "The number of slices in the simulation");
82 "If >0, the number of slices in bytestream");
84 "Minimum crate number, allows partial output");
86 "Maximum crate number, allows partial output");
◆ ~CpByteStreamV1Tool()
LVL1BS::CpByteStreamV1Tool::~CpByteStreamV1Tool |
( |
| ) |
|
|
virtual |
◆ convert() [1/4]
Convert CP Container to bytestream.
Vector for current CMM-CP hit0 sub-blocks
Vector for current CMM-CP hit1 sub-blocks
Definition at line 145 of file CpByteStreamV1Tool.cxx.
183 int timeslicesNew = 1;
194 if (
mod%modulesPerSlink == 0) {
195 const int daqOrRoi = 0;
196 const int slink = (
m_slinks == 2) ? 2*(
mod/modulesPerSlink)
197 :
mod/modulesPerSlink;
199 msg() <<
"Treating crate " << hwCrate
200 <<
" slink " << slink <<
endmsg;
210 msg(MSG::ERROR) <<
"Inconsistent number of slices or "
211 <<
"triggered slice offsets in data for crate "
212 << hwCrate <<
" slink " << slink <<
endmsg;
213 return StatusCode::FAILURE;
220 <<
"Slices/offset: " << timeslices <<
" " << trigCpm;
221 if (timeslices != timeslicesNew) {
222 msg() <<
" modified to " << timeslicesNew <<
" " << trigCpmNew;
226 L1CaloUserHeader userHeader;
227 userHeader.setCpm(trigCpmNew);
231 theROD->push_back(userHeader.header());
241 CpmSubBlockV1*
const subBlock =
new CpmSubBlockV1();
243 hwCrate,
module, timeslicesNew);
245 if (neutralFormat)
break;
256 const unsigned int key = towerKey.
ttKey(phi, eta);
259 std::vector<int> emData;
260 std::vector<int> hadData;
261 std::vector<int> emError;
262 std::vector<int> hadError;
276 const int index = ( neutralFormat ) ? 0 :
slice;
277 CpmSubBlockV1*
const subBlock = cpmBlocks[
index];
279 hadData[
slice], emErr, hadErr);
289 std::vector<unsigned int> vec0;
290 std::vector<unsigned int> vec1;
294 const int index = ( neutralFormat ) ? 0 :
slice;
295 CpmSubBlockV1*
const subBlock = cpmBlocks[
index];
304 CpmSubBlockV1*
const subBlock = *
pos;
305 if ( !subBlock->pack()) {
306 msg(MSG::ERROR) <<
"CPM sub-block packing failed" <<
endmsg;
307 return StatusCode::FAILURE;
310 msg() <<
"CPM sub-block data words: "
311 << subBlock->dataWords() <<
endmsg;
313 subBlock->write(theROD);
329 CmmCpSubBlock*
const h0Block =
new CmmCpSubBlock();
334 CmmCpSubBlock*
const h1Block =
new CmmCpSubBlock();
339 if (neutralFormat)
break;
345 for (
int dataID = 1; dataID < maxDataID; ++dataID) {
372 std::vector<unsigned int> hits0;
373 std::vector<unsigned int> hits1;
374 std::vector<int> err0;
375 std::vector<int> err1;
383 const int index = ( neutralFormat ) ? 0 :
slice;
384 CmmCpSubBlock* subBlock = cmmHit0Blocks[
index];
387 subBlock = cmmHit1Blocks[
index];
394 for (;
cos != cmmHit0Blocks.
end(); ++
cos) {
395 CmmCpSubBlock*
const subBlock = *
cos;
396 if ( !subBlock->pack()) {
397 msg(MSG::ERROR) <<
"CMM-Cp sub-block packing failed" <<
endmsg;
398 return StatusCode::FAILURE;
401 msg() <<
"CMM-Cp sub-block data words: "
402 << subBlock->dataWords() <<
endmsg;
404 subBlock->write(theROD);
407 for (;
cos != cmmHit1Blocks.
end(); ++
cos) {
408 CmmCpSubBlock*
const subBlock = *
cos;
409 if ( !subBlock->pack()) {
410 msg(MSG::ERROR) <<
"CMM-Cp sub-block packing failed" <<
endmsg;
411 return StatusCode::FAILURE;
414 msg() <<
"CMM-Cp sub-block data words: "
415 << subBlock->dataWords() <<
endmsg;
417 subBlock->write(theROD);
421 return StatusCode::SUCCESS;
◆ convert() [2/4]
◆ convert() [3/4]
◆ convert() [4/4]
◆ convertBs()
Convert bytestream to given container type.
Definition at line 459 of file CpByteStreamV1Tool.cxx.
466 const static std::string
flag(
"Overlap");
467 const std::string::size_type
pos = sgKey.find(
flag);
469 (
pos == std::string::npos ||
pos != sgKey.length() -
flag.length()) ? 0 : 1;
474 CmmCpSubBlock cmmCpSubBlock;
475 CpmSubBlockV1 cpmSubBlock;
480 std::set<uint32_t> dupCheck;
483 for (; rob != robEnd; ++rob) {
487 msg() <<
"Treating ROB fragment " << robCount <<
endmsg;
492 uint32_t robid = (*rob)->source_id();
493 if ((*rob)->nstatus() > 0) {
495 (*rob)->status(robData);
498 if (
debug)
msg() <<
"ROB status error - skipping fragment" <<
endmsg;
505 if (!dupCheck.insert(robid).second) {
516 (*rob)->rod_data(payloadBeg);
517 payloadEnd = payloadBeg + (*rob)->rod_ndata();
525 const uint32_t sourceID = (*rob)->rod_source_id();
534 msg() <<
"Wrong source identifier in data: ROD "
535 << MSG::hex << sourceID <<
" ROB " << robid
542 const int minorVersion = (*rob)->rod_version() & 0xffff;
549 msg() <<
"Treating crate " << rodCrate
559 L1CaloUserHeader userHeader(*
payload);
560 userHeader.setVersion(minorVersion);
561 const int headerWords = userHeader.words();
562 if (headerWords != 1) {
564 if (
debug)
msg() <<
"Unexpected number of user header words: "
568 for (
int i = 0;
i < headerWords; ++
i) ++
payload;
570 int trigCpm = userHeader.cpm();
571 int trigCmm = userHeader.cpCmm();
573 msg() <<
"Minor format version number: " << MSG::hex
574 << minorVersion << MSG::dec <<
endmsg
575 <<
"CPM triggered slice offset: " << trigCpm <<
endmsg
576 <<
"CMM triggered slice offset: " << trigCmm <<
endmsg;
578 if (trigCpm != trigCmm) {
579 const int newTrig = (trigCpm > trigCmm) ? trigCpm : trigCmm;
582 if (
debug)
msg() <<
"Changed both offsets to " << newTrig <<
endmsg;
588 while (
payload != payloadEnd) {
602 cmmCpSubBlock.clear();
604 if (cmmCpSubBlock.crate() != rodCrate) {
605 if (
debug)
msg() <<
"Inconsistent crate number in ROD source ID"
627 if (cpmSubBlock.crate() != rodCrate) {
628 if (
debug)
msg() <<
"Inconsistent crate number in ROD source ID"
646 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ decodeCmmCp()
Unpack CMM-CP sub-block.
Definition at line 651 of file CpByteStreamV1Tool.cxx.
658 const int hwCrate = subBlock->crate();
659 const int module = subBlock->cmmPosition();
660 const int firmware = subBlock->cmmFirmware();
661 const int summing = subBlock->cmmSumming();
662 const int timeslices = subBlock->timeslices();
663 const int sliceNum = subBlock->slice();
665 msg() <<
"CMM-CP: Crate " << hwCrate
667 <<
" Firmware " << firmware
668 <<
" Summing " << summing
669 <<
" Total slices " << timeslices
670 <<
" Slice " << sliceNum <<
endmsg;
672 if (timeslices <= trigCmm) {
673 if (
debug)
msg() <<
"Triggered CMM slice from header "
674 <<
"inconsistent with number of slices: "
675 << trigCmm <<
", " << timeslices <<
endmsg;
679 if (timeslices <= sliceNum) {
680 if (
debug)
msg() <<
"Total slices inconsistent with slice number: "
681 << timeslices <<
", " << sliceNum <<
endmsg;
686 if (subBlock->dataWords() && !subBlock->unpack()) {
688 std::string errMsg(subBlock->unpackErrorMsg());
689 msg() <<
"CMM-CP sub-block unpacking failed: " << errMsg <<
endmsg;
691 ld.rodErr = subBlock->unpackErrorCode();
698 const uint32_t subStatus = subBlock->subStatus();
702 const int sliceBeg = ( neutralFormat ) ? 0 : sliceNum;
703 const int sliceEnd = ( neutralFormat ) ? timeslices : sliceNum + 1;
742 ld.hitsVec0.assign(timeslices, 0);
743 ld.hitsVec1.assign(timeslices, 0);
744 ld.errVec0.assign(timeslices, 0);
745 ld.errVec1.assign(timeslices, 0);
754 std::make_unique<LVL1::CMMCPHits>(swCrate, dataID,
ld.hitsVec0,
ld.hitsVec1,
755 ld.errVec0,
ld.errVec1, trigCmm);
756 const int key = crate*100 + dataID;
757 data.m_cmmHitsMap.insert(std::make_pair(
key, chp.get()));
758 data.m_cmmHitCollection->push_back(std::move(chp));
760 ld.hitsVec0 =
ch->HitsVec0();
761 ld.hitsVec1 =
ch->HitsVec1();
762 ld.errVec0 =
ch->ErrorVec0();
763 ld.errVec1 =
ch->ErrorVec1();
764 const int nsl =
ld.hitsVec0.size();
765 if (timeslices != nsl) {
766 if (
debug)
msg() <<
"Inconsistent number of slices in sub-blocks"
785 ch->addHits(
ld.hitsVec0,
ld.hitsVec1,
ld.errVec0,
ld.errVec1);
◆ decodeCpm()
Unpack CPM sub-block.
Definition at line 796 of file CpByteStreamV1Tool.cxx.
804 const int hwCrate = subBlock->crate();
805 const int module = subBlock->module();
806 const int timeslices = subBlock->timeslices();
807 const int sliceNum = subBlock->slice();
809 msg() <<
"CPM: Crate " << hwCrate
811 <<
" Total slices " << timeslices
812 <<
" Slice " << sliceNum <<
endmsg;
819 if (timeslices <= trigCpm) {
820 if (
debug)
msg() <<
"Triggered CPM slice from header "
821 <<
"inconsistent with number of slices: "
822 << trigCpm <<
", " << timeslices <<
endmsg;
826 if (timeslices <= sliceNum) {
827 if (
debug)
msg() <<
"Total slices inconsistent with slice number: "
828 << timeslices <<
", " << sliceNum <<
endmsg;
833 if (subBlock->dataWords() && !subBlock->unpack()) {
835 std::string errMsg(subBlock->unpackErrorMsg());
836 msg() <<
"CPM sub-block unpacking failed: " << errMsg <<
endmsg;
838 ld.rodErr = subBlock->unpackErrorCode();
847 const int ssError = dErr.
error();
850 const int sliceBeg = ( neutralFormat ) ? 0 : sliceNum;
851 const int sliceEnd = ( neutralFormat ) ? timeslices : sliceNum + 1;
855 CpmTowerData& tdata =
static_cast<CpmTowerData&
> (
data);
860 if (!ssError && !subBlock->anyTowerData(
chan))
continue;
861 const int em = subBlock->emData(
slice,
chan);
862 const int had = subBlock->hadData(
slice,
chan);
863 const int emErr = subBlock->emError(
slice,
chan);
864 const int hadErr = subBlock->hadError(
slice,
chan);
865 int emErr1 = ssError;
870 emErr1 = emErrBits.error();
872 int hadErr1 = ssError;
877 hadErr1 = hadErrBits.error();
879 if (em || had || emErr1 || hadErr1) {
885 const unsigned int key =
ld.towerKey.ttKey(phi, eta);
888 ld.emVec.assign(timeslices, 0);
889 ld.hadVec.assign(timeslices, 0);
890 ld.emErrVec.assign(timeslices, 0);
891 ld.hadErrVec.assign(timeslices, 0);
897 std::make_unique<LVL1::CPMTower>(phi, eta,
ld.emVec,
ld.emErrVec,
898 ld.hadVec,
ld.hadErrVec, trigCpm);
899 tdata.m_ttMap.insert(std::make_pair(
key, ttp.get()));
900 tdata.m_ttCollection->push_back(std::move(ttp));
902 ld.emVec =
tt->emEnergyVec();
903 ld.hadVec =
tt->hadEnergyVec();
904 ld.emErrVec =
tt->emErrorVec();
905 ld.hadErrVec =
tt->hadErrorVec();
906 const int nsl =
ld.emVec.size();
907 if (timeslices != nsl) {
909 msg() <<
"Inconsistent number of slices in sub-blocks"
917 if (
debug)
msg() <<
"Duplicate data for slice "
926 tt->fill(
ld.emVec,
ld.emErrVec,
ld.hadVec,
ld.hadErrVec, trigCpm);
929 }
else if (
verbose && (em || had || emErr || hadErr)) {
930 msg(
MSG::VERBOSE) <<
"Non-zero data but no channel mapping for channel "
941 CpmHitsData& hdata =
static_cast<CpmHitsData&
> (
data);
945 const unsigned int hits0 = subBlock->hits0(
slice);
946 const unsigned int hits1 = subBlock->hits1(
slice);
947 if (hits0 || hits1) {
950 ld.hitsVec0.assign(timeslices, 0);
951 ld.hitsVec1.assign(timeslices, 0);
955 std::make_unique<LVL1::CPMHits>(swCrate,
module,
ld.hitsVec0,
ld.hitsVec1, trigCpm);
956 hdata.m_hitsMap.insert(std::make_pair(crate*
m_modules+
module-1, chp.get()));
957 hdata.m_hitCollection->push_back(std::move(chp));
959 ld.hitsVec0 =
ch->HitsVec0();
960 ld.hitsVec1 =
ch->HitsVec1();
961 const int nsl =
ld.hitsVec0.size();
962 if (timeslices != nsl) {
963 if (
debug)
msg() <<
"Inconsistent number of slices in sub-blocks"
975 ch->addHits(
ld.hitsVec0,
ld.hitsVec1);
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ findCmmCpHits() [1/2]
Definition at line 1041 of file CpByteStreamV1Tool.cxx.
1045 CmmCpHitsMap::const_iterator mapIter =
data.m_cmmHitsMap.find(crate*100 + dataID);
1046 if (mapIter !=
data.m_cmmHitsMap.end())
return mapIter->second;
◆ findCmmCpHits() [2/2]
Find CMM-CP hits for given crate, data ID.
Definition at line 1032 of file CpByteStreamV1Tool.cxx.
1036 ConstCmmCpHitsMap::const_iterator mapIter = cmmHitsMap.find(crate*100 + dataID);
1037 if (mapIter != cmmHitsMap.end())
return mapIter->second;
◆ findCpmHits() [1/2]
Definition at line 1020 of file CpByteStreamV1Tool.cxx.
1023 CpmHitsMap::const_iterator mapIter =
1025 if (mapIter !=
data.m_hitsMap.end())
return mapIter->second;
◆ findCpmHits() [2/2]
Find CPM hits for given crate, module.
Definition at line 1010 of file CpByteStreamV1Tool.cxx.
1014 ConstCpmHitsMap::const_iterator mapIter =
1016 if (mapIter != hitsMap.end())
return mapIter->second;
◆ findCpmTower() [1/2]
Definition at line 999 of file CpByteStreamV1Tool.cxx.
1002 CpmTowerMap::const_iterator mapIter =
data.m_ttMap.find(
key);
1003 if (mapIter !=
data.m_ttMap.end())
return mapIter->second;
◆ findCpmTower() [2/2]
Find a CPM tower for given key.
Definition at line 991 of file CpByteStreamV1Tool.cxx.
994 ConstCpmTowerMap::const_iterator mapIter = ttMap.find(
key);
995 if (mapIter != ttMap.end())
return mapIter->second;
◆ initialize()
StatusCode LVL1BS::CpByteStreamV1Tool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ interfaceID()
const InterfaceID & LVL1BS::CpByteStreamV1Tool::interfaceID |
( |
| ) |
|
|
static |
◆ makeSourceIDs()
std::vector< uint32_t > LVL1BS::CpByteStreamV1Tool::makeSourceIDs |
( |
| ) |
const |
|
private |
Create list of all source IDs.
Definition at line 426 of file CpByteStreamV1Tool.cxx.
438 for (
int slink = 0; slink < maxSlinks; ++slink)
440 const int daqOrRoi = 0;
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ setupCmmCpHitsMap()
Set up CMM-CP hits map.
Definition at line 1089 of file CpByteStreamV1Tool.cxx.
1094 if (hitCollection) {
1097 for (;
pos != pose; ++
pos) {
1100 const int key = crate*100 +
hits->dataID();
1101 cmmHitsMap.insert(std::make_pair(
key,
hits));
◆ setupCpmHitsMap()
◆ setupCpmTowerMap()
◆ slinkSlices()
Get number of slices and triggered slice offset for next slink.
Definition at line 1108 of file CpByteStreamV1Tool.cxx.
1125 const unsigned int key = towerKey.
ttKey(phi, eta);
1127 if ( !
tt )
continue;
1128 const int numdat = 4;
1129 std::vector<int> sums(numdat);
1130 std::vector<int> sizes(numdat);
1132 (
tt->emEnergyVec()).end(), 0);
1134 (
tt->hadEnergyVec()).end(), 0);
1136 (
tt->emErrorVec()).end(), 0);
1138 (
tt->hadErrorVec()).end(), 0);
1139 sizes[0] = (
tt->emEnergyVec()).
size();
1140 sizes[1] = (
tt->hadEnergyVec()).
size();
1141 sizes[2] = (
tt->emErrorVec()).
size();
1142 sizes[3] = (
tt->hadErrorVec()).
size();
1143 const int peak =
tt->peak();
1144 for (
int i = 0;
i < numdat; ++
i) {
1145 if (sums[
i] == 0)
continue;
1149 }
else if (
slices != sizes[
i] || trigC != peak)
return false;
1154 const int numdat = 2;
1155 std::vector<unsigned int> sums(numdat);
1156 std::vector<int> sizes(numdat);
1158 (
hits->HitsVec0()).end(), 0);
1160 (
hits->HitsVec1()).end(), 0);
1161 sizes[0] = (
hits->HitsVec0()).
size();
1162 sizes[1] = (
hits->HitsVec1()).
size();
1163 const int peak =
hits->peak();
1164 for (
int i = 0;
i < numdat; ++
i) {
1165 if (sums[
i] == 0)
continue;
1169 }
else if (
slices != sizes[
i] || trigC != peak)
return false;
1176 for (
int dataID = 0; dataID < maxDataID; ++dataID) {
1177 const int numdat = 4;
1178 std::vector<unsigned int> sums(numdat);
1179 std::vector<int> sizes(numdat);
1183 (
hits->HitsVec0()).end(), 0);
1185 (
hits->HitsVec1()).end(), 0);
1187 (
hits->ErrorVec0()).end(), 0);
1189 (
hits->ErrorVec1()).end(), 0);
1190 sizes[0] = (
hits->HitsVec0()).
size();
1191 sizes[1] = (
hits->HitsVec1()).
size();
1192 sizes[2] = (
hits->ErrorVec0()).
size();
1193 sizes[3] = (
hits->ErrorVec1()).
size();
1194 const int peak =
hits->peak();
1195 for (
int i = 0;
i < numdat; ++
i) {
1196 if (sums[
i] == 0)
continue;
1200 }
else if (
slices != sizes[
i] || trigC != peak)
return false;
◆ sourceIDs()
const std::vector< uint32_t > & LVL1BS::CpByteStreamV1Tool::sourceIDs |
( |
| ) |
const |
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_byteStreamCnvSvc
◆ m_channels
const int LVL1BS::CpByteStreamV1Tool::m_channels |
|
private |
◆ m_cpmMaps
◆ m_crateMax
int LVL1BS::CpByteStreamV1Tool::m_crateMax |
|
private |
◆ m_crateMin
int LVL1BS::CpByteStreamV1Tool::m_crateMin |
|
private |
◆ m_crateOffsetHw
int LVL1BS::CpByteStreamV1Tool::m_crateOffsetHw |
|
private |
◆ m_crateOffsetSw
int LVL1BS::CpByteStreamV1Tool::m_crateOffsetSw |
|
private |
◆ m_crates
int LVL1BS::CpByteStreamV1Tool::m_crates |
|
private |
◆ m_dataFormat
int LVL1BS::CpByteStreamV1Tool::m_dataFormat |
|
private |
◆ m_detStore
◆ m_dfltSlices
int LVL1BS::CpByteStreamV1Tool::m_dfltSlices |
|
private |
◆ m_errorTool
◆ m_evtStore
◆ m_forceSlices
int LVL1BS::CpByteStreamV1Tool::m_forceSlices |
|
private |
◆ m_modules
const int LVL1BS::CpByteStreamV1Tool::m_modules |
|
private |
◆ m_slinks
int LVL1BS::CpByteStreamV1Tool::m_slinks |
|
private |
◆ m_sourceIDsProp
std::vector<uint32_t> LVL1BS::CpByteStreamV1Tool::m_sourceIDsProp |
|
private |
◆ m_srcIdMap
◆ m_subDetector
const eformat::SubDetector LVL1BS::CpByteStreamV1Tool::m_subDetector |
|
private |
◆ m_varHandleArraysDeclared
◆ m_version
int LVL1BS::CpByteStreamV1Tool::m_version |
|
private |
◆ m_vhka
The documentation for this class was generated from the following files:
static CmmFirmwareCode cmmType(uint32_t word)
CMM differentiation (CMM_CP, CMM_JET, or CMM_ENERGY)
uint16_t minorVersionPreLS1() const
Return last ROD header minor version for pre-LS1 data.
char data[hepevt_bytes_allocation_ATLAS]
int slink(uint32_t code) const
Return slink from unpacked moduleID.
Template class for assembling a full atlas raw event from subfragments.
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
static int peak(int oldPeak, int oldSlices, int newSlices)
Return new triggered slice offset.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
static bool cmmBlock(uint32_t word)
Determine if header word corresponds to CMM.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
uint32_t getRobID(uint32_t rod_id) const
Make a ROB Source ID from a ROD source ID.
The CPMHits object contains the hit data produced by a given Cluster Processor Module,...
virtual void setOwner(IDataHandleHolder *o)=0
The CPMTower class contains the TriggerTower information received by the Cluster Processor Modules.
static void data(const std::vector< int > &oldVec, std::vector< int > &newVec, int newSlices)
Return modified data vector<int>
(Non-const) Iterator class for DataVector/DataList.
Summary of CP (EM/tau) hits received by the merger modules.
void set(ErrorBit bit, int value=1)
Set an error bit or data.
int crate(uint32_t code) const
Return crate from unpacked moduleID.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
static SubBlockWordType wordType(uint32_t word)
Word identification.
int error() const
Return the full error word.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
eformat::SubDetector subDet(uint32_t code) const
Return sub-detector for given ID.
void setRodMinorVersion(uint16_t m)
change the ROD minor version
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
uint32_t getRodID(int crate, int slink, int daqOrRoi, eformat::SubDetector subdet) const
Make a ROD Source ID.
std::vector< uint32_t > RODDATA
ROD data as a vector of unsigned int.
virtual unsigned int ttKey(const TriggerTower &tower)
returns the key of the passed tower
int maxSlinks() const
Return the maximum possible number of slinks.
int daqOrRoi(uint32_t code) const
Return daqOrRoi from unpacked moduleID.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
The TriggerTowerKey object provides the key for each trigger tower depending on its eta-phi coords.
RODDATA * getRodData(uint32_t id)
get a block of ROD data
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.