00001 00011 #ifndef IDYBLOADTOOL 00012 #define IDYBLOADTOOL 00013 00014 #include "GaudiKernel/IAlgTool.h" 00015 #include "Event/HeaderObject.h" 00016 #include "Event/RegistrationSequence.h" // for default location 00017 00018 #include <string> 00019 #include <map> 00020 #include <vector> 00021 00022 00023 class IDybInputLoadTool : virtual public IAlgTool 00024 { 00025 public: 00026 // This is much like a RegistrationSequence except it is not aware of 00027 // any event stores. It does NO reference counting on the held 00028 // HeaderObjects. 00029 typedef std::pair<std::string,DayaBay::HeaderObject*> ExecutionFrameEntry; 00030 typedef std::vector<ExecutionFrameEntry> ExecutionFrame; 00031 00032 00033 static const InterfaceID& interfaceID(); 00034 00035 // This will return the HeaderObject at the given entry and path 00036 // in some input file or NULL on failure. If input_headers is 00037 // true it will recursively call itself in order to populate the 00038 // InputHeaders hierarchy. If fileNumber is not -1, interpret 00039 // entry as a file entry and use fileNumber to pick the right file 00040 // in the intput stream. 00041 00042 // No attempt will be made to reuse the same HeaderObject if it 00043 // happens to be in more than one inputHeaders list. The caller 00044 // can resolve duplicates by looking at the HeaderObject's 00045 // execNumber. 00046 00047 virtual DayaBay::HeaderObject* 00048 get_header(int entry, const std::string& path, 00049 bool input_headers = true, int fileNumber = -1) = 0; 00050 00051 00052 // This will return an ExecutionFrame based on the 00053 // PerRegistrationSequence found at the given entry and path or 00054 // empty vector on failure. If input_headers is true it behaves 00055 // like get_header(), otherwise, inputHeaders will only be 00056 // populated with HeadersObjects found in the immediate frame. 00057 00058 virtual ExecutionFrame 00059 get_frame(int entry, const std::string& path = 00060 DayaBay::RegistrationSequenceLocation::Default, 00061 bool input_headers = true) = 0; 00062 00063 // Return the number of entries in a certain location 00064 // -1 in case path not found 00065 virtual int 00066 get_entries(const std::string& path) = 0; 00067 00068 protected: 00069 00070 virtual ~IDybInputLoadTool(); 00071 00072 }; 00073 00074 #endif // IDYBLOADTOOL