Classes for trigger processing in simulation
[u/mrichter/AliRoot.git] / ZDC / AliZDCTriggerProcessor.h
1 #ifndef ALI_ZDC_TRIGGERPROCESSOR_H
2 #define ALI_ZDC_TRIGGERPREPROCESSOR_H
3
4 //////////////////////////////////////////////////////////////////////
5 //                                                                  //
6 //                      ZDC trigger processor                       //
7 //      It collects data stored by the dedicated DA and writes      //
8 //      an AliZDCTriggerParameters object into the OCDB             //
9 //                                                                  //
10 //        Author: Chiara.Oppedisano@to.infn.it                      //
11 //////////////////////////////////////////////////////////////////////
12 #include <TObject.h>
13
14 class AliZDCTriggerParameters;
15
16 class AliZDCTriggerProcessor : public TObject 
17 {
18   public:
19     AliZDCTriggerProcessor();
20     AliZDCTriggerProcessor(Float_t* signal);
21     AliZDCTriggerProcessor(Float_t* signal, AliZDCTriggerParameters* ocdbParam);
22     AliZDCTriggerProcessor(const AliZDCTriggerProcessor& trigg);  
23     virtual ~AliZDCTriggerProcessor();
24     
25     AliZDCTriggerParameters *GetTriggerParamFromOCDB() const;
26     virtual void SetTriggerParam(AliZDCTriggerParameters* ocdbParam) 
27         {fTriggerParam = ocdbParam;}
28     
29     const Float_t* GetSignal() const {return fSignal;}
30     Float_t  GetSignal(Int_t idet) const {return fSignal[idet];}
31     void  SetSignal(Float_t* signal) 
32             {for(Int_t i=0; i<6; i++) fSignal[i] = signal[i];}
33     void  SetSignal(Int_t idet, Float_t signal) {fSignal[idet] = signal;}
34
35   protected:
36     virtual UInt_t ProcessEvent();
37     virtual Bool_t MBTrigger();
38     virtual Bool_t CentralTrigger();
39     virtual Bool_t SemicentralTrigger();
40     virtual Bool_t EMDTrigger();
41
42   private:
43     Float_t* fSignal;
44     AliZDCTriggerParameters *fTriggerParam; // parameters in OCDB
45
46     ClassDef(AliZDCTriggerProcessor, 1);
47 };
48
49     
50
51 #endif