10#include "GaudiKernel/IInterface.h"
11#include "GaudiKernel/MsgStream.h"
12#include "GaudiKernel/StatusCode.h"
48 const std::string& name,
49 const IInterface* parent)
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");
107 return StatusCode::SUCCESS;
113 const std::string& sgKey,
124 const std::string& sgKey,
135 const std::string& sgKey,
154 const uint16_t minorVersion =
m_srcIdMap.minorVersionPreLS1();
183 int timeslicesNew = 1;
189 for (
int module=1;
module <= m_modules; ++module) {
190 const int mod =
module - 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;
227 userHeader.
setCpm(trigCpmNew);
228 const uint32_t rodIdCpm =
m_srcIdMap.getRodID(hwCrate, slink, daqOrRoi,
231 theROD->push_back(userHeader.
header());
233 if (
debug)
msg() <<
"Module " <<
module << endmsg;
240 for (
int slice = 0; slice < timeslicesNew; ++slice) {
243 hwCrate, module, timeslicesNew);
245 if (neutralFormat)
break;
259 std::vector<int> emData;
260 std::vector<int> hadData;
261 std::vector<int> emError;
262 std::vector<int> hadError;
267 for (
int slice = 0; slice < timeslicesNew; ++slice) {
276 const int index = ( neutralFormat ) ? 0 : slice;
279 hadData[slice], emErr, hadErr);
289 std::vector<unsigned int> vec0;
290 std::vector<unsigned int> vec1;
293 for (
int slice = 0; slice < timeslicesNew; ++slice) {
294 const int index = ( neutralFormat ) ? 0 : slice;
296 subBlock->
setHits(slice, vec0[slice], vec1[slice]);
303 for (pos = cpmBlocks.
begin(); pos != cpmBlocks.
end(); ++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: "
313 subBlock->
write(theROD);
328 for (
int slice = 0; slice < timeslicesNew; ++slice) {
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;
380 for (
int slice = 0; slice < timeslicesNew; ++slice) {
383 const int index = ( neutralFormat ) ? 0 : slice;
385 subBlock->
setHits(slice, source, hits0[slice],
387 subBlock = cmmHit1Blocks[
index];
388 subBlock->
setHits(slice, source, hits1[slice],
394 for (; cos != cmmHit0Blocks.
end(); ++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: "
404 subBlock->
write(theROD);
406 cos = cmmHit1Blocks.
begin();
407 for (; cos != cmmHit1Blocks.
end(); ++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: "
417 subBlock->
write(theROD);
421 return StatusCode::SUCCESS;
438 for (
int slink = 0; slink < maxSlinks; ++slink)
440 const int daqOrRoi = 0;
441 const uint32_t rodId =
m_srcIdMap.getRodID(hwCrate, slink, daqOrRoi,
443 const uint32_t robId =
m_srcIdMap.getRobID(rodId);
460 const std::string& sgKey,
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;
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();
518 payload = payloadBeg;
519 if (payload == payloadEnd) {
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;
543 if (minorVersion >
m_srcIdMap.minorVersionPreLS1()) {
547 const int rodCrate =
m_srcIdMap.crate(sourceID);
549 msg() <<
"Treating crate " << rodCrate
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();
603 payload = cmmCpSubBlock.
read(payload, payloadEnd);
604 if (cmmCpSubBlock.
crate() != rodCrate) {
605 if (
debug)
msg() <<
"Inconsistent crate number in ROD source ID"
626 payload = cpmSubBlock.
read(payload, payloadEnd);
627 if (cpmSubBlock.
crate() != rodCrate) {
628 if (
debug)
msg() <<
"Inconsistent crate number in ROD source ID"
646 return StatusCode::SUCCESS;
658 const int hwCrate = subBlock->
crate();
662 const int timeslices = subBlock->
timeslices();
663 const int sliceNum = subBlock->
slice();
665 msg() <<
"CMM-CP: Crate " << hwCrate
666 <<
" Module " << module
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;
689 msg() <<
"CMM-CP sub-block unpacking failed: " << errMsg <<
endmsg;
698 const uint32_t subStatus = subBlock->
subStatus();
702 const int sliceBeg = ( neutralFormat ) ? 0 : sliceNum;
703 const int sliceEnd = ( neutralFormat ) ? timeslices : sliceNum + 1;
704 for (
int slice = sliceBeg; slice < sliceEnd; ++slice) {
708 for (
int source = 1; source < maxSid; ++source) {
733 const unsigned int hits = subBlock->
hits(slice, source);
734 int err = subBlock->
hitsError(slice, source);
738 err = errorBits.
error();
742 ld.hitsVec0.assign(timeslices, 0);
743 ld.hitsVec1.assign(timeslices, 0);
744 ld.errVec0.assign(timeslices, 0);
745 ld.errVec1.assign(timeslices, 0);
747 ld.hitsVec0[slice] = hits;
748 ld.errVec0[slice] = err;
750 ld.hitsVec1[slice] = hits;
751 ld.errVec1[slice] = err;
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"
773 (ld.hitsVec1[slice] != 0 || ld.errVec1[slice] != 0))) {
774 if (
debug)
msg() <<
"Duplicate data for slice " << slice <<
endmsg;
779 ld.hitsVec0[slice] = hits;
780 ld.errVec0[slice] = err;
782 ld.hitsVec1[slice] = hits;
783 ld.errVec1[slice] = err;
785 ch->addHits(ld.hitsVec0, ld.hitsVec1, ld.errVec0, ld.errVec1);
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
810 <<
" Module " << module
811 <<
" Total slices " << timeslices
812 <<
" Slice " << sliceNum <<
endmsg;
815 if (
debug)
msg() <<
"Unexpected module number: " <<
module << 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;
836 msg() <<
"CPM sub-block unpacking failed: " << errMsg <<
endmsg;
847 const int ssError = dErr.
error();
850 const int sliceBeg = ( neutralFormat ) ? 0 : sliceNum;
851 const int sliceEnd = ( neutralFormat ) ? timeslices : sliceNum + 1;
852 for (
int slice = sliceBeg; slice < sliceEnd; ++slice) {
859 for (
int chan = 0; chan <
m_channels; ++chan) {
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) {
884 if (layer == ld.coreOverlap) {
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);
892 ld.emVec[slice] = em;
893 ld.hadVec[slice] = had;
894 ld.emErrVec[slice] = emErr1;
895 ld.hadErrVec[slice] = hadErr1;
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()));
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"
915 if (ld.emVec[slice] != 0 || ld.hadVec[slice] != 0 ||
916 ld.emErrVec[slice] != 0 || ld.hadErrVec[slice] != 0) {
917 if (
debug)
msg() <<
"Duplicate data for slice "
922 ld.emVec[slice] = em;
923 ld.hadVec[slice] = had;
924 ld.emErrVec[slice] = emErr1;
925 ld.hadErrVec[slice] = hadErr1;
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 "
935 msg(MSG::VERBOSE) <<
"No CPM tower data for channel "
936 << chan <<
" slice " << slice <<
endmsg;
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);
952 ld.hitsVec0[slice] = hits0;
953 ld.hitsVec1[slice] = hits1;
955 std::make_unique<LVL1::CPMHits>(swCrate, module, ld.hitsVec0, ld.hitsVec1, trigCpm);
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"
968 if (ld.hitsVec0[slice] != 0 || ld.hitsVec1[slice] != 0) {
969 if (
debug)
msg() <<
"Duplicate data for slice " << slice <<
endmsg;
973 ld.hitsVec0[slice] = hits0;
974 ld.hitsVec1[slice] = hits1;
975 ch->addHits(ld.hitsVec0, ld.hitsVec1);
978 msg(MSG::VERBOSE) <<
"No CPM hits data for crate/module/slice "
979 << hwCrate <<
"/" << module <<
"/" << slice
994 ConstCpmTowerMap::const_iterator mapIter = ttMap.find(key);
995 if (mapIter != ttMap.end())
return mapIter->second;
1000 const unsigned int key)
const
1002 CpmTowerMap::const_iterator mapIter =
data.m_ttMap.find(key);
1003 if (mapIter !=
data.m_ttMap.end())
return mapIter->second;
1014 ConstCpmHitsMap::const_iterator mapIter =
1015 hitsMap.find(crate*
m_modules + module - 1);
1016 if (mapIter != hitsMap.end())
return mapIter->second;
1021 const int crate,
const int module)
const
1023 CpmHitsMap::const_iterator mapIter =
1025 if (mapIter !=
data.m_hitsMap.end())
return mapIter->second;
1036 ConstCmmCpHitsMap::const_iterator mapIter = cmmHitsMap.find(crate*100 + dataID);
1037 if (mapIter != cmmHitsMap.end())
return mapIter->second;
1043 const int dataID)
const
1045 CmmCpHitsMap::const_iterator mapIter =
data.m_cmmHitsMap.find(crate*100 + dataID);
1046 if (mapIter !=
data.m_cmmHitsMap.end())
return mapIter->second;
1060 for (; pos != pose; ++pos) {
1062 const unsigned int key = towerKey.
ttKey(tt->phi(), tt->eta());
1063 ttMap.insert(std::make_pair(key, tt));
1071 const hitCollection,
1075 if (hitCollection) {
1078 for (; pos != pose; ++pos) {
1081 const int key =
m_modules * crate + hits->module() - 1;
1082 hitsMap.insert(std::make_pair(key, hits));
1090 const hitCollection,
1094 if (hitCollection) {
1097 for (; pos != pose; ++pos) {
1100 const int key = crate*100 + hits->dataID();
1101 cmmHitsMap.insert(std::make_pair(key, hits));
1109 const int modulesPerSlink,
1119 for (
int mod = module; mod < module + modulesPerSlink; ++mod) {
1120 for (
int chan = 0; chan <
m_channels; ++chan) {
1124 if ( !
m_cpmMaps->mapping(crate, mod, chan,
eta,
phi, layer))
continue;
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);
1131 sums[0] = std::accumulate((tt->emEnergyVec()).begin(),
1132 (tt->emEnergyVec()).end(), 0);
1133 sums[1] = std::accumulate((tt->hadEnergyVec()).begin(),
1134 (tt->hadEnergyVec()).end(), 0);
1135 sums[2] = std::accumulate((tt->emErrorVec()).begin(),
1136 (tt->emErrorVec()).end(), 0);
1137 sums[3] = std::accumulate((tt->hadErrorVec()).begin(),
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);
1157 sums[0] = std::accumulate((hits->HitsVec0()).begin(),
1158 (hits->HitsVec0()).end(), 0);
1159 sums[1] = std::accumulate((hits->HitsVec1()).begin(),
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;
1174 if (module/modulesPerSlink ==
m_slinks - 1) {
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);
1182 sums[0] = std::accumulate((hits->HitsVec0()).begin(),
1183 (hits->HitsVec0()).end(), 0);
1184 sums[1] = std::accumulate((hits->HitsVec1()).begin(),
1185 (hits->HitsVec1()).end(), 0);
1186 sums[2] = std::accumulate((hits->ErrorVec0()).begin(),
1187 (hits->ErrorVec0()).end(), 0);
1188 sums[3] = std::accumulate((hits->ErrorVec1()).begin(),
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;
1206 timeslices = slices;
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
char data[hepevt_bytes_allocation_ATLAS]
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
bool msgLvl(const MSG::Level lvl) const
DataModel_detail::const_iterator< DataVector > const_iterator
value_type push_back(value_type pElem)
Add an element to the end of the collection.
DataModel_detail::iterator< DataVector > iterator
Standard iterator.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Template class for assembling a full atlas raw event from subfragments.
void setRodMinorVersion(uint16_t m)
change the ROD minor version
std::vector< uint32_t > RODDATA
ROD data as a vector of unsigned int.
RODDATA * getRodData(uint32_t id)
get a block of ROD data
std::vector< const ROBF * > VROBFRAG
Sub-Block class for CMM-CP data.
bool unpack()
Unpack data.
void clear()
Clear all data.
unsigned int hits(int slice, int source) const
Return hit counts for given CPM or source ID.
void setHits(int slice, int source, unsigned int hits, int error)
Store hit counts for given CPM or source ID.
int hitsError(int slice, int source) const
Return hit error for given CPM or source ID.
static bool cmmBlock(uint32_t word)
Determine if header word corresponds to CMM.
void setCmmHeader(int version, int format, int slice, int crate, int summing, int firmware, int position, int timeslices)
Store CMM header.
static CmmFirmwareCode cmmType(uint32_t word)
CMM differentiation (CMM_CP, CMM_JET, or CMM_ENERGY)
Sub-Block class for CPM data.
unsigned int hits0(int slice) const
Return e/gamma hit counts.
void setHits(int slice, unsigned int hit0, unsigned int hit1)
Store hit counts.
unsigned int hits1(int slice) const
Return tau hit counts.
int emData(int slice, int channel) const
Return Em data for given channel.
void clear()
Clear all data.
int emError(int slice, int channel) const
Return Em error for given channel.
void setCpmHeader(int version, int format, int slice, int crate, int module, int timeslices)
Store CPM header.
void fillTowerData(int slice, int channel, int em, int had, int emErr, int hadErr)
Store trigger tower data.
int hadError(int slice, int channel) const
Return Had error for given channel.
int timeslices() const
Return number of timeslices.
bool unpack()
Unpack data.
bool anyTowerData(int channel) const
Return true if there is tower data for given channel.
int hadData(int slice, int channel) const
Return Had data for given channel.
int unpackErrorCode() const
Return the unpacking error code.
uint32_t subStatus() const
Return Sub-status word.
int dataWords() const
Return number of data words.
static SubBlockWordType wordType(uint32_t word)
Word identification.
void write(FullEventAssembler< L1CaloSrcIdMap >::RODDATA *theROD) const
Output complete packed sub-block to ROD vector.
std::string unpackErrorMsg() const
Return the unpacking error message for printing.
OFFLINE_FRAGMENTS_NAMESPACE::PointerType read(const OFFLINE_FRAGMENTS_NAMESPACE::PointerType beg, const OFFLINE_FRAGMENTS_NAMESPACE::PointerType end)
Input complete packed sub-block from ROD array.
static void data(const std::vector< int > &oldVec, std::vector< int > &newVec, int newSlices)
Return modified data vector<int>
static int peak(int oldPeak, int oldSlices, int newSlices)
Return new triggered slice offset.
Summary of CP (EM/tau) hits received by the merger modules.
Cluster Processor container for writing bytestream.
The CPMHits object contains the hit data produced by a given Cluster Processor Module,...
The CPMTower class contains the TriggerTower information received by the Cluster Processor Modules.
int error() const
Return the full error word.
void set(ErrorBit bit, int value=1)
Set an error bit or data.
int get(ErrorBit bit) const
Return an error bit or data.
The TriggerTowerKey object provides the key for each trigger tower depending on its eta-phi coords.
virtual unsigned int ttKey(const TriggerTower &tower)
returns the key of the passed tower
static const InterfaceID IID_ICpByteStreamV1Tool("CpByteStreamV1Tool", 1, 1)