ROOT logo
#ifndef ALI_TOF_PREPROCESSOR_H
#define ALI_TOF_PREPROCESSOR_H

/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/* $Id$ */

#include "AliPreprocessor.h"

// TOF preprocessor. It takes care of both  
// DCS Data Points
// and DAQ histograms to compute online calibration constants

class AliTOFDataDCS;
class AliTOFLvHvDataPoints;
class AliTOFChannelOnlineStatusArray;
class AliTOFChannelOnlineArray;
class TObjArray;
class TH2S;

class AliTOFPreprocessor : public AliPreprocessor
{
  public:
    AliTOFPreprocessor(AliShuttleInterface* shuttle);
    virtual ~AliTOFPreprocessor();
    void   SetStoreRefData(Bool_t in){fStoreRefData=in;};
    Bool_t GetStoreRefData() const {return fStoreRefData;}
    void SetFDRFlag(Bool_t flag) {fFDRFlag = flag;}
    Bool_t GetFDRFlag() const {return fFDRFlag;}

  protected:
    virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime);
    virtual UInt_t Process(TMap *dcsAliasMap);
    virtual Bool_t ProcessDCS();

  private:
    AliTOFPreprocessor(const AliTOFPreprocessor & proc); // copy constructor
    AliTOFPreprocessor& operator=(const AliTOFPreprocessor & proc);
    UInt_t ProcessDCSDataPoints(TMap *dcsAliasMap);
    UInt_t ProcessHVandLVdps(TMap *dcsAliasMap);
    UInt_t ProcessOnlineDelays();
    UInt_t ProcessPulserData();
    UInt_t ProcessNoiseData();
    UInt_t ProcessFEEData(); // dummy, for the time being
    UInt_t ProcessT0Fill();
    UInt_t ProcessNoiseCalibTrg();
    UInt_t ProcessReadout();

    void FillWithCosmicCalibration(AliTOFChannelOnlineArray *cal); // fill with cosmic calibration
    void FillWithCableLengthMap(AliTOFChannelOnlineArray *cal); // fill with cable-lenght map

    static const Int_t fgkBinRangeAve;       // number of bins where to 
                                             // calculate the mean
    static const Double_t fgkIntegralThr;    // min number of entries per channel 
                                             // to perform calculation of delay
    static const Double_t fgkThrPar;         // parameter used to trigger the 
                                             // calculation of the delay
    AliTOFDataDCS *fData;                    // CDB class that stores the data
    AliTOFLvHvDataPoints *fHVLVmaps;         // HV and LV status maps
    AliTOFChannelOnlineArray *fCal;          // TOF Calibration object
    Int_t fNChannels;                        // number of TOF channels
    Bool_t fStoreRefData;                    // Flag to decide storage of Ref Data
    Bool_t fFDRFlag;                         // Flag for FDR runs 
    AliTOFChannelOnlineStatusArray *fStatus; // Array with TOF channels' status
    Int_t *fMatchingWindow;                  //[fNChannels]
                                             // Array of matching windows (one per channel) - to be used in noise runs
    Int_t *fLatencyWindow;                   //[fNChannels]
                                             // Array of latency windows (one per channel)
    Bool_t fIsStatusMapChanged;              // flag to check is the status map OCDB has to be updated

    ClassDef(AliTOFPreprocessor, 1);

};
#endif
 AliTOFPreprocessor.h:1
 AliTOFPreprocessor.h:2
 AliTOFPreprocessor.h:3
 AliTOFPreprocessor.h:4
 AliTOFPreprocessor.h:5
 AliTOFPreprocessor.h:6
 AliTOFPreprocessor.h:7
 AliTOFPreprocessor.h:8
 AliTOFPreprocessor.h:9
 AliTOFPreprocessor.h:10
 AliTOFPreprocessor.h:11
 AliTOFPreprocessor.h:12
 AliTOFPreprocessor.h:13
 AliTOFPreprocessor.h:14
 AliTOFPreprocessor.h:15
 AliTOFPreprocessor.h:16
 AliTOFPreprocessor.h:17
 AliTOFPreprocessor.h:18
 AliTOFPreprocessor.h:19
 AliTOFPreprocessor.h:20
 AliTOFPreprocessor.h:21
 AliTOFPreprocessor.h:22
 AliTOFPreprocessor.h:23
 AliTOFPreprocessor.h:24
 AliTOFPreprocessor.h:25
 AliTOFPreprocessor.h:26
 AliTOFPreprocessor.h:27
 AliTOFPreprocessor.h:28
 AliTOFPreprocessor.h:29
 AliTOFPreprocessor.h:30
 AliTOFPreprocessor.h:31
 AliTOFPreprocessor.h:32
 AliTOFPreprocessor.h:33
 AliTOFPreprocessor.h:34
 AliTOFPreprocessor.h:35
 AliTOFPreprocessor.h:36
 AliTOFPreprocessor.h:37
 AliTOFPreprocessor.h:38
 AliTOFPreprocessor.h:39
 AliTOFPreprocessor.h:40
 AliTOFPreprocessor.h:41
 AliTOFPreprocessor.h:42
 AliTOFPreprocessor.h:43
 AliTOFPreprocessor.h:44
 AliTOFPreprocessor.h:45
 AliTOFPreprocessor.h:46
 AliTOFPreprocessor.h:47
 AliTOFPreprocessor.h:48
 AliTOFPreprocessor.h:49
 AliTOFPreprocessor.h:50
 AliTOFPreprocessor.h:51
 AliTOFPreprocessor.h:52
 AliTOFPreprocessor.h:53
 AliTOFPreprocessor.h:54
 AliTOFPreprocessor.h:55
 AliTOFPreprocessor.h:56
 AliTOFPreprocessor.h:57
 AliTOFPreprocessor.h:58
 AliTOFPreprocessor.h:59
 AliTOFPreprocessor.h:60
 AliTOFPreprocessor.h:61
 AliTOFPreprocessor.h:62
 AliTOFPreprocessor.h:63
 AliTOFPreprocessor.h:64
 AliTOFPreprocessor.h:65
 AliTOFPreprocessor.h:66
 AliTOFPreprocessor.h:67
 AliTOFPreprocessor.h:68
 AliTOFPreprocessor.h:69
 AliTOFPreprocessor.h:70
 AliTOFPreprocessor.h:71
 AliTOFPreprocessor.h:72
 AliTOFPreprocessor.h:73
 AliTOFPreprocessor.h:74
 AliTOFPreprocessor.h:75