FairRoot/PandaRoot
PndBranchBurstBuilder_timeCut.cxx
Go to the documentation of this file.
1 /*
2  * PndEventCombinerTask_tb.cxx
3  *
4  * Created on: July 13, 2017
5  * Author: Steinschaden
6  *
7  */
8 
10 #include "TClonesArray.h"
11 
12 // framework includes
13 #include "FairRootManager.h"
14 #include "FairTimeStamp.h"
15 
16 
17 
20 {
21  fOutputPrefix= "Burst_tb";
22  fTimePeriod = 2000.0; // in nano seconds
23 
24 }
26 {
27 }
28 
29 // ----- Public method Init --------------------------------------------
31 {
32 
33  InitStatus status = PndBranchBurstBuilder::Init();
34 
35  fStopFunctor = new StopTime();
36 
37  return status;
38 }
39 
40 TClonesArray* PndBranchBurstBuilder_timeCut::GetBurstData(size_t branchNum)
41 {
42  FairRootManager* ioman = FairRootManager::Instance();
43 
44  // the absorbtion of the Array to the Writeout Array will "clear" the memmory of this Array so that in the next loop only new data are present
45  return ioman->GetData(fInBranchNames[branchNum], fStopFunctor, ioman->GetEntryNr()*fTimePeriod+fTimePeriod);
46 }
47 
48 
49 
51 
std::vector< TString > fInBranchNames
virtual TClonesArray * GetBurstData(size_t branchNum)
ClassImp(PndBranchBurstBuilder_timeCut)
virtual InitStatus Init()
int status[10]
Definition: f_Init.h:28