Fix for coverity (AdC)
[u/mrichter/AliRoot.git] / PHOS / AliPHOSTriggerRawDigiProducer.h
CommitLineData
e1aec4f9 1#ifndef ALIPHOSTRIGGERRAWDIGIPRODUCER_H
2#define ALIPHOSTRIGGERRAWDIGIPRODUCER_H
3/* Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6class AliPHOSTriggerRawReader;
7class AliPHOSTriggerParameters;
8class AliRawReader;
9class AliCaloRawStreamV3;
10
11#include "TString.h"
12#include "TClonesArray.h"
13
14#include <vector>
15
16class AliPHOSTriggerRawDigiProducer
17{
18 public:
19
20 AliPHOSTriggerRawDigiProducer();
21 AliPHOSTriggerRawDigiProducer(AliRawReader *rawReader);
22
23 virtual ~AliPHOSTriggerRawDigiProducer();
24
25 void ProcessEvent(TClonesArray* tdigits);
26
27 void SetTriggerParameters(AliPHOSTriggerParameters* parameters) {fParameters = parameters;}
28 void SetAnalyseModule(int mod, bool analyse = true) {fModules[mod] = analyse;}
29
30 static int Get2x2Max(AliPHOSTriggerRawReader*, AliPHOSTriggerParameters*, int mod, int xIdx, int zIdx);
31 static int Get2x2Signal(AliPHOSTriggerRawReader*, AliPHOSTriggerParameters*, int mod, int xIdx, int zIdx, int timeBin);
32 static int Get4x4Max(AliPHOSTriggerRawReader*, AliPHOSTriggerParameters*, int mod, int TRURow, int branch, int xIdx, int zIdx);
33 static int Get4x4Signal(AliPHOSTriggerRawReader*, AliPHOSTriggerParameters*, int mod, int TRURow, int branch, int xIdx, int zIdx, int timeBin);
34
35 static bool Is2x2Active(AliPHOSTriggerRawReader*, int mod, int xIdx, int zIdx);
36 static bool Is2x2Active(AliPHOSTriggerRawReader*, int mod, int xIdx, int zIdx, int timeBin);
37
38 const static int kNMods = 5; // number of PHOS modules
39 const static int kNTRURows = 4; // number of TRU rows
40 const static int kNBranches = 2; // number of branches
41 const static int kN2x2X = 32; // (=64/2) Number of 2x2 in X direction
42 const static int kN2x2Z = 28; // (=56/2) Number of 2x2 in Z direction
43 const static Int_t kN2x2XPrTRURow = 8; // (=64/2/4) Number of 2x2 pr. row
44 const static Int_t kN2x2ZPrBranch = 14; // (=56/2/2) Number of 2x2 pr. branch
45 const static Int_t kN4x4XPrTRURow = 7; // (=64/2/4 -1) Number of 4x4 pr. row
46 const static Int_t kN4x4ZPrBranch = 13; // (=56/2/2) -1 Number of 4x4 pr. branch
47 const static int kNTRUTimeBins = 128; // number of TRU time bins
48 const static int kNDefaultNEMCTimeBins = 62;
49
50 private:
51 AliPHOSTriggerRawDigiProducer(const AliPHOSTriggerRawDigiProducer &tdp); // not implemented
52 AliPHOSTriggerRawDigiProducer& operator= (const AliPHOSTriggerRawDigiProducer &tdp); // not implemented
53
54 protected:
55 std::vector<bool> fModules; // , per module: should analyser analyse module
56 UShort_t fSaturationThreshold;
57 AliPHOSTriggerParameters* fParameters;
58
59private:
60 AliRawReader * fRawReader; //! Raw data reader
61 AliCaloRawStreamV3 * fRawStream; //! Calorimeter decoder of ALTRO format
62 AliPHOSTriggerRawReader * fTriggerReader; //! TriggerRawReader
63
64 ClassDef(AliPHOSTriggerRawDigiProducer,1)
65};
66
67#endif