ATLAS Offline Software
TileRawDataContainer.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //********************************************************************
6 // Filename : TileRawDataContainer.h
7 // Author : A.Solodkov
8 // Created : Oct, 2002
9 //
10 // DESCRIPTION:
11 // Base Raw Event Container class for Tile calorimeter
12 // The collections inside container are sorted by frag_id
13 //
14 //
15 // HISTORY:
16 //
17 // BUGS:
18 //
19 // *******************************************************************
20 
21 #ifndef TILEEVENT_TILERAWDATACONTAINER_H
22 #define TILEEVENT_TILERAWDATACONTAINER_H
23 
25 #include "AthenaKernel/CLASS_DEF.h"
29 #include <string>
30 #include <inttypes.h>
31 
32 template <typename TCOLLECTION> class TileRawDataContainer
33  : public IdentifiableContainer<TCOLLECTION>
34 {
35 public:
36 
37  typedef typename TCOLLECTION::TElement TElement;
39  typedef typename TCOLLECTION::TCollection_const_iterator TCollection_const_iterator ;
40 
44 
45  // constructor
46  TileRawDataContainer(bool createColl=false,
50  TileRawDataContainer(bool createColl, SG::OwnershipPolicy ownPolicy);
51 
52  // desctructor
53  virtual ~TileRawDataContainer() { }
54 
55  // initialize all collections
56  void initialize(bool createColl, TYPE type,
58 
59  inline TYPE get_hashType() const { return this->m_hashFunc.type(); }
60  inline UNIT get_unit() const { return this->m_unit; }
61  inline void set_unit(UNIT unit) { m_unit=unit; }
62  inline TYPE get_type() const { return this->m_type; }
63  inline void set_type(TYPE type) { m_type=type; }
64  inline uint32_t get_bsflags() const { return this->m_bsflags; }
65  inline void set_bsflags(uint32_t bsflags) { m_bsflags=bsflags; }
66  inline const TileFragHash & hashFunc() const { return this->m_hashFunc; }
67 
68  // print all the Collections
69  virtual void print() const;
70  virtual operator std::string () const;
71  virtual std::string whoami (void) const { TCOLLECTION coll;
72  return "TileRawDataContainer of "+coll.whoami(); }
73 
74 private:
75 
76  UNIT m_unit; // we want to know if it's ADC counts or pCb or ...
77  TYPE m_type; // type of algorithm used to produce RawChannels
78  uint32_t m_bsflags; // some status bits from bytestream
79 
81 };
82 
83 
84 // Persistent representation of TileRawDataContainer for POOL
85 
86 template <typename TCOLLECTION> class TileRawDataCollectionVec
87  : public DataVector<TCOLLECTION>
88 {
89 
90 public:
91 
93  : DataVector<TCOLLECTION>(SG::VIEW_ELEMENTS)
95  //, m_unit(TileRawChannelUnit::ADCcounts)
96  { }
97 
99 
100  TileFragHash::TYPE m_type; // flag saved for initializing TileRawDataContainer.
101 
102 };
103 
104 
106 
107 #endif
108 
TileRawDataContainer::TElement
TCOLLECTION::TElement TElement
Definition: TileRawDataContainer.h:37
TileRawDataContainer::TContainer_const_iterator
TileRawDataContainer< TCOLLECTION >::const_iterator TContainer_const_iterator
Definition: TileRawDataContainer.h:38
TileRawDataCollectionVec::m_type
TileFragHash::TYPE m_type
Definition: TileRawDataContainer.h:100
TileRawDataContainer
Definition: TileRawDataContainer.h:34
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
TileRawDataContainer::MyBase
IdentifiableContainer< TCOLLECTION > MyBase
Definition: TileRawDataContainer.h:41
TileRawDataContainer::TCollection_const_iterator
TCOLLECTION::TCollection_const_iterator TCollection_const_iterator
Definition: TileRawDataContainer.h:39
TileRawDataContainer.icc
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TileRawDataContainer::m_type
TYPE m_type
Definition: TileRawDataContainer.h:77
TileFragHash::TYPE
TYPE
initialize
Definition: TileFragHash.h:33
TileRawDataCollectionVec::~TileRawDataCollectionVec
virtual ~TileRawDataCollectionVec()
Definition: TileRawDataContainer.h:98
TileFragHash.h
TileRawDataCollection.h
TileRawDataContainer::UNIT
TileRawChannelUnit::UNIT UNIT
Definition: TileRawDataContainer.h:43
TileRawDataContainer::m_unit
UNIT m_unit
Definition: TileRawDataContainer.h:76
TileFragHash
Hash table for Tile fragments (==drawers ==collections in StoreGate)
Definition: TileFragHash.h:24
TileFragHash::Digitizer
@ Digitizer
Definition: TileFragHash.h:33
TileRawDataContainer::TYPE
TileFragHash::TYPE TYPE
Definition: TileRawDataContainer.h:42
TileRawDataContainer::m_hashFunc
TileFragHash m_hashFunc
Definition: TileRawDataContainer.h:80
TileRawDataContainer::set_bsflags
void set_bsflags(uint32_t bsflags)
Definition: TileRawDataContainer.h:65
SG::OwnershipPolicy
OwnershipPolicy
describes the possible element ownership policies (see e.g. DataVector)
Definition: OwnershipPolicy.h:16
SG::OWN_ELEMENTS
@ OWN_ELEMENTS
this data object owns its elements
Definition: OwnershipPolicy.h:17
TileRawDataContainer::initialize
void initialize(bool createColl, TYPE type, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
TileRawDataContainer::get_bsflags
uint32_t get_bsflags() const
Definition: TileRawDataContainer.h:64
TileRawDataContainer::set_unit
void set_unit(UNIT unit)
Definition: TileRawDataContainer.h:61
TileRawDataContainer::whoami
virtual std::string whoami(void) const
Definition: TileRawDataContainer.h:71
IdentifiableContainerMT::const_iterator
Definition: IdentifiableContainerMT.h:82
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
TileRawChannelUnit::UNIT
UNIT
Definition: TileRawChannelUnit.h:16
TileRawDataContainer::TileRawDataContainer
TileRawDataContainer(bool createColl, SG::OwnershipPolicy ownPolicy)
TileRawDataContainer::~TileRawDataContainer
virtual ~TileRawDataContainer()
Definition: TileRawDataContainer.h:53
TileRawDataContainer::hashFunc
const TileFragHash & hashFunc() const
Definition: TileRawDataContainer.h:66
TileRawDataContainer::get_type
TYPE get_type() const
Definition: TileRawDataContainer.h:62
TileRawChannelUnit.h
TileRawDataContainer::print
virtual void print() const
TileRawDataContainer::set_type
void set_type(TYPE type)
Definition: TileRawDataContainer.h:63
TileFragHash::type
TYPE type() const
return hash type
Definition: TileFragHash.h:56
TileRawDataContainer::m_bsflags
uint32_t m_bsflags
Definition: TileRawDataContainer.h:78
TileRawDataContainer::get_unit
UNIT get_unit() const
Definition: TileRawDataContainer.h:60
unit
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
Definition: AmgMatrixBasePlugin.h:21
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TileRawDataContainer::TileRawDataContainer
TileRawDataContainer(bool createColl=false, TYPE type=TileFragHash::Digitizer, UNIT unit=TileRawChannelUnit::ADCcounts, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
IdentifiableContainerMT
Definition: IdentifiableContainerMT.h:30
TileRawDataContainer::get_hashType
TYPE get_hashType() const
Definition: TileRawDataContainer.h:59
TileRawDataCollectionVec::TileRawDataCollectionVec
TileRawDataCollectionVec()
Definition: TileRawDataContainer.h:92
Default
CLASS_DEF.h
macros to associate a CLID to a type
IdentifiableContainer.h
This class is a general container which can hold objects of accessed by an IdentifierHash For more in...
TileRawChannelUnit::ADCcounts
@ ADCcounts
Definition: TileRawChannelUnit.h:17
TileRawDataCollectionVec
Definition: TileRawDataContainer.h:88