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

GetTempTags.cxx

Go to the documentation of this file.
00001 #include "DataUtil/GetTempTags.h"
00002 #include "Registry/Registry.h"
00003 #include "MinosObjectMap/MomNavigator.h"
00004 #include "Record/RecMinos.h"
00005 #include "Record/RecRecord.h"
00006 
00007 #include "MessageService/MsgService.h"
00008 CVSID("$Id: GetTempTags.cxx,v 1.1 2007/10/01 02:10:46 rhatcher Exp $");
00009 
00010 #include <TIterator.h>
00011 
00012 using namespace std;
00013 
00014 const Registry* DataUtil::GetTempTags(const TObject* record)
00015 {
00016 
00017   if (!record) return 0;
00018 
00019   if (const RecMinos* rec = dynamic_cast<const RecMinos*>(record)) {
00020     // RawRecord, CandRecord
00021     return &(rec->GetTempTags());
00022   }
00023   else if (const RecRecord* rec  = dynamic_cast<const RecRecord*>(record)) {
00024     // SimSnarlRecord, Ntp*Record
00025     return &(rec->GetTempTags());
00026   }
00027 
00028   return 0;
00029 }
00030 
00031 std::string DataUtil::GetTempTagString(const TObject* record, std::string key)
00032 {
00033   const Registry* recreg = GetTempTags(record);
00034   string value("<no-"+key+">");
00035   if ( ! recreg ) return value;
00036   const char* tmp = 0;
00037   if (recreg->Get(key.c_str(),tmp)) value = tmp;
00038   return value;
00039 
00040 }

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