Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
VariableRearrangeTransform.h
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss
3 
4 /**********************************************************************************
5  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6  * Package: TMVA *
7  * Class : VariableRearrangeTransform *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * rearrangement of input variables *
12  * *
13  * Authors (alphabetical): *
14  * Peter Speckmayer <Peter.Speckmayer@cern.ch> - CERN, Switzerland *
15  * *
16  * Copyright (c) 2005: *
17  * CERN, Switzerland *
18  * U. of Victoria, Canada *
19  * MPI-K Heidelberg, Germany *
20  * *
21  * Redistribution and use in source and binary forms, with or without *
22  * modification, are permitted according to the terms listed in LICENSE *
23  * (http://tmva.sourceforge.net/LICENSE) *
24  **********************************************************************************/
25 
26 #ifndef ROOT_TMVA_VariableRearrangeTransform
27 #define ROOT_TMVA_VariableRearrangeTransform
28 
29 //////////////////////////////////////////////////////////////////////////
30 // //
31 // VariableRearrangeTransform //
32 // //
33 // rearrangement of input variables //
34 // //
35 //////////////////////////////////////////////////////////////////////////
36 
38 
39 namespace TMVA {
40 
41  class VariableRearrangeTransform : public VariableTransformBase {
42 
43  public:
44 
45  typedef std::vector<Float_t> FloatVector;
46 
47  VariableRearrangeTransform( DataSetInfo& dsi );
48  virtual ~VariableRearrangeTransform( void );
49 
50  void Initialize();
51  Bool_t PrepareTransformation (const std::vector<Event*>&);
52 
53  virtual const Event* Transform(const Event* const, Int_t cls ) const;
54  virtual const Event* InverseTransform( const Event* const, Int_t cls ) const;
55 
56  void WriteTransformationToStream ( std::ostream& ) const {}
57  void ReadTransformationFromStream( std::istream&, const TString& ) { SetCreated(); }
58 
59  virtual void AttachXMLTo(void* parent);
60  virtual void ReadFromXML( void* trfnode );
61 
62  virtual void PrintTransformation( std::ostream & o );
63 
64  // writer of function code
65  virtual void MakeFunction( std::ostream& fout, const TString& fncName, Int_t part, UInt_t trCounter, Int_t cls );
66 
67  // provides string vector giving explicit transformation
68  std::vector<TString>* GetTransformationStrings( Int_t cls ) const;
69 
70  private:
71 
72  ClassDef(VariableRearrangeTransform,0); // Variable transformation: normalization
73  };
74 
75 } // namespace TMVA
76 
77 #endif