]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RAW/AliCaloRawStream.h
end-of-line normalization
[u/mrichter/AliRoot.git] / RAW / AliCaloRawStream.h
CommitLineData
d84933b0 1#ifndef ALICALORAWSTREAM_H
2#define ALICALORAWSTREAM_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8///////////////////////////////////////////////////////////////////////////////
9///
10/// This class provides access to Calo digits in raw data.
11///
12///Modification: Class exported from PHOS to be used by EMCAL and PHOS
13///November 2006 Gustavo Conesa Balbastre
14///////////////////////////////////////////////////////////////////////////////
15
16// --- ROOT system ---
cee89af9 17#include "TString.h"
d84933b0 18
19// --- AliRoot header files ---
20#include "AliAltroRawStream.h"
21class AliRawReader;
22class AliAltroMapping;
23
24class AliCaloRawStream: public AliAltroRawStream {
25
26public :
467957dc 27 AliCaloRawStream(AliRawReader* rawReader, TString calo, AliAltroMapping **mapping = NULL);
d84933b0 28 virtual ~AliCaloRawStream();
29
30 virtual void Reset();
31 virtual Bool_t Next();
32
33 Int_t GetModule() const {return fModule;}
34 Int_t GetRow() const {return fRow;}
35 Int_t GetColumn() const {return fColumn;}
36 Int_t GetPrevModule() const {return fPrevModule;}
37 Int_t GetPrevRow() const {return fPrevRow;}
38 Int_t GetPrevColumn() const {return fPrevColumn;}
39 Bool_t IsNewModule() const {return GetModule() != GetPrevModule();}
40 Bool_t IsNewRow() const {return (GetRow() != GetPrevRow()) || IsNewModule();}
41 Bool_t IsNewColumn() const {return (GetColumn() != GetPrevColumn()) || IsNewRow();}
d84933b0 42 Int_t GetNRCU() const {return fNRCU;}
cee89af9 43 Int_t GetNSides() const {return fNSides;}
44 TString GetCalorimeter() const {return fCalo;}
c7ecf7e8 45 enum EAliCaloFlag { kLowGain=0, kHighGain=1, kTRUData=2, kLEDMonData=3 };
46 Bool_t IsLowGain() const {return (fCaloFlag == kLowGain);}
47 Bool_t IsHighGain() const {return (fCaloFlag == kHighGain);}
48 Bool_t IsTRUData() const {return (fCaloFlag == kTRUData);}
49 Bool_t IsLEDMonData() const {return (fCaloFlag == kLEDMonData);}
50
51 Int_t GetCaloFlag() const { return fCaloFlag; }
52 Int_t GetFilter() const { return fFilter; }
53
54 void SkipData(EAliCaloFlag caloFlag=kLEDMonData)
55 { fFilter |= (1<<caloFlag); }
56
d84933b0 57protected:
58
59 AliCaloRawStream(const AliCaloRawStream& stream);
60 AliCaloRawStream& operator = (const AliCaloRawStream& stream);
61
62 virtual void ApplyAltroMapping();
63
64 Int_t fModule; // index of current module
65 Int_t fPrevModule; // index of previous module
66 Int_t fRow; // index of current row
67 Int_t fPrevRow; // index of previous row
68 Int_t fColumn; // index of current column
69 Int_t fPrevColumn; // index of previous column
c7ecf7e8 70 Int_t fCaloFlag; // low (0) or (1) high gain; see enum EAliCaloFlag above
71 Int_t fFilter; // default 0 = let everything through
d84933b0 72 Int_t fNRCU; // number of RCU per (super)module
cee89af9 73 Int_t fNSides; // Division of EMCal in "A" "C" sides
74 TString fCalo; // Calorimeter name
467957dc 75 Bool_t fExternalMapping; // use external mapping or create a default one
d84933b0 76 AliAltroMapping *fMapping[4]; // pointers to ALTRO mapping
77
cee89af9 78 ClassDef(AliCaloRawStream, 1) // class for reading PHOS/EMCAL raw digits
d84933b0 79
80};
81
82#endif
83