ATLAS Offline Software
Loading...
Searching...
No Matches
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
29#include <string>
30#include <inttypes.h>
31
32template <typename TCOLLECTION> class TileRawDataContainer
33 : public IdentifiableContainer<TCOLLECTION>
34{
35public:
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
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
74private:
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
86template <typename TCOLLECTION> class TileRawDataCollectionVec
87 : public DataVector<TCOLLECTION>
88{
89
90public:
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
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
macros to associate a CLID to a type
This class is a general container which can hold objects of accessed by an IdentifierHash For more in...
IdentifiableContainerMT< T > IdentifiableContainer
DataVector(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
Hash table for Tile fragments (==drawers ==collections in StoreGate)
TYPE
initialize
TileRawDataContainer< TCOLLECTION >::const_iterator TContainer_const_iterator
TileRawDataContainer(bool createColl, SG::OwnershipPolicy ownPolicy)
const TileFragHash & hashFunc() const
void initialize(bool createColl, TYPE type, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
TileRawDataContainer(bool createColl=false, TYPE type=TileFragHash::Digitizer, UNIT unit=TileRawChannelUnit::ADCcounts, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
TileFragHash m_hashFunc
TileFragHash::TYPE TYPE
TileRawChannelUnit::UNIT UNIT
virtual std::string whoami(void) const
TCOLLECTION::TCollection_const_iterator TCollection_const_iterator
IdentifiableContainer< TCOLLECTION > MyBase
virtual void print() const
TCOLLECTION::TElement TElement
void set_bsflags(uint32_t bsflags)
uint32_t get_bsflags() const
Forward declaration.
OwnershipPolicy
@ OWN_ELEMENTS
this data object owns its elements