#ifndef SimpleTreeWrite_H #define SimpleTreeWrite_H class TTree; class SimpleTreeWrite { public: SimpleTreeWrite(); ~SimpleTreeWrite(); // store tree pointer and associate variables to branches void init( TTree* tree ); // set event number void setHeader( int ievt, float z ); // set coordinates void setCoord( float x, float y, float z ); // add data void addData( int i, float x, float y, float a, float b ); // fill tree void fill(); // reset all variables void reset(); private: // tree pointer TTree* currentTree; // tree variables int eventId; int lineNum; float zValue; float* coords; const int lineMax; int* iValue; float* xValue; float* yValue; float* aValue; float* bValue; SimpleTreeWrite( const SimpleTreeWrite& st ); SimpleTreeWrite& operator=( const SimpleTreeWrite& st ); }; #endif