]>
Commit | Line | Data |
---|---|---|
e4da63c2 | 1 | #ifndef ALISTARTRAWDATA_H |
2 | #define ALISTARTRAWDATA_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 | // Converts START digits into a raw data stream // | |
11 | // // | |
12 | /////////////////////////////////////////////////////////////////////////////// | |
13 | ||
14 | #include "TObject.h" | |
61be8c4a | 15 | |
e4da63c2 | 16 | class AliSTART; |
17 | class AliSTARTdigit; | |
61be8c4a | 18 | class AliFstream; |
19 | class TFile; | |
06fb27f4 | 20 | //class TBranch; |
61be8c4a | 21 | class AliRawDataHeaderSim; |
e4da63c2 | 22 | class AliSTARTRawData : public TObject { |
23 | ||
24 | public: | |
25 | ||
26 | AliSTARTRawData(); // default constructor | |
27 | AliSTARTRawData(const AliSTARTRawData &r); // copy constructor | |
28 | virtual ~AliSTARTRawData(); // destructor | |
29 | AliSTARTRawData &operator=(const AliSTARTRawData &r); // ass. op. | |
30 | ||
31 | Int_t RawDataSTART (AliSTARTdigit *fDigits); | |
32 | // This method generates the files with the TOF detector data | |
33 | void SetVerbose(Int_t Verbose){fVerbose=Verbose;} | |
34 | // To set the verbose level | |
61be8c4a | 35 | void GetDigits(AliSTARTdigit *fDigits); |
e4da63c2 | 36 | //This method formats and stores in buf all the digits of a TOF module |
37 | ||
4c7da157 | 38 | void PackWord(UInt_t &BaseWord, UInt_t Word, Int_t StartBit, Int_t StopBit); |
e4da63c2 | 39 | //This method stores the value of the variable Word of StopBit-StartBit+1 bits |
40 | //in BaseWord, starting from the bit StartBit | |
41 | ||
61be8c4a | 42 | void WriteDataHeader(Bool_t dummy, Bool_t compressed); |
43 | void WriteDRMDataHeader(); | |
44 | void WriteTRMDataHeader(UInt_t slotID, Int_t nWords, Int_t positionOfTRMHeader); | |
45 | //this method is used to write the data header | |
46 | void WriteTrailer(UInt_t slot, Int_t word1, UInt_t word2, UInt_t word3); | |
47 | void WriteChainDataHeader(UInt_t chainNumber,UInt_t slotID); | |
48 | void FillTime(Int_t ch, Int_t iTDC, Int_t time); | |
e4da63c2 | 49 | |
50 | //START digits arrays | |
51 | ||
e4da63c2 | 52 | |
460b4363 | 53 | TArrayI *TimeLED() {return fTimeLED;} |
61be8c4a | 54 | TArrayI *ADC1() {return fADC1;} |
460b4363 | 55 | TArrayI *TimeCFD() {return fTimeCFD;} |
56 | TArrayI *ADC0() {return fADC0;} | |
db173afc | 57 | |
58 | ||
e4da63c2 | 59 | |
60 | protected: | |
61 | ||
62 | Int_t fVerbose; //Verbose level (0:no msg, 1:msg, 2:digits in txt files) | |
61be8c4a | 63 | UInt_t fBuffer[512]; // buffer for writing rawdata |
e4da63c2 | 64 | Int_t fIndex; //number of 32 words to be stored into the output file |
61be8c4a | 65 | Int_t fEventNumber; // current event number |
e4da63c2 | 66 | |
e4da63c2 | 67 | Int_t fTimeDiff ; //time difference |
68 | Int_t fMeanTime ; // average time - ALICE start signal | |
06fb27f4 | 69 | Int_t fBestTimeLeft; //first particle on the left |
70 | Int_t fBestTimeRight; //first particle on the right | |
460b4363 | 71 | Int_t fSumMult; // sum multiplicity |
72 | TArrayI * fTimeCFD; //TDC on the each PMT | |
61be8c4a | 73 | TArrayI * fADC1; //QTC (ADC) on the each PMT |
460b4363 | 74 | TArrayI * fTimeLED; // TDC with amplified signal |
75 | TArrayI * fADC0; //QTC amplified | |
61be8c4a | 76 | AliFstream* fFile; //logical name of the I/O file |
77 | UInt_t fDataHeaderPos;//Data header position | |
78 | UInt_t fDRMDataHeaderPos;//Data DRM header position | |
79 | UInt_t fTRMDataHeaderPos;//Data TRM header position | |
80 | Int_t fWordsIn1stTRM; // Number of word in 1st TRM | |
06fb27f4 | 81 | AliSTARTdigit *fDigits; //! The START digits manager |
e4da63c2 | 82 | |
83 | ClassDef(AliSTARTRawData,1) // START raw data class | |
84 | ||
85 | }; | |
86 | #endif |