ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Muon::CscRdoContByteStreamTool Class Reference

#include <CscRdoContByteStreamTool.h>

Inheritance diagram for Muon::CscRdoContByteStreamTool:
Collaboration diagram for Muon::CscRdoContByteStreamTool:

Public Member Functions

 CscRdoContByteStreamTool (const std::string &type, const std::string &name, const IInterface *parent)
 constructor More...
 
virtual ~CscRdoContByteStreamTool ()=default
 
virtual StatusCode initialize () override
 
virtual bool isCosmic () const override
 to read the cosmic data More...
 
virtual bool isOldCosmic () const override
 for the old cosmic data before the ROB id=ROD id fix More...
 
virtual StatusCode convert (const CscRawDataContainer *cont, MsgStream &log) const override
 

Private Attributes

CSC_Hid2RESrcID m_hid2re
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
ServiceHandle< IByteStreamCnvSvcm_byteStreamCnvSvc {this, "ByteStreamCnvSvc", "ByteStreamCnvSvc"}
 
ServiceHandle< CSCcablingSvcm_cabling {this, "CablingSvc", "CSCcablingSvc"}
 
uint16_t m_rodVersion {}
 
bool m_isCosmic {}
 
bool m_isOldCosmic {}
 

Detailed Description

Definition at line 29 of file CscRdoContByteStreamTool.h.

Constructor & Destructor Documentation

◆ CscRdoContByteStreamTool()

Muon::CscRdoContByteStreamTool::CscRdoContByteStreamTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

constructor

Definition at line 14 of file CscRdoContByteStreamTool.cxx.

14  :
15  base_class(type, name, parent) {
16  declareProperty("RODVersion", m_rodVersion = 0x0200);
17  declareProperty("IsCosmicData", m_isCosmic = false);
18  declareProperty("IsOldCosmicData", m_isOldCosmic = false);
19 }

◆ ~CscRdoContByteStreamTool()

virtual Muon::CscRdoContByteStreamTool::~CscRdoContByteStreamTool ( )
virtualdefault

Member Function Documentation

◆ convert()

StatusCode Muon::CscRdoContByteStreamTool::convert ( const CscRawDataContainer cont,
MsgStream &  log 
) const
overridevirtual

set the iterator over the RDO

set the detector event type word

Definition at line 42 of file CscRdoContByteStreamTool.cxx.

42  {
43  // Get the event assembler
45  ATH_CHECK(m_byteStreamCnvSvc->getFullEventAssembler(fea, "CscRdoContByteStream"));
46 
47  fea->idMap().set(m_cabling.get(), &m_idHelperSvc->cscIdHelper());
48  if (m_cabling->nROD() == 16)
49  fea->setRodMinorVersion(0x400);
50  else
52 
53  StatusCode sc = StatusCode::SUCCESS;
54 
56 
57  // a map for ROD ID onto Encoder
58  std::map<uint32_t, CscROD_Encoder> mapEncoder;
59 
62  CscRawDataContainer::const_iterator it_col_end = cont->end();
63 
64  bool first = true;
65  for (; it_col != it_col_end; ++it_col) {
67  if (first && !(*it_col)->empty()) {
68  first = false;
69  uint32_t eventType = (*it_col)->eventType();
70  fea->setDetEvtType(eventType);
71  }
72 
73  // get ROD ID
74  const uint32_t rodId = m_hid2re.getRodID(*it_col);
75 
76  // map the RDO onto Encoder
77  mapEncoder[rodId].setRdo(*it_col);
78  mapEncoder[rodId].setIdHelper(&m_idHelperSvc->cscIdHelper());
79  }
80 
81  // loop over map and fill all ROD Data Blocks
82  std::map<uint32_t, CscROD_Encoder>::iterator it_map = mapEncoder.begin();
83  std::map<uint32_t, CscROD_Encoder>::iterator it_map_end = mapEncoder.end();
84  for (; it_map != it_map_end; ++it_map) {
85  // get ROD data address
86  theROD = fea->getRodData((*it_map).first);
87 
88  // fill ROD data
89  sc = ((*it_map).second).fillROD(*theROD, log);
90  if (sc.isFailure()) return StatusCode::RECOVERABLE;
91  }
92 
93  return sc;
94 }

◆ initialize()

StatusCode Muon::CscRdoContByteStreamTool::initialize ( )
overridevirtual

Definition at line 22 of file CscRdoContByteStreamTool.cxx.

22  {
24  ATH_MSG_DEBUG("Muon::CscRdoContByteStreamTool::initialize()");
25 
26  // get the cabling service
27  ATH_CHECK(m_cabling.retrieve());
28  ATH_CHECK(m_idHelperSvc.retrieve());
29 
30  ATH_CHECK(m_byteStreamCnvSvc.retrieve());
31 
32  // create CSC RDO ID to source ID mapper
33  m_hid2re.set(m_cabling.get(), &m_idHelperSvc->cscIdHelper());
34  if (m_isCosmic) {
37  }
38  return StatusCode::SUCCESS;
39 }

◆ isCosmic()

virtual bool Muon::CscRdoContByteStreamTool::isCosmic ( ) const
inlineoverridevirtual

to read the cosmic data

Definition at line 40 of file CscRdoContByteStreamTool.h.

40 { return m_isCosmic; }

◆ isOldCosmic()

virtual bool Muon::CscRdoContByteStreamTool::isOldCosmic ( ) const
inlineoverridevirtual

for the old cosmic data before the ROB id=ROD id fix

Definition at line 43 of file CscRdoContByteStreamTool.h.

43 { return m_isOldCosmic; }

Member Data Documentation

◆ m_byteStreamCnvSvc

ServiceHandle<IByteStreamCnvSvc> Muon::CscRdoContByteStreamTool::m_byteStreamCnvSvc {this, "ByteStreamCnvSvc", "ByteStreamCnvSvc"}
private

Definition at line 51 of file CscRdoContByteStreamTool.h.

◆ m_cabling

ServiceHandle<CSCcablingSvc> Muon::CscRdoContByteStreamTool::m_cabling {this, "CablingSvc", "CSCcablingSvc"}
private

Definition at line 53 of file CscRdoContByteStreamTool.h.

◆ m_hid2re

CSC_Hid2RESrcID Muon::CscRdoContByteStreamTool::m_hid2re
private

Definition at line 48 of file CscRdoContByteStreamTool.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> Muon::CscRdoContByteStreamTool::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 49 of file CscRdoContByteStreamTool.h.

◆ m_isCosmic

bool Muon::CscRdoContByteStreamTool::m_isCosmic {}
private

Definition at line 56 of file CscRdoContByteStreamTool.h.

◆ m_isOldCosmic

bool Muon::CscRdoContByteStreamTool::m_isOldCosmic {}
private

Definition at line 57 of file CscRdoContByteStreamTool.h.

◆ m_rodVersion

uint16_t Muon::CscRdoContByteStreamTool::m_rodVersion {}
private

Definition at line 55 of file CscRdoContByteStreamTool.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Muon::CscRdoContByteStreamTool::m_cabling
ServiceHandle< CSCcablingSvc > m_cabling
Definition: CscRdoContByteStreamTool.h:53
FullEventAssembler
Template class for assembling a full atlas raw event from subfragments.
Definition: FullEventAssembler.h:40
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
CSC_Hid2RESrcID::getRodID
uint32_t getRodID(const CscRawDataCollection *rdo) const
Make a ROD Source ID for CSC RDO.
Definition: CSC_Hid2RESrcID.cxx:16
initialize
void initialize()
Definition: run_EoverP.cxx:894
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
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
Muon::CscRdoContByteStreamTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: CscRdoContByteStreamTool.h:49
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
IdentifiableContainerMT::end
const_iterator end() const
return const_iterator for end of container
Definition: IdentifiableContainerMT.h:239
IdentifiableContainerMT::const_iterator
Definition: IdentifiableContainerMT.h:79
IdentifiableContainerMT::begin
const_iterator begin() const
return const_iterator for first entry
Definition: IdentifiableContainerMT.h:233
FullEventAssembler::idMap
IDMAP_t & idMap()
Return reference to IDMAP.
CSC_Hid2RESrcID::set_isCosmic
void set_isCosmic()
this is cosmic data
Definition: CSC_Hid2RESrcID.h:57
Muon::CscRdoContByteStreamTool::m_isOldCosmic
bool m_isOldCosmic
Definition: CscRdoContByteStreamTool.h:57
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Muon::CscRdoContByteStreamTool::m_rodVersion
uint16_t m_rodVersion
Definition: CscRdoContByteStreamTool.h:55
CSC_Hid2RESrcID::set
void set(CSCcablingSvc *p_cabling, const CscIdHelper *cscId)
initialize the identifier helper
Definition: CSC_Hid2RESrcID.h:48
FullEventAssembler::setRodMinorVersion
void setRodMinorVersion(uint16_t m)
change the ROD minor version
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DeMoScan.first
bool first
Definition: DeMoScan.py:536
Muon::CscRdoContByteStreamTool::m_isCosmic
bool m_isCosmic
Definition: CscRdoContByteStreamTool.h:56
CSC_Hid2RESrcID::set_isOldCosmic
void set_isOldCosmic()
to read the old cosmic data before the ROB id = ROD id fix
Definition: CSC_Hid2RESrcID.h:60
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
Muon::CscRdoContByteStreamTool::m_hid2re
CSC_Hid2RESrcID m_hid2re
Definition: CscRdoContByteStreamTool.h:48
FullEventAssembler::RODDATA
std::vector< uint32_t > RODDATA
ROD data as a vector of unsigned int.
Definition: FullEventAssembler.h:54
Muon::CscRdoContByteStreamTool::m_byteStreamCnvSvc
ServiceHandle< IByteStreamCnvSvc > m_byteStreamCnvSvc
Definition: CscRdoContByteStreamTool.h:51
FullEventAssembler::getRodData
RODDATA * getRodData(uint32_t id)
get a block of ROD data
FullEventAssembler::setDetEvtType
void setDetEvtType(uint32_t m)
change Detector Event Type