// // This file test the functionalities of the Block class. // Interectly it also test the functionalities of the ColumnAttribs class. // // Test harness #include "TestManager.h" #include "HepTuple/HepHBookNtuple.h" #include "HepTuple/HepNtuple.h" #include "HepTuple/Column.h" #include "HepTuple/Block.h" ZM_USING_NAMESPACE( zmht ) #include "ZMutility/iostream" #include USING( namespace std ) #ifdef DEBUGZ extern "C" { void debugz_(); } #endif int main (int argc, char** argv) { // get comandline arguments PARSE; int rowNumber = 10000; HepFileManager* manager = OPEN_FILE("timing"); if (manager == NULL ) { cerr << "Could not open file\n"; ::exit(-1); } HepNtuple & hep = manager->ntuple("CWNTUPLE",1); hep.setColumnWise(); #if defined(DEBUGZ) && defined(USE_HBOOK) debugz_(); #endif hep.columnDirect("Col1",(Int4)11); hep.columnDirect("Col2",(Float4)12.0); cout << "\nchform for block: " << hep.blockFormat("_1") << endl; cout << endl; cout << "For loop: "; for (int i=0; i