ChipEvent Class Reference

#include <ChipEvent.h>

Inheritance diagram for ChipEvent:
CMChipEvent DSChipEvent TPChipEvent

List of all members.

Public Member Functions

 ChipEvent ()
 ~ChipEvent ()
void Reset ()
virtual void LocalReset ()
void PackLoc (Char_t Crate=-1, Char_t Varc=-1, Char_t Vmm=-1, Char_t Vadc=-1, Char_t Vachip=-1, Char_t Vachan=-1)
bool IsLoc (Char_t Crate=-1, Char_t Varc=-1, Char_t Vmm=-1, Char_t Vadc=-1, Char_t Vachip=-1, Char_t Vachan=-1)
Int_t GetCrate () const
Int_t GetVarc () const
Int_t GetVmm () const
Int_t GetVadc () const
Int_t GetVachip () const
Int_t GetVachan () const
const char * AsString ()
Int_t Compare (const TObject *obj) const
 ClassDef (ChipEvent, 1)

Public Attributes

Short_t fChipLoc

Detailed Description

Definition at line 12 of file ChipEvent.h.


Constructor & Destructor Documentation

ChipEvent::ChipEvent (  ) 

Definition at line 38 of file ChipEvent.cxx.

References RSMVer.

00038                      {
00039   RSMVer << "ChipEvent::ChipEvent" << endl;
00040   this->Reset();
00041 }

ChipEvent::~ChipEvent (  ) 

Definition at line 43 of file ChipEvent.cxx.

References RSMVer.

00043                       {
00044   RSMVer << "ChipEvent::~ChipEvent" << endl;
00045 }


Member Function Documentation

const char * ChipEvent::AsString ( void   ) 

Definition at line 83 of file ChipEvent.cxx.

References GetCrate(), GetVachip(), GetVadc(), GetVarc(), and GetVmm().

00083                                 {
00084   static char newstring[80] = " ";
00085 
00086   sprintf(newstring,"%d-%d-%d-%d-%d",
00087                     GetCrate(),
00088                     GetVarc(),
00089                     GetVmm(),
00090                     GetVadc(),
00091                     GetVachip());
00092 
00093   return(newstring);
00094 }

ChipEvent::ClassDef ( ChipEvent  ,
 
)

Reimplemented in CMChipEvent.

Int_t ChipEvent::Compare ( const TObject *  obj  )  const

Definition at line 96 of file ChipEvent.cxx.

References fChipLoc.

00096                                                  {
00097   if(fChipLoc < ((ChipEvent*)obj)->fChipLoc)
00098     return(-1);
00099   if(fChipLoc > ((ChipEvent*)obj)->fChipLoc)
00100     return(1);
00101 
00102   return(0);
00103 }

Int_t ChipEvent::GetCrate (  )  const [inline]

Definition at line 35 of file ChipEvent.h.

References fChipLoc.

Referenced by AsString(), IsLoc(), and tp_crate_plot().

00035 {return((fChipLoc>>12)&0xF);}

Int_t ChipEvent::GetVachan (  )  const [inline]

Definition at line 40 of file ChipEvent.h.

References fChipLoc.

Referenced by IsLoc().

00040 {return((fChipLoc>>0)&0xF);}

Int_t ChipEvent::GetVachip (  )  const [inline]

Definition at line 39 of file ChipEvent.h.

References fChipLoc.

Referenced by AsString(), ds_vmm_plot(), IsLoc(), and tp_vmm_plot().

00039 {return((fChipLoc>>4)&0x3);}

Int_t ChipEvent::GetVadc (  )  const [inline]

Definition at line 38 of file ChipEvent.h.

References fChipLoc.

Referenced by AsString(), ds_vmm_plot(), IsLoc(), tp_crate_plot(), and tp_vmm_plot().

00038 {return((fChipLoc>>6)&0x1);}

Int_t ChipEvent::GetVarc (  )  const [inline]

Definition at line 36 of file ChipEvent.h.

References fChipLoc.

Referenced by AsString(), IsLoc(), and tp_crate_plot().

00036 {return((fChipLoc>>10)&0x3);}

Int_t ChipEvent::GetVmm (  )  const [inline]

Definition at line 37 of file ChipEvent.h.

References fChipLoc.

Referenced by AsString(), IsLoc(), and tp_crate_plot().

00037 {return((fChipLoc>>7)&0x7);}

bool ChipEvent::IsLoc ( Char_t  Crate = -1,
Char_t  Varc = -1,
Char_t  Vmm = -1,
Char_t  Vadc = -1,
Char_t  Vachip = -1,
Char_t  Vachan = -1 
)

Definition at line 67 of file ChipEvent.cxx.

References GetCrate(), GetVachan(), GetVachip(), GetVadc(), GetVarc(), and GetVmm().

Referenced by ds_vmm_plot(), tp_crate_plot(), and tp_vmm_plot().

00072                                      {
00073   if(Crate>=0  && Crate!=this->GetCrate())    return(false);
00074   if(Varc>=0   && Varc!=this->GetVarc())      return(false);
00075   if(Vmm>=0    && Vmm!=this->GetVmm())        return(false);
00076   if(Vadc>=0   && Vadc!=this->GetVadc())      return(false);
00077   if(Vachip>=0 && Vachip!=this->GetVachip())  return(false);
00078   if(Vachan>=0 && Vachan!=this->GetVachan())  return(false);
00079 
00080   return(true);
00081 }

virtual void ChipEvent::LocalReset (  )  [inline, virtual]

Reimplemented in CMChipEvent, DSChipEvent, and TPChipEvent.

Definition at line 17 of file ChipEvent.h.

Referenced by Reset().

00017 {return;}

void ChipEvent::PackLoc ( Char_t  Crate = -1,
Char_t  Varc = -1,
Char_t  Vmm = -1,
Char_t  Vadc = -1,
Char_t  Vachip = -1,
Char_t  Vachan = -1 
)

Definition at line 52 of file ChipEvent.cxx.

References fChipLoc.

Referenced by DaqSnarlEvent::ChipGen(), BlockEvent::ChipGen(), TPSinglesEvent::ChipGen(), and CrateMonitorEvent::ChipGen().

00057                                        {
00058   fChipLoc= 0;
00059   if(Crate>=0)  fChipLoc += Crate  << 12;
00060   if(Varc>=0)   fChipLoc += Varc   << 10;
00061   if(Vmm>=0)    fChipLoc += Vmm    << 7;
00062   if(Vadc>=0)   fChipLoc += Vadc   << 6;
00063   if(Vachip>=0) fChipLoc += Vachip << 4;
00064   if(Vachan>=0) fChipLoc += Vachan << 0;
00065 }

void ChipEvent::Reset ( void   ) 

Definition at line 47 of file ChipEvent.cxx.

References fChipLoc, and LocalReset().

00047                       {
00048   fChipLoc=0;
00049   this->LocalReset();
00050 }


Member Data Documentation

Definition at line 19 of file ChipEvent.h.

Referenced by Compare(), GetCrate(), GetVachan(), GetVachip(), GetVadc(), GetVarc(), GetVmm(), PackLoc(), and Reset().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1