ATLAS Offline Software
Loading...
Searching...
No Matches
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
28#include "Identifier/Identifier.h"
29// #include "TileEvent/TileRoI_ID.h"
30
31#include <string>
32#include <map>
33#include <inttypes.h>
34
35template <typename TELEMENT> class TileRawDataCollection
36 : public DataVector<TELEMENT>
37{
38 public:
39
41
42 // required for a Digit Collection
43 typedef int ID;
45 typedef TELEMENT DIGIT;
46 typedef TELEMENT OBJECT;
47
48 // construct a container for a given super-drawer (fragment)
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
109protected:
111 SG::OwnershipPolicy getOwnership() const { return this->m_ownPolicy; }
112
113private:
115
117 uint32_t m_lvl1Id;
119 uint32_t m_lvl1Type;
121 uint32_t m_detEvType;
123 uint32_t m_rodBCID;
124
136};
137
139
140#endif
141
macros to associate a CLID to a type
An STL vector of pointers that by default owns its pointed-to elements.
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
void reserve(size_type n)
DataVector(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
SG::OwnershipPolicy ownPolicy() const
uint32_t getLvl1Type() const
Getter for level1 type.
virtual ~TileRawDataCollection()=default
uint32_t getDetEvType() const
Getter for detector event type.
void setOwnership(SG::OwnershipPolicy ownPolicy)
void setLvl1Type(uint32_t lvl1Type)
Setter for level1 type from ROD header.
TileRawDataCollection(TileRawDataCollection< TELEMENT > &&rhs)=default
void setLvl1Id(uint32_t lvl1Id)
Setter for level1 id from ROD header.
virtual void clear()
TileRawDataCollection(const TileRawDataCollection< TELEMENT > &rhs)=default
virtual void print() const
void setRODBCID(uint32_t rodBCID)
Setter for BCID from ROD header.
virtual std::string whoami(void) const
TileRawDataCollection(ID id, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
void setDetEvType(uint32_t detEvType)
Setter for detector event type from ROD header.
uint32_t getLvl1Id() const
Getter for level1 id.
TileRawDataCollection< TileBeamElem >::const_iterator TCollection_const_iterator
TileRawDataCollection(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
SG::OwnershipPolicy getOwnership() const
uint32_t getRODBCID() const
Getter for BCID from.
TileRawDataCollection(ID id, SG::OwnershipPolicy ownPolicy, uint32_t lvl1Id, uint32_t lvl1Type, uint32_t detEvType, uint32_t rodBCID)
OwnershipPolicy
@ OWN_ELEMENTS
this data object owns its elements