Skip to content

Commit 1066045

Browse files
authored
Connecting to AliEn (#5866)
1 parent 9c12d21 commit 1066045

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

Analysis/Core/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ o2_target_root_dictionary(AnalysisCore
2727
o2_add_executable(merger
2828
COMPONENT_NAME aod
2929
SOURCES src/AODMerger.cxx
30-
PUBLIC_LINK_LIBRARIES ROOT::Hist ROOT::Core)
30+
PUBLIC_LINK_LIBRARIES ROOT::Hist ROOT::Core ROOT::Net)
3131

3232
if(FastJet_FOUND)
3333
o2_add_library(AnalysisJets

Analysis/Core/src/AODMerger.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "TList.h"
1818
#include "TDirectory.h"
1919
#include "TObjString.h"
20+
#include <TGrid.h>
2021

2122
// AOD merger with correct index rewriting
2223
// No need to know the datamodel because the branch names follow a canonical standard (identified by fIndex)
@@ -71,13 +72,20 @@ int main(int argc, char* argv[])
7172
std::ifstream in;
7273
in.open(inputCollection);
7374
TString line;
75+
bool connectedToAliEn = false;
7476
while (in.good()) {
7577
in >> line;
7678

7779
if (line.Length() == 0) {
7880
continue;
7981
}
8082

83+
if (line.BeginsWith("alien:") && !connectedToAliEn) {
84+
printf("Connecting to AliEn...");
85+
TGrid::Connect("alien:");
86+
connectedToAliEn = true; // Only try once
87+
}
88+
8189
printf("Processing input file: %s\n", line.Data());
8290

8391
auto inputFile = TFile::Open(line);

0 commit comments

Comments
 (0)