ROOT logo
#ifndef ALIFMD_PREPROCESSOR_H
#define ALIFMD_PREPROCESSOR_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
 * reserved. 
 *
 * See cxx source for full Copyright notice                               
 */
//___________________________________________________________________
// The class processes data points from DCS (via Amanada), and DAQ DA
// files (via FXS) to make calibration data for the FMD.
// More to come. 


#include "AliPreprocessor.h"
#ifndef ALIFMDUSHORTMAP_H
# include <AliFMDUShortMap.h>
#endif
#ifndef ALIFMDBOOLMAP_H
# include <AliFMDBoolMap.h>
#endif
typedef AliFMDUShortMap AliFMDCalibZeroSuppression;
typedef AliFMDBoolMap  AliFMDCalibDeadMap;
class AliFMDCalibPedestal;
class AliFMDCalibGain;
class AliFMDCalibSampleRate;
class AliFMDCalibStripRange;
class AliCDBEntry;
class TList;

//___________________________________________________________________
/** The class processes data points from DCS (via Amanada), and DAQ DA
    files (via FXS) to make calibration data for the FMD.

    Data points: 
       *  Nothing yet. 

    DAQ FXS file:
       * pedestals - a (ASCII) Comma Separated Values files with the
                     fields 
                          rcu	 DDL number 
                          board   FEC board number 
                          chip    ALTRO chip number on FEC
                          channel ALTRO channel number
                          strip   VA1 strip number
                          sample  Sample number
                          ped     Mean of ADC spectra
                          noise   Spread of ADC spectra
                          mu      Mean of Gaussian fit to ADC spectra
                          sigma   Variance of Gaussian fit to ADC spectra
                          chi2    Chi^2 per degrees of freedom of fit
       * Gains     - a (ASCII) Comma Separated Values files with the
                     fields 
                          rcu	 DDL number 
                          board   FEC board number 
                          chip    ALTRO chip number on FEC
                          channel ALTRO channel number
                          strip   VA1 strip number
                          gain    Slope of gain
                          error   Error on gain
                          chi2    Chi^2 per degrees of freedom of fit
*/
class AliFMDPreprocessor: public AliPreprocessor 
{
public:
  /** Constructor */
  AliFMDPreprocessor(): AliPreprocessor("FMD",0) {}
  /** Constructor 
      @param shuttle Shuttle */
  AliFMDPreprocessor(AliShuttleInterface* shuttle) ;
  
  
  /** Destructor */
  virtual ~AliFMDPreprocessor() {}
  /** Get an entry from OCDB */ 
  AliCDBEntry* GetFromCDB(const char* second, const char* third);
protected:
  /** 
   * Get the pedestal calibrations 
   *
   * @param list List of files 
   */
  AliFMDCalibPedestal*   GetPedestalCalibration(const TList* list);
  /** 
   * Get the gain calibrations 
   * 
   * @param list List of files 
   */
  AliFMDCalibGain*       GetGainCalibration(const TList*);
  /** 
   * Get the dead channels map based on the pedestal
   * an gain calibration objects. 
   */
  AliFMDCalibDeadMap*    GetDeadChannelMap(AliFMDCalibPedestal* pedcalib,
					   AliFMDCalibGain*     gaincalib);

  /** Get info calibrations. 
      @param files List of files. 
      @param s     On return, newly allocated object 
      @param r     On return, newly allocated object 
      @param z     On return, newly allocated object 
      @return kTRUE on success */
  Bool_t GetInfoCalibration(TList* files, 
			    AliFMDCalibSampleRate*&      s,
			    AliFMDCalibStripRange*&      r, 
			    AliFMDCalibZeroSuppression*& z);
  /** Convinience function 
      @param list On return, list of files. 
      @param system Alice system (DAQ, DCS, ...)
      @param id     File id
      @return kTRUE on success. */
  Bool_t GetAndCheckFileSources(TList*& list, Int_t system, const char* id);
  
  /** Entry method 
      @param dcsAliasMap Map of DCS data points */
  virtual UInt_t Process(TMap* dcsAliasMap);
private:
  ClassDef(AliFMDPreprocessor, 1)
};

#endif
//____________________________________________________________________
//
// Local Variables:
//   mode: C++
// End:
//
// EOF
//
 AliFMDPreprocessor.h:1
 AliFMDPreprocessor.h:2
 AliFMDPreprocessor.h:3
 AliFMDPreprocessor.h:4
 AliFMDPreprocessor.h:5
 AliFMDPreprocessor.h:6
 AliFMDPreprocessor.h:7
 AliFMDPreprocessor.h:8
 AliFMDPreprocessor.h:9
 AliFMDPreprocessor.h:10
 AliFMDPreprocessor.h:11
 AliFMDPreprocessor.h:12
 AliFMDPreprocessor.h:13
 AliFMDPreprocessor.h:14
 AliFMDPreprocessor.h:15
 AliFMDPreprocessor.h:16
 AliFMDPreprocessor.h:17
 AliFMDPreprocessor.h:18
 AliFMDPreprocessor.h:19
 AliFMDPreprocessor.h:20
 AliFMDPreprocessor.h:21
 AliFMDPreprocessor.h:22
 AliFMDPreprocessor.h:23
 AliFMDPreprocessor.h:24
 AliFMDPreprocessor.h:25
 AliFMDPreprocessor.h:26
 AliFMDPreprocessor.h:27
 AliFMDPreprocessor.h:28
 AliFMDPreprocessor.h:29
 AliFMDPreprocessor.h:30
 AliFMDPreprocessor.h:31
 AliFMDPreprocessor.h:32
 AliFMDPreprocessor.h:33
 AliFMDPreprocessor.h:34
 AliFMDPreprocessor.h:35
 AliFMDPreprocessor.h:36
 AliFMDPreprocessor.h:37
 AliFMDPreprocessor.h:38
 AliFMDPreprocessor.h:39
 AliFMDPreprocessor.h:40
 AliFMDPreprocessor.h:41
 AliFMDPreprocessor.h:42
 AliFMDPreprocessor.h:43
 AliFMDPreprocessor.h:44
 AliFMDPreprocessor.h:45
 AliFMDPreprocessor.h:46
 AliFMDPreprocessor.h:47
 AliFMDPreprocessor.h:48
 AliFMDPreprocessor.h:49
 AliFMDPreprocessor.h:50
 AliFMDPreprocessor.h:51
 AliFMDPreprocessor.h:52
 AliFMDPreprocessor.h:53
 AliFMDPreprocessor.h:54
 AliFMDPreprocessor.h:55
 AliFMDPreprocessor.h:56
 AliFMDPreprocessor.h:57
 AliFMDPreprocessor.h:58
 AliFMDPreprocessor.h:59
 AliFMDPreprocessor.h:60
 AliFMDPreprocessor.h:61
 AliFMDPreprocessor.h:62
 AliFMDPreprocessor.h:63
 AliFMDPreprocessor.h:64
 AliFMDPreprocessor.h:65
 AliFMDPreprocessor.h:66
 AliFMDPreprocessor.h:67
 AliFMDPreprocessor.h:68
 AliFMDPreprocessor.h:69
 AliFMDPreprocessor.h:70
 AliFMDPreprocessor.h:71
 AliFMDPreprocessor.h:72
 AliFMDPreprocessor.h:73
 AliFMDPreprocessor.h:74
 AliFMDPreprocessor.h:75
 AliFMDPreprocessor.h:76
 AliFMDPreprocessor.h:77
 AliFMDPreprocessor.h:78
 AliFMDPreprocessor.h:79
 AliFMDPreprocessor.h:80
 AliFMDPreprocessor.h:81
 AliFMDPreprocessor.h:82
 AliFMDPreprocessor.h:83
 AliFMDPreprocessor.h:84
 AliFMDPreprocessor.h:85
 AliFMDPreprocessor.h:86
 AliFMDPreprocessor.h:87
 AliFMDPreprocessor.h:88
 AliFMDPreprocessor.h:89
 AliFMDPreprocessor.h:90
 AliFMDPreprocessor.h:91
 AliFMDPreprocessor.h:92
 AliFMDPreprocessor.h:93
 AliFMDPreprocessor.h:94
 AliFMDPreprocessor.h:95
 AliFMDPreprocessor.h:96
 AliFMDPreprocessor.h:97
 AliFMDPreprocessor.h:98
 AliFMDPreprocessor.h:99
 AliFMDPreprocessor.h:100
 AliFMDPreprocessor.h:101
 AliFMDPreprocessor.h:102
 AliFMDPreprocessor.h:103
 AliFMDPreprocessor.h:104
 AliFMDPreprocessor.h:105
 AliFMDPreprocessor.h:106
 AliFMDPreprocessor.h:107
 AliFMDPreprocessor.h:108
 AliFMDPreprocessor.h:109
 AliFMDPreprocessor.h:110
 AliFMDPreprocessor.h:111
 AliFMDPreprocessor.h:112
 AliFMDPreprocessor.h:113
 AliFMDPreprocessor.h:114
 AliFMDPreprocessor.h:115
 AliFMDPreprocessor.h:116
 AliFMDPreprocessor.h:117
 AliFMDPreprocessor.h:118
 AliFMDPreprocessor.h:119
 AliFMDPreprocessor.h:120
 AliFMDPreprocessor.h:121
 AliFMDPreprocessor.h:122
 AliFMDPreprocessor.h:123
 AliFMDPreprocessor.h:124
 AliFMDPreprocessor.h:125
 AliFMDPreprocessor.h:126
 AliFMDPreprocessor.h:127
 AliFMDPreprocessor.h:128