9 #include <TClonesArray.h>
18 , fSelectedBranches(new TList())
27 LOG(error) <<
"-E- FairPrintFairLinks::Init: "
28 <<
"RootManager not instantiated!";
33 if (fSelectedBranches->GetEntries() > 0) {
34 branchNames = fSelectedBranches;
49 for (
int i = 0; i < branches->GetEntries();
51 TObjString* branchName = (TObjString*)branches->At(i);
52 if (branchName->String().Contains(
"_link"))
54 if (branchName->String().Contains(
"MCTrack"))
56 if (branchName->String().Contains(
"."))
58 if (branchName->String().Contains(
"GeoTracks"))
60 if (branchName->String().Contains(
"Header"))
62 if (branchName->String().Contains(
"Info"))
64 if (branchName->String().Contains(
"ID"))
66 if (branchName->String().Contains(
"PidAlgo"))
68 if (branchName->String().Contains(
"Riemann"))
71 LOG(debug) <<
"FairPrintFairLinks::Init() branches: " << branchName->String();
72 if ((TClonesArray*)ioman->
GetObject(branchName->String()) != 0) {
73 fBranches[ioman->
GetBranchId(branchName->String())] = (TClonesArray*)ioman->
GetObject(branchName->String());
75 LOG(warning) <<
"-E- FairPrintFairLinks " << branchName->String().Data() <<
" is not a valid branch name!";
82 LOG(info) <<
"-I- FairPrintFairLinks Branches:";
84 for (
int i = 0; i < branches->GetEntries(); ++i) {
85 TObjString* branchName = (TObjString*)branches->At(i);
86 LOG(info) << i <<
" : " << branchName->String().Data() <<
"\n";
102 for (std::map<Int_t, TClonesArray*>::iterator iter = fBranches.begin(); iter != fBranches.end(); ++iter) {
105 <<
" Entries: " << iter->second->GetEntriesFast();
106 for (
int i = 0; i < iter->second->GetEntriesFast(); ++i) {
109 LOG(info) << i <<
" : " << *myLinks <<
"\n";
void InitBranchList(TList *branches)
static FairRootManager * Instance()
ClassImp(FairEventBuilder)
TObject * GetObject(const char *BrName)
virtual void SetParContainers()
TList * GetBranchNameList()
FairMultiLinkedData * GetPointerToLinks() const
returns non-owning pointer
virtual InitStatus Init()
TString GetBranchName(Int_t id)
virtual ~FairPrintFairLinks()
virtual void PrintBranchNameList(TList *branches)
virtual void Exec(Option_t *opt)
Int_t GetBranchId(TString const &BrName)