AlcapDAQ  1
TWFDBankReader.h
Go to the documentation of this file.
1 #ifndef TWFDBankReader_h
2 #define TWFDBankReader_h
3 
4 #include <string>
5 #include <vector>
6 #include "Rtypes.h"
7 #include "midas.h"
8 #include "Parameters.h"
9 #include "TWFDRawIsland.h"
10 
18  private:
19  Int_t fDBC;
20  Int_t fPersonality;
21  std::string fBankName; // Must use string::c_str for MIDAS
22 
24  void* fEventPtr;
25 
26  Int_t fSize;
29  Int_t fStatus;
30  Bool_t fIsOK;
31 
32  std::vector<TWFDRawIsland> fData;
33 
34  Int_t fNBlocks;
35 
36  Bool_t CheckStatus();
37  Bool_t ReadIslandsLoop();
38 
39  protected:
40  // There's no point in making an empty reader.
42 
43  public:
44  TWFDBankReader(Int_t dbc, Int_t personality, std::string bankname);
45 
46  Int_t GetDBC();
47  Int_t GetPersonality();
48  std::string GetBankName();
49  Int_t GetNIslands();
50  Int_t GetNBlocks();
51  inline Int_t GetBlockLength_Words();
52  inline Int_t GetNBlockSamples();
53 
54  Int_t GetNRequestedWords();
55  Int_t GetNReceivedWords();
56  Int_t GetStatus();
57 
58  TWFDRawIsland& at(int index); // returns reference like std::vector
59 
60  void ProcessEvent(EVENT_HEADER* pheader, void *pevent);
61  void ClearEvent();
62 };
63 #endif