ATLAS Offline Software
PadTrig_ROD_Decoder.cxx
Go to the documentation of this file.
1 #include "PadTrig_ROD_Decoder.h"
2 
3 #include <byteswap.h>
4 #include <vector>
5 
6 #include "Identifier/Identifier.h"
7 #include "eformat/Issue.h"
8 #include "eformat/SourceIdentifier.h"
11 
12 namespace Muon {
13 
14 //=====================================================================
15 PadTrig_ROD_Decoder::PadTrig_ROD_Decoder(const std::string& type, const std::string& name, const IInterface* parent)
17 {
18  declareInterface<IPadTrig_ROD_Decoder>(this);
19 }
20 
21 
22 //=====================================================================
24 {
25  try {
26  fragment.check();
27  } catch (const eformat::Issue& ex) {
28  ATH_MSG_ERROR(ex.what());
29  return StatusCode::FAILURE;
30  }
31 
32  const std::string trigger{"PadL1A"};
33  const Muon::nsw::NSWTriggerCommonDecoder decoder{fragment, trigger};
34  for (const auto& baselink: decoder.get_elinks()) {
35  const auto link = dynamic_cast<const Muon::nsw::NSWPadTriggerL1a*>(baselink.get());
36  auto *const collection = new NSW_PadTriggerData{
37  fragment.rob_source_id(),
38  link->getFlags(),
39  link->getEc(),
40  link->getFragid(),
41  link->getSecid(),
42  link->getSpare(),
43  link->getOrbit(),
44  link->getBcid(),
45  link->getL1id(),
46  link->getOrbitid(),
47  link->getOrbit1(),
48  link->getStatus(),
49  link->getNumberOfHits(),
50  link->getNumberOfPfebs(),
51  link->getNumberOfTriggers(),
52  link->getNumberOfBcids(),
53  link->getHitRelBcids(),
54  link->getHitPfebs(),
55  link->getHitTdsChannels(),
56  link->getHitVmmChannels(),
57  link->getHitVmms(),
58  link->getHitPadChannels(),
59  link->getPfebAddresses(),
60  link->getPfebNChannels(),
61  link->getPfebDisconnecteds(),
62  link->getTriggerBandIds(),
63  link->getTriggerPhiIds(),
64  link->getTriggerRelBcids(),
65  link->getBcidRels(),
66  link->getBcidStatuses(),
67  link->getBcidMultZeros(),
68  link->getBcidMultiplicities()
69  };
70  ATH_MSG_DEBUG("Pad trigger fillCollection " << std::hex << collection->getSourceid() << std::dec << " " << rdo.numberOfCollections());
71  ATH_CHECK(rdo.addCollection(collection, rdo.numberOfCollections()));
72  }
73 
74  return StatusCode::SUCCESS;
75 }
76 
77 } // namespace Muon
NSWTriggerCommonDecoder.h
IdentifiableContainerMT::addCollection
virtual StatusCode addCollection(const T *coll, IdentifierHash hashId) override final
insert collection into container with id hash if IDC should not take ownership of collection,...
Definition: IdentifiableContainerMT.h:300
python.LArCondContChannels.decoder
decoder
def channelSelection(self, channelList, groupType): if groupType == self.SingleGroup: pass elif group...
Definition: LArCondContChannels.py:618
Issue
Configuration Issue
Definition: PscIssues.h:31
Muon::NSW_PadTriggerDataContainer
Definition: NSW_PadTriggerDataContainer.h:15
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:45
NSWPadTriggerL1a.h
IdentifiableContainerMT::numberOfCollections
virtual size_t numberOfCollections() const override final
return number of collections
Definition: IdentifiableContainerMT.h:216
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
eformat::ROBFragment
Definition: L1CaloBsDecoderUtil.h:12
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Muon::NSW_PadTriggerData
Definition: NSW_PadTriggerData.h:12
Muon::PadTrig_ROD_Decoder::PadTrig_ROD_Decoder
PadTrig_ROD_Decoder(const std::string &type, const std::string &name, const IInterface *parent)
Definition: PadTrig_ROD_Decoder.cxx:15
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Muon::PadTrig_ROD_Decoder::fillCollection
StatusCode fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment &fragment, NSW_PadTriggerDataContainer &rdo) const override
Definition: PadTrig_ROD_Decoder.cxx:23
Muon::nsw::NSWPadTriggerL1a
Definition: NSWPadTriggerL1a.h:142
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
PadTrig_ROD_Decoder.h
AthAlgTool
Definition: AthAlgTool.h:26
Muon::nsw::NSWTriggerCommonDecoder
Definition: NSWTriggerCommonDecoder.h:21