// edm_event.h #ifndef INCLUDED_EDM_EVENT #define INCLUDED_EDM_EVENT // PURPOSE // Provide a repository of all data related to a given particle collision. // // CLASSES // edm_Event: Protocol describing event data repository. // edm_ChunkIter: Protocol describing a read-only iterator that provides // sequential access to the data chunks of an event. // // DESCRIPTION // This component describes the protocol for the event data repository. The // combination of keys and handles are used to retrieve chunks from the event // object. // // More comments need to go here! class edm_Chunk; class edm_Key; class edm_ConstKey; // =============== // CLASS edm_Event // =============== class edm_Event { public: // CREATORS virtual ~edm_Event(); // MANIPULATORS virtual int addChunk(edm_Chunk *chunk) = 0; // Add the specified data chunk to this event and return 0 on success; // else return 1 if chunk is not valid. // NOTE: The chunk will now be owned and managed by this event object. // ACCESSORS virtual bool getChunk(edm_Key *key) = 0; virutal bool const edm_Chunk* getChunk(edm_ConstKey *key) const = 0; // Return the data chunk specfied by key if found; else return 0. }; // =================== // CLASS edm_ChunkIter // =================== class edm_ChunkIter { public: // CREATORS virtual ~edm_ChunkIter(); // MANIPULATORS virtual void operator++() = 0; // Advance to the next data chunk. // The behavior is undefined if the iteration state is not valid. // ACCESSORS virtual operator const void *() const = 0; // Return non-zero if iterator is valid; else 0; virtual const edm_Chunk& operator()() const = 0; // Return the current data chunk. // The behavior is undefined if the iteration state is not valid. }; #endif