ATLAS Offline Software
TileRawDataCollection.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //********************************************************************
6 // Filename : TileRawDataCollection.h
7 // Author : A.Solodkov
8 // Created : Oct, 2002
9 //
10 // DESCRIPTION:
11 // TileCal drawer output object Collection
12 // It contains the ROD output objects from one super-drawer
13 // i.e. up to 48 TileRawData objects
14 // It is meant to store TileRawData in Store Gate
15 //
16 //
17 // HISTORY:
18 //
19 // BUGS:
20 //
21 // *******************************************************************
22 
23 #ifndef TILEEVENT_TILERAWDATACOLLECTION_H
24 #define TILEEVENT_TILERAWDATACOLLECTION_H
25 
27 #include "AthenaKernel/CLASS_DEF.h"
28 #include "Identifier/Identifier.h"
29 // #include "TileEvent/TileRoI_ID.h"
30 
31 #include <string>
32 #include <map>
33 #include <inttypes.h>
34 
35 template <typename TELEMENT> class TileRawDataCollection
36  : public DataVector<TELEMENT>
37 {
38  public:
39 
41 
42  // required for a Digit Collection
43  typedef int ID;
44  typedef Identifier TT_ID;
45  typedef TELEMENT DIGIT;
46  typedef TELEMENT OBJECT;
47 
48  // construct a container for a given super-drawer (fragment)
50  : DataVector <TELEMENT> (ownPolicy),
51  m_id(id), m_lvl1Id(0), m_lvl1Type(0), m_detEvType(0), m_rodBCID(0) { this->reserve(48); }
53  : DataVector < TELEMENT > (ownPolicy),
54  m_id(0), m_lvl1Id(0), m_lvl1Type(0), m_detEvType(0), m_rodBCID(0) { this->reserve(48); }
55 
57  uint32_t lvl1Id, uint32_t lvl1Type, uint32_t detEvType, uint32_t rodBCID )
58  : DataVector <TELEMENT> (ownPolicy),
59  m_id(id), m_lvl1Id(lvl1Id), m_lvl1Type(lvl1Type), m_detEvType(detEvType), m_rodBCID(rodBCID) { this->reserve(48); }
60 
63 
64  // destructor
65  virtual ~TileRawDataCollection () = default;
66 
67  // clear everything for next event
68  virtual void clear ();
69 
70  // return fragment ID corresponding to this container
71  ID identify() const { return m_id; }
72 
73 // void setTT(const TT_ID& id,
74 // TCollection_const_iterator b, TCollection_const_iterator e);
75 //
76 // void getTT(const TT_ID& id,
77 // TCollection_const_iterator& b, TCollection_const_iterator& e) const ;
78 
79  // print all the Channels
80  virtual void print() const;
81  virtual operator std::string () const;
82  virtual std::string whoami (void) const { TELEMENT elem;
83  return "TileRawDataCollection of "+elem.whoami(); }
84 
86  void setLvl1Id(uint32_t lvl1Id) { m_lvl1Id = lvl1Id; }
87 
89  inline uint32_t getLvl1Id() const { return m_lvl1Id; }
90 
92  void setLvl1Type(uint32_t lvl1Type) { m_lvl1Type = lvl1Type; }
93 
95  inline uint32_t getLvl1Type() const { return m_lvl1Type; }
96 
98  void setDetEvType(uint32_t detEvType) { m_detEvType = detEvType; }
99 
101  inline uint32_t getDetEvType() const { return m_detEvType; }
102 
104  void setRODBCID(uint32_t rodBCID) { m_rodBCID = rodBCID; }
105 
107  inline uint32_t getRODBCID() const { return m_rodBCID; }
108 
109 protected:
110  void setOwnership(SG::OwnershipPolicy ownPolicy) { this->m_ownPolicy = ownPolicy; }
111  SG::OwnershipPolicy getOwnership() const { return this->m_ownPolicy; }
112 
113 private:
115 
124 
136 };
137 
139 
140 #endif
141 
DataVector< TELEMENT >::reserve
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
TileRawDataCollection::m_detEvType
uint32_t m_detEvType
Detector event type from ROD header.
Definition: TileRawDataCollection.h:121
TileRawDataCollection::setRODBCID
void setRODBCID(uint32_t rodBCID)
Setter for BCID from ROD header.
Definition: TileRawDataCollection.h:104
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
TileRawDataCollection::m_rodBCID
uint32_t m_rodBCID
BCID from ROD header.
Definition: TileRawDataCollection.h:123
TileRawDataCollection::TT_ID
Identifier TT_ID
Definition: TileRawDataCollection.h:44
TileRawDataCollection::setDetEvType
void setDetEvType(uint32_t detEvType)
Setter for detector event type from ROD header.
Definition: TileRawDataCollection.h:98
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TileRawDataCollection::TileRawDataCollection
TileRawDataCollection(ID id, SG::OwnershipPolicy ownPolicy, uint32_t lvl1Id, uint32_t lvl1Type, uint32_t detEvType, uint32_t rodBCID)
Definition: TileRawDataCollection.h:56
TileRawDataCollection::ID
int ID
Definition: TileRawDataCollection.h:43
TileRawDataCollection::TileRawDataCollection
TileRawDataCollection(TileRawDataCollection< TELEMENT > &&rhs)=default
TileRawDataCollection::m_id
ID m_id
Definition: TileRawDataCollection.h:114
TileRawDataCollection::m_lvl1Type
uint32_t m_lvl1Type
Level1 Type from ROD header.
Definition: TileRawDataCollection.h:119
TileRawDataCollection::DIGIT
TELEMENT DIGIT
Definition: TileRawDataCollection.h:45
TileRawDataCollection::TCollection_const_iterator
TileRawDataCollection< TELEMENT >::const_iterator TCollection_const_iterator
Definition: TileRawDataCollection.h:40
SG::OwnershipPolicy
OwnershipPolicy
describes the possible element ownership policies (see e.g. DataVector)
Definition: OwnershipPolicy.h:16
TileRawDataCollection::whoami
virtual std::string whoami(void) const
Definition: TileRawDataCollection.h:82
SG::OWN_ELEMENTS
@ OWN_ELEMENTS
this data object owns its elements
Definition: OwnershipPolicy.h:17
TileRawDataCollection::TileRawDataCollection
TileRawDataCollection(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Definition: TileRawDataCollection.h:52
TileRawDataCollection::clear
virtual void clear()
TileRawDataCollection::~TileRawDataCollection
virtual ~TileRawDataCollection()=default
TileRawDataCollection::getLvl1Id
uint32_t getLvl1Id() const
Getter for level1 id.
Definition: TileRawDataCollection.h:89
TileRawDataCollection
Definition: TileRawDataCollection.h:37
TileRawDataCollection::getOwnership
SG::OwnershipPolicy getOwnership() const
Definition: TileRawDataCollection.h:111
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
TileRawDataCollection::setOwnership
void setOwnership(SG::OwnershipPolicy ownPolicy)
Definition: TileRawDataCollection.h:110
TileRawDataCollection::identify
ID identify() const
Definition: TileRawDataCollection.h:71
TileRawDataCollection::OBJECT
TELEMENT OBJECT
Definition: TileRawDataCollection.h:46
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
TileRawDataCollection::print
virtual void print() const
TileRawDataCollection::getLvl1Type
uint32_t getLvl1Type() const
Getter for level1 type.
Definition: TileRawDataCollection.h:95
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
TileRawDataCollection::getDetEvType
uint32_t getDetEvType() const
Getter for detector event type.
Definition: TileRawDataCollection.h:101
DataVector< TELEMENT >::ownPolicy
SG::OwnershipPolicy ownPolicy() const
Return the ownership policy setting for this container.
TileRawDataCollection::setLvl1Id
void setLvl1Id(uint32_t lvl1Id)
Setter for level1 id from ROD header.
Definition: TileRawDataCollection.h:86
TileRawDataCollection::getRODBCID
uint32_t getRODBCID() const
Getter for BCID from.
Definition: TileRawDataCollection.h:107
TileRawDataCollection.icc
CLASS_DEF.h
macros to associate a CLID to a type
TileRawDataCollection::TileRawDataCollection
TileRawDataCollection(ID id, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Definition: TileRawDataCollection.h:49
TileRawDataCollection::setLvl1Type
void setLvl1Type(uint32_t lvl1Type)
Setter for level1 type from ROD header.
Definition: TileRawDataCollection.h:92
TileRawDataCollection::m_lvl1Id
uint32_t m_lvl1Id
Level1 id from ROD header.
Definition: TileRawDataCollection.h:117
TileRawDataCollection::TileRawDataCollection
TileRawDataCollection(const TileRawDataCollection< TELEMENT > &rhs)=default
Identifier
Definition: IdentifierFieldParser.cxx:14