Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
CompressionMap.h
1/*
2 * CompressionMap.h
3 *
4 * Created on: 10 wrz 2022
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9#ifndef HAL_FEATURES_COMPRESSIONMAP_H_
10#define HAL_FEATURES_COMPRESSIONMAP_H_
11
12#include <TObject.h>
16namespace Hal {
17
18 class CompressionMap : public TObject {
19 Int_t fSize;
20 Int_t fAllocatedSize;
21 Int_t fCounter;
22 Int_t* fOldToNewIndex; //[fAllocatedSize]
23 Int_t* fNewToOldIndex; //[fAllocatedSize]
24 void CheckSize(Int_t size);
25
26 public:
33 void Reset(Int_t size);
38 inline void MarkAsGood(Int_t old_index) { fOldToNewIndex[old_index] = 0; }
42 void Recalculate();
48 inline Int_t GetNewIndex(Int_t old_index) const { return fOldToNewIndex[old_index]; }
54 inline Int_t GetOldIndex(Int_t new_index) const { return fNewToOldIndex[new_index]; }
59 inline Int_t GetSize() const { return fSize; }
64 inline Int_t GetNewSize() const { return fCounter; }
65 virtual ~CompressionMap();
66 ClassDef(CompressionMap, 1)
67 };
68
69} /* namespace Hal */
70
71#endif /* HAL_FEATURES_COMPRESSIONMAP_H_ */
Int_t GetNewIndex(Int_t old_index) const
void MarkAsGood(Int_t old_index)
void Reset(Int_t size)
Int_t GetOldIndex(Int_t new_index) const
Int_t GetSize() const
Int_t GetNewSize() const