LCTuple  1.6.0
CollectionBranches.h
1 #ifndef CollectionBranches_h
2 #define CollectionBranches_h 1
3 
4 #include "LCTupleConf.h"
5 
6 #include "CWBranchesSet.h"
7 
8 #include <vector>
9 #include <string>
10 
11 class TTree ;
12 
13 namespace EVENT{
14  class LCCollection ;
15  class LCCEvent ;
16 }
17 
24 
25 public:
26  CollectionBranches() {} ;
27  virtual void initBranches( TTree* tree, const std::string& prefix="" ) ; //const char* prefix=0) ;
28  virtual void fill(const EVENT::LCCollection* col, EVENT::LCEvent* evt ) ;
29  virtual ~CollectionBranches() {} ;
30 
31  virtual void writeParameters(bool writeparameters){ _writeparameters=writeparameters; };
32 
33 protected:
34  bool _writeparameters;
35 
36  int _npar ;
37  std::vector<std::string> _parName;
38  std::vector<std::string> _parOrigin;
39  int _parOriginID[ LCT_PARAMETERS_MAX ];
40 
41  int _parIntN[ LCT_PARAMETERS_MAX ];
42  int _parFloatN[ LCT_PARAMETERS_MAX ];
43  int _parStringN[ LCT_PARAMETERS_MAX ];
44 
45  int _parIntVal[ LCT_PARAMETERS_MAX ][ LCT_PARAMVALS_MAX ] ;
46  float _parFloatVal[ LCT_PARAMETERS_MAX ][ LCT_PARAMVALS_MAX ] ;
47  //Not yet implemented! 2D vector of strings not well supported by TTree
48  //std::vector<std::vector<std::string> > _parStringVal;
49  //char** _parStringVal[ LCT_PARAMETERS_MAX ][ LCT_PARAMVALS_MAX ][ LCT_STRING_MAX ] ;
50 } ;
51 
52 #endif
Base class for branches of collections.
Definition: CollectionBranches.h:23
CWBranchesSet holds a set of branches in a columnwise ntuple that are filled from one collection...
Definition: CWBranchesSet.h:20