]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
A macro MakeAODInputChain.C is searched for in the current directory to make the...
authoragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Jul 2009 12:33:55 +0000 (12:33 +0000)
committeragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Jul 2009 12:33:55 +0000 (12:33 +0000)
ANALYSIS/AliAnalysisAlien.cxx

index 3b807f6f63a2d7328c391c4d4a9598486c7ea917..a7974283c11527a73ae8e410815e3525bc2f860c 100644 (file)
@@ -1724,7 +1724,17 @@ void AliAnalysisAlien::WriteAnalysisMacro()
       if (IsUsingTags()) {
          out << "   TChain *chain = CreateChainFromTags(\"wn.xml\", anatype);" << endl << endl;
       } else {
-         out << "   TChain *chain = CreateChain(\"wn.xml\", anatype);" << endl << endl;      
+         if(fFriendChainName!="AliAOD.VertexingHF.root") {
+            out << "   TChain *chain = CreateChain(\"wn.xml\", anatype);" << endl << endl;    
+         } else {
+            out << "   // Check if the macro to create the chain was provided" << endl;
+            out << "   if (gSystem->AccessPathName(\"MakeAODInputChain.C\")) {" << endl;
+            out << "      ::Error(\"" << func.Data() << "\", \"File MakeAODInputChain.C not provided. Aborting.\");" << endl;
+            out << "      return;" << endl;
+            out << "   }" << endl;
+            out << "   gROOT->LoadMacro(\"MakeAODInputChain.C\");" << endl;
+            out << "   TChain *chain = MakeAODInputChain(\"wn.xml\",\"none\");" << endl << endl;
+         }  
       }   
       out << "// read the analysis manager from file" << endl;
       out << "   TFile *file = TFile::Open(\"analysis.root\");" << endl;