CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Attributes | Private Attributes

CastorTriggerPrimitiveDigi Class Reference

#include <CastorTriggerPrimitiveDigi.h>

List of all members.

Public Types

typedef HcalCastorDetId key_type
 For the sorted collection.

Public Member Functions

 CastorTriggerPrimitiveDigi ()
 CastorTriggerPrimitiveDigi (const HcalCastorDetId &id)
const HcalCastorDetIdid () const
bool isSOI (int i) const
const HcalTriggerPrimitiveSampleoperator[] (int i) const
int presamples () const
const HcalTriggerPrimitiveSamplesample (int i) const
void setPresamples (int ps)
void setSample (int i, const HcalTriggerPrimitiveSample &sam)
void setSize (int size)
void setZSInfo (bool unsuppressed, bool markAndPass)
int size () const
int SOI_compressedEt () const
 Compressed ET for the "Sample of Interest".
bool SOI_fineGrain () const
 Fine-grain bit for the "Sample of Interest".
int SOI_tpchannel () const
int SOI_tpdata () const
const HcalTriggerPrimitiveSamplet0 () const
 Full "Sample of Interest".
int tpchannel (int i) const
int tpdata (int i) const
bool zsMarkAndPass () const
 was ZS MarkAndPass?
bool zsUnsuppressed () const
 was ZS unsuppressed?

Static Public Attributes

static const int MAXSAMPLES = 10

Private Attributes

HcalTriggerPrimitiveSample data_ [MAXSAMPLES]
int hcalPresamples_
HcalCastorDetId id_
int size_

Detailed Description

Date:
2010/06/30 12:19:09
Revision:
1.1
Author:
A. Campbell - DESY

Definition at line 15 of file CastorTriggerPrimitiveDigi.h.


Member Typedef Documentation

For the sorted collection.

Definition at line 17 of file CastorTriggerPrimitiveDigi.h.


Constructor & Destructor Documentation

CastorTriggerPrimitiveDigi::CastorTriggerPrimitiveDigi ( )

Definition at line 4 of file CastorTriggerPrimitiveDigi.cc.

                                                       : size_(0), hcalPresamples_(0) {
}
CastorTriggerPrimitiveDigi::CastorTriggerPrimitiveDigi ( const HcalCastorDetId id) [explicit]

Definition at line 6 of file CastorTriggerPrimitiveDigi.cc.

                                                                                : id_(id),
                                                                                   size_(0), hcalPresamples_(0) {
}

Member Function Documentation

const HcalCastorDetId& CastorTriggerPrimitiveDigi::id ( void  ) const [inline]

Definition at line 22 of file CastorTriggerPrimitiveDigi.h.

References id_.

Referenced by operator<<().

{ return id_; }
bool CastorTriggerPrimitiveDigi::isSOI ( int  i) const [inline]

Definition at line 45 of file CastorTriggerPrimitiveDigi.h.

References data_.

Referenced by operator<<().

{ return ( ( data_[i].raw() & 0x0200 ) == 0x0200 ) ; }
const HcalTriggerPrimitiveSample& CastorTriggerPrimitiveDigi::operator[] ( int  i) const [inline]

Definition at line 33 of file CastorTriggerPrimitiveDigi.h.

References data_, and i.

{ return data_[i]; }
int CastorTriggerPrimitiveDigi::presamples ( ) const [inline]

Definition at line 24 of file CastorTriggerPrimitiveDigi.h.

References hcalPresamples_.

Referenced by operator<<(), SOI_tpchannel(), SOI_tpdata(), and t0().

{ return hcalPresamples_&0xF; }
const HcalTriggerPrimitiveSample& CastorTriggerPrimitiveDigi::sample ( int  i) const [inline]

Definition at line 34 of file CastorTriggerPrimitiveDigi.h.

References data_, and i.

Referenced by operator<<().

{ return data_[i]; }
void CastorTriggerPrimitiveDigi::setPresamples ( int  ps)

Definition at line 15 of file CastorTriggerPrimitiveDigi.cc.

References hcalPresamples_.

                                                     {
  if (ps<0) hcalPresamples_&=0xFFFFFF0;
  //  else if (ps>=size_) hcalPresamples_=size_-1;
  else hcalPresamples_|=ps&0xF;
}
void CastorTriggerPrimitiveDigi::setSample ( int  i,
const HcalTriggerPrimitiveSample sam 
) [inline]

Definition at line 51 of file CastorTriggerPrimitiveDigi.h.

References data_, and i.

{ data_[i]=sam; }
void CastorTriggerPrimitiveDigi::setSize ( int  size)

Definition at line 10 of file CastorTriggerPrimitiveDigi.cc.

References MAXSAMPLES, size(), and size_.

                                                 {
  if (size<0) size_=0;
  else if (size>MAXSAMPLES) size_=MAXSAMPLES;
  else size_=size;
}
void CastorTriggerPrimitiveDigi::setZSInfo ( bool  unsuppressed,
bool  markAndPass 
)

Definition at line 21 of file CastorTriggerPrimitiveDigi.cc.

References hcalPresamples_.

                                                                              {
  if (markAndPass) hcalPresamples_|=0x10;
  if (unsuppressed) hcalPresamples_|=0x20;
}
int CastorTriggerPrimitiveDigi::size ( void  ) const [inline]

Definition at line 23 of file CastorTriggerPrimitiveDigi.h.

References size_.

Referenced by operator<<(), and setSize().

{ return (size_&0xF); }
int CastorTriggerPrimitiveDigi::SOI_compressedEt ( ) const [inline]

Compressed ET for the "Sample of Interest".

Definition at line 41 of file CastorTriggerPrimitiveDigi.h.

References HcalTriggerPrimitiveSample::compressedEt(), and t0().

{ return t0().compressedEt(); }
bool CastorTriggerPrimitiveDigi::SOI_fineGrain ( ) const [inline]

Fine-grain bit for the "Sample of Interest".

Definition at line 39 of file CastorTriggerPrimitiveDigi.h.

References HcalTriggerPrimitiveSample::fineGrain(), and t0().

{ return t0().fineGrain(); }
int CastorTriggerPrimitiveDigi::SOI_tpchannel ( ) const [inline]

Definition at line 46 of file CastorTriggerPrimitiveDigi.h.

References data_, and presamples().

Referenced by operator<<().

{ return ( ( data_[presamples()].raw() & 0xf800 ) >> 11 ); }
int CastorTriggerPrimitiveDigi::SOI_tpdata ( ) const [inline]

Definition at line 47 of file CastorTriggerPrimitiveDigi.h.

References data_, and presamples().

Referenced by operator<<().

{ return ( data_[presamples()].raw() & 0x01ff ); }
const HcalTriggerPrimitiveSample& CastorTriggerPrimitiveDigi::t0 ( ) const [inline]

Full "Sample of Interest".

Definition at line 37 of file CastorTriggerPrimitiveDigi.h.

References data_, and presamples().

Referenced by SOI_compressedEt(), and SOI_fineGrain().

{ return data_[presamples()]; }  
int CastorTriggerPrimitiveDigi::tpchannel ( int  i) const [inline]

Definition at line 43 of file CastorTriggerPrimitiveDigi.h.

References data_.

Referenced by operator<<().

{ return ( ( data_[i].raw() & 0xf800 ) >> 11 ); }
int CastorTriggerPrimitiveDigi::tpdata ( int  i) const [inline]

Definition at line 44 of file CastorTriggerPrimitiveDigi.h.

References data_.

Referenced by operator<<().

{ return ( data_[i].raw() & 0x01ff ); }
bool CastorTriggerPrimitiveDigi::zsMarkAndPass ( ) const [inline]

was ZS MarkAndPass?

Definition at line 27 of file CastorTriggerPrimitiveDigi.h.

References hcalPresamples_.

Referenced by operator<<().

{ return (hcalPresamples_&0x10); }
bool CastorTriggerPrimitiveDigi::zsUnsuppressed ( ) const [inline]

was ZS unsuppressed?

Definition at line 29 of file CastorTriggerPrimitiveDigi.h.

References hcalPresamples_.

Referenced by operator<<().

{ return (hcalPresamples_&0x20); }

Member Data Documentation

Definition at line 55 of file CastorTriggerPrimitiveDigi.h.

Referenced by id().

const int CastorTriggerPrimitiveDigi::MAXSAMPLES = 10 [static]

Definition at line 53 of file CastorTriggerPrimitiveDigi.h.

Referenced by setSize().

Definition at line 56 of file CastorTriggerPrimitiveDigi.h.

Referenced by setSize(), and size().