#ifndef PndTrkVectors_H #define PndTrkVectors_H 1 // Root includes #include "TROOT.h" #include #include using namespace std ; // this class is useful to mimic the [] operator // of an array or the at() operator of the std::vector // but it contains also the boundary check. If the boundary // are violated an error message is printed and a call // to the exit function with value -1 is performed. // The argument for the constructor are : // p --> pointer to an EXISTING array(of ANY type) to be mimiced; // dim --> dimension of the array to be mimiced; // nam --> string containing the name of the Vec class // that mimics the array. // The typical statements for producing the Vec mimicing // an existing array of type MYTYPE is : /* MYTYPE array[100]; the array must physically exist in memory; Vec myvec(array, 100, "myvec"); */ template class Vec{ public: int dimension; TString name; T *array; // constructor; Vec(T *p, int dim, TString nam){ if(dim < 0 || dim > 1000000){ cout<<"PndTrkVectors::Vec the dimension of the array "<=0 && index