class TCanvas;
class TH3S;
class AliTPCMonitorMappingHandler;
-class AliTPCMonitorDateFile;
-class AliTPCMonitorDateFormat;
-class AliTPCMonitorAltro;
class AliTPCMonitorFFT;
class AliTPCMonitorConfig;
-class AliRawReaderRoot;
class AliRawReader;
-class AliTPCMonitorDateMonitor;
-
+class AliAltroRawStreamV3;
class AliTPCMonitor : public AliTPCMonitorConfig {
+
+public:
+
+ AliTPCMonitor(char* name, char* title);
+ AliTPCMonitor(const AliTPCMonitor &monitor);
+ AliTPCMonitor& operator= (const AliTPCMonitor& monitor);
+
+ virtual ~AliTPCMonitor();
+
+ Int_t CheckEqId(Int_t secid, Int_t eqid);
+ TCanvas* CreateCanvas(const char* name);
+ void CreateHistos();
+
+ void DeleteHistos();
+ void DisableFit(Int_t val) { fDisableFit =val; }
+ void DrawHists(Int_t histos);
+ void DrawRMSMap();
+ void DumpHeader(AliRawReader* reader ) const ;
+
+ void ExecPad() ;
+ void ExecRow() ;
+ Int_t ExecProcess();
+ void ExecTransform();
+
+ void FillGlobal(Int_t sector);
+ void FillHistsPadPlane();
+
+ static double Gamma4(double* x, double* par);
+ Int_t GetChannelsProc() const { return fChannelIter ;}
+ Int_t GetEventID() const { return fEventNumber ;}
+ TH1* GetHisto(char* histname);
+ Int_t GetRCUPatch(Int_t runid, Int_t eqid) const;
+
+ Int_t GetPadAtX(Float_t xval, Int_t row, Int_t padmax) const ;
+ Int_t GetPadAtX(Float_t xval, Int_t row) const ;
+ void GetXY( Double_t& xval , Double_t& yval , Int_t padmax, Int_t row , Int_t pad) const ;
+
+ Int_t IsLastEvent() const { return fLastEv ;}
+
+ Int_t ProcessEvent();
+
+ void SetEventID(Int_t val) { fEventNumber =val;}
+ void SetMirror(Int_t val) { fMirror=val;}
+ void SetVerbose(Int_t val) { fVerb = val;}
+ void SetMappingHandler(AliTPCMonitorMappingHandler* val ) { fMapHand = val;}
+ void ShowSel(Int_t* compval);
+ void SetEqIds();
+
+ void ResizeCanv();
+ void ResetHistos();
+ void ResetArrays();
+ Int_t ReadDataNew( Int_t secid);
- public:
-
- AliTPCMonitor(char* name, char* title);
- AliTPCMonitor(const AliTPCMonitor &monitor);
- AliTPCMonitor& operator= (const AliTPCMonitor& monitor);
-
- virtual ~AliTPCMonitor();
-
- Int_t CheckEqId(Int_t secid, Int_t eqid);
- TCanvas* CreateCanvas(const char* name);
- void CreateHistos();
-
- void DeleteHistos();
- void DisableFit(Int_t val) { fDisableFit =val; }
- void DrawHists(Int_t histos);
- void DrawRMSMap();
- void DumpHeader(AliRawReaderRoot* reader ) const ;
- void DumpHeader(AliTPCMonitorDateFormat* DateForm) const ;
-
- void ExecPad() ;
- void ExecRow() ;
- Int_t ExecProcess();
- void ExecTransform();
-
- void FillGlobal(Int_t sector);
- void FillHistsDecode( AliTPCMonitorAltro* altro , Int_t rcupatch, Int_t secid=0);
- void FillHistsPadPlane();
-
- static double Gamma4(double* x, double* par);
- Int_t GetChannelsProc() const { return fChannelIter ;}
- Int_t GetEventID() const { return fEventNumber ;}
- TH1* GetHisto(char* histname);
- Int_t GetRCUPatch(Int_t runid, Int_t eqid) const;
-
- Int_t GetPadAtX(Float_t xval, Int_t row, Int_t padmax) const ;
- Int_t GetPadAtX(Float_t xval, Int_t row) const ;
- void GetXY( Double_t& xval , Double_t& yval , Int_t padmax, Int_t row , Int_t pad) const ;
-
- Int_t IsLastEvent() const { return fLastEv ;}
-
- Int_t ProcessEvent();
-
- void SetEventID(Int_t val) { fEventNumber =val;}
- void SetMirror(Int_t val) { fMirror=val;}
- void SetVerbose(Int_t val) { fVerb = val;}
- void SetMappingHandler(AliTPCMonitorMappingHandler* val ) { fMapHand = val;}
- void ShowSel(Int_t* compval);
- void SetEqIds();
-
- void ResizeCanv();
- void ResetHistos();
- void ResetArrays();
- Int_t ReadData( Int_t secid);
-
- Int_t ReadDataDATEFile(Int_t secid);
- Int_t ReadDataDATEStream(Int_t secid);
- Int_t ReadDataDATESubEventLoop(AliTPCMonitorDateFormat* DateForm, Int_t secid);
- Int_t ReadDataROOT(Int_t secid );
-
- void WriteHistos() ;
- void Write10bitChannel();
-
-
+ void WriteHistos() ;
+ void Write10bitChannel();
+
+
// private:
-
+
// stats for size of arrays and histograms /////////////////////////////////////////////////
- Int_t** fPad; // array to store channel adc in time
- Float_t* fPadMapHw; // array to store mapping of hardware address and channel number
- Int_t** fPadMapRCU; // store multiple information for hardware address for debugging purpose (read out errors occur)
-
-
+ Int_t** fPad; // array to store channel adc in time
+ Float_t* fPadMapHw; // array to store mapping of hardware address and channel number
+ Int_t** fPadMapRCU; // store multiple information for hardware address for debugging purpose (read out errors occur)
+
+
// histograms to be used ////////////////////////////////////////////////////////////////
- TH2F* fHistIROC; // histo for max adc IROC
- TH2F* fHistOROC; // histo for max adc OROC
- TH2S* fHistIROCIndex; // histo for channel number in each bin IROC
- TH2S* fHistOROCIndex; // histo for channel number in each bin OROC
- TH2F* fHistIROCTime; // histo for peaking time in each bin IROC
- TH2F* fHistOROCTime; // histo for peaking time in each bin OROC
- TH2F* fHistIROCClone; // clone histo for max adc IROC (backup when selecting component)
- TH2F* fHistOROCClone; // clone histo for max adc OROC (backup when selecting component)
- TH2F* fHistIROCRMS; // histo for RMS IROC
- TH2F* fHistOROCRMS; // histo for RMS OROC
- TH2F* fHistIROCBASE; // histo for baseline IROC
- TH2F* fHistOROCBASE; // histo for baseline OROC
- TH2F* fHistIROCSUM; // histo for adc sum IROC
- TH2F* fHistOROCSUM; // histo for adc sum OROC
-
- TH2F* fHistChannelTime; // histo for adc(channel,time)
- TH1F* fHistAddrMapIndex; // histo for channel(hardware address)
- TH1F* fHistAddrMaxAdc; // histo for max-adc(hardware address)
- TH1F* fHistAddrBaseMean; // histo for baseline(hardware address)
- TH1F* fHistAddrMaxAdcX; // histo for max-adc-xposition(hardware address)
- TH1F* fHistAddrAdcSum; // histo for adc-sum(hardware address)
- TH1F* fHistAddrBaseRms; // histo for baselinr-rms(hardware address)
-
- TH1F* fHistDistrSumIROC; // distribution of adc sum for all channels IROC
- TH1F* fHistDistrMaxIROC; // distribution of adc max for all channels OROC
- TH1F* fHistDistrSumOROC; // distribution of adc sum for all channels OROC
- TH1F* fHistDistrMaxOROC; // distribution of adc max for all channels OROC
-
- TH2F* fHistDistrBase2dIROC; // distribution of baseline vs rms for all channels IROC
- TH2F* fHistDistrBase2dOROC; // distribution of baseline vs rms for all channels OROC
- TH1D* fHistDistrBaseRmsIROC; // projection of fHistDistrBase2dIROC on Rms
- TH1D* fHistDistrBaseMeanIROC; // projection of fHistDistrBase2dIROC on Mean
- TH1D* fHistDistrBaseRmsOROC; // projection of fHistDistrBase2dOROC on Rms
- TH1D* fHistDistrBaseMeanOROC; // projection of fHistDistrBase2dOROC on Mean
-
- TH2S* fHistGlobalMaxA; // global histogramm for max adc of all sectors Side A
- TH2S* fHistGlobalMaxC; // global histogramm for max adc of all sectors Side C
-
- TObjArray* fHistList; // array to store all histogram
-
-
- // row and pad settings
- Int_t fkNRowsIroc; // number of rows in IROC
- Int_t fkNRowsOroc; // number of rows in OROC
-
- Int_t fkNPadsIroc; // number of pads in IROC
- Int_t fkNPadsOroc; // number of pads in OROC
-
- Int_t fkNPadMinIroc; // min for pad (y-axis) representation in 2D histogram IROC
- Int_t fkNPadMinOroc; // min for pad (y-axis) representation in 2D histogram OROC
- Int_t fkNPadMaxIroc; // max for pad (y-axis) representation in 2D histogram IROC
- Int_t fkNPadMaxOroc; // max for pad (y-axis) representation in 2D histogram IROC
-
- Int_t fVerb; // verbose flag
-
- Int_t fLastEv; // flag for last event
-
- Int_t fEventNumber; // current event number (ID)
- Int_t fEventNumberOld; // previous event number
-
- Int_t fDisableFit; // flag to disable fit of maximum peak
-
- Int_t fExecGlob; // flag to add Executable to global histo
- Int_t fExecPlaneMax; // flag to add executable for plane view ( max iroc/oroc)
- Int_t fExecPadIrocRms; // flag to add executable for rms plane view IROC
- Int_t fExecPadOrocRms; // flag to add executable for rms plane view OROC
-
- Int_t fRunId; // current run id
- Int_t fEqId; // currend equipment id
-
- Int_t fPadUsedRoc; // last ROC canvas the mouse pointed at
- Int_t fPadUsedHwAddr; // hwaddress for last pad the mouse pointed at
-
- Int_t fGdcId; // current GDC id
- Int_t fLdcId; // current LDC id
- Int_t fLdcIdOld; // previous LDC id
-
- Int_t** fMapEqidsSec; // mapping rcu-patch(equipmentid)
- Int_t* fMapEqidsRcu; // mapping equipmentid(sector,rcu-patch)
-
- Int_t fMirror; // mirror x position on C-side
- Int_t fChannelIter; // counter for channels read
-
-
- AliTPCMonitorMappingHandler* fMapHand; // mapping handler
-
- AliRawReaderRoot* fReaderROOT; // reader for ROOT format
- AliTPCMonitorDateFile* fReaderDATE; // reader for DATE files
+ TH2F* fHistIROC; // histo for max adc IROC
+ TH2F* fHistOROC; // histo for max adc OROC
+ TH2S* fHistIROCIndex; // histo for channel number in each bin IROC
+ TH2S* fHistOROCIndex; // histo for channel number in each bin OROC
+ TH2F* fHistIROCTime; // histo for peaking time in each bin IROC
+ TH2F* fHistOROCTime; // histo for peaking time in each bin OROC
+ TH2F* fHistIROCClone; // clone histo for max adc IROC (backup when selecting component)
+ TH2F* fHistOROCClone; // clone histo for max adc OROC (backup when selecting component)
+ TH2F* fHistIROCRMS; // histo for RMS IROC
+ TH2F* fHistOROCRMS; // histo for RMS OROC
+ TH2F* fHistIROCBASE; // histo for baseline IROC
+ TH2F* fHistOROCBASE; // histo for baseline OROC
+ TH2F* fHistIROCSUM; // histo for adc sum IROC
+ TH2F* fHistOROCSUM; // histo for adc sum OROC
+
+ TH2F* fHistChannelTime; // histo for adc(channel,time)
+ TH1F* fHistAddrMapIndex; // histo for channel(hardware address)
+ TH1F* fHistAddrMaxAdc; // histo for max-adc(hardware address)
+ TH1F* fHistAddrBaseMean; // histo for baseline(hardware address)
+ TH1F* fHistAddrMaxAdcX; // histo for max-adc-xposition(hardware address)
+ TH1F* fHistAddrAdcSum; // histo for adc-sum(hardware address)
+ TH1F* fHistAddrBaseRms; // histo for baselinr-rms(hardware address)
+
+ TH1F* fHistDistrSumIROC; // distribution of adc sum for all channels IROC
+ TH1F* fHistDistrMaxIROC; // distribution of adc max for all channels OROC
+ TH1F* fHistDistrSumOROC; // distribution of adc sum for all channels OROC
+ TH1F* fHistDistrMaxOROC; // distribution of adc max for all channels OROC
+
+ TH2F* fHistDistrBase2dIROC; // distribution of baseline vs rms for all channels IROC
+ TH2F* fHistDistrBase2dOROC; // distribution of baseline vs rms for all channels OROC
+ TH1D* fHistDistrBaseRmsIROC; // projection of fHistDistrBase2dIROC on Rms
+ TH1D* fHistDistrBaseMeanIROC; // projection of fHistDistrBase2dIROC on Mean
+ TH1D* fHistDistrBaseRmsOROC; // projection of fHistDistrBase2dOROC on Rms
+ TH1D* fHistDistrBaseMeanOROC; // projection of fHistDistrBase2dOROC on Mean
+
+ TH2S* fHistGlobalMaxA; // global histogramm for max adc of all sectors Side A
+ TH2S* fHistGlobalMaxC; // global histogramm for max adc of all sectors Side C
+
+ TObjArray* fHistList; // array to store all histogram
+
+
+ // row and pad settings
+ Int_t fkNRowsIroc; // number of rows in IROC
+ Int_t fkNRowsOroc; // number of rows in OROC
+
+ Int_t fkNPadsIroc; // number of pads in IROC
+ Int_t fkNPadsOroc; // number of pads in OROC
+
+ Int_t fkNPadMinIroc; // min for pad (y-axis) representation in 2D histogram IROC
+ Int_t fkNPadMinOroc; // min for pad (y-axis) representation in 2D histogram OROC
+ Int_t fkNPadMaxIroc; // max for pad (y-axis) representation in 2D histogram IROC
+ Int_t fkNPadMaxOroc; // max for pad (y-axis) representation in 2D histogram IROC
+
+ Int_t fVerb; // verbose flag
+
+ Int_t fLastEv; // flag for last event
+
+ Int_t fEventNumber; // current event number (ID)
+ Int_t fEventNumberOld; // previous event number
+
+ Int_t fDisableFit; // flag to disable fit of maximum peak
+
+ Int_t fExecGlob; // flag to add Executable to global histo
+ Int_t fExecPlaneMax; // flag to add executable for plane view ( max iroc/oroc)
+ Int_t fExecPadIrocRms; // flag to add executable for rms plane view IROC
+ Int_t fExecPadOrocRms; // flag to add executable for rms plane view OROC
+
+ Int_t fRunId; // current run id
+ Int_t fEqId; // currend equipment id
+
+ Int_t fPadUsedRoc; // last ROC canvas the mouse pointed at
+ Int_t fPadUsedHwAddr; // hwaddress for last pad the mouse pointed at
+
+ Int_t fGdcId; // current GDC id
+ Int_t fLdcId; // current LDC id
+ Int_t fLdcIdOld; // previous LDC id
+
+ Int_t** fMapEqidsSec; // mapping rcu-patch(equipmentid)
+ Int_t* fMapEqidsRcu; // mapping equipmentid(sector,rcu-patch)
+
+ Int_t fMirror; // mirror x position on C-side
+ Int_t fChannelIter; // counter for channels read
+
+
+ AliTPCMonitorMappingHandler* fMapHand; // mapping handler
+
+ AliRawReader* fRawReader; // reader for ROOT format
+
- AliTPCMonitorDateMonitor* fReaderDATEMon; // reader for DATE monitoring
-
-
-
-
-
-
- ClassDef(AliTPCMonitor,1);
+
+ static const Int_t fgkHwMaskFEC ; // mask for fec in hardware address
+ static const Int_t fgkHwMaskBranch ; // mask for branch in hardware address
+ static const Int_t fgkHwMaskFECChannel ; // mask for fec channel in hardware address
+ static const Int_t fgkHwMaskAltroChannel ; // mask for altro channel in hardware address
+ static const Int_t fgkHwMaskAltroChip ; // mask for altro chip in hardware address
+ static const Int_t fgkHwMaskRCU ; // not part of the trailer added afterwards
+
+
+ ClassDef(AliTPCMonitor,1);
};
#endif