CMS 3D CMS Logo

EcalPseudoStripInputDigi.cc
Go to the documentation of this file.
2 
3 
4 EcalPseudoStripInputDigi::EcalPseudoStripInputDigi() : size_(0), data_(MAXSAMPLES) {
5 }
6 
8  size_(0), data_(MAXSAMPLES) {
9 }
10 
12 {
13  if (size_ == 1)
14  return 0;
15  else if (size_ == 5)
16  return 2;
17  else
18  return -1;
19 }
20 
23 {
24  int sample = sampleOfInterest();
25  if (sample != -1)
26  return data_[sample].pseudoStripInput();
27  else
28  return -1;
29 }
30 
33 {
34  int sample = sampleOfInterest();
35  if (sample != -1)
36  return data_[sample].fineGrain();
37  else
38  return false;
39 }
40 
42 {
43  if (size_ == 1)
44  return false;
45  else if (size_ > 1)
46  return true;
47  return false;
48 }
49 
51  if (size<0) size_=0;
52  else if (size>MAXSAMPLES) size_=MAXSAMPLES;
53  else size_=size;
54 }
55 
56 
57 std::ostream& operator<<(std::ostream& s, const EcalPseudoStripInputDigi& digi) {
58  s << digi.id() << " " << digi.size() << " samples " << std::endl;
59  for (int i=0; i<digi.size(); i++)
60  s << " " << digi.sample(i) << std::endl;
61  return s;
62 }
63 
int i
Definition: DBlmapReader.cc:9
const EcalTriggerElectronicsId & id() const
const EcalPseudoStripInputSample & sample(int i) const
std::ostream & operator<<(std::ostream &s, const EcalPseudoStripInputDigi &digi)
int pseudoStripInput() const
get the encoded/compressed Et of interesting sample
EcalTriggerElectronicsId id_
bool fineGrain() const
get the fine-grain bit of interesting sample
std::vector< EcalPseudoStripInputSample > data_
int sampleOfInterest() const
Gets the interesting sample.
bool isDebug() const
True if debug mode (# of samples > 1)
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...