/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         bool bypassed;
00039 
00040         //channel properties
00041         bool stimulatedChannel[64];       // <- Channel config.
00042         bool enableChannel[64];           // <- Channel Config .A disabled chip cannot cause the writing of 64 channel
00043         bool maskChannel[64][3];   
00044         UInt_t pedestal_offset[64];       // <- 4 bits
00045 
00046 
00047 public:
00048    UInt_t GetId() const { return id;};
00049    void   SetId(UInt_t aValue) { id = aValue ;};
00050   
00051          UInt_t GetSerialNumber() const { return serialNum;};
00052    void SetSerialNumber(UInt_t value)  { serialNum = value;};
00053 
00054    Int_t GetGain() const { return gain; };
00055    void SetGain(Int_t aValue) { gain = aValue; };
00056 
00057          MTBoard& GetBoard(void) { return board; } ;
00058          void SetBoard(MTBoard& value ) { board = value; } ; 
00059 
00060    void  Info(void) const;
00061    bool IsConfigured() const { return configured; };
00062 
00063   bool GetBypassed() const { return bypassed; };
00064   void SetBypassed(bool value) { bypassed = value;};
00065 
00066    const MTChipSoftId& GetSoftId() const { return softId;};
00067 
00068                 //channel properties
00069     bool GetEnableChannel(UInt_t channelId) const { return enableChannel[channelId]; };
00070     const bool* GetEnableChannels() const { return enableChannel; };
00071     void SetEnableChannel(UInt_t channelId, bool aValue) { enableChannel[channelId] = aValue; };
00072 
00073     bool GetMaskChannel(UInt_t channelId,UInt_t index) const { return maskChannel[channelId][index]; };
00074     void SetMaskChannel(UInt_t channelId, UInt_t index,bool aValue) { maskChannel[channelId][index] = aValue; };
00075 
00076     bool GetStimulatedChannel(UInt_t channelId) const { return stimulatedChannel[channelId]; };
00077     const bool* GetStimulatedChannels() const { return stimulatedChannel; };
00078     void SetStimulatedChannel(UInt_t channelId, bool aValue) { stimulatedChannel[channelId] = aValue; };
00079 
00080     UInt_t GetPedestalChannel(UInt_t channelId) const { return pedestal_offset[channelId]; };
00081     const UInt_t* GetPedestalChannels() const { return pedestal_offset; };
00082     void SetPedestalChannel(UInt_t channelId, UInt_t aValue) { pedestal_offset[channelId] = aValue; };
00083 
00084 
00085    ClassDef(MTChip, 34)  //MTChip structure
00086 };
00087 
00088 #endif

Generated on Mon Jan 7 13:15:20 2013 for MicromegasFramework by  doxygen 1.4.7