1 |
loizides |
1.1 |
//
|
2 |
|
|
// $Id: TAMVirtualBranchLoader.cxx 3191 2006-08-17 14:52:57Z loizides $
|
3 |
|
|
//
|
4 |
|
|
|
5 |
|
|
#include "TAMVirtualBranchLoader.h"
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
#ifndef ROOT_TTree
|
9 |
|
|
#include "TTree.h"
|
10 |
|
|
#endif
|
11 |
|
|
#ifndef ROOT_TError
|
12 |
|
|
#include "TError.h"
|
13 |
|
|
#endif
|
14 |
|
|
|
15 |
|
|
|
16 |
|
|
//////////////////////////////////////////////////////////////////////////
|
17 |
|
|
// //
|
18 |
|
|
// TAMVirtualBranchLoader //
|
19 |
|
|
// //
|
20 |
|
|
// Abstract base class for loading data into TAM. Every TAM plugin //
|
21 |
|
|
// (data loader) needs to derive from this class. //
|
22 |
|
|
// //
|
23 |
|
|
// Author : Maarten Ballintijn 12/06/2005 //
|
24 |
|
|
// Constantin Loizides 12/22/2005 //
|
25 |
|
|
// //
|
26 |
|
|
//////////////////////////////////////////////////////////////////////////
|
27 |
|
|
|
28 |
|
|
ClassImp(TAMVirtualBranchLoader)
|
29 |
|
|
|
30 |
|
|
|
31 |
|
|
//______________________________________________________________________________
|
32 |
|
|
TAMVirtualBranchLoader::TAMVirtualBranchLoader(TAMBranchInfo *binfo)
|
33 |
|
|
: fBInfo(binfo)
|
34 |
|
|
{
|
35 |
|
|
// Default constructor.
|
36 |
|
|
}
|
37 |
|
|
|
38 |
|
|
|
39 |
|
|
//______________________________________________________________________________
|
40 |
|
|
void TAMVirtualBranchLoader::Clear(Option_t */*option*/)
|
41 |
|
|
{
|
42 |
|
|
// Clear branch loader before processing the next event,
|
43 |
|
|
// eg. use this function to clear objects or arrays that
|
44 |
|
|
// use heap memory.
|
45 |
|
|
|
46 |
|
|
MayNotUse("Clear");
|
47 |
|
|
}
|
48 |
|
|
|
49 |
|
|
//______________________________________________________________________________
|
50 |
|
|
void* TAMVirtualBranchLoader::GetAddress() const
|
51 |
|
|
{
|
52 |
|
|
// Returns the address to which the user pointer will
|
53 |
|
|
// be set.
|
54 |
|
|
|
55 |
|
|
MayNotUse("NewBrAddress");
|
56 |
|
|
return 0;
|
57 |
|
|
}
|
58 |
|
|
|
59 |
|
|
|
60 |
|
|
//______________________________________________________________________________
|
61 |
|
|
Int_t TAMVirtualBranchLoader::GetEntry(Long64_t /*entry*/)
|
62 |
|
|
{
|
63 |
|
|
// Load the data for this branch.
|
64 |
|
|
|
65 |
|
|
MayNotUse("GetEntry");
|
66 |
|
|
|
67 |
|
|
return 0;
|
68 |
|
|
}
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
//______________________________________________________________________________
|
72 |
|
|
Bool_t TAMVirtualBranchLoader::Notify(TTree * /*tree*/)
|
73 |
|
|
{
|
74 |
|
|
// Notify on opening of a new file.
|
75 |
|
|
// Can be used to setup data structures (eg. allocate
|
76 |
|
|
// underlying memory if necessary) and to do the type
|
77 |
|
|
// checking (see TAMTreeBranchLoader::Notify()).
|
78 |
|
|
|
79 |
|
|
MayNotUse("Notify");
|
80 |
|
|
|
81 |
|
|
return kFALSE;
|
82 |
|
|
}
|