17 #include "MyDataClass.h"
32 std::pair<double, MyDataClass*> newData)
34 std::vector<std::pair<double, MyDataClass*>> result;
35 std::pair<double, MyDataClass*> singleResult;
36 if (newData.first > 0) {
37 singleResult.first = oldData.first + newData.first;
39 singleResult.second = oldData.second;
40 singleResult.second->AddCharge(newData.second->GetCharge());
42 std::cout <<
"Modify hit" << std::endl;
43 std::cout <<
"OldData: " << oldData.first <<
" : " << oldData.second <<
" NewData: " << newData.first <<
" : "
44 << newData.second << std::endl;
45 std::cout <<
"Resulting Data: " << singleResult.first <<
" : " << singleResult.second << std::endl;
48 result.push_back(singleResult);
57 std::cout <<
"Data Inserted: " << *(MyDataClass*)(data) << std::endl;
59 new ((*myArray)[myArray->GetEntries()]) MyDataClass(*(MyDataClass*)(data));
64 std::map<MyDataClass, double>::iterator it;
65 MyDataClass myData = *(MyDataClass*)data;
76 MyDataClass myData = *(MyDataClass*)data;
82 MyDataClass myData = *(MyDataClass*)data;
virtual void FillDataMap(FairTimeStamp *data, double activeTime)
add a new element in the search buffer
virtual std::vector< std::pair< double, MyDataClass * > > Modify(std::pair< double, MyDataClass * > oldData, std::pair< double, MyDataClass * > newData)
static FairRootManager * Instance()
ClassImp(FairEventBuilder)
void AddNewDataToTClonesArray(FairTimeStamp *)
TClonesArray * GetTClonesArray(TString branchName)
virtual void EraseDataFromDataMap(FairTimeStamp *data)
delete the element from the search buffer (see PndSdsDigiPixelWriteoutBuffer)
virtual double FindTimeForData(FairTimeStamp *data)
std::map< MyDataClass, double > fData_map
A container class to store digi data during events.
virtual ~MyWriteoutBuffer()