]> git.uio.no Git - u/mrichter/AliRoot.git/blob - VZERO/AliVZEROBuffer.h
69ba4ad898ef2ca5b8307bc5327a78dc468796ca
[u/mrichter/AliRoot.git] / VZERO / AliVZEROBuffer.h
1 #ifndef AliVZEROBUFFER_H
2 #define AliVZEROBUFFER_H
3 /* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /////////////////////////////////////////////////////////////////////
7 // Class used for storing VZERO digits according to the DDLs format//
8 /////////////////////////////////////////////////////////////////////
9
10 #ifdef __CINT__
11 class fstream;
12 #else
13 #include "Riostream.h"
14 #endif
15
16 #include "AliFstream.h"
17
18 class AliVZEROBuffer:public TObject{
19
20 public:
21   AliVZEROBuffer();
22   AliVZEROBuffer(const char* fileName); //constructor
23   virtual ~AliVZEROBuffer(); //destructor
24   AliVZEROBuffer(const AliVZEROBuffer &source); // copy constructor
25   AliVZEROBuffer& operator=(const AliVZEROBuffer &source); // ass. op.
26   void    WriteTriggerInfo(UInt_t trigger);
27   void    WriteTriggerScalers();
28   void    WriteBunchNumbers();  
29   void    WriteChannel(Int_t cell,UInt_t ADC, UInt_t Time, Bool_t integrator);
30   void    WriteBeamFlags();
31   void    WriteMBInfo();
32   void    WriteMBFlags();  
33   void    WriteBeamScalers();
34   void    WriteTiming(Int_t cell,UInt_t ADC, UInt_t Time);
35
36   void    SetVerbose(Int_t val){fVerbose=val;}
37   Int_t   GetVerbose() const{return  fVerbose;} 
38   
39 // Getter of Online channel number (as defined in the FEE readout) from the 
40 // Offline channel (as defined by aliroot numbering convention):
41   Int_t              GetOnlineChannel(Int_t channel)  const
42        { Int_t  fOnlineChannel[64] = {39, 38, 37, 36, 35, 34, 33, 32, 
43                                       47, 46, 45, 44, 43, 42, 41, 40, 
44                                       55, 54, 53, 52, 51, 50, 49, 48, 
45                                       63, 62, 61, 60, 59, 58, 57, 56,
46                                        7,  6,  5,  4,  3,  2,  1,  0, 
47                                       15, 14, 13, 12, 11, 10,  9,  8,
48                                       23, 22, 21, 20, 19, 18, 17, 16, 
49                                       31, 30, 29, 28, 27, 26, 25, 24};
50                return fOnlineChannel[channel]; }
51                
52 private:
53   Int_t fVerbose; //Verbosity level: 0-silent, 1:cout msg, 2: txt files for checking
54   AliFstream* f;      //The IO file name
55   ClassDef(AliVZEROBuffer,1)
56 };
57
58 #endif