|
ATLAS Offline Software
|
Tool to perform ROB fragments to trigger towers and trigger towers to raw data conversions.
More...
#include <ZdcByteStreamReadV1V2Tool.h>
|
| ZdcByteStreamReadV1V2Tool (const std::string &name) |
|
virtual | ~ZdcByteStreamReadV1V2Tool () |
|
virtual StatusCode | initialize () |
| Dummy implementation of the initialisation function. More...
|
|
virtual StatusCode | finalize () |
|
StatusCode | convert (const IROBDataProviderSvc::VROBFRAG &robFrags, xAOD::TriggerTowerContainer *const ttCollection) const |
| Convert ROB fragments to trigger towers. More...
|
|
StatusCode | convert (const IROBDataProviderSvc::VROBFRAG &robFrags, ZdcDigitsCollection *zdcCollection) const |
|
StatusCode | convert (xAOD::TriggerTowerContainer *const ttCollection) const |
|
StatusCode | convert (const std::string &sgKey, xAOD::TriggerTowerContainer *const ttCollection) const |
|
ZdcDigitsCollection * | convertTT2ZD (xAOD::TriggerTowerContainer *const ttCollection) const |
|
const std::vector< uint32_t > & | ppmSourceIDs (const std::string &sgKey) const |
| Return reference to vector with all possible Source Identifiers. More...
|
|
virtual void | print () const |
| Print the state of the tool. 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 |
|
|
StatusCode | processRobFragment_ (State &state, const ROBIterator &robFrag, const RequestType &requestedType) const |
|
StatusCode | processPpmWord_ (State &state, uint32_t word, int indata) const |
|
StatusCode | processPpmBlock_ (State &state) const |
|
StatusCode | processPpmBlockR4V1_ (State &state) const |
|
StatusCode | processPpmBlockR3V1_ (State &state) const |
|
StatusCode | processPpmStandardR4V1_ (State &state) const |
|
StatusCode | processPpmStandardR3V1_ (State &state) const |
|
StatusCode | processPpmStandardR3V1_ (State &state, uint32_t word, int indata) const |
|
StatusCode | processPpmCompressedR3V1_ (State &state) const |
|
std::vector< uint16_t > | getPpmAdcSamplesR3_ (State &state, BitReader &br, uint8_t format, uint8_t minIndex) const |
|
StatusCode | processPpmCompressedR4V1_ (State &state) const |
|
void | interpretPpmHeaderR4V1_ (BitReader &br, uint8_t numAdc, int8_t &encoding, int8_t &minIndex) const |
|
std::vector< uint16_t > | getPpmAdcSamplesR4_ (State &state, BitReader &br, uint8_t encoding, uint8_t minIndex) const |
|
StatusCode | processPpmNeutral_ (State &state) const |
|
StatusCode | addTriggerTowerV2_ (State &state, uint8_t crate, uint8_t module, uint8_t channel, const std::vector< uint8_t > &lcpVal, const std::vector< uint8_t > &lcpBcidVec, const std::vector< uint8_t > &ljeVal, const std::vector< uint8_t > &ljeSat80Vec, const std::vector< uint16_t > &adcVal, const std::vector< uint8_t > &adcExt, const std::vector< int16_t > &pedCor, const std::vector< uint8_t > &pedEn) const |
|
StatusCode | addTriggerTowerV1_ (State &state, uint8_t crate, uint8_t module, uint8_t channel, const std::vector< uint16_t > &luts, const std::vector< uint16_t > &fadc) const |
|
StatusCode | addTriggerTowerV1_ (State &state, uint8_t crate, uint8_t module, uint8_t channel, const std::vector< uint8_t > &luts, const std::vector< uint8_t > &lcpBcidVec, const std::vector< uint16_t > &fadc, const std::vector< uint8_t > &bcidExt) const |
|
void | initSourceIDs () |
|
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 trigger towers and trigger towers to raw data conversions.
- Author
- alexa.nosp@m.nder.nosp@m..mazu.nosp@m.rov@.nosp@m.cern..nosp@m.ch
Definition at line 66 of file ZdcByteStreamReadV1V2Tool.h.
◆ ROBIterator
◆ ROBPointer
◆ RODPointer
◆ StoreGateSvc_t
◆ RequestType
◆ ZdcByteStreamReadV1V2Tool()
ZdcByteStreamReadV1V2Tool::ZdcByteStreamReadV1V2Tool |
( |
const std::string & |
name | ) |
|
Definition at line 78 of file ZdcByteStreamReadV1V2Tool.cxx.
81 m_errorTool(
"ZdcL1CaloErrorByteStreamTool/ZdcL1CaloErrorByteStreamTool"),
84 declareInterface<ZdcByteStreamReadV1V2Tool>(
this);
88 "Get ROB source IDs service");
◆ ~ZdcByteStreamReadV1V2Tool()
virtual ZdcByteStreamReadV1V2Tool::~ZdcByteStreamReadV1V2Tool |
( |
| ) |
|
|
inlinevirtual |
◆ addTriggerTowerV1_() [1/2]
StatusCode ZdcByteStreamReadV1V2Tool::addTriggerTowerV1_ |
( |
State & |
state, |
|
|
uint8_t |
crate, |
|
|
uint8_t |
module, |
|
|
uint8_t |
channel, |
|
|
const std::vector< uint16_t > & |
luts, |
|
|
const std::vector< uint16_t > & |
fadc |
|
) |
| const |
|
private |
Definition at line 1044 of file ZdcByteStreamReadV1V2Tool.cxx.
1053 std::vector<uint8_t> lcpVal;
1054 std::vector<uint8_t> lcpBcidVec;
1056 std::vector<uint16_t> adcVal;
1057 std::vector<uint8_t> adcExt;
1059 for(
auto lut: luts) {
1060 lcpVal.push_back(BitField::get<uint8_t>(lut, 0, 8));
1061 lcpBcidVec.push_back(BitField::get<uint8_t>(lut, 8, 3));
1065 adcExt.push_back(BitField::get<uint8_t>(
f, 0, 1));
1066 adcVal.push_back(BitField::get<uint16_t>(
f, 1, 10));
1072 return StatusCode::SUCCESS;
◆ addTriggerTowerV1_() [2/2]
StatusCode ZdcByteStreamReadV1V2Tool::addTriggerTowerV1_ |
( |
State & |
state, |
|
|
uint8_t |
crate, |
|
|
uint8_t |
module, |
|
|
uint8_t |
channel, |
|
|
const std::vector< uint8_t > & |
luts, |
|
|
const std::vector< uint8_t > & |
lcpBcidVec, |
|
|
const std::vector< uint16_t > & |
fadc, |
|
|
const std::vector< uint8_t > & |
bcidExt |
|
) |
| const |
|
private |
Definition at line 1021 of file ZdcByteStreamReadV1V2Tool.cxx.
1032 std::vector<uint8_t> ljeSat80Vec;
1034 std::vector<int16_t> pedCor;
1035 std::vector<uint8_t> pedEn;
1038 luts , ljeSat80Vec, fadc, bcidExt, pedCor, pedEn)
1041 return StatusCode::SUCCESS;
◆ addTriggerTowerV2_()
StatusCode ZdcByteStreamReadV1V2Tool::addTriggerTowerV2_ |
( |
State & |
state, |
|
|
uint8_t |
crate, |
|
|
uint8_t |
module, |
|
|
uint8_t |
channel, |
|
|
const std::vector< uint8_t > & |
lcpVal, |
|
|
const std::vector< uint8_t > & |
lcpBcidVec, |
|
|
const std::vector< uint8_t > & |
ljeVal, |
|
|
const std::vector< uint8_t > & |
ljeSat80Vec, |
|
|
const std::vector< uint16_t > & |
adcVal, |
|
|
const std::vector< uint8_t > & |
adcExt, |
|
|
const std::vector< int16_t > & |
pedCor, |
|
|
const std::vector< uint8_t > & |
pedEn |
|
) |
| const |
|
private |
Definition at line 955 of file ZdcByteStreamReadV1V2Tool.cxx.
974 bool isNotSpare =
false;
987 phi = 4 * pin + asic;
991 CHECK(state.m_coolIds.count(coolId) == 0);
992 state.m_coolIds.insert(coolId);
997 state.m_triggerTowers->push_back(
tt);
1015 tt->initialize(coolId,
eta,
phi, lcpVal, ljeVal, pedCor, pedEn,
1016 lcpBcidVec, adcVal, adcExt, ljeSat80Vec,
error, state.m_caloUserHeader.lut(),
1017 state.m_caloUserHeader.ppFadc());
1018 return StatusCode::SUCCESS;
◆ convert() [1/4]
Convert ROB fragments to trigger towers.
Definition at line 126 of file ZdcByteStreamReadV1V2Tool.cxx.
131 state.m_subDetectorID = eformat::FORWARD_ZDC;
132 state.m_triggerTowers = ttCollection;
138 for (; rob != robEnd; ++rob, ++robCounter) {
140 if (!
sc.isSuccess()) {
144 return StatusCode::SUCCESS;
◆ convert() [2/4]
Definition at line 153 of file ZdcByteStreamReadV1V2Tool.cxx.
160 ttCollection->setStore(aux);
168 if (
sc != StatusCode::SUCCESS)
178 (*zdcCollection) = (*zc);
181 return StatusCode::SUCCESS;
◆ convert() [3/4]
◆ convert() [4/4]
◆ convertTT2ZD()
Definition at line 1143 of file ZdcByteStreamReadV1V2Tool.cxx.
1145 typedef std::map<uint32_t,ZdcDigits*> hashmapType;
1146 hashmapType digits_map;
1159 uint32_t slinkChannel = asic*16 + pin;
1174 if (iter == digits_map.end())
1177 digits_map.insert(std::pair<uint32_t,ZdcDigits*>(chan_hash,
new ZdcDigits(chan_id)));
1178 iter = digits_map.find(chan_hash);
1180 if (iter != digits_map.end())
1183 if (
gain==0&&
delay==0) (*iter).second->set_digits_gain0_delay0(
tt->adc() );
1184 if (
gain==1&&
delay==0) (*iter).second->set_digits_gain1_delay0(
tt->adc() );
1185 if (
gain==0&&
delay==1) (*iter).second->set_digits_gain0_delay1(
tt->adc() );
1186 if (
gain==1&&
delay==1) (*iter).second->set_digits_gain1_delay1(
tt->adc() );
1196 while (iter != iter_end)
1208 zdcCollection->
push_back((*iter).second);
1212 return zdcCollection;
◆ 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);
◆ 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.
◆ 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.
◆ 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]
◆ 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
◆ finalize()
StatusCode ZdcByteStreamReadV1V2Tool::finalize |
( |
| ) |
|
|
virtual |
◆ getKey()
Get the (hashed) key of an object that is in the event store.
This is a bit of a special one. StoreGateSvc
and xAOD::TEvent
both provide ways for getting the SG::sgkey_t
key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getName
- Parameters
-
ptr | The bare pointer to the object that the event store should know about |
- Returns
- The hashed key of the object in the store. If not found, an invalid (zero) key.
Definition at line 119 of file AsgTool.cxx.
121 #ifdef XAOD_STANDALONE
124 return evtStore()->event()->getKey( ptr );
127 return (
proxy ==
nullptr ? 0 :
proxy->sgkey() );
128 #endif // XAOD_STANDALONE
◆ getName()
const std::string & asg::AsgTool::getName |
( |
const void * |
ptr | ) |
const |
|
inherited |
Get the name of an object that is / should be in the event store.
This is a bit of a special one. StoreGateSvc
and xAOD::TEvent
both provide ways for getting the std::string
name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.
In order to allow tools to efficiently perform this operation, they can use this helper function.
- See also
- asg::AsgTool::getKey
- Parameters
-
ptr | The bare pointer to the object that the event store should know about |
- Returns
- The string name of the object in the store. If not found, an empty string.
Definition at line 106 of file AsgTool.cxx.
108 #ifdef XAOD_STANDALONE
111 return evtStore()->event()->getName( ptr );
114 static const std::string
dummy =
"";
116 #endif // XAOD_STANDALONE
◆ getPpmAdcSamplesR3_()
std::vector< uint16_t > ZdcByteStreamReadV1V2Tool::getPpmAdcSamplesR3_ |
( |
State & |
state, |
|
|
BitReader & |
br, |
|
|
uint8_t |
format, |
|
|
uint8_t |
minIndex |
|
) |
| const |
|
private |
Definition at line 552 of file ZdcByteStreamReadV1V2Tool.cxx.
556 std::vector<uint16_t>
adc = {0, 0, 0, 0, 0};
563 longField =
br.getField (1);
564 numBits = longField == 0? 4: (
format * 2);
566 numBits =
i == 0? 4: (
format + 2);
570 minAdc =
br.getField (numBits);
571 if (longField == 0) {
572 minAdc += state.m_caloUserHeader.ppLowerBound();
575 adc[
i] = minAdc +
br.getField (numBits);
583 adc[minIndex] = minAdc;
◆ getPpmAdcSamplesR4_()
std::vector< uint16_t > ZdcByteStreamReadV1V2Tool::getPpmAdcSamplesR4_ |
( |
State & |
state, |
|
|
BitReader & |
br, |
|
|
uint8_t |
encoding, |
|
|
uint8_t |
minIndex |
|
) |
| const |
|
private |
Definition at line 840 of file ZdcByteStreamReadV1V2Tool.cxx.
843 uint8_t numAdc = state.m_subBlockHeader.nSlice2();
847 return std::vector<uint16_t>(numAdc,
val);
849 std::vector<uint16_t>
adc(numAdc, 0);
850 uint16_t minAdc =
br.getField (5) + state.m_caloUserHeader.ppLowerBound();
851 adc[minIndex] = minAdc;
857 std::vector<uint16_t>
adc(numAdc, 0);
861 state.m_caloUserHeader.ppLowerBound());
863 adc[minIndex] = minAdc;
865 adc[minIndex ==
i? 0:
i] =
br.getField (
◆ getProperty()
template<class T >
const T* asg::AsgTool::getProperty |
( |
const std::string & |
name | ) |
const |
|
inherited |
Get one of the tool's properties.
◆ initialize()
StatusCode ZdcByteStreamReadV1V2Tool::initialize |
( |
| ) |
|
|
virtual |
Dummy implementation of the initialisation function.
It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...
Reimplemented from asg::AsgTool.
Definition at line 95 of file ZdcByteStreamReadV1V2Tool.cxx.
102 const ZdcID* zdcID =
nullptr;
104 msg(MSG::ERROR) <<
"execute: Could not retrieve ZdcID object from the detector store" <<
endmsg;
105 return StatusCode::FAILURE;
114 return StatusCode::SUCCESS;
◆ initSourceIDs()
void ZdcByteStreamReadV1V2Tool::initSourceIDs |
( |
| ) |
|
|
private |
Definition at line 1075 of file ZdcByteStreamReadV1V2Tool.cxx.
1077 const int crates = 8;
1082 for (
int crate = 0; crate < crates; ++crate) {
1087 eformat::FORWARD_ZDC);
1091 if (crate > 1 && crate < 6) {
1093 if (crate < 4 && slink == 0) {
◆ 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.
◆ interpretPpmHeaderR4V1_()
void ZdcByteStreamReadV1V2Tool::interpretPpmHeaderR4V1_ |
( |
BitReader & |
br, |
|
|
uint8_t |
numAdc, |
|
|
int8_t & |
encoding, |
|
|
int8_t & |
minIndex |
|
) |
| const |
|
private |
Definition at line 790 of file ZdcByteStreamReadV1V2Tool.cxx.
796 minHeader =
br.getField (4);
798 minIndex = minHeader % 5;
800 if (minHeader < 10) {
812 }
else if (numAdc == 7) {
814 }
else if (numAdc < 16) {
819 uint8_t fieldSize = 1 << numBits;
820 minHeader =
br.getField (numBits);
821 uint8_t encValue = fieldSize - 1;
822 if (minHeader == encValue) {
826 minHeader +=
br.getField (2) << numBits;
827 minIndex = minHeader % fieldSize;
828 encValue = 3 * fieldSize;
830 if (minHeader < encValue) {
◆ msg() [1/2]
◆ msg() [2/2]
◆ msg_level_name()
const std::string & asg::AsgTool::msg_level_name |
( |
| ) |
const |
|
inherited |
A deprecated function for getting the message level's name.
Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:
MSG::name( msg().level() )
This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.
- Returns
- The string name of the current minimum message level that's printed
Definition at line 101 of file AsgTool.cxx.
◆ 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.
◆ ppmSourceIDs()
const std::vector< uint32_t > & ZdcByteStreamReadV1V2Tool::ppmSourceIDs |
( |
const std::string & |
sgKey | ) |
const |
Return reference to vector with all possible Source Identifiers.
Definition at line 1103 of file ZdcByteStreamReadV1V2Tool.cxx.
1106 if (sgKey.find(
"Muon") != std::string::npos) {
1109 else if (sgKey.find(
"Spare") != std::string::npos) {
◆ print()
void asg::AsgTool::print |
( |
| ) |
const |
|
virtualinherited |
Print the state of the tool.
Implements asg::IAsgTool.
Reimplemented in JetRecTool, JetFinder, JetModifiedMassDrop, JetFromPseudojet, JetReclusterer, JetReclusteringTool, JetTruthLabelingTool, JetPileupLabelingTool, HI::HIPileupTool, top::TopObjectSelection, JetDumper, JetBottomUpSoftDrop, JetRecursiveSoftDrop, JetSoftDrop, JetConstituentsRetriever, JetSubStructureMomentToolsBase, JetSplitter, JetToolRunner, JetPruner, JetPseudojetRetriever, JetTrimmer, AsgHelloTool, and KtDeltaRTool.
Definition at line 131 of file AsgTool.cxx.
◆ processPpmBlock_()
StatusCode ZdcByteStreamReadV1V2Tool::processPpmBlock_ |
( |
State & |
state | ) |
const |
|
private |
Definition at line 344 of file ZdcByteStreamReadV1V2Tool.cxx.
345 if (!state.m_ppBlock.empty()) {
346 if (state.m_subBlockHeader.format() == 0) {
348 state.m_ppBlock.clear();
353 if (state.m_verCode == 0x31) {
355 state.m_ppBlock.clear();
360 if (state.m_verCode == 0x41 || state.m_verCode == 0x42) {
362 state.m_ppBlock.clear();
368 if (!state.m_ppLuts.empty()) {
369 if (state.m_verCode == 0x21 || state.m_verCode == 0x31) {
371 state.m_ppLuts.clear();
372 state.m_ppFadcs.clear();
377 <<
int(state.m_subBlockHeader.format())
378 <<
"' for rob version '"
379 << MSG::hex <<
int(state.m_verCode)
380 << MSG::dec <<
"'" );
381 return StatusCode::FAILURE;
383 return StatusCode::SUCCESS;
◆ processPpmBlockR3V1_()
StatusCode ZdcByteStreamReadV1V2Tool::processPpmBlockR3V1_ |
( |
State & |
state | ) |
const |
|
private |
Definition at line 873 of file ZdcByteStreamReadV1V2Tool.cxx.
874 if (state.m_subBlockHeader.format() == 1) {
876 return StatusCode::SUCCESS;
877 }
else if (state.m_subBlockHeader.format() >= 2) {
879 return StatusCode::FAILURE;
881 return StatusCode::FAILURE;
◆ processPpmBlockR4V1_()
StatusCode ZdcByteStreamReadV1V2Tool::processPpmBlockR4V1_ |
( |
State & |
state | ) |
const |
|
private |
Definition at line 627 of file ZdcByteStreamReadV1V2Tool.cxx.
628 if (state.m_subBlockHeader.format() == 1) {
630 return StatusCode::SUCCESS;
631 }
else if (state.m_subBlockHeader.format() >= 2) {
634 return StatusCode::SUCCESS;
636 return StatusCode::FAILURE;
◆ processPpmCompressedR3V1_()
StatusCode ZdcByteStreamReadV1V2Tool::processPpmCompressedR3V1_ |
( |
State & |
state | ) |
const |
|
private |
Definition at line 469 of file ZdcByteStreamReadV1V2Tool.cxx.
471 BitReader
br (state.m_ppBlock);
475 if (state.m_subBlockHeader.format() == 3) {
476 present =
br.getField (1);
486 std::vector<uint16_t> adcVal = {0 , 0, 0, 0, 0};
487 std::vector<uint8_t> adcExt = {0 , 0, 0, 0, 0};
490 uint8_t minIndex = minHeader % 5;
491 if (minHeader < 15) {
492 if (minHeader < 10) {
495 fmt = 2 +
br.getField (2);
499 lutVal =
br.getField (3);
505 lutVal =
br.getField (8);
506 lutExt =
br.getField (1);
507 lutSat =
br.getField (1);
508 lutPeak =
br.getField (1);
513 adcExt[
i] =
br.getField (1);
534 state.m_subBlockHeader.crate(),
535 state.m_subBlockHeader.module(),
537 std::vector<uint8_t> {lutVal},
538 std::vector<uint8_t> {uint8_t(lutExt | (lutSat << 1) | (lutPeak << 2))},
545 }
catch (
const std::out_of_range& ex) {
549 return StatusCode::SUCCESS;
◆ processPpmCompressedR4V1_()
StatusCode ZdcByteStreamReadV1V2Tool::processPpmCompressedR4V1_ |
( |
State & |
state | ) |
const |
|
private |
Definition at line 639 of file ZdcByteStreamReadV1V2Tool.cxx.
640 BitReader
br (state.m_ppBlock);
642 uint8_t numAdc = state.m_subBlockHeader.nSlice2();
643 uint8_t numLut = state.m_subBlockHeader.nSlice1();
656 std::vector<uint8_t> haveLut(numLut, 0);
657 std::vector<uint8_t> lcpVal(numLut, 0);
659 std::vector<uint8_t> lcpExt(numLut, 0);
660 std::vector<uint8_t> lcpSat(numLut, 0);
661 std::vector<uint8_t> lcpPeak(numLut, 0);
662 std::vector<uint8_t> lcpBcidVec(numLut, 0);
664 std::vector<uint8_t> ljeVal(numLut, 0);
666 std::vector<uint8_t> ljeLow(numLut, 0);
667 std::vector<uint8_t> ljeHigh(numLut, 0);
668 std::vector<uint8_t> ljeRes(numLut, 0);
669 std::vector<uint8_t> ljeSat80Vec(numLut, 0);
671 std::vector<uint16_t> adcVal(numAdc, 0);
672 std::vector<uint8_t> adcExt(numAdc, 0);
673 std::vector<int16_t> pedCor(numLut, 0);
674 std::vector<uint8_t> pedEn(numLut, 0);
677 int8_t minIndex = -1;
679 if (state.m_subBlockHeader.format() == 3) {
680 present =
br.getField (1);
688 for(
uint i=0;
i < numLut; ++
i) {
689 lcpPeak[
i] =
br.getField (1);
694 ljeLow[
i] =
br.getField (1);
701 if (lcpPeak[
i] == 1) {
702 lcpVal[
i] =
br.getField (4);
706 if (lcpPeak[
i] == 1){
707 ljeVal[
i] =
br.getField (3);
714 haveLut[
i] =
br.getField (1);
722 adcExt[
i] =
br.getField (1);
727 if (haveLut[
i] == 1) {
728 lcpVal[
i] =
br.getField (8);
729 lcpExt[
i] =
br.getField (1);
730 lcpSat[
i] =
br.getField (1);
731 lcpPeak[
i] =
br.getField (1);
736 if (haveLut[
i] == 1) {
737 ljeVal[
i] =
br.getField (8);
738 ljeLow[
i] =
br.getField (1);
739 ljeHigh[
i] =
br.getField (1);
740 ljeRes[
i] =
br.getField (1);
749 return StatusCode::FAILURE;
757 pedCor[
i] =
br.getField (6) + pedCorBase;
758 if (state.m_subBlockHeader.compVer() > 0) {
769 pedCor[
i] = ::pedCorrection(
val);
770 pedEn[
i] =
br.getField (1);
775 lcpBcidVec[
i] =
uint8_t((lcpPeak[
i] << 2) | (lcpSat[
i] << 1) | lcpExt[
i]);
776 ljeSat80Vec[
i] =
uint8_t((ljeRes[
i] << 2) | (ljeHigh[
i] << 1) | ljeLow[
i]);
779 chan, lcpVal, lcpBcidVec, ljeVal, ljeSat80Vec, adcVal, adcExt, pedCor,
782 }
catch (
const std::out_of_range& ex) {
786 return StatusCode::SUCCESS;
◆ processPpmNeutral_()
StatusCode ZdcByteStreamReadV1V2Tool::processPpmNeutral_ |
( |
State & |
state | ) |
const |
|
private |
Definition at line 386 of file ZdcByteStreamReadV1V2Tool.cxx.
387 uint8_t numLut = state.m_subBlockHeader.nSlice1();
388 uint8_t numFadc = state.m_subBlockHeader.nSlice2();
389 uint8_t totSlice = 3 * numLut + numFadc;
392 for (
int asic = 0 ; asic < 4 ; ++asic ) {
393 for (
int mcm = 0 ; mcm < 16 ; ++mcm ) {
395 std::vector<uint32_t> rotated(totSlice);
398 for (
uint8_t bit = 0 ; bit < 11 ; ++bit ) {
399 if ( state.m_ppBlock[
slice * 11 + asic * (11 * totSlice) + bit + 1] & (1 << mcm))
400 rotated[
slice] |= (1 << bit);
404 bool nonZeroData =
false;
407 || rotated[
slice + numLut]
408 || rotated[
slice + 2 * numLut + numFadc]) {
414 std::vector<uint8_t> lcpVal;
415 std::vector<uint8_t> lcpBcidVec;
416 std::vector<uint8_t> ljeVal;
417 std::vector<uint8_t> ljeSat80Vec;
418 std::vector<int16_t> pedCor;
419 std::vector<uint8_t> pedEn;
421 std::vector<uint16_t> adcVal;
422 std::vector<uint8_t> adcExt;
426 lcpVal.push_back(rotated[
slice] & 0xff);
427 ljeVal.push_back(rotated[
slice + numLut] & 0xff);
428 pedCor.push_back(::pedCorrection(rotated[
slice + 2 * numLut + numFadc] & 0x3ff));
430 lcpBcidVec.push_back((rotated[
slice] >> 8) & 0x7);
431 ljeSat80Vec.push_back((rotated[
slice + numLut] >> 8) & 0x7);
432 pedEn.push_back((rotated[
slice + 2 * numLut + numFadc] >> 10) & 0x1);
437 if (rotated[
slice + numLut]) {
445 adcVal.push_back(rotated[
slice + 2 * numLut] & 0x3ff);
446 adcExt.push_back((rotated[
slice + 2 * numLut] >> 10 & 0
x1) & 0x3ff);
452 state.m_subBlockHeader.crate(),
453 state.m_subBlockHeader.module(),
466 return StatusCode::SUCCESS;
◆ processPpmStandardR3V1_() [1/2]
StatusCode ZdcByteStreamReadV1V2Tool::processPpmStandardR3V1_ |
( |
State & |
state | ) |
const |
|
private |
Definition at line 942 of file ZdcByteStreamReadV1V2Tool.cxx.
943 for(
const auto& lut : state.m_ppLuts) {
946 state.m_subBlockHeader.crate(),
947 state.m_subBlockHeader.module(),
950 state.m_ppFadcs[lut.first]));
952 return StatusCode::SUCCESS;
◆ processPpmStandardR3V1_() [2/2]
StatusCode ZdcByteStreamReadV1V2Tool::processPpmStandardR3V1_ |
( |
State & |
state, |
|
|
uint32_t |
word, |
|
|
int |
indata |
|
) |
| const |
|
private |
Definition at line 590 of file ZdcByteStreamReadV1V2Tool.cxx.
594 if (state.m_subBlockHeader.seqNum() == 63) {
598 const uint8_t numAdc = state.m_subBlockHeader.nSlice2();
599 const uint8_t numLut = state.m_subBlockHeader.nSlice1();
600 const uint8_t nTotal = numAdc + numLut;
601 const uint8_t wordsPerBlock = 8;
602 const uint8_t iBlk = inData / wordsPerBlock;
603 uint8_t iChan = state.m_subBlockHeader.seqNum() + 2 * (inData % wordsPerBlock);
607 uint16_t subword = (word >> 16 *
i) & 0x7ff;
608 state.m_ppLuts[iChan].push_back(subword);
611 }
else if (iBlk < nTotal) {
613 uint16_t subword = (word >> (16 *
i)) & 0x7ff;
614 state.m_ppFadcs[iChan].push_back(subword);
620 sc = StatusCode::FAILURE;
◆ processPpmStandardR4V1_()
StatusCode ZdcByteStreamReadV1V2Tool::processPpmStandardR4V1_ |
( |
State & |
state | ) |
const |
|
private |
Definition at line 884 of file ZdcByteStreamReadV1V2Tool.cxx.
887 uint8_t numAdc = state.m_subBlockHeader.nSlice2();
888 uint8_t numLut = state.m_subBlockHeader.nSlice1();
889 uint8_t crate = state.m_subBlockHeader.crate();
893 BitReader
br (state.m_ppBlock);
897 std::vector<uint8_t> lcpVal;
898 std::vector<uint8_t> lcpBcidVec;
900 std::vector<uint8_t> ljeVal;
901 std::vector<uint8_t> ljeSat80Vec;
905 std::vector<uint16_t> adcVal;
906 std::vector<uint8_t> adcExt;
907 std::vector<int16_t> pedCor;
908 std::vector<uint8_t> pedEn;
910 for (
int i = 0;
i < numLut; ++
i) {
911 lcpVal.push_back(
br.getField (8));
912 lcpBcidVec.push_back(
br.getField (3));
915 for (
int i = 0;
i < numLut; ++
i) {
916 ljeVal.push_back(
br.getField (8));
917 ljeSat80Vec.push_back(
br.getField (3));
920 for (
int i = 0;
i < numAdc; ++
i) {
921 adcVal.push_back(
br.getField (10));
922 adcExt.push_back(
br.getField (1));
925 for (
int i = 0;
i < numLut; ++
i) {
927 pedCor.push_back(pedCorrection(
pc));
928 pedEn.push_back(
br.getField (1));
930 }
catch (
const std::out_of_range& ex) {
936 ljeVal, ljeSat80Vec, adcVal, adcExt, pedCor, pedEn));
939 return StatusCode::SUCCESS;
◆ processPpmWord_()
StatusCode ZdcByteStreamReadV1V2Tool::processPpmWord_ |
( |
State & |
state, |
|
|
uint32_t |
word, |
|
|
int |
indata |
|
) |
| const |
|
private |
Definition at line 325 of file ZdcByteStreamReadV1V2Tool.cxx.
328 if ( (state.m_subBlockHeader.format() == 0)
329 || (state.m_subBlockHeader.format() >= 2)
330 || (state.m_verCode >= 0x41)) {
331 state.m_ppBlock.push_back(word);
332 }
else if ((state.m_verCode == 0x21) || (state.m_verCode == 0x31)) {
336 << state.m_verCode <<
":" << state.m_subBlockHeader.format()
338 return StatusCode::FAILURE;
340 return StatusCode::SUCCESS;
◆ processRobFragment_()
Definition at line 207 of file ZdcByteStreamReadV1V2Tool.cxx.
211 auto rob = **robIter;
214 "Treating ROB fragment source id #" << MSG::hex << rob.rob_source_id());
217 state.m_rodSourceId = rob.rod_source_id();
218 state.m_robSourceId = rob.source_id();
219 const auto sourceID = (state.m_rodSourceId >> 16) & 0xff;
224 if (rob.nstatus() > 0) {
229 m_errorTool->robError(state.m_rodSourceId, *robData);
230 return StatusCode::FAILURE;
238 rob.rod_data(payloadBeg);
239 payloadEnd = payloadBeg + rob.rod_ndata();
244 return StatusCode::FAILURE;
249 uint16_t rodVer = rob.rod_version() & 0xffff;
250 state.m_verCode = ((rodVer & 0xfff) << 4) | 1;
251 uint32_t rodRunNumber = rob.rod_run_no() & 0xffffff;
254 if (sourceID != state.m_subDetectorID) {
255 ATH_MSG_ERROR(
"Wrong subdetector source id for requested objects: " << state.m_rodSourceId);
256 return StatusCode::FAILURE;
259 ATH_MSG_DEBUG(
"Treating crate " << rodCrate <<
" slink " << rodSlink);
262 if (!state.m_caloUserHeader.isValid()) {
264 return StatusCode::FAILURE;
268 "Run number: " << MSG::dec << rodRunNumber <<
endmsg
269 <<
"Version code: 0x" << MSG::hex <<
int(state.m_verCode) << MSG::dec
270 <<
endmsg <<
"LUT triggered slice offset: "
271 <<
int(state.m_caloUserHeader.lut()) <<
endmsg
272 <<
"FADC triggered slice offset: " <<
int(state.m_caloUserHeader.ppFadc())
273 <<
endmsg <<
"FADC baseline lower bound: "
274 <<
int(state.m_caloUserHeader.ppLowerBound()));
287 state.m_ppLuts.clear();
288 state.m_ppFadcs.clear();
289 state.m_ppBlock.clear();
296 "SubBlock version #" <<
int(state.m_subBlockHeader.version())
297 <<
" format #" <<
int(state.m_subBlockHeader.format())
298 <<
" seqNum (compVer) #" <<
int(state.m_subBlockHeader.seqNum())
299 <<
" nslice1 #" <<
int(state.m_subBlockHeader.nSlice1())
300 <<
" nslice2 #" <<
int(state.m_subBlockHeader.nSlice2())
303 }
else if (
blockType == (subBlock | 1)) {
308 switch(state.m_subDetectorID){
309 case eformat::TDAQ_CALO_PREPROC:
312 case eformat::FORWARD_ZDC:
322 return StatusCode::SUCCESS;
◆ renounce()
◆ renounceArray()
◆ 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_detStore
◆ m_errorTool
◆ m_evtStore
◆ m_ppmSourceIDs
std::vector<uint32_t> ZdcByteStreamReadV1V2Tool::m_ppmSourceIDs |
|
private |
◆ m_ppmSourceIDsMuon
std::vector<uint32_t> ZdcByteStreamReadV1V2Tool::m_ppmSourceIDsMuon |
|
private |
◆ m_ppmSourceIDsSpare
std::vector<uint32_t> ZdcByteStreamReadV1V2Tool::m_ppmSourceIDsSpare |
|
private |
◆ m_robDataProvider
◆ m_srcIdMap
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_zdcID
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
static int crate(uint32_t code)
moduleID -> crate
static const ZdcCablingService * getInstance()
get pointer to service instance
Scalar phi() const
phi method
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
TriggerTowerAuxContainer_v2 TriggerTowerAuxContainer
Define the latest version of the TriggerTower auxiliary container.
static uint32_t getRobID(uint32_t rod_id)
ROD -> ROB.
L1Topo::BlockTypes blockType(const uint32_t word, uint32_t offset=28, uint32_t size=0x0f)
Function to return the block type of a data word from L1Topo
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
Identifier h2s_channel_id(int crate, int channel) const
#define ATH_MSG_VERBOSE(x)
setScaleOne setStatusOne setSaturated int16_t
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
value_type get_compact(void) const
Get the compact id.
int hwid2delay(int crate, int channel) const
::StatusCode StatusCode
StatusCode definition for legacy code.
static int maxSlinks()
Return the maximum possible number of slinks.
Description of TriggerTower_v2.
static int slink(uint32_t code)
moduleID -> slink
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
#define CHECK(...)
Evaluate an expression and check for errors.
double delay(std::size_t d)
std::vector< const ROBF * > VROBFRAG
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
AuxContainer for TriggerTower_v2.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
TriggerTowerContainer_v2 TriggerTowerContainer
Define the latest version of the TriggerTower container.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
int hwid2gain(int crate, int channel) const
static uint32_t getRodID(int crate, int slink, int daqOrRoi, eformat::SubDetector subdet)
Make a ROD Source ID.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
This class provides conversion between Lower level Source ID to higher level source ID for L1Calo Byt...
Identifier32 get_identifier32(void) const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
TriggerTower_v2 TriggerTower
Define the latest version of the TriggerTower class.