ATLAS Offline Software
TileDigitsCollection.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 /*
5  */
15 
16 
25  m_FragChipCRCWords (other.m_FragChipCRCWords),
26  m_FragChipCRCWordsHIGH (other.m_FragChipCRCWordsHIGH),
27  m_FragChipHeaderWords (other.m_FragChipHeaderWords),
28  m_FragChipHeaderWordsHIGH (other.m_FragChipHeaderWordsHIGH),
29  m_FragExtraWords (other.m_FragExtraWords),
30  m_FragSize (other.m_FragSize),
31  m_FragBCID (other.m_FragBCID)
32 {
33  // Copy flags from the base class.
34  setLvl1Id (other.getLvl1Id());
35  setLvl1Type (other.getLvl1Type());
36  setDetEvType (other.getDetEvType());
37  setRODBCID (other.getRODBCID());
38 
39  // Copy the collection contents.
40  reserve (other.size());
41  for (const TileDigits* chan : other) {
42  push_back (std::make_unique<TileDigits> (*chan));
43  }
44 }
45 
46 
48 {
49  printExtra (std::cout);
50 }
51 
52 
53 void TileDigitsCollection::printExtra (std::ostream& os) const
54 {
55  os<<std::hex<<"id=0x"<<this->identify()
56  <<std::dec<<", bcid="<<m_FragBCID
57  <<std::hex<<"(0x"<<m_FragBCID
58  <<std::dec<<"), size="<<m_FragSize
59  <<std::hex;
60  os<<std::endl<<"FragExtraWords: ";
61  for (unsigned int i=0; i<m_FragExtraWords.size(); ++i)
62  os<<" "<<m_FragExtraWords[i];
63  os<<std::endl<<"FragChipHeaderWords:";
64  for (unsigned int i=0; i<m_FragChipHeaderWords.size(); ++i)
65  os<<" "<<m_FragChipHeaderWords[i];
66  os<<std::endl<<"FragChipCRCWords: ";
67  for (unsigned int i=0; i<m_FragChipCRCWords.size(); ++i)
68  os<<" "<<m_FragChipCRCWords[i];
69  os<<std::endl<<"FragChipHeaderWHigh:";
70  for (unsigned int i=0; i<m_FragChipHeaderWordsHIGH.size(); ++i)
72  os<<std::endl<<"FragChipCRCWHigh: ";
73  for (unsigned int i=0; i<m_FragChipCRCWordsHIGH.size(); ++i)
75  os<<std::endl<<std::dec;
76 }
77 
78 
80 {
81  m_FragChipCRCWords.clear();
82  m_FragChipCRCWordsHIGH.clear();
83  m_FragChipHeaderWords.clear();
85 
86  m_FragExtraWords.resize(2);
88 
89  m_FragSize = 0;
90  m_FragBCID = 0;
91 
93 }
DataVector< TileDigits >::reserve
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
TileRawDataCollection< TileDigits >::setRODBCID
void setRODBCID(uint32_t rodBCID)
Setter for BCID from ROD header.
Definition: TileRawDataCollection.h:104
TileDigitsCollection::m_FragChipHeaderWords
std::vector< uint32_t > m_FragChipHeaderWords
Header words from Frag data, one word for each chip LOW gain if calib mode.
Definition: TileDigitsCollection.h:214
TileDigitsCollection.h
TileDigitsCollection::m_FragChipCRCWordsHIGH
std::vector< uint32_t > m_FragChipCRCWordsHIGH
CRC words from Frag data, HIGH gain if in calib mode.
Definition: TileDigitsCollection.h:209
TileRawDataCollection< TileDigits >::setDetEvType
void setDetEvType(uint32_t detEvType)
Setter for detector event type from ROD header.
Definition: TileRawDataCollection.h:98
xAOD::identify
Identifier identify(const UncalibratedMeasurement *meas)
Returns the associated identifier.
Definition: MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/Root/UtilFunctions.cxx:61
TileDigitsCollection::printExtra
void printExtra() const
Definition: TileDigitsCollection.cxx:47
TileDigitsCollection::m_FragSize
uint32_t m_FragSize
Size of drawer fragment.
Definition: TileDigitsCollection.h:230
lumiFormat.i
int i
Definition: lumiFormat.py:85
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
TileRawDataCollection< TileDigits >::clear
virtual void clear()
TileDigitsCollection::m_FragBCID
uint32_t m_FragBCID
BCID.
Definition: TileDigitsCollection.h:234
TileRawDataCollection
Definition: TileRawDataCollection.h:37
TileDigitsCollection::m_FragChipCRCWords
std::vector< uint32_t > m_FragChipCRCWords
CRC words from Frag data, one word for each chip LOW gain if calib mode.
Definition: TileDigitsCollection.h:205
TileDigitsCollection::TileDigitsCollection
TileDigitsCollection(ID id, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Definition: TileDigitsCollection.h:26
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
TileDigitsCollection::clear
void clear()
Clear everything for next event.
Definition: TileDigitsCollection.cxx:79
TileRawDataCollection< TileDigits >::identify
ID identify() const
Definition: TileRawDataCollection.h:71
TileDigitsCollection
Definition: TileDigitsCollection.h:18
TileDigits
Definition: TileDigits.h:30
DataVector< TileDigits >::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
TileRawDataCollection< TileDigits >::setLvl1Id
void setLvl1Id(uint32_t lvl1Id)
Setter for level1 id from ROD header.
Definition: TileRawDataCollection.h:86
TileDigitsCollection::m_FragExtraWords
std::vector< uint32_t > m_FragExtraWords
all extra words from the trailer of the drawer fragment first two words are always DMU Mask and CRC w...
Definition: TileDigitsCollection.h:226
TileRawDataCollection< TileDigits >::setLvl1Type
void setLvl1Type(uint32_t lvl1Type)
Setter for level1 type from ROD header.
Definition: TileRawDataCollection.h:92
TileDigitsCollection::m_FragChipHeaderWordsHIGH
std::vector< uint32_t > m_FragChipHeaderWordsHIGH
Header words from Frag data, one word for each chip HIGH gain if calib mode.
Definition: TileDigitsCollection.h:219