12 #ifndef LMD_LMDSENSORALIGNMENT_PNDLMDALIGNMANAGER_H_
13 #define LMD_LMDSENSORALIGNMENT_PNDLMDALIGNMANAGER_H_
17 #include <boost/asio.hpp>
18 #include <boost/asio/io_service.hpp>
19 #include <boost/thread/mutex.hpp>
20 #include <boost/shared_ptr.hpp>
21 #include <boost/thread.hpp>
22 #include <boost/property_tree/ptree.hpp>
23 #include <boost/property_tree/json_parser.hpp>
28 #include <TGeoMatrix.h>
36 typedef std::map<int, PndLmdSensorAligner>::iterator
mapIt;
131 static void loadBar(
int current,
int total,
int resolution,
int width, std::string message =
"");
165 static int searchFiles(std::string curr_directory, std::vector<std::string> &list,
166 std::string extension =
"",
bool includeSubDirs =
true);
172 static int searchDirectories(std::string curr_directory, std::vector<std::string> &list,
173 bool includeSubDirs =
true);
174 static bool mkdir(std::string path);
176 static std::vector<std::string>
findRegex(std::string source, std::string regex);
193 void workerThread(boost::shared_ptr<boost::asio::io_service> io_service);
197 bool replaceExisting =
true);
std::vector< std::string > fileNames
bool addFile(std::string filename)
void setInCentimeters(bool inCentimeters)
void setOutFilename(const std::string &filename)
bool checkForLmdMatrixFiles()
std::map< int, bool > alignersFull
static int searchDirectories(std::string curr_directory, std::vector< std::string > &list, bool includeSubDirs=true)
void setStartAlignerWhenFull(bool value)
static int searchFiles(std::string curr_directory, std::vector< std::string > &list, std::string extension="", bool includeSubDirs=true)
void setBinaryPairFileDirectory(const std::string &binaryPairFileDirectory)
std::map< int, PndLmdSensorAligner > aligners
PndLmdAlignManager manager
std::map< int, TString > files
static bool mkdir(std::string path)
void setSingleAligner(bool singleAligner)
static Matrix castTGeoHMatrixToMatrix(const TGeoHMatrix &matrix)
static std::string makeBinaryPairFileName(int overlapId=0, bool incentimeters=true)
static std::vector< std::string > findRegex(std::string source, std::string regex)
void setZasTimestamp(bool timestamp)
std::string _matrixOutDir
bool checkForBinaryFiles()
void resetMTLB(int n, int r, int w)
static std::stringstream * readFile(std::string filename)
static void clearScreen()
static void loadBar(int current, int total, int resolution, int width, std::string message="")
static void readPairsFromChainMT(std::vector< std::string > files, std::map< int, PndLmdSensorAligner > &aligners, PndLmdAlignManager &manager)
std::string _binaryPairFileDirectory
std::map< int, PndLmdSensorAligner >::iterator mapIt
static bool writeMatrix(Matrix &mat, std::string filename)
static boost::property_tree::ptree readConfigFile(std::string filename)
void setMatrixOutDir(std::string matrixOutDir)
bool readPairsFromBinaryFiles()
static std::string makeMatrixFileName(int overlapId=0, bool incentimeters=true)
void verboseLevel(int verbose)
static bool exists(std::string file)
void verbosePrint(std::string input, int level=3)
static bool writeConfigFile(boost::property_tree::ptree configTree, std::string filename, bool replaceExisting=true)
bool writePairsToBinaryFiles()
void workerThread(boost::shared_ptr< boost::asio::io_service > io_service)
bool startAlignerWhenFull
virtual ~PndLmdAlignManager()
static Matrix readMatrix(std::string filename)
int addFilesFromDirectory(std::string directory, int maxFiles=0)
void setMaxPairs(int maxPairs)
bool addPairAndStartAligner(PndLmdHitPair &pair)
static std::vector< std::vector< double > > readFromCSVFile(std::string filename)
void alignOne(PndLmdSensorAligner &aligner)