diff --git a/add_friend.py b/add_friend.py index 0f1807fa314d41ed2216a6362706cdb6389b47ec..11db673f8ef9be332b3a5be58711df2e42803de2 100755 --- a/add_friend.py +++ b/add_friend.py @@ -11,7 +11,7 @@ def add_friend(infile, intree, outfile, outtree): for k in root_outfile.GetListOfKeys(): if k.GetName() == friend_name: - raise ValueError("Tree with name {} already exists in outputfile".format(intree)) + print("Tree with name {} already exists in outputfile - writing new cycle!".format(intree)) root_outfile.cd() root_outtree = root_outfile.Get(outtree) @@ -23,7 +23,7 @@ def add_friend(infile, intree, outfile, outtree): if root_outtree.GetListOfFriends(): for k in root_outtree.GetListOfFriends(): if k.GetName() == friend_name: - raise ValueError("Tree with name {} is already friend of {}".format(intree, outtree)) + print("Tree with name {} is already friend of {} - writing new cycle!".format(intree, outtree)) root_infile.cd() root_intree = root_infile.Get(intree)