1 /* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
4 ///////////////////////////////////////////////////////////////////////////////////////////
5 // Class used for generating the files containing raw data, required for Data Challenge //
6 ///////////////////////////////////////////////////////////////////////////////////////////
8 #ifndef AliITSDDLRAWDATA_H
9 #define AliITSDDLRAWDATA_H
14 class AliITSDDLRawData:public TObject{
16 AliITSDDLRawData();//default constructor
17 virtual ~AliITSDDLRawData(){;}//destructor
18 AliITSDDLRawData(const AliITSDDLRawData &source); // copy constructor
19 AliITSDDLRawData& operator=(const AliITSDDLRawData &source); // ass. op.
20 Int_t RawDataSPD(AliITS *ITS,TTree *TD ,Int_t LDCsNumber,Int_t eventNumber);
21 // This method generates the files with the Silicon pixel detector data
22 Int_t RawDataSDD(AliITS *ITS,TTree *TD ,Int_t LDCsNumber,Int_t eventNumbe);
23 // This method generates the files with the Silicon drift detector data
24 Int_t RawDataSSD(AliITS *ITS,TTree *TD ,Int_t LDCsNumber,Int_t eventNumbe);
25 // This method generates the files with the Silicon pixel detector data
26 void TestFormat(Int_t eventNumber);
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
31 void GetDigitsSPD(TClonesArray *ITSdigits, Int_t mod,Int_t ddl,UInt_t *buf);
32 //This method formats and stores in buf all the digits of a SPD module
33 void GetDigitsSDD(TClonesArray *ITSdigits, Int_t mod,Int_t modR,Int_t ddl,UInt_t *buf);
34 //This method formats and stores in buf all the digits of a SDD module
35 void GetDigitsSSD(TClonesArray *ITSdigits, Int_t mod,Int_t modR,Int_t ddl,UInt_t *buf);
36 //This method formats and stores in buf all the digits of a SSD module
37 void PackWord(UInt_t &BaseWord, UInt_t Word, Int_t StartBit, Int_t StopBit);
38 //This method stores the value of the variable Word of StopBit-StartBit+1 bits
39 //in BaseWord, starting from the bit StartBit
40 void UnpackWord(UInt_t PackedWord, Int_t StartBit, Int_t StopBit, UInt_t &Word);
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
43 void WriteChipHeader(Int_t ChipAddr,Int_t EventCnt,UInt_t &BaseWord);
44 void WriteChipTrailer(UInt_t *buf,Int_t ChipHitCount,UInt_t &BaseWord);
45 void WriteHit(UInt_t *buf,Int_t RowAddr,Int_t HitAddr,UInt_t &BaseWord);
46 //The three previous methods are used to store the data according to the
47 //Silicon pixel detector data format
48 void ReadChipHeader(Int_t &ChipAddr,Int_t &EventCnt,UInt_t BaseWord);
49 void ReadChipTrailer(Int_t &ChipHitCount,UInt_t BaseWord);
50 //Methods used for reading and dubugging SPD data files
51 Int_t fVerbose; //Verbose level (0:no msg, 1:msg, 2:digits in txt files)
52 Int_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
54 ClassDef(AliITSDDLRawData,1)