FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairOnlineSource.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 // -----------------------------------------------------------------------------
9 // ----- -----
10 // ----- FairMbsSource -----
11 // ----- Created 12.04.2013 by D.Kresan -----
12 // ----- Copied from FairSource 01.11.2013 by F.Uhlig -----
13 // ----- -----
14 // -----------------------------------------------------------------------------
15 
16 #ifndef FAIRONLINESOURCE_H
17 #define FAIRONLINESOURCE_H
18 
19 #include "FairSource.h"
20 #include "FairUnpack.h"
21 
22 #include <Rtypes.h>
23 #include <TObjArray.h>
24 
26 {
27  public:
29  FairOnlineSource(const FairOnlineSource& source);
30  virtual ~FairOnlineSource();
31 
32  inline void AddUnpacker(FairUnpack* unpacker) { fUnpackers->Add(unpacker); }
33  inline const TObjArray* GetUnpackers() const { return fUnpackers; }
34 
35  virtual Bool_t Init() = 0;
36  virtual Int_t ReadEvent(UInt_t = 0) = 0;
37  virtual void Close() = 0;
38 
39  virtual void SetParUnpackers();
40 
41  virtual Bool_t InitUnpackers();
42 
43  virtual Bool_t ReInitUnpackers();
44 
45  void Reset();
46 
47  virtual Source_Type GetSourceType() { return kONLINE; }
48 
49  Bool_t SpecifyRunId()
50  {
51  ReadEvent(0);
52  return true;
53  };
54 
55  protected:
56  TObjArray* fUnpackers;
57 
58  private:
59  FairOnlineSource& operator=(const FairOnlineSource&);
60 
61  ClassDef(FairOnlineSource, 0);
62 };
63 
64 #endif
const TObjArray * GetUnpackers() const
virtual Bool_t InitUnpackers()
virtual void Close()=0
virtual ~FairOnlineSource()
Source_Type
Definition: FairSource.h:26
virtual Int_t ReadEvent(UInt_t=0)=0
void AddUnpacker(FairUnpack *unpacker)
TObjArray * fUnpackers
virtual Bool_t ReInitUnpackers()
virtual Source_Type GetSourceType()
virtual Bool_t Init()=0
virtual void SetParUnpackers()