Public Member Functions | Private Attributes | List of all members
raw::ctb::pdspctb Class Reference

#include <pdspctb.h>

Public Member Functions

 pdspctb ()
 
 pdspctb (std::vector< raw::ctb::Trigger > &trigs, std::vector< raw::ctb::ChStatus > &chstats, std::vector< raw::ctb::Feedback > &fbs, std::vector< raw::ctb::Misc > &m, std::vector< raw::ctb::WordIndex > &wordindexes)
 
const std::vector< raw::ctb::Trigger > & GetTriggers () const
 
const std::vector< raw::ctb::ChStatus > & GetChStatuses () const
 
const std::vector< raw::ctb::Feedback > & GetFeedbacks () const
 
const std::vector< raw::ctb::Misc > & GetMiscs () const
 
const std::vector< raw::ctb::WordIndex > & GetIndexes () const
 
const std::vector< raw::ctb::TriggerGetHLTriggers () const
 
const std::vector< raw::ctb::TriggerGetLLTriggers () const
 
const std::vector< raw::ctb::ChStatusGetChStatusAfterHLTs () const
 
size_t GetNTriggers () const
 
size_t GetNChStatuses () const
 
size_t GetNFeedbacks () const
 
size_t GetNMiscs () const
 
size_t GetNIndexes () const
 
const raw::ctb::TriggerGetTrigger (size_t i) const
 
const raw::ctb::ChStatusGetChStatuse (size_t i) const
 
const raw::ctb::FeedbackGetFeedback (size_t i) const
 
const raw::ctb::MiscGetMisc (size_t i) const
 
const raw::ctb::WordIndexGetIndex (size_t i) const
 

Private Attributes

std::vector< raw::ctb::TriggerfTriggers
 
std::vector< raw::ctb::ChStatusfChStatuses
 
std::vector< raw::ctb::FeedbackfFeedbacks
 
std::vector< raw::ctb::MiscfMiscs
 
std::vector< raw::ctb::WordIndexfIndexes
 

Detailed Description

Definition at line 52 of file pdspctb.h.

Constructor & Destructor Documentation

raw::ctb::pdspctb::pdspctb ( )
inline

Definition at line 57 of file pdspctb.h.

57 {}; // Constructor of an emtpy data product
raw::ctb::pdspctb::pdspctb ( std::vector< raw::ctb::Trigger > &  trigs,
std::vector< raw::ctb::ChStatus > &  chstats,
std::vector< raw::ctb::Feedback > &  fbs,
std::vector< raw::ctb::Misc > &  m,
std::vector< raw::ctb::WordIndex > &  wordindexes 
)
inline

Definition at line 60 of file pdspctb.h.

64  :
65  fTriggers(trigs), fChStatuses(chstats), fFeedbacks(fbs), fMiscs(m), fIndexes(wordindexes) {};
std::vector< raw::ctb::ChStatus > fChStatuses
Definition: pdspctb.h:93
std::vector< raw::ctb::Trigger > fTriggers
Definition: pdspctb.h:92
std::vector< raw::ctb::WordIndex > fIndexes
Definition: pdspctb.h:96
std::vector< raw::ctb::Misc > fMiscs
Definition: pdspctb.h:95
std::vector< raw::ctb::Feedback > fFeedbacks
Definition: pdspctb.h:94

Member Function Documentation

const std::vector< raw::ctb::ChStatus > raw::ctb::pdspctb::GetChStatusAfterHLTs ( ) const

Definition at line 127 of file pdspctb.h.

128 {
129  std::vector<raw::ctb::ChStatus> chs;
130  raw::ctb::ChStatus emptychstat;
131  emptychstat.word_type = 0;
132  emptychstat.pds = 0;
133  emptychstat.crt = 0;
134  emptychstat.beam_hi = 0;
135  emptychstat.beam_lo = 0;
136  emptychstat.timestamp = 0;
137 
138  for (size_t i=0; i<fTriggers.size(); ++i)
139  {
140  if (fTriggers.at(i).word_type == 2)
141  {
142  // find this HL trigger word in the indexes vector. Assume the next entry is a chstatus
143 
144  for (size_t j=0; j<fIndexes.size(); ++j)
145  {
146  if (fIndexes.at(j).word_type == 2 && fIndexes.at(j).index == i)
147  {
148  size_t kstatindex = j;
149  if (kstatindex > 0)
150  {
151  kstatindex --; // it's the word before the HLT that has the chstat
152  if (fIndexes.at(kstatindex).word_type == 3)
153  {
154  size_t kstat = fIndexes.at(kstatindex).index;
155 
156  if (kstat < fChStatuses.size())
157  {
158  chs.push_back(fChStatuses.at(kstat));
159  }
160  else
161  {
162  chs.push_back(emptychstat);
163  }
164  }
165  else
166  {
167  chs.push_back(emptychstat);
168  }
169  }
170  else
171  {
172  chs.push_back(emptychstat);
173  }
174  }
175  }
176  }
177  }
178  return chs;
179 }
std::vector< raw::ctb::ChStatus > fChStatuses
Definition: pdspctb.h:93
std::vector< raw::ctb::Trigger > fTriggers
Definition: pdspctb.h:92
uint32_t crt
Definition: pdspctb.h:27
std::vector< raw::ctb::WordIndex > fIndexes
Definition: pdspctb.h:96
uint32_t beam_lo
Definition: pdspctb.h:29
uint32_t beam_hi
Definition: pdspctb.h:28
uint32_t pds
Definition: pdspctb.h:26
uint32_t word_type
Definition: pdspctb.h:25
ULong64_t timestamp
Definition: pdspctb.h:30
const raw::ctb::ChStatus & raw::ctb::pdspctb::GetChStatuse ( size_t  i) const

Definition at line 201 of file pdspctb.h.

201 { return fChStatuses.at(i); }
std::vector< raw::ctb::ChStatus > fChStatuses
Definition: pdspctb.h:93
const std::vector< raw::ctb::ChStatus > & raw::ctb::pdspctb::GetChStatuses ( ) const

Definition at line 107 of file pdspctb.h.

107 { return fChStatuses; }
std::vector< raw::ctb::ChStatus > fChStatuses
Definition: pdspctb.h:93
const raw::ctb::Feedback & raw::ctb::pdspctb::GetFeedback ( size_t  i) const

Definition at line 202 of file pdspctb.h.

202 { return fFeedbacks.at(i); }
std::vector< raw::ctb::Feedback > fFeedbacks
Definition: pdspctb.h:94
const std::vector< raw::ctb::Feedback > & raw::ctb::pdspctb::GetFeedbacks ( ) const

Definition at line 108 of file pdspctb.h.

108 { return fFeedbacks; }
std::vector< raw::ctb::Feedback > fFeedbacks
Definition: pdspctb.h:94
const std::vector< raw::ctb::Trigger > raw::ctb::pdspctb::GetHLTriggers ( ) const

Definition at line 112 of file pdspctb.h.

113 {
114  std::vector<raw::ctb::Trigger> HLTriggers;
115  for (size_t i=0; i<fTriggers.size(); ++i)
116  {
117  if (fTriggers.at(i).word_type == 2)
118  {
119  HLTriggers.push_back(fTriggers.at(i));
120  }
121  }
122  return HLTriggers;
123 }
std::vector< raw::ctb::Trigger > fTriggers
Definition: pdspctb.h:92
const raw::ctb::WordIndex & raw::ctb::pdspctb::GetIndex ( size_t  i) const

Definition at line 204 of file pdspctb.h.

204 { return fIndexes.at(i); }
std::vector< raw::ctb::WordIndex > fIndexes
Definition: pdspctb.h:96
const std::vector< raw::ctb::WordIndex > & raw::ctb::pdspctb::GetIndexes ( ) const

Definition at line 110 of file pdspctb.h.

110 { return fIndexes; }
std::vector< raw::ctb::WordIndex > fIndexes
Definition: pdspctb.h:96
const std::vector< raw::ctb::Trigger > raw::ctb::pdspctb::GetLLTriggers ( ) const

Definition at line 181 of file pdspctb.h.

182 {
183  std::vector<raw::ctb::Trigger> LLTriggers;
184  for (size_t i=0; i<fTriggers.size(); ++i)
185  {
186  if (fTriggers.at(i).word_type == 1)
187  {
188  LLTriggers.push_back(fTriggers.at(i));
189  }
190  }
191  return LLTriggers;
192 }
std::vector< raw::ctb::Trigger > fTriggers
Definition: pdspctb.h:92
const raw::ctb::Misc & raw::ctb::pdspctb::GetMisc ( size_t  i) const

Definition at line 203 of file pdspctb.h.

203 { return fMiscs.at(i); }
std::vector< raw::ctb::Misc > fMiscs
Definition: pdspctb.h:95
const std::vector< raw::ctb::Misc > & raw::ctb::pdspctb::GetMiscs ( ) const

Definition at line 109 of file pdspctb.h.

109 { return fMiscs; }
std::vector< raw::ctb::Misc > fMiscs
Definition: pdspctb.h:95
size_t raw::ctb::pdspctb::GetNChStatuses ( ) const

Definition at line 195 of file pdspctb.h.

195 { return fChStatuses.size(); }
std::vector< raw::ctb::ChStatus > fChStatuses
Definition: pdspctb.h:93
size_t raw::ctb::pdspctb::GetNFeedbacks ( ) const

Definition at line 196 of file pdspctb.h.

196 { return fFeedbacks.size(); }
std::vector< raw::ctb::Feedback > fFeedbacks
Definition: pdspctb.h:94
size_t raw::ctb::pdspctb::GetNIndexes ( ) const

Definition at line 198 of file pdspctb.h.

198 { return fIndexes.size(); }
std::vector< raw::ctb::WordIndex > fIndexes
Definition: pdspctb.h:96
size_t raw::ctb::pdspctb::GetNMiscs ( ) const

Definition at line 197 of file pdspctb.h.

197 { return fMiscs.size(); }
std::vector< raw::ctb::Misc > fMiscs
Definition: pdspctb.h:95
size_t raw::ctb::pdspctb::GetNTriggers ( ) const

Definition at line 194 of file pdspctb.h.

194 { return fTriggers.size(); }
std::vector< raw::ctb::Trigger > fTriggers
Definition: pdspctb.h:92
const raw::ctb::Trigger & raw::ctb::pdspctb::GetTrigger ( size_t  i) const

Definition at line 200 of file pdspctb.h.

200 { return fTriggers.at(i); }
std::vector< raw::ctb::Trigger > fTriggers
Definition: pdspctb.h:92
const std::vector< raw::ctb::Trigger > & raw::ctb::pdspctb::GetTriggers ( ) const

Definition at line 106 of file pdspctb.h.

106 { return fTriggers; }
std::vector< raw::ctb::Trigger > fTriggers
Definition: pdspctb.h:92

Member Data Documentation

std::vector<raw::ctb::ChStatus> raw::ctb::pdspctb::fChStatuses
private

Definition at line 93 of file pdspctb.h.

std::vector<raw::ctb::Feedback> raw::ctb::pdspctb::fFeedbacks
private

Definition at line 94 of file pdspctb.h.

std::vector<raw::ctb::WordIndex> raw::ctb::pdspctb::fIndexes
private

Definition at line 96 of file pdspctb.h.

std::vector<raw::ctb::Misc> raw::ctb::pdspctb::fMiscs
private

Definition at line 95 of file pdspctb.h.

std::vector<raw::ctb::Trigger> raw::ctb::pdspctb::fTriggers
private

Definition at line 92 of file pdspctb.h.


The documentation for this class was generated from the following file: