1 | /* ======================================================================== *\
|
---|
2 | !
|
---|
3 | ! *
|
---|
4 | ! * This file is part of MARS, the MAGIC Analysis and Reconstruction
|
---|
5 | ! * Software. It is distributed to you in the hope that it can be a useful
|
---|
6 | ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
|
---|
7 | ! * It is distributed WITHOUT ANY WARRANTY.
|
---|
8 | ! *
|
---|
9 | ! * Permission to use, copy, modify and distribute this software and its
|
---|
10 | ! * documentation for any purpose is hereby granted without fee,
|
---|
11 | ! * provided that the above copyright notice appear in all copies and
|
---|
12 | ! * that both that copyright notice and this permission notice appear
|
---|
13 | ! * in supporting documentation. It is provided "as is" without express
|
---|
14 | ! * or implied warranty.
|
---|
15 | ! *
|
---|
16 | !
|
---|
17 | !
|
---|
18 | ! Author(s): Thomas Bretz, 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
|
---|
19 | !
|
---|
20 | ! Copyright: MAGIC Software Development, 2000-2004
|
---|
21 | !
|
---|
22 | !
|
---|
23 | \* ======================================================================== */
|
---|
24 |
|
---|
25 | /////////////////////////////////////////////////////////////////////////////
|
---|
26 | //
|
---|
27 | // MChain
|
---|
28 | //
|
---|
29 | // Helper class for MReadTree
|
---|
30 | //
|
---|
31 | /////////////////////////////////////////////////////////////////////////////
|
---|
32 | #include "MChain.h"
|
---|
33 |
|
---|
34 | ClassImp(MChain);
|
---|
35 |
|
---|
36 | using namespace std;
|
---|
37 |
|
---|
38 | //#if ROOT_VERSION_CODE < ROOT_VERSION(4,02,00)
|
---|
39 | //Int_t MChain::LoadTree(Int_t entry)
|
---|
40 | //#else
|
---|
41 | Long64_t MChain::LoadTree(Long64_t entry)
|
---|
42 | //#endif
|
---|
43 | {
|
---|
44 | //
|
---|
45 | // This is the code from TChain::LoadTree but skips the
|
---|
46 | // notification in LoadTree. If LoadTree raises the notification
|
---|
47 | // a flag is set and the notification is done by hand. This
|
---|
48 | // is done to be able to catch the return value from Notify. If
|
---|
49 | // it has not been successfull -15 is returned.
|
---|
50 | // This is to support return values from Notify()/Reinit()
|
---|
51 | //
|
---|
52 | TObject *notify = GetNotify();
|
---|
53 |
|
---|
54 | SetNotify(this);
|
---|
55 |
|
---|
56 | //#if ROOT_VERSION_CODE < ROOT_VERSION(4,02,00)
|
---|
57 | // Int_t
|
---|
58 | //#else
|
---|
59 | Long64_t
|
---|
60 | //#endif
|
---|
61 | rc = TChain::LoadTree(entry);
|
---|
62 |
|
---|
63 | if (rc >= 0 && fNotified && notify)
|
---|
64 | if (!notify->Notify())
|
---|
65 | rc = -15;
|
---|
66 |
|
---|
67 | SetNotify(notify);
|
---|
68 |
|
---|
69 | return rc;
|
---|
70 | }
|
---|
71 |
|
---|