FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairMQPixelFileSink.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  ********************************************************************************/
15 #ifndef FAIRMQPIXELFILESINK_H_
16 #define FAIRMQPIXELFILESINK_H_
17 
18 #include <FairMQDevice.h>
19 #include <string>
20 
21 class TFile;
22 class TObject;
23 class TTree;
24 
25 class FairMQPixelFileSink : public FairMQDevice
26 {
27  public:
29  virtual ~FairMQPixelFileSink();
30 
31  void SetOutputFileName(const std::string& tempString) { fFileName = tempString; }
32  std::string GetOutputFileName() { return fFileName; }
33 
34  void SetInputChannelName(const std::string& tstr) { fInputChannelName = tstr; }
35  void SetAckChannelName(const std::string& tstr) { fAckChannelName = tstr; }
36 
37  protected:
38  bool StoreData(FairMQParts&, int);
39  void InitTask() override;
40  void ResetTask() override;
41 
42  private:
43  std::string fInputChannelName;
44  std::string fAckChannelName;
45 
46  std::string fFileName;
47  std::string fTreeName;
48 
49  std::string fFileOption;
50  bool fFlowMode;
51  bool fWrite;
52 
53  TFile* fOutFile;
54  TTree* fTree;
55  unsigned int fNObjects;
56  TObject** fOutputObjects;
57 
59  FairMQPixelFileSink& operator=(const FairMQPixelFileSink&);
60 };
61 
62 #endif /* FAIRMQPIXELFILESINK_H_ */
void SetOutputFileName(const std::string &tempString)
void SetAckChannelName(const std::string &tstr)
bool StoreData(FairMQParts &, int)
std::string GetOutputFileName()
void SetInputChannelName(const std::string &tstr)