CMS 3D CMS Logo

TransientDataFrame.h
Go to the documentation of this file.
1 #ifndef DataFormats_Common_TransientDataFrame_h
2 #define DataFormats_Common_TransientDataFrame_h
3 
5 #include <algorithm>
6 
7 namespace edm {
8 
9  /* a fixed size array of 16bit words belonging to
10  * a "channel" identified by an 32bit id
11  *
12  * FIXME interface to be finalized once use-cases fully identified
13  *
14  */
15  template<unsigned int SIZE>
17  public:
18 
21 
24  TransientDataFrame(DataFrame const & iframe) :
25  m_id(iframe.id())
26  {
27  data_type const * p = iframe.begin();
28  std::copy(p,p+SIZE,m_data);
29  }
30 
31  int size() const { return SIZE;}
32 
33  data_type operator[](size_t i) const {
34  return m_data[i];
35  }
36 
37  data_type & operator[](size_t i) {
38  return m_data[i];
39  }
40 
41  id_type id() const { return m_id; }
42 
43  private:
46 
47  };
48 
49 }
50 
51 #endif // DataFormats_Common_TransientDataFrame_h
mps_fire.i
i
Definition: mps_fire.py:355
edm::TransientDataFrame::TransientDataFrame
TransientDataFrame()
Definition: TransientDataFrame.h:22
edm::TransientDataFrame::m_id
id_type m_id
Definition: TransientDataFrame.h:44
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
edm
HLT enums.
Definition: AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::TransientDataFrame::data_type
DataFrame::data_type data_type
Definition: TransientDataFrame.h:19
edm::TransientDataFrame::operator[]
data_type operator[](size_t i) const
Definition: TransientDataFrame.h:33
edm::TransientDataFrame::size
int size() const
Definition: TransientDataFrame.h:31
edm::TransientDataFrame::m_data
data_type m_data[SIZE]
Definition: TransientDataFrame.h:45
edm::TransientDataFrame::operator[]
data_type & operator[](size_t i)
Definition: TransientDataFrame.h:37
DataFrame.h
edm::DataFrame
Definition: DataFrame.h:15
edm::TransientDataFrame::id
id_type id() const
Definition: TransientDataFrame.h:41
edm::TransientDataFrame::TransientDataFrame
TransientDataFrame(id_type i)
Definition: TransientDataFrame.h:23
edm::DataFrame::id_type
unsigned int id_type
Definition: DataFrame.h:18
edm::TransientDataFrame::TransientDataFrame
TransientDataFrame(DataFrame const &iframe)
Definition: TransientDataFrame.h:24
edm::TransientDataFrame
Definition: TransientDataFrame.h:16
edm::DataFrame::data_type
unsigned short data_type
Definition: DataFrame.h:19
edm::DataFrame::begin
constexpr iterator begin()
Definition: DataFrame.h:33
edm::TransientDataFrame::id_type
DataFrame::id_type id_type
Definition: TransientDataFrame.h:20