Skip to content

Commit 4bd12f6

Browse files
iouribelikovsawenzel
authored andcommitted
Generating dictionaries for vectors of digits, clusters and tracks
1 parent cb41ddc commit 4bd12f6

6 files changed

Lines changed: 6 additions & 21 deletions

File tree

DataFormats/Detectors/ITSMFT/ITS/src/DataFormatsITSLinkDef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
#pragma link off all classes;
1515
#pragma link off all functions;
1616
#pragma link C++ class o2::ITS::TrackITS + ;
17+
#pragma link C++ class std::vector<o2::ITS::TrackITS> + ;
1718

1819
#endif

DataFormats/Detectors/ITSMFT/common/src/ITSMFTDataFormatsLinkDef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#pragma link off all functions;
1616

1717
#pragma link C++ class o2::ITSMFT::Cluster + ;
18+
#pragma link C++ class std::vector<o2::ITSMFT::Cluster> + ;
1819
#pragma link C++ class o2::ITSMFT::ClusterTopology + ;
1920
#pragma link C++ class o2::ITSMFT::TopologyDictionary + ;
2021

Detectors/ITSMFT/ITS/macros/test/CheckClusters.C

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,7 @@ void CheckClusters(Int_t nEvents = 10, TString mcEngine = "TGeant3")
5252
TFile* file1 = TFile::Open(filename);
5353
TTree* clusTree = (TTree*)gFile->Get("o2sim");
5454
std::vector<Cluster>* clusArr = nullptr;
55-
// clusTree->SetBranchAddress("ITSCluster",&clusArr); // Why this does not work ???
56-
auto* branch = clusTree->GetBranch("ITSCluster");
57-
if (!branch) {
58-
std::cout << "No clusters !" << std::endl;
59-
return;
60-
}
61-
branch->SetAddress(&clusArr);
55+
clusTree->SetBranchAddress("ITSCluster",&clusArr);
6256
// Cluster MC labels
6357
o2::dataformats::MCTruthContainer<o2::MCCompLabel>* clusLabArr = nullptr;
6458
clusTree->SetBranchAddress("ITSClusterMCTruth", &clusLabArr);

Detectors/ITSMFT/ITS/macros/test/CheckTopologies.C

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,7 @@ void CheckTopologies(Int_t nEvents = 10, TString mcEngine = "TGeant3")
5959
TFile* file1 = TFile::Open(filename);
6060
TTree* clusTree = (TTree*)gFile->Get("o2sim");
6161
std::vector<Cluster>* clusArr = nullptr;
62-
// clusTree->SetBranchAddress("ITSCluster",&clusArr); // Why this does not work ???
63-
auto* branch = clusTree->GetBranch("ITSCluster");
64-
if (!branch) {
65-
std::cout << "No clusters !" << std::endl;
66-
return;
67-
}
68-
branch->SetAddress(&clusArr);
62+
clusTree->SetBranchAddress("ITSCluster",&clusArr);
6963
// Cluster MC labels
7064
o2::dataformats::MCTruthContainer<o2::MCCompLabel>* clusLabArr = nullptr;
7165
clusTree->SetBranchAddress("ITSClusterMCTruth", &clusLabArr);

Detectors/ITSMFT/ITS/macros/test/DisplayTrack.C

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,7 @@ void DisplayTrack(Int_t nEvents = 10, TString mcEngine = "TGeant3", Int_t event
127127
points->SetMarkerColor(kMagenta);
128128

129129
std::vector<Cluster>* clusArr = nullptr;
130-
// tree->SetBranchAddress("ITSCluster",&clusArr); // Why this does not work ???
131-
auto* branch = tree->GetBranch("ITSCluster");
132-
if (!branch) {
133-
std::cout << "No clusters !" << std::endl;
134-
return;
135-
}
136-
branch->SetAddress(&clusArr);
130+
tree->SetBranchAddress("ITSCluster",&clusArr);
137131
// Cluster MC labels
138132
o2::dataformats::MCTruthContainer<o2::MCCompLabel>* clsLabArr = nullptr;
139133
tree->SetBranchAddress("ITSClusterMCTruth", &clsLabArr);

Detectors/ITSMFT/common/base/src/ITSMFTBaseLinkDef.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#pragma link C++ class o2::ITSMFT::SDigit+;
1818
#pragma link C++ class o2::ITSMFT::Digit+;
19+
#pragma link C++ class std::vector<o2::ITSMFT::Digit>+;
1920
#pragma link C++ class o2::ITSMFT::SegmentationAlpide+;
2021
//#pragma link C++ class o2::ITS::ContainerFactory;
2122
//#pragma link C++ class o2::ITS::MisalignmentParameter+;

0 commit comments

Comments
 (0)