Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

GetRawHeader.h

Go to the documentation of this file.
00001 
00020 #ifndef GETRAWHEADER_H
00021 #define GETRAWHEADER_H
00022 
00023 #include "RawData/RawRecord.h"
00024 #include "RawData/RawHeader.h"
00025 #include "MinosObjectMap/MomNavigator.h"
00026 
00027 namespace DataUtil {
00028 
00034 template<class HeaderType>
00035 inline
00036 const HeaderType* GetRawHeader(const MomNavigator* mom) 
00037 {
00038   if (!mom) return 0;
00039   // Loop through all RawRecords in mom:
00040   TObject* tobj;
00041   TIter fragiter = mom->FragmentIter();
00042   while( ( tobj = fragiter.Next() ) ) {
00043     const RawRecord* rawrec = dynamic_cast<const RawRecord*>(tobj);
00044     if(rawrec) {
00045       const HeaderType* myHead = dynamic_cast<const HeaderType*>(rawrec->GetRawHeader());
00046       if(myHead) return myHead;
00047     }
00048   }
00049   return NULL;
00050 }
00051 
00052 
00053 } // namespace DataUtil
00054 
00055 #endif  // 

Generated on Mon Feb 15 11:06:46 2010 for loon by  doxygen 1.3.9.1