// // This file test the functionalities of the Block class. // Interectly it also test the functionalities of the ColumnAttribs class. // #include #include #include #include #include #include int main (int argc, char* argv[]) { int i,j; Block* mcas; string nst; // HepAList colList; HepAList CAs; if(argc<2) { cout << "need string" << endl; exit(-1); } HepAList Emptys; HepFileManager* manager = new HepHBookFileManager("test.out","section"); HepTuple* hep = manager->newHepTuple("NTUPLE"); // mcas->addColumnsFromFormat(argv[1] , Emptys); CAs = hep->parseFormat(argv[1]); i = CAs.index(CAs.last())+1; cout << "NB=" << i << endl; mcas = new Block(hep,"test"); for(j=0;jaddColumn(Column::newColumn(mcas,*(CAs[j]))); } if(argc==3) { sscanf(argv[2],"%d",&j); HepAList colList = mcas->columns(); if(jattributes() << endl; else for(j=0;jattributes() << endl << endl; } } nst = mcas->format(); cout << nst << endl; return 0; }