]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSDDLRawData.h
Fixing problem with previous checkin...
[u/mrichter/AliRoot.git] / ITS / AliITSDDLRawData.h
CommitLineData
2e9f335b 1/* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
a79660fb 4///////////////////////////////////////////////////////////////////////////////////////////
5// Class used for generating the files containing raw data, required for Data Challenge //
6///////////////////////////////////////////////////////////////////////////////////////////
2e9f335b 7
8#ifndef AliITSDDLRAWDATA_H
9#define AliITSDDLRAWDATA_H
10
11class AliITS;
12class TTree;
13
14class AliITSDDLRawData:public TObject{
15 public:
16 AliITSDDLRawData();//default constructor
17 virtual ~AliITSDDLRawData(){;}//destructor
18 AliITSDDLRawData(const AliITSDDLRawData &source); // copy constructor
19 AliITSDDLRawData& operator=(const AliITSDDLRawData &source); // ass. op.
c9bd9d3d 20 Int_t RawDataSPD(AliITS *ITS,TTree *TD ,Int_t LDCsNumber,Int_t eventNumber);
2e9f335b 21 // This method generates the files with the Silicon pixel detector data
c9bd9d3d 22 Int_t RawDataSDD(AliITS *ITS,TTree *TD ,Int_t LDCsNumber,Int_t eventNumbe);
2e9f335b 23 // This method generates the files with the Silicon drift detector data
c9bd9d3d 24 Int_t RawDataSSD(AliITS *ITS,TTree *TD ,Int_t LDCsNumber,Int_t eventNumbe);
a79660fb 25 // This method generates the files with the Silicon pixel detector data
c9bd9d3d 26 void TestFormat(Int_t eventNumber);
9f992f70 27 // A debugging method used to test the files generated for the SPD.
28 void SetVerbose(Int_t Verbose){fVerbose=Verbose;}
29 // To set the verbose level
2e9f335b 30 private:
9f992f70 31 void GetDigitsSPD(TClonesArray *ITSdigits, Int_t mod,Int_t ddl,ULong_t *buf);
a79660fb 32 //This method formats and stores in buf all the digits of a SPD module
9f992f70 33 void GetDigitsSDD(TClonesArray *ITSdigits, Int_t mod,Int_t modR,Int_t ddl,ULong_t *buf);
a79660fb 34 //This method formats and stores in buf all the digits of a SDD module
9f992f70 35 void GetDigitsSSD(TClonesArray *ITSdigits, Int_t mod,Int_t modR,Int_t ddl,ULong_t *buf);
a79660fb 36 //This method formats and stores in buf all the digits of a SSD module
37 void PackWord(ULong_t &BaseWord, ULong_t Word, Int_t StartBit, Int_t StopBit);
2e9f335b 38 //This method stores the value of the variable Word of StopBit-StartBit+1 bits
39 //in BaseWord, starting from the bit StartBit
2e9f335b 40 void UnpackWord(ULong_t PackedWord, Int_t StartBit, Int_t StopBit, ULong_t &Word);
a79660fb 41 //This method extracts a group of adjacent bits, specified by StartBit and StopBit,
42 //from the word PackedWord. The resulting word is saved in the Word variable
2e9f335b 43 void WriteChipHeader(Int_t ChipAddr,Int_t EventCnt,ULong_t &BaseWord);
44 void WriteChipTrailer(ULong_t *buf,Int_t ChipHitCount,ULong_t &BaseWord);
45 void WriteHit(ULong_t *buf,Int_t RowAddr,Int_t HitAddr,ULong_t &BaseWord);
a79660fb 46 //The three previous methods are used to store the data according to the
47 //Silicon pixel detector data format
2e9f335b 48 void ReadChipHeader(Int_t &ChipAddr,Int_t &EventCnt,ULong_t BaseWord);
49 void ReadChipTrailer(Int_t &ChipHitCount,ULong_t BaseWord);
a79660fb 50 //Methods used for reading and dubugging SPD data files
9f992f70 51 Int_t fVerbose; //Verbose level (0:no msg, 1:msg, 2:digits in txt files)
a79660fb 52 Long_t fIndex; //number of 32 words to be stored into the output file
53 Int_t fHalfStaveModule; //first or second half of an Half Stave module
2e9f335b 54 ClassDef(AliITSDDLRawData,1)
55};
56
57#endif