|
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 39 of file ZdcByteStreamReadV1V2Tool.h.
◆ ROBIterator
◆ ROBPointer
◆ RODPointer
◆ StoreGateSvc_t
◆ RequestType
◆ ZdcByteStreamReadV1V2Tool()
ZdcByteStreamReadV1V2Tool::ZdcByteStreamReadV1V2Tool |
( |
const std::string & |
name | ) |
|
Definition at line 73 of file ZdcByteStreamReadV1V2Tool.cxx.
76 m_errorTool(
"ZdcL1CaloErrorByteStreamTool/ZdcL1CaloErrorByteStreamTool"),
79 declareInterface<ZdcByteStreamReadV1V2Tool>(
this);
83 "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 1039 of file ZdcByteStreamReadV1V2Tool.cxx.
1048 std::vector<uint8_t> lcpVal;
1049 std::vector<uint8_t> lcpBcidVec;
1051 std::vector<uint16_t> adcVal;
1052 std::vector<uint8_t> adcExt;
1054 for(
auto lut: luts) {
1055 lcpVal.push_back(BitField::get<uint8_t>(
lut, 0, 8));
1056 lcpBcidVec.push_back(BitField::get<uint8_t>(
lut, 8, 3));
1060 adcExt.push_back(BitField::get<uint8_t>(
f, 0, 1));
1061 adcVal.push_back(BitField::get<uint16_t>(
f, 1, 10));
1067 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 1016 of file ZdcByteStreamReadV1V2Tool.cxx.
1027 std::vector<uint8_t> ljeSat80Vec;
1029 std::vector<int16_t> pedCor;
1030 std::vector<uint8_t> pedEn;
1033 luts , ljeSat80Vec, fadc, bcidExt, pedCor, pedEn)
1036 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 950 of file ZdcByteStreamReadV1V2Tool.cxx.
969 bool isNotSpare =
false;
982 phi = 4 * pin + asic;
986 CHECK(state.m_coolIds.count(coolId) == 0);
987 state.m_coolIds.insert(coolId);
992 state.m_triggerTowers->push_back(
tt);
1010 tt->initialize(coolId,
eta,
phi, lcpVal, ljeVal, pedCor, pedEn,
1011 lcpBcidVec, adcVal, adcExt, ljeSat80Vec,
error, state.m_caloUserHeader.lut(),
1012 state.m_caloUserHeader.ppFadc());
1013 return StatusCode::SUCCESS;
◆ convert() [1/4]
Convert ROB fragments to trigger towers.
Definition at line 121 of file ZdcByteStreamReadV1V2Tool.cxx.
126 state.m_subDetectorID = eformat::FORWARD_ZDC;
127 state.m_triggerTowers = ttCollection;
133 for (; rob != robEnd; ++rob, ++robCounter) {
135 if (!
sc.isSuccess()) {
139 return StatusCode::SUCCESS;
◆ convert() [2/4]
Definition at line 148 of file ZdcByteStreamReadV1V2Tool.cxx.
155 ttCollection->setStore(aux);
163 if (
sc != StatusCode::SUCCESS)
173 (*zdcCollection) = (*zc);
176 return StatusCode::SUCCESS;
◆ convert() [3/4]
◆ convert() [4/4]
◆ convertTT2ZD()
Definition at line 1138 of file ZdcByteStreamReadV1V2Tool.cxx.
1140 typedef std::map<uint32_t,ZdcDigits*> hashmapType;
1141 hashmapType digits_map;
1149 uint32_t slinkChannel = asic*16 + pin;
1164 if (iter == digits_map.end())
1167 digits_map.insert(std::pair<uint32_t,ZdcDigits*>(chan_hash,
new ZdcDigits(chan_id)));
1168 iter = digits_map.find(chan_hash);
1170 if (iter != digits_map.end())
1173 if (
gain==0&&
delay==0) (*iter).second->set_digits_gain0_delay0(
tt->adc() );
1174 if (
gain==1&&
delay==0) (*iter).second->set_digits_gain1_delay0(
tt->adc() );
1175 if (
gain==0&&
delay==1) (*iter).second->set_digits_gain0_delay1(
tt->adc() );
1176 if (
gain==1&&
delay==1) (*iter).second->set_digits_gain1_delay1(
tt->adc() );
1186 while (iter != iter_end)
1198 zdcCollection->
push_back((*iter).second);
1202 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);
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]
◆ 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
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
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 547 of file ZdcByteStreamReadV1V2Tool.cxx.
551 std::vector<uint16_t>
adc = {0, 0, 0, 0, 0};
558 longField =
br.getField (1);
559 numBits = longField == 0? 4: (
format * 2);
561 numBits =
i == 0? 4: (
format + 2);
565 minAdc =
br.getField (numBits);
566 if (longField == 0) {
567 minAdc += state.m_caloUserHeader.ppLowerBound();
570 adc[
i] = minAdc +
br.getField (numBits);
578 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 835 of file ZdcByteStreamReadV1V2Tool.cxx.
838 uint8_t numAdc = state.m_subBlockHeader.nSlice2();
842 return std::vector<uint16_t>(numAdc,
val);
844 std::vector<uint16_t>
adc(numAdc, 0);
845 uint16_t minAdc =
br.getField (5) + state.m_caloUserHeader.ppLowerBound();
846 adc[minIndex] = minAdc;
852 std::vector<uint16_t>
adc(numAdc, 0);
856 state.m_caloUserHeader.ppLowerBound());
858 adc[minIndex] = minAdc;
860 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 90 of file ZdcByteStreamReadV1V2Tool.cxx.
97 const ZdcID* zdcID =
nullptr;
99 msg(MSG::ERROR) <<
"execute: Could not retrieve ZdcID object from the detector store" <<
endmsg;
100 return StatusCode::FAILURE;
109 return StatusCode::SUCCESS;
◆ initSourceIDs()
void ZdcByteStreamReadV1V2Tool::initSourceIDs |
( |
| ) |
|
|
private |
Definition at line 1070 of file ZdcByteStreamReadV1V2Tool.cxx.
1072 const int crates = 8;
1077 for (
int crate = 0; crate < crates; ++crate) {
1082 eformat::FORWARD_ZDC);
1086 if (crate > 1 && crate < 6) {
1088 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 785 of file ZdcByteStreamReadV1V2Tool.cxx.
791 minHeader =
br.getField (4);
793 minIndex = minHeader % 5;
795 if (minHeader < 10) {
807 }
else if (numAdc == 7) {
809 }
else if (numAdc < 16) {
814 uint8_t fieldSize = 1 << numBits;
815 minHeader =
br.getField (numBits);
816 uint8_t encValue = fieldSize - 1;
817 if (minHeader == encValue) {
821 minHeader +=
br.getField (2) << numBits;
822 minIndex = minHeader % fieldSize;
823 encValue = 3 * fieldSize;
825 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 1098 of file ZdcByteStreamReadV1V2Tool.cxx.
1101 if (sgKey.find(
"Muon") != std::string::npos) {
1104 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, 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 339 of file ZdcByteStreamReadV1V2Tool.cxx.
340 if (!state.m_ppBlock.empty()) {
341 if (state.m_subBlockHeader.format() == 0) {
343 state.m_ppBlock.clear();
348 if (state.m_verCode == 0x31) {
350 state.m_ppBlock.clear();
355 if (state.m_verCode == 0x41 || state.m_verCode == 0x42) {
357 state.m_ppBlock.clear();
363 if (!state.m_ppLuts.empty()) {
364 if (state.m_verCode == 0x21 || state.m_verCode == 0x31) {
366 state.m_ppLuts.clear();
367 state.m_ppFadcs.clear();
372 <<
int(state.m_subBlockHeader.format())
373 <<
"' for rob version '"
374 << MSG::hex <<
int(state.m_verCode)
375 << MSG::dec <<
"'" );
376 return StatusCode::FAILURE;
378 return StatusCode::SUCCESS;
◆ processPpmBlockR3V1_()
StatusCode ZdcByteStreamReadV1V2Tool::processPpmBlockR3V1_ |
( |
State & |
state | ) |
const |
|
private |
Definition at line 868 of file ZdcByteStreamReadV1V2Tool.cxx.
869 if (state.m_subBlockHeader.format() == 1) {
871 return StatusCode::SUCCESS;
872 }
else if (state.m_subBlockHeader.format() >= 2) {
874 return StatusCode::FAILURE;
876 return StatusCode::FAILURE;
◆ processPpmBlockR4V1_()
StatusCode ZdcByteStreamReadV1V2Tool::processPpmBlockR4V1_ |
( |
State & |
state | ) |
const |
|
private |
Definition at line 622 of file ZdcByteStreamReadV1V2Tool.cxx.
623 if (state.m_subBlockHeader.format() == 1) {
625 return StatusCode::SUCCESS;
626 }
else if (state.m_subBlockHeader.format() >= 2) {
629 return StatusCode::SUCCESS;
631 return StatusCode::FAILURE;
◆ processPpmCompressedR3V1_()
StatusCode ZdcByteStreamReadV1V2Tool::processPpmCompressedR3V1_ |
( |
State & |
state | ) |
const |
|
private |
Definition at line 464 of file ZdcByteStreamReadV1V2Tool.cxx.
466 BitReader
br (state.m_ppBlock);
470 if (state.m_subBlockHeader.format() == 3) {
471 present =
br.getField (1);
481 std::vector<uint16_t> adcVal = {0 , 0, 0, 0, 0};
482 std::vector<uint8_t> adcExt = {0 , 0, 0, 0, 0};
485 uint8_t minIndex = minHeader % 5;
486 if (minHeader < 15) {
487 if (minHeader < 10) {
490 fmt = 2 +
br.getField (2);
494 lutVal =
br.getField (3);
500 lutVal =
br.getField (8);
501 lutExt =
br.getField (1);
502 lutSat =
br.getField (1);
503 lutPeak =
br.getField (1);
508 adcExt[
i] =
br.getField (1);
529 state.m_subBlockHeader.crate(),
530 state.m_subBlockHeader.module(),
532 std::vector<uint8_t> {lutVal},
533 std::vector<uint8_t> {uint8_t(lutExt | (lutSat << 1) | (lutPeak << 2))},
540 }
catch (
const std::out_of_range& ex) {
544 return StatusCode::SUCCESS;
◆ processPpmCompressedR4V1_()
StatusCode ZdcByteStreamReadV1V2Tool::processPpmCompressedR4V1_ |
( |
State & |
state | ) |
const |
|
private |
Definition at line 634 of file ZdcByteStreamReadV1V2Tool.cxx.
635 BitReader
br (state.m_ppBlock);
637 uint8_t numAdc = state.m_subBlockHeader.nSlice2();
638 uint8_t numLut = state.m_subBlockHeader.nSlice1();
651 std::vector<uint8_t> haveLut(numLut, 0);
652 std::vector<uint8_t> lcpVal(numLut, 0);
654 std::vector<uint8_t> lcpExt(numLut, 0);
655 std::vector<uint8_t> lcpSat(numLut, 0);
656 std::vector<uint8_t> lcpPeak(numLut, 0);
657 std::vector<uint8_t> lcpBcidVec(numLut, 0);
659 std::vector<uint8_t> ljeVal(numLut, 0);
661 std::vector<uint8_t> ljeLow(numLut, 0);
662 std::vector<uint8_t> ljeHigh(numLut, 0);
663 std::vector<uint8_t> ljeRes(numLut, 0);
664 std::vector<uint8_t> ljeSat80Vec(numLut, 0);
666 std::vector<uint16_t> adcVal(numAdc, 0);
667 std::vector<uint8_t> adcExt(numAdc, 0);
668 std::vector<int16_t> pedCor(numLut, 0);
669 std::vector<uint8_t> pedEn(numLut, 0);
672 int8_t minIndex = -1;
674 if (state.m_subBlockHeader.format() == 3) {
675 present =
br.getField (1);
683 for(
uint i=0;
i < numLut; ++
i) {
684 lcpPeak[
i] =
br.getField (1);
689 ljeLow[
i] =
br.getField (1);
696 if (lcpPeak[
i] == 1) {
697 lcpVal[
i] =
br.getField (4);
701 if (lcpPeak[
i] == 1){
702 ljeVal[
i] =
br.getField (3);
709 haveLut[
i] =
br.getField (1);
717 adcExt[
i] =
br.getField (1);
722 if (haveLut[
i] == 1) {
723 lcpVal[
i] =
br.getField (8);
724 lcpExt[
i] =
br.getField (1);
725 lcpSat[
i] =
br.getField (1);
726 lcpPeak[
i] =
br.getField (1);
731 if (haveLut[
i] == 1) {
732 ljeVal[
i] =
br.getField (8);
733 ljeLow[
i] =
br.getField (1);
734 ljeHigh[
i] =
br.getField (1);
735 ljeRes[
i] =
br.getField (1);
744 return StatusCode::FAILURE;
752 pedCor[
i] =
br.getField (6) + pedCorBase;
753 if (state.m_subBlockHeader.compVer() > 0) {
764 pedCor[
i] = ::pedCorrection(
val);
765 pedEn[
i] =
br.getField (1);
770 lcpBcidVec[
i] =
uint8_t((lcpPeak[
i] << 2) | (lcpSat[
i] << 1) | lcpExt[
i]);
771 ljeSat80Vec[
i] =
uint8_t((ljeRes[
i] << 2) | (ljeHigh[
i] << 1) | ljeLow[
i]);
774 chan, lcpVal, lcpBcidVec, ljeVal, ljeSat80Vec, adcVal, adcExt, pedCor,
777 }
catch (
const std::out_of_range& ex) {
781 return StatusCode::SUCCESS;
◆ processPpmNeutral_()
StatusCode ZdcByteStreamReadV1V2Tool::processPpmNeutral_ |
( |
State & |
state | ) |
const |
|
private |
Definition at line 381 of file ZdcByteStreamReadV1V2Tool.cxx.
382 uint8_t numLut = state.m_subBlockHeader.nSlice1();
383 uint8_t numFadc = state.m_subBlockHeader.nSlice2();
384 uint8_t totSlice = 3 * numLut + numFadc;
387 for (
int asic = 0 ; asic < 4 ; ++asic ) {
388 for (
int mcm = 0 ; mcm < 16 ; ++mcm ) {
390 std::vector<uint32_t> rotated(totSlice);
393 for (
uint8_t bit = 0 ; bit < 11 ; ++bit ) {
394 if ( state.m_ppBlock[
slice * 11 + asic * (11 * totSlice) + bit + 1] & (1 << mcm))
395 rotated[
slice] |= (1 << bit);
399 bool nonZeroData =
false;
402 || rotated[
slice + numLut]
403 || rotated[
slice + 2 * numLut + numFadc]) {
409 std::vector<uint8_t> lcpVal;
410 std::vector<uint8_t> lcpBcidVec;
411 std::vector<uint8_t> ljeVal;
412 std::vector<uint8_t> ljeSat80Vec;
413 std::vector<int16_t> pedCor;
414 std::vector<uint8_t> pedEn;
416 std::vector<uint16_t> adcVal;
417 std::vector<uint8_t> adcExt;
421 lcpVal.push_back(rotated[
slice] & 0xff);
422 ljeVal.push_back(rotated[
slice + numLut] & 0xff);
423 pedCor.push_back(::pedCorrection(rotated[
slice + 2 * numLut + numFadc] & 0x3ff));
425 lcpBcidVec.push_back((rotated[
slice] >> 8) & 0x7);
426 ljeSat80Vec.push_back((rotated[
slice + numLut] >> 8) & 0x7);
427 pedEn.push_back((rotated[
slice + 2 * numLut + numFadc] >> 10) & 0x1);
432 if (rotated[
slice + numLut]) {
440 adcVal.push_back(rotated[
slice + 2 * numLut] & 0x3ff);
441 adcExt.push_back((rotated[
slice + 2 * numLut] >> 10 & 0
x1) & 0x3ff);
447 state.m_subBlockHeader.crate(),
448 state.m_subBlockHeader.module(),
461 return StatusCode::SUCCESS;
◆ processPpmStandardR3V1_() [1/2]
StatusCode ZdcByteStreamReadV1V2Tool::processPpmStandardR3V1_ |
( |
State & |
state | ) |
const |
|
private |
Definition at line 937 of file ZdcByteStreamReadV1V2Tool.cxx.
938 for(
const auto&
lut : state.m_ppLuts) {
941 state.m_subBlockHeader.crate(),
942 state.m_subBlockHeader.module(),
945 state.m_ppFadcs[
lut.first]));
947 return StatusCode::SUCCESS;
◆ processPpmStandardR3V1_() [2/2]
StatusCode ZdcByteStreamReadV1V2Tool::processPpmStandardR3V1_ |
( |
State & |
state, |
|
|
uint32_t |
word, |
|
|
int |
indata |
|
) |
| const |
|
private |
Definition at line 585 of file ZdcByteStreamReadV1V2Tool.cxx.
589 if (state.m_subBlockHeader.seqNum() == 63) {
593 const uint8_t numAdc = state.m_subBlockHeader.nSlice2();
594 const uint8_t numLut = state.m_subBlockHeader.nSlice1();
595 const uint8_t nTotal = numAdc + numLut;
596 const uint8_t wordsPerBlock = 8;
597 const uint8_t iBlk = inData / wordsPerBlock;
598 uint8_t iChan = state.m_subBlockHeader.seqNum() + 2 * (inData % wordsPerBlock);
602 uint16_t subword = (word >> 16 *
i) & 0x7ff;
603 state.m_ppLuts[iChan].push_back(subword);
606 }
else if (iBlk < nTotal) {
608 uint16_t subword = (word >> (16 *
i)) & 0x7ff;
609 state.m_ppFadcs[iChan].push_back(subword);
615 sc = StatusCode::FAILURE;
◆ processPpmStandardR4V1_()
StatusCode ZdcByteStreamReadV1V2Tool::processPpmStandardR4V1_ |
( |
State & |
state | ) |
const |
|
private |
Definition at line 879 of file ZdcByteStreamReadV1V2Tool.cxx.
882 uint8_t numAdc = state.m_subBlockHeader.nSlice2();
883 uint8_t numLut = state.m_subBlockHeader.nSlice1();
884 uint8_t crate = state.m_subBlockHeader.crate();
888 BitReader
br (state.m_ppBlock);
892 std::vector<uint8_t> lcpVal;
893 std::vector<uint8_t> lcpBcidVec;
895 std::vector<uint8_t> ljeVal;
896 std::vector<uint8_t> ljeSat80Vec;
900 std::vector<uint16_t> adcVal;
901 std::vector<uint8_t> adcExt;
902 std::vector<int16_t> pedCor;
903 std::vector<uint8_t> pedEn;
905 for (
int i = 0;
i < numLut; ++
i) {
906 lcpVal.push_back(
br.getField (8));
907 lcpBcidVec.push_back(
br.getField (3));
910 for (
int i = 0;
i < numLut; ++
i) {
911 ljeVal.push_back(
br.getField (8));
912 ljeSat80Vec.push_back(
br.getField (3));
915 for (
int i = 0;
i < numAdc; ++
i) {
916 adcVal.push_back(
br.getField (10));
917 adcExt.push_back(
br.getField (1));
920 for (
int i = 0;
i < numLut; ++
i) {
922 pedCor.push_back(pedCorrection(
pc));
923 pedEn.push_back(
br.getField (1));
925 }
catch (
const std::out_of_range& ex) {
931 ljeVal, ljeSat80Vec, adcVal, adcExt, pedCor, pedEn));
934 return StatusCode::SUCCESS;
◆ processPpmWord_()
StatusCode ZdcByteStreamReadV1V2Tool::processPpmWord_ |
( |
State & |
state, |
|
|
uint32_t |
word, |
|
|
int |
indata |
|
) |
| const |
|
private |
Definition at line 320 of file ZdcByteStreamReadV1V2Tool.cxx.
323 if ( (state.m_subBlockHeader.format() == 0)
324 || (state.m_subBlockHeader.format() >= 2)
325 || (state.m_verCode >= 0x41)) {
326 state.m_ppBlock.push_back(word);
327 }
else if ((state.m_verCode == 0x21) || (state.m_verCode == 0x31)) {
331 << state.m_verCode <<
":" << state.m_subBlockHeader.format()
333 return StatusCode::FAILURE;
335 return StatusCode::SUCCESS;
◆ processRobFragment_()
Definition at line 202 of file ZdcByteStreamReadV1V2Tool.cxx.
206 auto rob = **robIter;
209 "Treating ROB fragment source id #" << MSG::hex << rob.rob_source_id());
212 state.m_rodSourceId = rob.rod_source_id();
213 state.m_robSourceId = rob.source_id();
214 const auto sourceID = (state.m_rodSourceId >> 16) & 0xff;
219 if (rob.nstatus() > 0) {
224 m_errorTool->robError(state.m_rodSourceId, *robData);
225 return StatusCode::FAILURE;
233 rob.rod_data(payloadBeg);
234 payloadEnd = payloadBeg + rob.rod_ndata();
239 return StatusCode::FAILURE;
244 uint16_t rodVer = rob.rod_version() & 0xffff;
245 state.m_verCode = ((rodVer & 0xfff) << 4) | 1;
246 uint32_t rodRunNumber = rob.rod_run_no() & 0xffffff;
249 if (sourceID != state.m_subDetectorID) {
250 ATH_MSG_ERROR(
"Wrong subdetector source id for requested objects: " << state.m_rodSourceId);
251 return StatusCode::FAILURE;
254 ATH_MSG_DEBUG(
"Treating crate " << rodCrate <<
" slink " << rodSlink);
257 if (!state.m_caloUserHeader.isValid()) {
259 return StatusCode::FAILURE;
263 "Run number: " << MSG::dec << rodRunNumber <<
endmsg
264 <<
"Version code: 0x" << MSG::hex <<
int(state.m_verCode) << MSG::dec
265 <<
endmsg <<
"LUT triggered slice offset: "
266 <<
int(state.m_caloUserHeader.lut()) <<
endmsg
267 <<
"FADC triggered slice offset: " <<
int(state.m_caloUserHeader.ppFadc())
268 <<
endmsg <<
"FADC baseline lower bound: "
269 <<
int(state.m_caloUserHeader.ppLowerBound()));
282 state.m_ppLuts.clear();
283 state.m_ppFadcs.clear();
284 state.m_ppBlock.clear();
291 "SubBlock version #" <<
int(state.m_subBlockHeader.version())
292 <<
" format #" <<
int(state.m_subBlockHeader.format())
293 <<
" seqNum (compVer) #" <<
int(state.m_subBlockHeader.seqNum())
294 <<
" nslice1 #" <<
int(state.m_subBlockHeader.nSlice1())
295 <<
" nslice2 #" <<
int(state.m_subBlockHeader.nSlice2())
298 }
else if (
blockType == (subBlock | 1)) {
303 switch(state.m_subDetectorID){
304 case eformat::TDAQ_CALO_PREPROC:
307 case eformat::FORWARD_ZDC:
317 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
const ZdcID* ZdcByteStreamReadV1V2Tool::m_zdcID {} |
|
private |
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)
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
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
value_type get_compact() const
Get the compact id.
constexpr auto lut(Generator &&f)
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.
int hwid2delay(int crate, int channel) const
::StatusCode StatusCode
StatusCode definition for legacy code.
static int maxSlinks()
Return the maximum possible number of slinks.
CalibratedSpacePoint::State State
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...
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.