/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/include/root/MTChip.hh

Go to the documentation of this file.
00001 #ifndef ROOT_MTChip
00002 #define ROOT_MTChip
00003 
00004 #include "TObject.h"
00005 #include "TClonesArray.h"
00006 #include "TRefArray.h"
00007 #include "TRef.h"
00008 #include "TH1.h"
00009 #include "TMath.h"
00010 #include <vector>
00011 #include <map>
00012 
00013 #include "root/MTChipSoftId.hh"
00014 #include "root/MTBoard.hh"
00015 
00016 class Chip;
00017 ////////////////////////////////////////////////////////////////////////////////////////
00018 ///     CLASS MTCHIP(containing chip configuration)
00019 ///////////////////////////////////////////////////////////////////////////////////////
00020 
00021 class MTChip : public TObject {
00022 
00023 public:
00024    MTChip(UInt_t id = 0);
00025    MTChip(const Chip& aChip);
00026    virtual ~MTChip();
00027     MTChip& operator=(const Chip& aChip);
00028 
00029 private:
00030 
00031         UInt_t id;          // unique id per Board
00032         MTChipSoftId softId;  // unique softid per DIF
00033 
00034         MTBoard board;
00035         UInt_t serialNum;
00036         Int_t gain;                                // <- Chip config.
00037         bool configured;
00038 
00039         //channel properties
00040         bool stimulatedChannel[64];       // <- Channel config.
00041         bool enableChannel[64];           // <- Channel Config .A disabled chip cannot cause the writing of 64 channel
00042         bool maskChannel[64][3];   
00043         UInt_t pedestal_offset[64];       // <- 4 bits
00044 
00045 
00046 public:
00047    UInt_t GetId() const { return id;};
00048    void   SetId(UInt_t aValue) { id = aValue ;};
00049   
00050          UInt_t GetSerialNumber() const { return serialNum;};
00051    void SetSerialNumber(UInt_t value)  { serialNum = value;};
00052 
00053    Int_t GetGain() const { return gain; };
00054    void SetGain(Int_t aValue) { gain = aValue; };
00055 
00056          MTBoard& GetBoard(void) { return board; } ;
00057          void SetBoard(MTBoard& value ) { board = value; } ; 
00058 
00059    void  Info(void) const;
00060    bool IsConfigured() const { return configured; };
00061 
00062    const MTChipSoftId& GetSoftId() const { return softId;};
00063 
00064                 //channel properties
00065     bool GetEnableChannel(UInt_t channelId) const { return enableChannel[channelId]; };
00066     const bool* GetEnableChannels() const { return enableChannel; };
00067     void SetEnableChannel(UInt_t channelId, bool aValue) { enableChannel[channelId] = aValue; };
00068 
00069     bool GetMaskChannel(UInt_t channelId,UInt_t index) const { return maskChannel[channelId][index]; };
00070     void SetMaskChannel(UInt_t channelId, UInt_t index,bool aValue) { maskChannel[channelId][index] = aValue; };
00071 
00072     bool GetStimulatedChannel(UInt_t channelId) const { return stimulatedChannel[channelId]; };
00073     const bool* GetStimulatedChannels() const { return stimulatedChannel; };
00074     void SetStimulatedChannel(UInt_t channelId, bool aValue) { stimulatedChannel[channelId] = aValue; };
00075 
00076     UInt_t GetPedestalChannel(UInt_t channelId) const { return pedestal_offset[channelId]; };
00077     const UInt_t* GetPedestalChannels() const { return pedestal_offset; };
00078     void SetPedestalChannel(UInt_t channelId, UInt_t aValue) { pedestal_offset[channelId] = aValue; };
00079 
00080 
00081    ClassDef(MTChip, 30)  //MTChip structure
00082 };
00083 
00084 #endif

Generated on Mon Jun 11 16:55:45 2012 for MicromegasFramework by  doxygen 1.4.7