MTDif Class Reference

#include <MTDif.hh>

Inheritance diagram for MTDif:

Inheritance graph
[legend]
Collaboration diagram for MTDif:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MTDif (UInt_t _id=0)
 MTDif (const Dif &aDif)
virtual ~MTDif ()
MTDifoperator= (const Dif &aDif)
void Info (void) const
void SetRegister (Char_t low, Char_t high, Char_t before, Char_t after)
void SetAcqMiode (Short_t _acqMode)
Int_t GetDifBunchCrossing (void) const
Int_t GetId () const
Char_t GetLowRegister () const
Char_t GetHighRegister () const
Char_t GetBeforeRegister () const
Char_t GetAfterRegister () const
Short_t GetAcqMode () const
void SetId (UInt_t value)
void SetLowRegister (Char_t value)
void SetHighRegister (Char_t value)
void SetBeforeRegister (Char_t value)
void SetAfterRegister (Char_t value)
void SetAcqMode (Short_t value)
Char_t GetDifFirmware () const
void SetDifFirmware (Char_t value)
Char_t GetDifConfig () const
void SetDifConfig (Char_t value)
Char_t GetAsicType () const
TString GetStringAsicType () const
void SetAsicType (Char_t value)
Char_t GetAsu1Id () const
void SetAsu1Id (Char_t value)
Char_t GetAsu2Id () const
void SetAsu2Id (Char_t value)
void SetConfigured (bool value)
bool IsConfigured (void) const

Private Attributes

Int_t id
bool configured
Int_t low_register
Int_t high_register
Int_t before_register
Int_t after_register
Int_t acqMode
Int_t difFirmware
Int_t difConfig
Int_t asicType
Int_t asu1Id
Int_t asu2Id

Detailed Description

CLASS MTDIF(containing dif configuration)

Definition at line 20 of file MTDif.hh.


Constructor & Destructor Documentation

MTDif::MTDif ( UInt_t  _id = 0  ) 

MTDif::MTDif ( const Dif aDif  ) 

Definition at line 34 of file MTDif.cpp.

00035 {
00036  FILE_LOG(logDEBUG) << "MTDif::MTDif(const Dif& aDif)" << endl;
00037  (*this) = aDif;  // appel de l'operateur de copie
00038 }

MTDif::~MTDif (  )  [virtual]

Definition at line 42 of file MTDif.cpp.

00043 {
00044 
00045 }


Member Function Documentation

MTDif & MTDif::operator= ( const Dif aDif  ) 

Definition at line 48 of file MTDif.cpp.

00049 {
00050    id              = aDif.getId();
00051    configured      = aDif.isConfigured();
00052    low_register    = aDif.getLowRegister();
00053    high_register   = aDif.getHighRegister();
00054    before_register = aDif.getBeforeRegister();  
00055    after_register  = aDif.getAfterRegister() ;
00056    acqMode         = aDif.getAcqMode();
00057          difFirmware     = aDif.getDifFirmware();
00058    difConfig       = aDif.getDifConfig();
00059          asicType        = aDif.getAsicType();
00060          asu1Id          = aDif.getAsu1Id();
00061          asu2Id          = aDif.getAsu2Id();
00062 }

void MTDif::Info ( void   )  const

Definition at line 95 of file MTDif.cpp.

00096 {
00097          cout << endl << "**** Dif informations ****"    <<  endl ;
00098    cout << "   Dif id[0x" << hex << id << "] configuration "  <<endl;
00099    cout << "    low:0x"   <<hex << (Int_t)low_register;           //8 bits
00100    cout << ", high:0x"  <<hex << (Int_t)high_register;          //8 bits
00101    cout << ", before:0x" <<hex<< (Int_t)before_register;        //8 bits
00102    cout << ", after:0x"  <<hex<< (Int_t)after_register ;        //8 bits
00103    cout << ", acqMode:0x"<<hex<< acqMode << endl;
00104    cout << "       Bunch crossing period:0x"<<hex << GetDifBunchCrossing() << endl;
00105          cout << "       Firmware:             0x"<<hex << difFirmware <<endl;
00106    cout << "       Config:               0x"<<hex << difConfig << endl;
00107          cout << "       asic Type Id :        0x"<< hex <<  asicType << endl;
00108          cout << "       asic Type:            "<< GetStringAsicType() << endl;
00109          cout << "       asu1 Id:              0x"<<hex << (unsigned int)asu1Id << endl;
00110          cout << "       asu2 Id:              0x"<<hex << (unsigned int)asu2Id << endl;
00111 }

void MTDif::SetRegister ( Char_t  low,
Char_t  high,
Char_t  before,
Char_t  after 
)

Definition at line 66 of file MTDif.cpp.

00067 {
00068     low_register    = low;
00069     high_register   = high;          //8 bits
00070     before_register = before;        //8 bits
00071     after_register  = after;
00072 }

void MTDif::SetAcqMiode ( Short_t  _acqMode  )  [inline]

Definition at line 53 of file MTDif.hh.

00053 { acqMode = _acqMode;};

Int_t MTDif::GetDifBunchCrossing ( void   )  const [inline]

Definition at line 54 of file MTDif.hh.

Referenced by Info().

00054 { return low_register + high_register; };       // 64 bits

Int_t MTDif::GetId ( void   )  const [inline]

Definition at line 56 of file MTDif.hh.

00056 { return id; } ;

Char_t MTDif::GetLowRegister (  )  const [inline]

Definition at line 57 of file MTDif.hh.

00057 { return low_register; } ;

Char_t MTDif::GetHighRegister (  )  const [inline]

Definition at line 58 of file MTDif.hh.

00058 { return high_register; } ;

Char_t MTDif::GetBeforeRegister (  )  const [inline]

Definition at line 59 of file MTDif.hh.

00059 { return before_register; } ;

Char_t MTDif::GetAfterRegister (  )  const [inline]

Definition at line 60 of file MTDif.hh.

00060 { return after_register; } ;

Short_t MTDif::GetAcqMode (  )  const [inline]

Definition at line 61 of file MTDif.hh.

00061 { return acqMode; } ;

void MTDif::SetId ( UInt_t  value  )  [inline]

Definition at line 63 of file MTDif.hh.

00063 { id =value; };

void MTDif::SetLowRegister ( Char_t  value  )  [inline]

Definition at line 64 of file MTDif.hh.

00064 { low_register =value; };

void MTDif::SetHighRegister ( Char_t  value  )  [inline]

Definition at line 65 of file MTDif.hh.

00065 { high_register =value; };

void MTDif::SetBeforeRegister ( Char_t  value  )  [inline]

Definition at line 66 of file MTDif.hh.

00066 { before_register =value; };

void MTDif::SetAfterRegister ( Char_t  value  )  [inline]

Definition at line 67 of file MTDif.hh.

00067 { after_register =value; };

void MTDif::SetAcqMode ( Short_t  value  )  [inline]

Definition at line 68 of file MTDif.hh.

00068 { acqMode = value; } ;

Char_t MTDif::GetDifFirmware (  )  const [inline]

Definition at line 71 of file MTDif.hh.

00071 { return difFirmware; } ;

void MTDif::SetDifFirmware ( Char_t  value  )  [inline]

Definition at line 72 of file MTDif.hh.

00072 { difFirmware = value; } ;

Char_t MTDif::GetDifConfig (  )  const [inline]

Definition at line 74 of file MTDif.hh.

00074 { return difConfig; } ;

void MTDif::SetDifConfig ( Char_t  value  )  [inline]

Definition at line 75 of file MTDif.hh.

00075 { difConfig = value; } ;

Char_t MTDif::GetAsicType (  )  const [inline]

Definition at line 77 of file MTDif.hh.

00077 { return asicType; } ;

TString MTDif::GetStringAsicType (  )  const

Definition at line 75 of file MTDif.cpp.

Referenced by Info().

00076 {
00077 //              Code to describe front-end electronic device:
00078                                                            // 01 Hardroc1
00079                                                            // 02 Hardroc2
00080                                                            // 03 Hardroc2b
00081                                                            // 11 Dirac1
00082                                                            // 12 Dirac2
00083                                                            // 31 Microroc1
00084                 if (asicType == 1) { return "Hardroc1"; }
00085                 else if (asicType == 2) { return "Hardroc2"; }
00086                 else if (asicType == 3) { return "Hardroc2b"; }
00087                 else if (asicType == 4) { return "Microroc"; }
00088                 else if (asicType == 11) { return "Dirac1"; }
00089                 else if (asicType == 12) { return "Dirac2"; }
00090                 else if (asicType == 31) { return "Microroc1"; }
00091                 else return "Unknown asic type";
00092 
00093 }

void MTDif::SetAsicType ( Char_t  value  )  [inline]

Definition at line 79 of file MTDif.hh.

00079 { asicType = value; } ;

Char_t MTDif::GetAsu1Id (  )  const [inline]

Definition at line 81 of file MTDif.hh.

00081 { return asu1Id; } ;

void MTDif::SetAsu1Id ( Char_t  value  )  [inline]

Definition at line 82 of file MTDif.hh.

00082 { asu1Id = value; } ;

Char_t MTDif::GetAsu2Id (  )  const [inline]

Definition at line 84 of file MTDif.hh.

00084 { return asu2Id; } ;

void MTDif::SetAsu2Id ( Char_t  value  )  [inline]

Definition at line 85 of file MTDif.hh.

00085 { asu2Id = value; } ;

void MTDif::SetConfigured ( bool  value  )  [inline]

Definition at line 88 of file MTDif.hh.

00088 {  configured = value; };

bool MTDif::IsConfigured ( void   )  const [inline]

Definition at line 89 of file MTDif.hh.

00089 { return configured;};


Member Data Documentation

Int_t MTDif::id [private]

Definition at line 32 of file MTDif.hh.

Referenced by GetId().

bool MTDif::configured [private]

Definition at line 33 of file MTDif.hh.

Referenced by IsConfigured(), operator=(), and SetConfigured().

Int_t MTDif::low_register [private]

Definition at line 34 of file MTDif.hh.

Referenced by GetDifBunchCrossing(), GetLowRegister(), Info(), operator=(), SetLowRegister(), and SetRegister().

Int_t MTDif::high_register [private]

Definition at line 35 of file MTDif.hh.

Referenced by GetDifBunchCrossing(), GetHighRegister(), Info(), operator=(), SetHighRegister(), and SetRegister().

Int_t MTDif::before_register [private]

Definition at line 36 of file MTDif.hh.

Referenced by GetBeforeRegister(), Info(), operator=(), SetBeforeRegister(), and SetRegister().

Int_t MTDif::after_register [private]

Definition at line 37 of file MTDif.hh.

Referenced by GetAfterRegister(), Info(), operator=(), SetAfterRegister(), and SetRegister().

Int_t MTDif::acqMode [private]

Definition at line 38 of file MTDif.hh.

Referenced by GetAcqMode(), Info(), operator=(), SetAcqMiode(), and SetAcqMode().

Int_t MTDif::difFirmware [private]

Definition at line 39 of file MTDif.hh.

Referenced by GetDifFirmware(), Info(), operator=(), and SetDifFirmware().

Int_t MTDif::difConfig [private]

Definition at line 40 of file MTDif.hh.

Referenced by GetDifConfig(), Info(), operator=(), and SetDifConfig().

Int_t MTDif::asicType [private]

Definition at line 41 of file MTDif.hh.

Referenced by GetAsicType(), GetStringAsicType(), Info(), operator=(), and SetAsicType().

Int_t MTDif::asu1Id [private]

Definition at line 48 of file MTDif.hh.

Referenced by GetAsu1Id(), Info(), operator=(), and SetAsu1Id().

Int_t MTDif::asu2Id [private]

Definition at line 49 of file MTDif.hh.

Referenced by GetAsu2Id(), Info(), operator=(), and SetAsu2Id().


The documentation for this class was generated from the following files:
Generated on Mon Jan 7 13:18:52 2013 for MicromegasFramework by  doxygen 1.4.7