PandaRoot
PndMdtWaveformWriteoutBuffer.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 /*
14  * PndMdtWaveformWriteoutBuffer.h
15  */
16 
17 #ifndef PNDMDTDIGIWRITEOUTBUFFER_H_
18 #define PNDMDTDIGIWRITEOUTBUFFER_H_
19 
20 #include "FairWriteoutBuffer.h"
21 #include "PndMdtWaveform.h"
22 #include "TFile.h"
23 #include "TTree.h"
24 #include "THashTable.h"
25 
26 class FairTimeStamp;
27 
29  bool operator()(const PndMdtWaveform *lw, const PndMdtWaveform *rw) const { return (*lw) < (*rw); }
30 };
31 
32 class PndMdtWaveformWriteoutBuffer : public FairWriteoutBuffer {
33 
34  public:
36  PndMdtWaveformWriteoutBuffer(TString branchName, TString folderName, Bool_t persistance);
38 
39  private:
40  void AddNewDataToTClonesArray(FairTimeStamp *);
41 
42  virtual double FindTimeForData(FairTimeStamp *data);
43  virtual void FillDataMap(FairTimeStamp *data, double activeTime);
44  virtual void EraseDataFromDataMap(FairTimeStamp *data);
45 
46  virtual std::vector<std::pair<double, FairTimeStamp *>> Modify(std::pair<double, FairTimeStamp *> oldData, std::pair<double, FairTimeStamp *> newData);
47 
48  std::map<PndMdtWaveform *, double, PndMdtWaveformLess> fData_map;
49 
50  ClassDef(PndMdtWaveformWriteoutBuffer, 1);
51 };
52 
53 #endif /* PNDMDTDIGIWRITEOUTBUFFER_H_ */
bool operator()(const PndMdtWaveform *lw, const PndMdtWaveform *rw) const