]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSTRURawReader.h
coverity fix
[u/mrichter/AliRoot.git] / PHOS / AliPHOSTRURawReader.h
CommitLineData
e1aec4f9 1#ifndef ALIPHOSTRURAWREADER_H
2#define ALIPHOSTRURAWREADER_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5/* $Id$ */
6
7
8class AliCaloRawStreamV3;
9
10#include "TObject.h"
11
12/*
13 * Class for reading TRU data from a bunch from a raw datastream.
14 * Author: Henrik Qvigstad <henrik.qvigstad@cern.ch>
e1382811 15 * Author: Jussi Viinikainen <jussi.viinikainen@cern.ch> (adaptation to Run2 format)
e1aec4f9 16 */
17class AliPHOSTRURawReader : public TObject
18{
19 public:
20 AliPHOSTRURawReader();
21 virtual ~AliPHOSTRURawReader();
22
23 Short_t GetTriggerSignal(Int_t xIdx, Int_t zIdx, Int_t timeBin) const {return fSignals[xIdx][zIdx][timeBin];}
e1382811 24 Bool_t GetTriggerFlag(Int_t xIdx, Int_t zIdx, Int_t timeBin) const;
25 bool IsActive() const {return fActive;}
26 bool IsActive(Int_t timeBin) const {return fActiveTime[timeBin];}
27 bool HasSignal() const {return fHasSignal;}
28 bool HasSignal(Int_t timeBin) const {return fHasSignalTime[timeBin];}
e1aec4f9 29
e1382811 30 void ReadFromStream(AliCaloRawStreamV3* rawStream);
e1aec4f9 31 void Reset();
e1382811 32
33 static Int_t GetDefaultSignalValue() { return fgkDefaultSignalValue; };
34
e1aec4f9 35 private:
36 AliPHOSTRURawReader(const AliPHOSTRURawReader &); // not implemented
37 AliPHOSTRURawReader& operator= (const AliPHOSTRURawReader &); // not implemented
38
e1aec4f9 39 // constants
e1382811 40 static const Int_t fgkDefaultSignalValue = 512; // Default/Ideal TRU amplitude pedestal
41 static const Int_t fgkNReadoutChannels = 112; // number of readout channels in tru
42 static const Int_t fgkN4x4TriggerFlags = 91; // number of possible 4x4 area in PHOS
43 static const Int_t fgkFinalProductionChannel = 123; // The last channel of production bits, contains markesr to choose between 2x2 and 4x4 algorithm
44 static const Int_t fgkWordLength = 10; // Length of one data word in raw data
45 static const Int_t fgkNTimeBins = 128; // Number of timeBins
46 static const Int_t fgkN2x2XPrTRURow = 8; // (=64/2/4) Number of 2x2 pr. row
47 static const Int_t fgkN2x2ZPrBranch = 14; // (=56/2/2) Number of 2x2 pr. branch
48 static const Int_t fgkN4x4XPrTRURow = 7; // (=64/2/4 -1) Number of 4x4 pr. row
49 static const Int_t fgkN4x4ZPrBranch = 13; // (=56/2/2) -1 Number of 4x4 pr. branch
e1aec4f9 50
e1382811 51 Short_t fSignals[fgkN2x2XPrTRURow][fgkN2x2ZPrBranch][fgkNTimeBins]; // 2x2 Trigger Signal Sum, [x][z][t]
52 Bool_t fFlags[fgkN4x4XPrTRURow][fgkN4x4ZPrBranch][fgkNTimeBins]; // 4x4 Trigger Flag, [x][z][t]
53 Bool_t fFlags2x2[fgkN2x2XPrTRURow][fgkN2x2ZPrBranch][fgkNTimeBins]; // 2x2 Trigger Flag, [x][z][t]
e1aec4f9 54
55 Bool_t fActive; // Active
e19e9fb1 56 Bool_t fHasSignal; // Has Signal
e1382811 57 Bool_t fActiveTime[fgkNTimeBins]; // Active [t]
58 Bool_t fHasSignalTime[fgkNTimeBins]; // Has Signal [t]
59 Bool_t fUse4x4Flags; // True is the 4x4 analysis bit (bit number 112) is 1, otherwise false
e1aec4f9 60
e1382811 61 ClassDef(AliPHOSTRURawReader, 2)
e1aec4f9 62};
63
64#endif // ALIPHOSTRURAWREADER_H