FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairMQPixelFileSinkBin.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 FAIRMQPIXELFILESINKBIN_H_
16 #define FAIRMQPIXELFILESINKBIN_H_
17 
18 #include <FairMQDevice.h>
19 #include <string>
20 #include <vector>
21 
22 class TFile;
23 class TFolder;
24 class TObject;
25 class TTree;
26 
27 class FairMQPixelFileSinkBin : public FairMQDevice
28 {
29  public:
31  virtual ~FairMQPixelFileSinkBin();
32 
33  void SetOutputFileName(const std::string& tempString) { fFileName = tempString; }
34  void AddOutputBranch(const std::string& classString, const std::string& branchString)
35  {
36  fClassNames.push_back(classString);
37  fBranchNames.push_back(branchString);
38  }
39  std::string GetOutputFileName() { return fFileName; }
40 
41  void SetInputChannelName(const std::string& tstr) { fInputChannelName = tstr; }
42  void SetAckChannelName(const std::string& tstr) { fAckChannelName = tstr; }
43 
44  protected:
45  bool StoreData(FairMQParts&, int);
46  virtual void Init();
47 
48  private:
49  std::string fInputChannelName;
50  std::string fAckChannelName;
51 
52  std::string fFileName;
53  std::string fTreeName;
54 
55  std::vector<std::string> fBranchNames;
56  std::vector<std::string> fClassNames;
57 
58  std::string fFileOption;
59  bool fFlowMode;
60  bool fWrite;
61 
62  TFile* fOutFile;
63  TTree* fTree;
64  unsigned int fNObjects;
65  TObject** fOutputObjects;
66  /* FairEventHeader* fEventHeader; */
67  /* TClonesArray* fOutput; */
68  TFolder* fFolder;
69 
72 };
73 
74 #endif /* FAIRMQPIXELFILESINK_H_ */
void SetOutputFileName(const std::string &tempString)
bool StoreData(FairMQParts &, int)
void SetAckChannelName(const std::string &tstr)
void AddOutputBranch(const std::string &classString, const std::string &branchString)
void SetInputChannelName(const std::string &tstr)