//------------------------------------------------------------------------------ // Main cluster class -- // (C) Piero Giubilato 2009-2011, Berkeley Lab -- //------------------------------------------------------------------------------ //______________________________________________________________________________ // {Trace} // [File name] "data_Layer.h" // [Author] "Piero Giubilato" // [Version] "1.0" // [Modified by] "Piero Giubilato" // [Last revision] "31 Jul 2009" // [Language] "C++" // [Compiler] "Visual C++ 9.x" // [Member of] "Cool SEAL" // [Project] "SEAL" // [Description] "Main data class" // [Key documentation] // "Root user's guide" // "Visual C++ Reference Help" // {Trace} //______________________________________________________________________________ // Overloading check #ifndef data_Cluster_H #define data_Cluster_H // Keep ROOTCInt out of this! #ifndef __CINT__ // Standard componend #include // Root components #include // Application components #include "global.h" //______________________________________________________________________________ template class data_Point { public: // Data containers UInt_t dp_X; UInt_t dp_Y; T dp_Z; // Special member data_Point(Int_t x, Int_t y, T z); ~data_Point(); // Root overload void Dump() const {Dump(0);} void Dump(UInt_t level) const; // Would be a nonsense to have a streamer here // implemented into the stack class only }; //______________________________________________________________________________ template class data_Cluster: public data_Object { private: // Class identifiers static const UShort_t class_Ver = 1; // Class version public: // Special member data_Cluster(UInt_t pSize = 10); data_Cluster(Int_t x, Int_t y, T z, UInt_t pSize = 10); ~data_Cluster(); // Methods void Refresh(); // Root overload void Dump() const {Dump(0);} void Dump(UInt_t level) const; void Streamer(TBuffer &b); // Data containers std::vector*> dp_Array; // Main data point(dp) array // Cluster parameters Float_t cl_Max, cl_Min; Float_t cl_Left, cl_Top, cl_Right, cl_Bottom; Float_t cl_Width, cl_Height; Double_t cl_Mass; Float_t cl_pos_X, cl_pos_Y; UInt_t cl_Mult; }; //______________________________________________________________________________ template class data_Stack: public data_Object { private: // Class identifiers static const UShort_t class_Ver = 1; // Class version // Link container: this nested class-stack is the link container class link { public: UInt_t a; UInt_t b; link(UInt_t a_Idx, UInt_t b_Idx): a(a_Idx), b(b_Idx) {}; }; std::vector cl_Link; // Main data point (dp) array // Cuts parameters UInt_t cut_width_Min, cut_width_Max; UInt_t cut_height_Min, cut_height_Max; UInt_t cut_top_Min, cut_top_Max; UInt_t cut_mass_Min, cut_mass_Max; UInt_t cut_mult_Min, cut_mult_Max; public: // Special member data_Stack(UInt_t pSize = 200); ~data_Stack(); // Functions void List(); void Merge(UInt_t a_Idx, UInt_t b_Idx); void Link(UInt_t a_Idx, UInt_t b_Idx); void Clean(); void Refresh(); // Cut functions void cut_set_Width(UInt_t min, UInt_t max) {cut_width_Min = min; cut_width_Max = max;}; void cut_set_Height(UInt_t min, UInt_t max) {cut_height_Min = min; cut_height_Max = max;}; void cut_set_Top(UInt_t min, UInt_t max) {cut_top_Min = min; cut_top_Max = max;}; void cut_set_Mass(UInt_t min, UInt_t max) {cut_mass_Min = min; cut_mass_Max = max;}; void cut_set_Mult(UInt_t min, UInt_t max) {cut_mult_Min = min; cut_mult_Max = max;}; void cut_Apply(); // Root overloaded void Dump() const {Dump(0);} void Dump(UInt_t level) const; void Streamer(TBuffer &b); // Data containers std::vector*> cl_Array; // Main data point (dp) array }; // Reference to the translation unit, allows to just include the .h file #include "data_Cluster.cpp" // RootCint check #endif // Overloading check #endif