FairRoot/PandaRoot
MvdTestBeam/Tools/mrftools.h
Go to the documentation of this file.
1 /*============================================================*/
2 /* mrftools.h */
3 /* Toolbox */
4 /* M.C. Mertens */
5 /*============================================================*/
6 
7 
8 #ifndef __MRFTOOLS_H__
9 #define __MRFTOOLS_H__
10 
11 //#include <sys/types.h>
12 #include <map>
13 #include <string>
14 #include "mrf_confitem.h"
15 
17 namespace mrftools {
18 
20 
25 bool getIntBit(const UInt_t& position, const UInt_t& value);
26 
28 
33 void setIntBit(const UInt_t& position, UInt_t& value, const bool& state);
34 
36 
41 UInt_t shiftBy(const int& positions, const UInt_t& value);
42 
43 unsigned int getIteratorItemCount(const std::map<std::string, TConfItem>::const_iterator& start, const std::map<std::string, TConfItem>::const_iterator& stop);
44 unsigned int getIteratorItemCount(const std::map<std::string, std::map<std::string, TConfItem> >::const_iterator& start, const std::map<std::string, std::map<std::string, TConfItem> >::const_iterator& stop);
45 
46 
48 
53 UInt_t grayToBin(UInt_t gray);
54 
55 }
56 
57 #endif // __MRFTOOLS_H__
58 
PndTransMap * map
Definition: sim_emc_apd.C:99
UInt_t shiftBy(const int &positions, const UInt_t &value)
Shifts the bits in an integer value.
UInt_t grayToBin(UInt_t gray)
Converts gray encoded values to bianry values.
bool getIntBit(const UInt_t &position, const UInt_t &value)
Retrieves a single bit from an integer value.
void setIntBit(const UInt_t &position, UInt_t &value, const bool &state)
Sets a single bit in an integer value.
unsigned int getIteratorItemCount(const std::map< std::string, TConfItem >::const_iterator &start, const std::map< std::string, TConfItem >::const_iterator &stop)