ATLAS Offline Software
LArRodEncoder.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LARBYTESTREAM_LARROD_ENCODER_H
6 #define LARBYTESTREAM_LARROD_ENCODER_H
7 
30 #include <stdint.h>
31 
32 #include "GaudiKernel/MsgStream.h"
33 
36 //#include "LArRawEvent/LArRawChannelCollection.h"
37 
38 #include "LArRawEvent/LArDigit.h"
40 
43 
46 //#include "LArByteStream/LArRodBlockStructure_0.h"
47 //#include "LArByteStream/LArRodBlockStructure_1.h"
48 //#include "LArByteStream/LArRodBlockStructure_3.h"
49 #include "ByteStreamData/RawEvent.h"
53 
55 {
56 public:
57 
58  // constructor
59  LArRodEncoder (const LArOnlineID& onlineHelper,
60  const CaloDetDescrManager& calodd,
61  const LArOnOffIdMapping& onOffIdMapping,
62  LArRodBlockStructure* BlStruct);
63  // destructor
64  ~LArRodEncoder();
65 
66  // add LArRawChannels to the current list
67  void add(const LArRawChannel* rc);
68 
69  // add LArDigits to the current list
70  void add(const LArDigit* digit);
71 
72  // add LArDigit for fixed gain
73  void add(const LArDigit* dg, const int gain);
74 
75  //add LArCalibDigit (always fixed gain)
76  void add(const LArCalibDigit* dg, const int gain);
77 
78  // clear the current LArRawChannels list
79  void clear();
80 
81  // convert all LArRawChannels in the current list to a vector of 32bit words
82 // void fillROD(std::vector<uint32_t>& v, MsgStream& logstr) ;
83  void fillROD(std::vector<uint32_t>& v, MsgStream& logstr, const CaloNoise& noise, double nsigma) ;
84 
85 
86 private:
87  /*
88  int m_NFeb;
89  uint32_t *m_FEB_ID;
90  std::vector<const LArRawChannel*> **m_vLArRC;
91  std::vector<const LArDigit*> **m_vLArDigit;
92 
93 
94  std::vector<uint32_t> m_FEB_ID;
95  std::vector<std::vector<const LArRawChannel*>> m_vLArRC;
96  std::vector<std::vector<const LArRawChannel*>> m_vLArDigit;
97  std::vector<std::vector<const LArRawChannel*>> m_vLArDigitFixed[3];
98 
99  //std::vector<std::vector<const LArRawChannel*>> m_vLArDigit2;
100  //std::vector<std::vector<const LArRawChannel*>> m_vLArDigit3;
101  */
102 
103  struct FebData_t {
104  //uint32_t FEB_ID;
105  std::vector<const LArRawChannel*> vLArRC;
106  std::vector<const LArDigit*> vLArDigit; //Free gain
107  std::vector<const LArDigit*> vLArDigitFixed[3]; //Three gains
108  std::vector<const LArCalibDigit*> vLArCalibDigit[3]; //Three gains
109  //std::vector<const LArAverageDigits* > vLArAverageDigits[3]; //Three gains
110  };
111 
112  //std::vector<FebData> m_vFEB;
113  std::map<uint32_t,FebData_t> m_mFEB;
114 
119 
120  /*
121  public:
122  static int m_digitcounter; //for debug purpose only
123  static int m_fixeddigitcounter[4];
124  */
125 } ;
126 
127 #endif
LArRodBlockStructure
Definition: LArRodBlockStructure.h:48
LArCalibDigitContainer.h
LArRodEncoder::add
void add(const LArRawChannel *rc)
Definition: LArRodEncoder.cxx:37
checkCoolLatestUpdate.dg
dg
Definition: checkCoolLatestUpdate.py:9
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
LArRodEncoder::m_BlStruct
LArRodBlockStructure * m_BlStruct
Definition: LArRodEncoder.h:118
LArRodEncoder::clear
void clear()
Definition: LArRodEncoder.cxx:71
checkRpcDigits.digit
digit
Definition: checkRpcDigits.py:186
LArRodEncoder::m_CaloDetDescrManager
const CaloDetDescrManager & m_CaloDetDescrManager
Definition: LArRodEncoder.h:116
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
LArCalibDigit.h
LArRodEncoder::FebData_t::vLArRC
std::vector< const LArRawChannel * > vLArRC
Definition: LArRodEncoder.h:105
LArOnOffIdMapping.h
LArDigit.h
LArRodEncoder::fillROD
void fillROD(std::vector< uint32_t > &v, MsgStream &logstr, const CaloNoise &noise, double nsigma)
Definition: LArRodEncoder.cxx:78
LArDigit
Liquid Argon digit base class.
Definition: LArDigit.h:25
LArRawChannel
Liquid Argon ROD output object base class.
Definition: LArRawChannel.h:40
RawEvent.h
LArRodEncoder::FebData_t::vLArDigitFixed
std::vector< const LArDigit * > vLArDigitFixed[3]
Definition: LArRodEncoder.h:107
LArRodEncoder::LArRodEncoder
LArRodEncoder(const LArOnlineID &onlineHelper, const CaloDetDescrManager &calodd, const LArOnOffIdMapping &onOffIdMapping, LArRodBlockStructure *BlStruct)
Definition: LArRodEncoder.cxx:19
LArRodEncoder::~LArRodEncoder
~LArRodEncoder()
Definition: LArRodEncoder.cxx:31
CaloNoise
Definition: CaloNoise.h:16
LArRawChannel.h
LArRodEncoder::FebData_t::vLArDigit
std::vector< const LArDigit * > vLArDigit
Definition: LArRodEncoder.h:106
LArCalibDigit
Base class for LArDigits taken during calibration runs.
Definition: LArCalibDigit.h:29
CaloNoise.h
LArOnlineID
Definition: LArOnlineID.h:20
LArDigitContainer.h
LArRodEncoder::FebData_t::vLArCalibDigit
std::vector< const LArCalibDigit * > vLArCalibDigit[3]
Definition: LArRodEncoder.h:108
LArRodEncoder::FebData_t
Definition: LArRodEncoder.h:103
LArRodEncoder::m_onlineHelper
const LArOnlineID & m_onlineHelper
Definition: LArRodEncoder.h:115
python.PyAthena.v
v
Definition: PyAthena.py:157
LArRodBlockStructure.h
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
LArRodEncoder
This class provides conversion from LArRawChannel and LArDigit to ROD format.
Definition: LArRodEncoder.h:55
LArRodEncoder::m_onOffIdMapping
const LArOnOffIdMapping & m_onOffIdMapping
Definition: LArRodEncoder.h:117
LArRodEncoder::m_mFEB
std::map< uint32_t, FebData_t > m_mFEB
Definition: LArRodEncoder.h:113
WriteCellNoiseToCool.noise
noise
Definition: WriteCellNoiseToCool.py:380
LArRawChannelContainer.h
LArOnlineID.h
LArOnOffIdMapping
Definition: LArOnOffIdMapping.h:20