ATLAS Offline Software
ALFA_Decoder.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ALFA_DECODER_H
6 #define ALFA_DECODER_H
7 
8 #include <stdint.h>
9 #include <map>
10 #include <string>
11 #include "eformat/ROBFragment.h"
12 #include "eformat/FullEventFragment.h"
13 
15 
16 #include "GaudiKernel/ToolHandle.h"
17 #include "GaudiKernel/ServiceHandle.h"
18 #include "GaudiKernel/IToolSvc.h"
19 #include "GaudiKernel/MsgStream.h"
20 
21 #include "ByteStreamData/RawEvent.h"
22 
26 
29 #include "ALFA_RawDataReadOut.h"
30 
32 
33 
34 class ISvcLocator;
35 class StatusCode;
36 
37 class ALFA_Decoder: public AthAlgTool {
38 
39  public:
40 
41 
42  // Collection type
45 
46  // constructor
47  ALFA_Decoder (const std::string& type, const std::string& name, const IInterface* parent);
48 
49  // AlgTool InterfaceID
50  static const InterfaceID& interfaceID();
51 
52  // destructor
53  virtual ~ALFA_Decoder();
54 
55  virtual StatusCode initialize();
56  virtual StatusCode finalize();
57 
58  StatusCode fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment *robFrag, ALFA_RawDataContainer* rdoCont, std::vector<unsigned int>* vecHash = NULL);
59 
60  ALFA_RawDataCollection* getCollection (unsigned int MotherBoardId, ALFA_RawDataContainer* cont);
61  ALFA_RawData* getRawData (unsigned int PMFId, ALFA_RawDataCollection* coll);
62 
63  inline const eformat::FullEventFragment<const uint32_t*> * eventFragment() const { return m_event; }
64  inline const eformat::ROBFragment<const uint32_t*> * robFragment() const { return m_robFrag; }
65 
66 
67  private:
68  const eformat::FullEventFragment<const uint32_t*> * m_event = nullptr;
70 
71  unsigned int m_fragment_number = 0U;
72 
75 
76  // Methods for the decoding
80 
81 };
82 
83 #endif
84 
ALFA_RawDataReadOut
Definition: ALFA_RawDataReadOut.h:26
ALFA_Decoder::m_robDataProvider
ServiceHandle< IROBDataProviderSvc > m_robDataProvider
Service for reading bytestream.
Definition: ALFA_Decoder.h:74
ALFA_Decoder::m_ALFA_RawDataCollectionReadOut
ALFA_RawDataCollectionReadOut * m_ALFA_RawDataCollectionReadOut
Definition: ALFA_Decoder.h:78
ALFA_Decoder::initialize
virtual StatusCode initialize()
Definition: ALFA_Decoder.cxx:45
ALFA_Decoder::m_ALFA_RawDataReadOut
ALFA_RawDataReadOut * m_ALFA_RawDataReadOut
Definition: ALFA_Decoder.h:77
ALFA_RawDataContainer.h
ALFA_Decoder::ALFA_Decoder
ALFA_Decoder(const std::string &type, const std::string &name, const IInterface *parent)
Definition: ALFA_Decoder.cxx:23
ALFA_Decoder::fillCollection
StatusCode fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment *robFrag, ALFA_RawDataContainer *rdoCont, std::vector< unsigned int > *vecHash=NULL)
Definition: ALFA_Decoder.cxx:103
ALFA_Decoder::m_fragment_number
unsigned int m_fragment_number
Definition: ALFA_Decoder.h:71
ALFA_Decoder::getRawData
ALFA_RawData * getRawData(unsigned int PMFId, ALFA_RawDataCollection *coll)
ALFA_RawData
Definition: ALFA_RawData.h:21
ALFA_Decoder::m_ALFA_RawData
ALFA_RawData m_ALFA_RawData
Definition: ALFA_Decoder.h:43
ALFA_RawData.h
ALFA_Decoder::interfaceID
static const InterfaceID & interfaceID()
Definition: ALFA_Decoder.cxx:14
eformat::ROBFragment
Definition: L1CaloBsDecoderUtil.h:12
RawEvent.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ALFA_Decoder::~ALFA_Decoder
virtual ~ALFA_Decoder()
Definition: ALFA_Decoder.cxx:37
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ALFA_RawDataCollection
RDOs : Chamber Service Module, collection of RawData.
Definition: ALFA_RawDataCollection.h:19
ALFA_Decoder::eventFragment
const eformat::FullEventFragment< const uint32_t * > * eventFragment() const
Definition: ALFA_Decoder.h:63
ALFA_RawDataContainerReadOut.h
ALFA_RawDataCollectionReadOut
Definition: ALFA_RawDataCollectionReadOut.h:32
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ALFA_Decoder::m_robFrag
const eformat::ROBFragment< const uint32_t * > * m_robFrag
Definition: ALFA_Decoder.h:69
ALFA_Decoder::getCollection
ALFA_RawDataCollection * getCollection(unsigned int MotherBoardId, ALFA_RawDataContainer *cont)
Definition: ALFA_Decoder.cxx:652
ALFA_Decoder::m_event
const eformat::FullEventFragment< const uint32_t * > * m_event
Definition: ALFA_Decoder.h:68
ALFA_Decoder::robFragment
const eformat::ROBFragment< const uint32_t * > * robFragment() const
Definition: ALFA_Decoder.h:64
ALFA_Decoder::m_ALFA_RawDataCollection
ALFA_RawDataCollection m_ALFA_RawDataCollection
Definition: ALFA_Decoder.h:44
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
ALFA_Decoder::finalize
virtual StatusCode finalize()
Definition: ALFA_Decoder.cxx:83
ALFA_RawDataContainer
This container provides acces to the PMF RDOs.
Definition: ALFA_RawDataContainer.h:21
AthAlgTool
Definition: AthAlgTool.h:26
ALFA_RawDataCollection.h
ALFA_RawDataContainerReadOut
Definition: ALFA_RawDataContainerReadOut.h:31
ALFA_Decoder::m_ALFA_RawDataContainerReadOut
ALFA_RawDataContainerReadOut * m_ALFA_RawDataContainerReadOut
Definition: ALFA_Decoder.h:79
IROBDataProviderSvc.h
ALFA_RawDataReadOut.h
ServiceHandle< IROBDataProviderSvc >
ALFA_Decoder
Definition: ALFA_Decoder.h:37
ALFA_RawDataCollectionReadOut.h