17 #include <boost/thread.hpp>
18 #include <boost/bind.hpp>
20 #include "FairMQLogger.h"
51 , fOutputObjects(new TObject*[1000])
58 LOG(INFO) <<
"SHOULD CREATE THE FILE AND TREE";
72 fFolder =
new TFolder(
"cbmout",
"Main Output Folder");
73 TFolder* foldEventHeader = fFolder->AddFolder(
"EvtHeader",
"EvtHeader");
74 TFolder* foldPixel = fFolder->AddFolder(
"Pixel",
"Pixel");
76 TList* BranchNameList =
new TList();
78 LOG(INFO) <<
"PndMvdMQFileSink: " <<
fBranchNames.size();
87 BranchNameList->AddLast(
new TObjString(fBranchNames[fNObjects].c_str()));
93 BranchNameList->AddLast(
new TObjString(
fBranchNames[fNObjects].c_str()));
101 BranchNameList->Write(
"BranchList", TObject::kSingleKey);
102 BranchNameList->Delete();
103 delete BranchNameList;
109 while (CheckCurrentState(RUNNING))
113 if (Receive(parts,
"data-in") >= 0)
116 TObject* tempObjects[10];
117 for (
int ipart = 0 ; ipart < parts.Size() ; ipart++ )
119 Ex9TMessage tm(parts.At(ipart)->GetData(), parts.At(ipart)->GetSize());
120 tempObjects[ipart] = (TObject*)tm.ReadObject(tm.GetClass());
121 for (
unsigned int ibr = 0 ; ibr <
fBranchNames.size() ; ibr++ )
123 if ( strcmp(tempObjects[ipart]->GetName(),
fBranchNames[ibr].c_str()) == 0 )
134 LOG(INFO) <<
"oops!";
148 FairMQDevice::SetProperty(key, value);
155 FairMQDevice::SetProperty(key, value);
166 return FairMQDevice::GetProperty(key, default_);
172 return FairMQDevice::GetProperty(key, value);
std::string GetOutputFileName()
void SetProperty(const int key, const std::string &value)
std::string GetProperty(const int key, const std::string &default_="")
Ex9TMessage(void *buf, Int_t len)
TObject ** fOutputObjects
std::vector< std::string > fBranchNames
void SetOutputFileName(std::string tempString)
virtual ~PndMvdMQFileSink()
std::vector< std::string > fClassNames