Changeset 317 for MEMPHYS/HEAD
- Timestamp:
- Apr 19, 2007, 3:45:50 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MEMPHYS/HEAD/applications/MEMPHYS_geom.cxx
r310 r317 1 // AIDA analysis program over MEMPHYS .root file.1 // AIDA analysis program over MEMPHYS_geom.root file. 2 2 3 3 // AIDA : … … 8 8 #include <iostream> 9 9 10 //////////////////////////////////////////////////////////////////////////////11 bool get_XYZ(12 AIDA::ITuple& aParent13 ,int aColumn14 ,double& aX15 ,double& aY16 ,double& aZ17 )18 //////////////////////////////////////////////////////////////////////////////19 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//20 {21 AIDA::ITupleEntry* entry = (AIDA::ITupleEntry*)aParent.getObject(aColumn);22 if(!entry) return false;23 24 AIDA::ITuple* tuple = dynamic_cast<AIDA::ITuple*>(entry);25 if(!tuple) return false;26 27 tuple->start();28 if(!tuple->next()) return false;29 30 aX = tuple->getDouble(0);31 aY = tuple->getDouble(1);32 aZ = tuple->getDouble(2);33 34 return true;35 }36 10 ////////////////////////////////////////////////////////////////////////////// 37 11 ////////////////////////////////////////////////////////////////////////////// … … 44 18 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// 45 19 { 46 AIDA::ITupleEntry* entry = (AIDA::ITupleEntry*)aParent.getObject( 5);20 AIDA::ITupleEntry* entry = (AIDA::ITupleEntry*)aParent.getObject(7); 47 21 if(!entry) return false; 48 22 … … 58 32 //int pmtLocation = tuple->getInt(1); 59 33 60 double dx,dy,dz; 61 if(!get_XYZ(*tuple,2,dx,dy,dz)) return false; 62 63 double x,y,z; 64 if(!get_XYZ(*tuple,3,x,y,z)) return false; 34 double dx = tuple->getDouble(2); 35 double dy = tuple->getDouble(3); 36 double dz = tuple->getDouble(4); 37 double x = tuple->getDouble(5); 38 double y = tuple->getDouble(6); 39 double z = tuple->getDouble(7); 65 40 66 41 std::cout << "----> PM{"<<irow<<"}: " … … 104 79 std::string fmt = (aArgc>=2?aArgv[1]:"root"); //file extension 105 80 106 AIDA::ITree* tree = treeFactory->create("MEMPHYS ."+fmt,fmt,true,false);81 AIDA::ITree* tree = treeFactory->create("MEMPHYS_geom."+fmt,fmt,true,false); 107 82 if(!tree) { 108 83 std::cout << header << "can't open data file." << std::endl;
Note: See TracChangeset
for help on using the changeset viewer.