25 #ifndef SRC_XRDEC_XRDECREADER_HH_
26 #define SRC_XRDEC_XRDECREADER_HH_
34 #include <unordered_map>
35 #include <unordered_set>
60 friend class ::MicroTest;
61 friend class ::XrdEcTests;
71 Reader(
ObjCfg &objcfg ) : objcfg( objcfg ), lstblk( 0 ), filesize( 0 )
95 void Read( uint64_t offset,
165 void AddMissing(
const buffer_t &cdbuff );
170 bool IsMissing(
const std::string &fn );
172 inline static callback_t ErrorCorrected(
Reader *reader, std::shared_ptr<block_t> &
self,
size_t blkid,
size_t strpid);
174 void MissingVectorRead(std::shared_ptr<block_t> &block,
size_t blkid,
size_t strpid, uint16_t timeout = 0);
176 typedef std::unordered_map<std::string, std::shared_ptr<XrdCl::ZipArchive>> dataarchs_t;
177 typedef std::unordered_map<std::string, buffer_t> metadata_t;
178 typedef std::unordered_map<std::string, std::string> urlmap_t;
179 typedef std::unordered_set<std::string> missing_t;
182 dataarchs_t dataarchs;
186 std::shared_ptr<block_t> block;
190 std::map<std::string, size_t> archiveIndices;
192 std::mutex missingChunksMutex;
193 std::vector<std::tuple<size_t, size_t>> missingChunksVectorRead;
194 std::condition_variable waitMissing;
Handle an async response.
void Close(XrdCl::ResponseHandler *handler, uint16_t timeout=0)
Close the data object.
void Read(uint64_t offset, uint32_t length, void *buffer, XrdCl::ResponseHandler *handler, uint16_t timeout)
void Open(XrdCl::ResponseHandler *handler, uint16_t timeout=0)
void VectorRead(const XrdCl::ChunkList &chunks, void *buffer, XrdCl::ResponseHandler *handler, uint16_t timeout)
std::vector< ChunkInfo > ChunkList
List of chunks.
std::function< void(const XrdCl::XRootDStatus &, uint32_t)> callback_t
std::vector< char > buffer_t
a buffer type
Describe a data chunk for vector read.