FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairEventBuilder.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 //* $Id: */
9 
10 // -------------------------------------------------------------------------
11 // ----- FairEventBuilder header file -----
12 // ----- Created 23/09/2013 by R. Karabowicz -----
13 // -------------------------------------------------------------------------
14 
31 #ifndef FAIREVENTBUILDER_H
32 #define FAIREVENTBUILDER_H 1
33 
34 #include "FairRecoEventHeader.h"
35 #include "FairWriteoutBuffer.h"
36 
37 #include <Rtypes.h>
38 #include <TStopwatch.h>
39 #include <TString.h>
40 #include <utility> // pair
41 #include <vector>
42 
43 class TClonesArray;
44 // class FairRecoEventHeader;
45 
47 {
48  public:
51 
53  FairEventBuilder(TString branchName, TString className, TString folderName, Bool_t persistance);
54 
56  virtual ~FairEventBuilder();
57 
58  virtual void WriteOutAllDeadTimeData();
59 
60  virtual std::vector<std::pair<double, FairRecoEventHeader*>> FindEvents() = 0;
61  virtual void StoreEventData(FairRecoEventHeader* /*recoEvent*/) = 0;
62 
63  void SetIdentifier(Int_t ident) { fIdentifier = ident; }
64  Int_t GetIdentifier() { return fIdentifier; }
65 
66  virtual Bool_t Init() = 0;
67 
68  virtual void Print(Option_t* option = "") const = 0;
69 
71  virtual void Finish();
72 
73  Double_t AllowedTime() { return fMaxAllowedEventCreationTime; };
74  void SetMaxAllowedTime(Double_t td) { fMaxAllowedEventCreationTime = td; };
75 
76  void SetBuilderName(const char* name) { fBuilderName = name; }
77  TString GetBuilderName() { return fBuilderName; }
78 
79  private:
80  TString fBuilderName;
81 
82  TStopwatch fTimer;
83  Double_t fExecTime;
84 
85  Int_t fIdentifier;
86  Double_t fMaxAllowedEventCreationTime;
87 
88  ClassDef(FairEventBuilder, 1);
89 };
90 
91 #endif
virtual void Finish()
void SetIdentifier(Int_t ident)
TString GetBuilderName()
virtual std::vector< std::pair< double, FairRecoEventHeader * > > FindEvents()=0
void SetBuilderName(const char *name)
Double_t AllowedTime()
virtual void Print(Option_t *option="") const =0
virtual Bool_t Init()=0
virtual void WriteOutAllDeadTimeData()
void SetMaxAllowedTime(Double_t td)
virtual void StoreEventData(FairRecoEventHeader *)=0
virtual ~FairEventBuilder()
A container class to store digi data during events.