00001 #ifndef DEFINITIONS_H_
00002 #define DEFINITIONS_H_
00003
00004 #include <vector>
00005 #include <map>
00006 #include "IdSource.h"
00007 #include <string>
00008
00009
00010 typedef int TPulseIslandID;
00011
00012
00013 class TPulseIsland;
00014 typedef std::vector<TPulseIsland*> PulseIslandList;
00015 typedef std::vector<const TPulseIsland*> ConstPulseIslandList;
00016 typedef std::map<IDs::channel, PulseIslandList> ChannelPulseIslandMap;
00017 typedef std::map<std::string, PulseIslandList> StringPulseIslandMap;
00018 typedef std::map<std::string, ConstPulseIslandList> StringConstPulseIslandMap;
00019
00020
00021 class TAnalysedPulse;
00022 typedef std::vector<TAnalysedPulse*> AnalysedPulseList;
00023 typedef std::vector<const TAnalysedPulse*> ConstAnalysedPulseList;
00024 typedef std::map<IDs::source, AnalysedPulseList> SourceAnalPulseMap;
00025 typedef std::map<std::string, AnalysedPulseList> StringAnalPulseMap;
00026 typedef std::map<std::string, ConstAnalysedPulseList> StringConstAnalPulseMap;
00027
00028
00029 class TDetectorPulse;
00030 typedef std::vector<TDetectorPulse*> DetectorPulseList;
00031 typedef std::vector<const TDetectorPulse*> ConstDetectorPulseList;
00032 typedef std::map<IDs::source, DetectorPulseList> SourceDetPulseMap;
00033 typedef std::map<std::string, DetectorPulseList> StringDetPulseMap;
00034 typedef std::map<std::string, ConstDetectorPulseList> StringConstDetPulseMap;
00035
00036
00037 class TMuonEvent;
00038 typedef std::vector<TMuonEvent*> MuonEventList;
00039
00040 namespace definitions{
00043 enum { DefaultValue=-99999 };
00044 }
00045
00046 namespace Except{
00047 class Base;
00048 }
00049
00050 namespace alcap{
00051 template < typename ExceptType, typename KeyType, typename ValueType>
00052 const ValueType& at(const std::map<KeyType,ValueType>& map, const KeyType& key, const char* msg=""){
00053 typedef std::map<KeyType,ValueType> MapType;
00054 typename MapType::const_iterator it=map.find(key);
00055 if(it==map.end()) throw ExceptType(msg);
00056 return it->second;
00057 }
00058 }
00059
00060 #endif // DEFINITIONS_H_