FEDRA emulsion software from the OPERA Collaboration
|
scanned data processing More...
#include <EdbScanProc.h>
Public Member Functions | |
bool | AddAFFtoScanSet (EdbScanSet &sc, EdbID id1, EdbID id2) |
bool | AddAFFtoScanSet (EdbScanSet &sc, int b1, int p1, int s1, int e1, int b2, int p2, int s2, int e2) |
bool | AddAFFtoScanSet (EdbScanSet &sc, int id1[4], int id2[4]) |
bool | AddParLine (const char *file, const char *line, bool recreate=false) |
int | Align (EdbID id1, EdbID id2, const char *option="") |
int | Align (int id1[4], int id2[4], const char *option="") |
int | AlignAll (EdbID id1, EdbID id2, int npre=1, int nfull=3, const char *opt="-z") |
int | AlignAll (int id1[4], int id2[4], int npre=1, int nfull=3, const char *opt="-z") |
int | AlignNewNopar (EdbID id1, EdbID id2, TEnv &cenv, EdbAffine2D *aff=0, float dz=0) |
void | AlignOverlaps (EdbID id, EdbPattern &p1, EdbPattern &p2, TEnv &cenv, const char *suff) |
int | AlignRaw (EdbID id1, EdbID id2, TEnv &cenv, EdbAffine2D *applyAff=0) |
void | AlignRawSet (EdbID id1, EdbID id2, TEnv &cenv) |
void | AlignSet (EdbID id, int npre, int nfull, const char *opt="-z") |
int | AlignSet (EdbScanSet &sc, int npre=1, int nfull=3, const char *opt="-z") |
void | AlignSetNewNopar (EdbID id, TEnv &cenv) |
int | AlignSetNewNopar (EdbScanSet &sc, TEnv &cenv) |
bool | ApplyAffZ (EdbPattern &pat, int id1[4], int id2[4]) |
int | AssembleScanSet (EdbScanSet &ss) |
char * | BrickDir (int brick) |
bool | CheckAFFDir (int brick, bool create=true) |
bool | CheckBrickDir (EdbID id, bool create=true) |
bool | CheckDir (const char *dir, bool create=true) |
bool | CheckDirWritable (const char *dir) |
void | CheckFiles (EdbScanSet &sc, const char *suffix) |
bool | CheckPlateDir (EdbID id, bool create=true) |
bool | CheckProcDir (EdbID id, bool create=true) |
bool | CheckProcDir (int id[4], bool create=true) |
void | CheckRunQualityRaw (EdbID idss) |
void | CheckSetQualityRaw (EdbID idss) |
void | CheckViewOverlaps (EdbID id, TEnv &cenv) |
int | ConvertAreas (EdbScanClient &scan, int id[4], int flag=-1, const char *opt="NOCLCLFRAMESUM") |
int | CopyAFFPar (int id1c[4], int id2c[4], int id1p[4], int id2p[4], bool overwrite=true) |
int | CopyFile (int id1[4], int id2[4], const char *suffix, bool overwrite) |
int | CopyPar (EdbID id1, EdbID id2, bool overwrite=true) |
int | CopyPar (int id1[4], int id2[4], bool overwrite=true) |
void | CopyParSet (EdbID idset1, EdbID idset2) |
int | CopyPred (int id1[4], int id2[4], bool overwrite=true) |
bool | CorrectAffWithPred (int id1[4], int id2[4], const char *opt="-z", int patmin=6, const char *parfile="fullalignment") |
int | CorrectAngles (int id[4]) |
bool | CorrectPredWithFound (int id1[4], int id2[4], const char *opt="-z", int patmin=6) |
EdbScanProc () | |
void | ExtractRawVolume (EdbID id, EdbID idnew, EdbSegP pred, int plate, TEnv &cenv) |
void | ExtractRawVolume (EdbScanSet &ss, EdbScanSet &ssnew, EdbSegP &pred, float dR) |
int | FindCompliments (EdbSegP &s, EdbPattern &pat, TObjArray &found, float chi2max, TArrayF &chiarr) |
int | FindPredictions (EdbPattern &pred, int id[4], EdbPattern &found, int maxholes=3) |
int | FindPredictions (int id[4], int flag=-1, int maxholes=3) |
int | FindPredictionsRaw (EdbID idp, EdbID idr) |
int | FindPredictionsRaw (EdbPattern &pred, EdbPattern &found, EdbRunAccess &ra, EdbScanCond &condBT, EdbScanCond &condMT, float delta_theta=0.1, float puls_min=5., float puls_mt=9., float chi2max=1.6, FILE *out=0) |
int | FindPredictionsRawSet (EdbID idp, EdbScanSet &ss, int npl) |
int | FindRawTrack (EdbTrackP &pred, EdbTrackP &found, EdbID idset, int plate) |
int | FindRawTrack (EdbTrackP &pred, EdbTrackP &found, EdbID idset, int plate, TEnv &cenv) |
bool | FlashRawDir (EdbScanClient &scan, int id[4]) |
bool | GetAffZ (EdbAffine2D &aff, float &z, int id1[4], int id2[4]) |
bool | GetMap (int brick, TString &map) |
void | GetPatternSide (EdbID id, int side, EdbLayer &la, const char *segcut, int afid, EdbPattern &p) |
const char * | GetServerRunName () const |
bool | InitPiece (EdbDataPiece &piece, EdbID id) |
bool | InitPiece (EdbDataPiece &piece, int id[4]) |
EdbRun * | InitRun (int id[4], char *runname_=NULL, char *runnamesrv_=NULL, bool createrun_=true) |
bool | InitRunAccess (EdbRunAccess &ra, EdbID id, bool do_update=false) |
bool | InitRunAccess (EdbRunAccess &ra, int id[4], bool do_update=false) |
bool | InitRunAccessNew (EdbRunAccess &ra, EdbID id, EdbPlateP &plate, bool do_update=false) |
bool | InitRunAccessNew (EdbRunAccess &ra, EdbID idset, int idplate, bool do_update=false) |
int | LinkRun (int id[4], int noUpdate=1) |
int | LinkRunAll (EdbID id, int npre=3, int nfull=1, int correct_ang=1) |
int | LinkRunAll (int id[4], int npre=3, int nfull=1, int correct_ang=1) |
void | LinkRunNew (EdbID id, EdbPlateP &plate, TEnv &cenv) |
void | LinkRunTest (EdbID id, EdbPlateP &plate, TEnv &cenv) |
int | LinkSet (EdbScanSet &sc, int npre=3, int nfull=1, int correct_ang=1) |
void | LinkSetNew (EdbScanSet &sc, TEnv &cenv) |
void | LinkSetNewTest (EdbScanSet &sc, TEnv &cenv) |
int | LoadPlate (EdbScanClient &scan, int id[4], int attempts=1) |
void | LogPrint (int brick, int level, const char *rout, const char *msgfmt,...) |
void | MakeAffName (TString &s, EdbID id1, EdbID id2, const char *suffix="aff.par") |
void | MakeAffName (TString &s, int id1[4], int id2[4], const char *suffix="aff.par") |
bool | MakeAFFSet (EdbScanSet &sc) |
void | MakeAlignSetSummary (EdbID id) |
void | MakeAlignSetSummary (EdbID id1, EdbID id2, const char *fout, const char *opt="UPDATE") |
void | MakeEraseFile (EdbID id, EdbPattern &pat) |
void | MakeFileName (TString &s, EdbID id, const char *suffix, bool inplate=true) |
void | MakeFileName (TString &s, int id[4], const char *suffix, bool inplate=true) |
void | MakeFileNameSrv (TString &s, EdbID id, const char *suffix, bool inplate=true) |
void | MakeFileNameSrv (TString &s, int id[4], const char *suffix, bool inplate=true) |
bool | MakeInPar (EdbID id, const char *option) |
bool | MakeInPar (int id[4], const char *option) |
void | MakeInParSet (EdbID id, const char *option) |
void | MakeLinkSetSummary (EdbID id) |
bool | MakeParSet (EdbScanSet &sc) |
void | MakeScannedIDList (EdbID id0, EdbScanSet &sc, int pl_from, int pl_to, const char *suffix) |
int | MakeTracksPred (TObjArray &tracks, EdbID id, EdbLayer &layer) |
void | MergeSetSBT (EdbID id) |
void | MergeSetSBT (EdbID id, EdbScanSet &ss) |
void | OptimizeScanPath (EdbPattern &pin, EdbPattern &pout, int brick) |
bool | PrepareSetStructure (EdbScanSet &sc) |
void | PrepareVolumesPred (int id[4], EdbPattern &points, int before=5, int after=5, int pmin=1, int pmax=57, EdbScanSet *sc=0) |
void | Print () |
bool | ProjectFound (EdbID id1, EdbID id2) |
bool | ProjectFound (int id1[4], int id2[4]) |
bool | ReadAffToLayer (EdbLayer &la, EdbID id1, EdbID id2) |
EdbMask * | ReadEraseMask (EdbID id) |
int | ReadFound (EdbPattern &pred, EdbID id, int flag=-1) |
int | ReadFound (EdbPattern &pred, int id[4], int flag=-1) |
int | ReadFoundSegment (EdbID id, EdbSegP &s, int flag=-1) |
int | ReadFoundTrack (EdbScanSet &ss, EdbTrackP &track, int flag=-1) |
int | ReadFoundTracks (EdbScanSet &ss, EdbPVRec &ali, int flag=-1) |
int | ReadManFoundTracks (EdbScanSet &ss, EdbPVRec &ali, int flag=-1) |
int | ReadMarksSet (EdbMarksSet &ms, int brick, const char *filename, char spacer='_', char shape='S') |
int | ReadPatCP (EdbPattern &pat, EdbID id, TCut c="1") |
int | ReadPatCP (EdbPattern &pat, int id[4], TCut c="1") |
int | ReadPatCPnopar (EdbPattern &pat, const char *file, TCut cut="1", EdbMask *erase_mask=0, bool read_mt=false) |
int | ReadPatCPnopar (EdbPattern &pat, EdbID id, TCut cut="1", bool do_erase=false, bool read_mt=false) |
int | ReadPatRoot (EdbPattern &pred, int id[4], const char *suffix, int flag=-1) |
int | ReadPatTXT (const char *file, EdbPattern &pred, int flag=-1) |
int | ReadPatTXT (EdbPattern &pred, EdbID id, const char *suffix, int flag=-1) |
int | ReadPatTXT (EdbPattern &pred, int id[4], const char *suffix, int flag=-1) |
int | ReadPiece (EdbDataPiece &piece, EdbPattern &pat) |
bool | ReadPiecePar (EdbID id, EdbPlateP &plate) |
int | ReadPred (EdbPattern &pred, EdbID id, int flag=-1) |
int | ReadPred (EdbPattern &pred, int id[4], int flag=-1) |
TObjArray * | ReadSBTracks (EdbID id) |
EdbScanSet * | ReadScanSet (EdbID id) |
int | ReadScanSetCP (EdbID id, EdbPVRec &ali, TCut c="1", bool do_erase=true, bool do_assemble=true, int minplate=-1000, int maxplate=-1000) |
int | ReadScanSetCP (EdbScanSet &ss, EdbPVRec &ali, TCut c="1", bool do_erase=true, int minplate=-1000, int maxplate=-1000) |
EdbScanSet * | ReadScanSetGlobal (EdbID id, bool x_marks) |
int | ReadTracksTree (const char *name, EdbPVRec &ali, TCut cut="1") |
int | ReadTracksTree (EdbID id, EdbPVRec &ali, TCut cut="1") |
void | ReadUncorrectedBTforFoundTracks (EdbPVRec &ali) |
int | RemoveDublets (EdbPattern &pin, EdbPattern &pout, int brick) |
int | RemoveFile (EdbID id, const char *suffix) |
int | ScanAreas (EdbScanClient::ScanType st, EdbScanClient &scan, EdbPattern &pred, int id[4], const char *opt="NOCLCLFRAMESUM") |
int | ScanAreas (EdbScanClient::ScanType st, EdbScanClient &scan, int id[4], int flag=-1, const char *opt="NOCLCLFRAMESUM") |
bool | SetAFF0 (int id1[4], int id2[4]) |
bool | SetAFFDZ (int id1[4], int id2[4], float dz) |
void | SetDefaultCondBT (EdbScanCond &cond) |
void | SetDefaultCondMT (EdbScanCond &cond) |
void | SetServerRunName (const char *fname_) |
int | TestAl (const char *cpfile1, const char *cpfile2, TCut &cut, float dz, EdbAffine2D *aff=0) |
int | TestAl (EdbID id1, EdbID id2) |
int | TestAl (EdbPattern &p1, EdbPattern &p2) |
int | TestAl (int id1[4], int id2[4]) |
int | TrackSetBT (EdbScanSet &sc, TEnv &cenv) |
bool | UpdateAFFPar (EdbID id1, EdbID id2, EdbLayer &l, EdbAffine2D *aff0=0) |
void | UpdateAlignSummaryTree (EdbID idset1, EdbID idset2, TTree &tree) |
bool | UpdatePlatePar (EdbID id, EdbLayer &l) |
void | UpdateSetWithAff (EdbID id, EdbID id1, EdbID id2) |
void | UpdateSetWithAff (EdbID id, EdbID idu) |
void | UpdateSetWithAff (EdbID idset, EdbAffine2D aff) |
void | UpdateSetWithPlatePar (EdbID id) |
void | UpdateSetWithPlatePar (EdbScanSet &ss) |
bool | WaitFileReady (const char *fname_) |
int | WriteFound (EdbPattern &found, EdbID id, int flag=-1) |
int | WriteFound (EdbPattern &pred, int id[4], int flag=-1) |
int | WriteMarksSet (EdbMarksSet &ms, int brick, const char *filename, char spacer='_', char shape='S', int plate=1) |
int | WritePatRoot (EdbPattern &pred, int id[4], const char *suffix, int flag=-1) |
int | WritePatTXT (EdbPattern &pred, EdbID id, const char *suffix, int flag=-1) |
int | WritePatTXT (EdbPattern &pred, int id[4], const char *suffix, int flag=-1) |
int | WritePred (EdbPattern &pred, EdbID id, int flag=-1) |
int | WritePred (EdbPattern &pred, int id[4], int flag=-1) |
int | WriteSBcndTXT (int id[4], const char *suffix="man.sbt.txt") |
int | WriteSBTrack (EdbTrackP &t, int path, EdbID id) |
int | WriteSBTracks (TObjArray &tracks, EdbID id) |
int | WriteScanSet (EdbID id, EdbScanSet &ss) |
virtual | ~EdbScanProc () |
Public Attributes | |
TString | eParDir |
directory path for off-line processing parameters More... | |
TString | eProcDirClient |
directory path for root data More... | |
TString | eProcDirServer |
directory path for root data More... | |
Private Attributes | |
TString | eServerCreatedRunName |
EdbRun file name that is created by scanserver side. More... | |
scanned data processing
EdbScanProc::EdbScanProc | ( | ) |
|
inlinevirtual |
bool EdbScanProc::AddAFFtoScanSet | ( | EdbScanSet & | sc, |
EdbID | id1, | ||
EdbID | id2 | ||
) |
bool EdbScanProc::AddAFFtoScanSet | ( | EdbScanSet & | sc, |
int | b1, | ||
int | p1, | ||
int | s1, | ||
int | e1, | ||
int | b2, | ||
int | p2, | ||
int | s2, | ||
int | e2 | ||
) |
bool EdbScanProc::AddAFFtoScanSet | ( | EdbScanSet & | sc, |
int | id1[4], | ||
int | id2[4] | ||
) |
read affine tranformation from file, form "plate", add "plate" to EdbScanSet:ePC
bool EdbScanProc::AddParLine | ( | const char * | file, |
const char * | line, | ||
bool | recreate = false |
||
) |
add string to par file
int EdbScanProc::Align | ( | int | id1[4], |
int | id2[4], | ||
const char * | option = "" |
||
) |
Align 2 patterns, assumed that already exists file x.x.x.x_y.y.y.y.aff.par with deltaZ inside.
Convension about Z(setted while process): the z of id2 is 0, the z of id1 is (-deltaZ) where
deltaZ readed from aff.par file in a way that pattern of id1 projected
to deltaZ correspond to pattern of id2
int EdbScanProc::AlignAll | ( | int | id1[4], |
int | id2[4], | ||
int | npre = 1 , |
||
int | nfull = 3 , |
||
const char * | opt = "-z" |
||
) |
int EdbScanProc::AlignNewNopar | ( | EdbID | id1, |
EdbID | id2, | ||
TEnv & | cenv, | ||
EdbAffine2D * | aff = 0 , |
||
float | dz = 0 |
||
) |
Align 2 patterns. All necessary information should be in the envfile
Convension about Z(setted while process): the z of id2 is 0, the z of id1 is (-deltaZ) where deltaZ readed from aff.par file in a way that pattern of id1 projected to deltaZ correspond to pattern of id2
void EdbScanProc::AlignOverlaps | ( | EdbID | id, |
EdbPattern & | p1, | ||
EdbPattern & | p2, | ||
TEnv & | cenv, | ||
const char * | suff | ||
) |
int EdbScanProc::AlignRaw | ( | EdbID | id1, |
EdbID | id2, | ||
TEnv & | cenv, | ||
EdbAffine2D * | applyAff = 0 |
||
) |
Align raw segments patterns. Typical application: align 2 different scannings of the same emulsion plate.
assuming that exist the scan sets for idset1 and idset2
for each plate do the alignment raw from 1 to 2 and write id1_id2.aff.par
int EdbScanProc::AlignSet | ( | EdbScanSet & | sc, |
int | npre = 1 , |
||
int | nfull = 3 , |
||
const char * | opt = "-z" |
||
) |
int EdbScanProc::AlignSetNewNopar | ( | EdbScanSet & | sc, |
TEnv & | cenv | ||
) |
bool EdbScanProc::ApplyAffZ | ( | EdbPattern & | pat, |
int | id1[4], | ||
int | id2[4] | ||
) |
read affine transformations and deltaZ from x.x.x.x_y.y.y.y.aff.par and apply it to pat
int EdbScanProc::AssembleScanSet | ( | EdbScanSet & | ss | ) |
char * EdbScanProc::BrickDir | ( | int | brick | ) |
bool EdbScanProc::CheckAFFDir | ( | int | brick, |
bool | create = true |
||
) |
return true if dir ../bXXXXXX/AFF is exists, if create==true (default) create it if necessary
bool EdbScanProc::CheckBrickDir | ( | EdbID | id, |
bool | create = true |
||
) |
return true if dir ../bXXXXXX exist, if create==true (default) create it if necessary
bool EdbScanProc::CheckDir | ( | const char * | dir, |
bool | create = true |
||
) |
check the existance of the directory dir
if do not exist and create==true (default) - create it
return true if the directory exists or succesfully created
bool EdbScanProc::CheckDirWritable | ( | const char * | dir | ) |
void EdbScanProc::CheckFiles | ( | EdbScanSet & | sc, |
const char * | suffix | ||
) |
bool EdbScanProc::CheckPlateDir | ( | EdbID | id, |
bool | create = true |
||
) |
return true if dir ../bXXXXXX/pXXX exist, if create==true (default) create it if necessary
|
inline |
bool EdbScanProc::CheckProcDir | ( | int | id[4], |
bool | create = true |
||
) |
return true if dir ../bXXXXXX/pXXX exist, if create==true (default) create it if necessary
int EdbScanProc::ConvertAreas | ( | EdbScanClient & | scan, |
int | id[4], | ||
int | flag = -1 , |
||
const char * | opt = "NOCLCLFRAMESUM" |
||
) |
can be called separately in case of missed conversion
int EdbScanProc::CopyAFFPar | ( | int | id1c[4], |
int | id2c[4], | ||
int | id1p[4], | ||
int | id2p[4], | ||
bool | overwrite = true |
||
) |
copy AFF/xc_yc.par to AFF/xp_yp.par
int EdbScanProc::CopyFile | ( | int | id1[4], |
int | id2[4], | ||
const char * | suffix, | ||
bool | overwrite | ||
) |
copy piece file from id1 to id2
|
inline |
assuming that exist the scan sets for idset1 and idset2
copy the plate par files with shrinkage corrections from 1 to 2
|
inline |
bool EdbScanProc::CorrectAffWithPred | ( | int | id1[4], |
int | id2[4], | ||
const char * | opt = "-z" , |
||
int | patmin = 6 , |
||
const char * | parfile = "fullalignment" |
||
) |
take p1.found.root, apply AFF/p1_p2.par, align to p2 and update AFF/p1_p2.par
int EdbScanProc::CorrectAngles | ( | int | id[4] | ) |
bool EdbScanProc::CorrectPredWithFound | ( | int | id1[4], |
int | id2[4], | ||
const char * | opt = "-z" , |
||
int | patmin = 6 |
||
) |
take p1.found.root, apply AFF/p1_p2.par, read p2.found.root, align and update AFF/p1_p2.par
from EdbScanSet id extract volume around pred and save into idnew
Note: the z of pred is assumed to be the z of plate in this function
void EdbScanProc::ExtractRawVolume | ( | EdbScanSet & | ss, |
EdbScanSet & | ssnew, | ||
EdbSegP & | pred, | ||
float | dR | ||
) |
from EdbScanSet ss extract volume for plates defined in ssnew around pred with dR
int EdbScanProc::FindCompliments | ( | EdbSegP & | s, |
EdbPattern & | pat, | ||
TObjArray & | found, | ||
float | chi2max, | ||
TArrayF & | chiarr | ||
) |
return found sorted by increasing chi2
int EdbScanProc::FindPredictions | ( | EdbPattern & | pred, |
int | id[4], | ||
EdbPattern & | found, | ||
int | maxholes = 3 |
||
) |
find predictions pred in couples tree of id and prepare pattern "found"
assumed that pred are transformed and projected into the coord system of id
Input: pred - pattern with predictions
id - the data piece to be processed
maxholes - the maximum number of holes (missed segments) for doing extrapolation
Output: found - pattern with found tracks
x.x.x.x.found.txt summary file with all candidats
Probably obsolete function - to investigate if it in use now - in most
of cases it can be substituted by EdbRunTracking::FindPredictions (VT, AC)
int EdbScanProc::FindPredictions | ( | int | id[4], |
int | flag = -1 , |
||
int | maxholes = 3 |
||
) |
find predictions of yp.yp.yp.yp.pred.root in yp.yp.yp.yp.cp.root and produce yp.yp.yp.yp.found.root
flag: -1 - all predictions
0 - only found in the previous plate (no holes)
1 - 1 holes before
2 - 2 holes before
3 - 3 holes before
find raw microtracks for the predictions of idp in raw data of idr
Input: idp.pred.root, idr.raw.root
Output: idp.found.root, idp.found.raw.txt
int EdbScanProc::FindPredictionsRaw | ( | EdbPattern & | pred, |
EdbPattern & | found, | ||
EdbRunAccess & | ra, | ||
EdbScanCond & | condBT, | ||
EdbScanCond & | condMT, | ||
float | delta_theta = 0.1 , |
||
float | puls_min = 5. , |
||
float | puls_mt = 9. , |
||
float | chi2max = 1.6 , |
||
FILE * | out = 0 |
||
) |
find raw microtracks for the predictions "pred" in run "ra"
Input: pred,ra
Output: fnd - basetracks with position taken from the best microtrack (if any) and the angle of the predicted basetrack
int EdbScanProc::FindPredictionsRawSet | ( | EdbID | idp, |
EdbScanSet & | ss, | ||
int | npl | ||
) |
found segments will be added to track tr
int EdbScanProc::FindRawTrack | ( | EdbTrackP & | pred, |
EdbTrackP & | found, | ||
EdbID | idset, | ||
int | plate, | ||
TEnv & | cenv | ||
) |
found segments will be added to track tr
bool EdbScanProc::FlashRawDir | ( | EdbScanClient & | scan, |
int | id[4] | ||
) |
move all rwc and rwd files from the raw scanning directory into the new subdir
bool EdbScanProc::GetAffZ | ( | EdbAffine2D & | aff, |
float & | z, | ||
int | id1[4], | ||
int | id2[4] | ||
) |
read affine transformations and deltaZ from x.x.x.x_y.y.y.y.aff.par
bool EdbScanProc::GetMap | ( | int | brick, |
TString & | map | ||
) |
get map string from the map file of this brick : .../bXXXXXX/bXXXXXX.map
void EdbScanProc::GetPatternSide | ( | EdbID | id, |
int | side, | ||
EdbLayer & | la, | ||
const char * | segcut, | ||
int | afid, | ||
EdbPattern & | p | ||
) |
const char * EdbScanProc::GetServerRunName | ( | ) | const |
|
inline |
bool EdbScanProc::InitPiece | ( | EdbDataPiece & | piece, |
int | id[4] | ||
) |
set raw, cp and par for the piece according to id
EdbRun * EdbScanProc::InitRun | ( | int | id[4], |
char * | runname_ = NULL , |
||
char * | runnamesrv_ = NULL , |
||
bool | createrun_ = true |
||
) |
create new run file as eProcDirClient/bXXXXXX/pYYY/x.y.s.p.raw.root
|
inline |
bool EdbScanProc::InitRunAccess | ( | EdbRunAccess & | ra, |
int | id[4], | ||
bool | do_update = false |
||
) |
initialize the EdbRunAccess object useful for the raw data handling
bool EdbScanProc::InitRunAccessNew | ( | EdbRunAccess & | ra, |
EdbID | id, | ||
EdbPlateP & | plate, | ||
bool | do_update = false |
||
) |
use only scanset file (no *.par)
before this function one should define variables:
r.eInvertSides (default is 0 - no invert)
after:
r.eAFID (default is 1 - use view aff)
r.AddSegmentCut(...) , etc
bool EdbScanProc::InitRunAccessNew | ( | EdbRunAccess & | ra, |
EdbID | idset, | ||
int | idplate, | ||
bool | do_update = false |
||
) |
int EdbScanProc::LinkRun | ( | int | id[4], |
int | noUpdate = 1 |
||
) |
the x.x.x.x.in.par file must be prepared before
|
inline |
int EdbScanProc::LinkRunAll | ( | int | id[4], |
int | npre = 3 , |
||
int | nfull = 1 , |
||
int | correct_ang = 1 |
||
) |
int EdbScanProc::LinkSet | ( | EdbScanSet & | sc, |
int | npre = 3 , |
||
int | nfull = 1 , |
||
int | correct_ang = 1 |
||
) |
void EdbScanProc::LinkSetNew | ( | EdbScanSet & | sc, |
TEnv & | cenv | ||
) |
void EdbScanProc::LinkSetNewTest | ( | EdbScanSet & | sc, |
TEnv & | cenv | ||
) |
int EdbScanProc::LoadPlate | ( | EdbScanClient & | scan, |
int | id[4], | ||
int | attempts = 1 |
||
) |
void EdbScanProc::LogPrint | ( | int | brick, |
int | level, | ||
const char * | rout, | ||
const char * | msgfmt, | ||
... | |||
) |
Print message to the logfile and to stdout.
|
inline |
void EdbScanProc::MakeAffName | ( | TString & | s, |
int | id1[4], | ||
int | id2[4], | ||
const char * | suffix = "aff.par" |
||
) |
make affine file name as ../bXXXXXX/AFF/a.a.a.a_b.b.b.b.aff.par
bool EdbScanProc::MakeAFFSet | ( | EdbScanSet & | sc | ) |
create AFF dir if do not exist
put all affine transformations inside for each plates couple
assuming that exist the scan sets for idset
read id.n_id.n+1.aff.par and make a summary tree
void EdbScanProc::MakeAlignSetSummary | ( | EdbID | id1, |
EdbID | id2, | ||
const char * | fout, | ||
const char * | opt = "UPDATE" |
||
) |
assuming that exist the scan sets for idset1 and idset2
read id1_id2.aff.par and make a summary tree
void EdbScanProc::MakeEraseFile | ( | EdbID | id, |
EdbPattern & | pat | ||
) |
input: pat with the segments to be erased - assumed that s.eVid[1] is the entry number in the couples tree
ouput: file id.er.root with the EdbMask object "mask" inside
|
inline |
void EdbScanProc::MakeFileName | ( | TString & | s, |
int | id[4], | ||
const char * | suffix, | ||
bool | inplate = true |
||
) |
make file pathname as .../bXXXXXX/pYYY/a.a.a.a.suffix if inplate==true
otherwise as .../bXXXXXX/a.a.a.a.suffix
|
inline |
void EdbScanProc::MakeFileNameSrv | ( | TString & | s, |
int | id[4], | ||
const char * | suffix, | ||
bool | inplate = true |
||
) |
make file pathname as .../bXXXXXX/pYYY/a.a.a.a.suffix if inplate==true
otherwise as .../bXXXXXX/a.a.a.a.suffix
|
inline |
bool EdbScanProc::MakeInPar | ( | int | id[4], |
const char * | option | ||
) |
prepare x.x.x.x.in.par file for the process defined in the option string
assuming that exist the scan sets for idset
read id.n_id.n+1.aff.par and make a summary tree
bool EdbScanProc::MakeParSet | ( | EdbScanSet & | sc | ) |
void EdbScanProc::MakeScannedIDList | ( | EdbID | id0, |
EdbScanSet & | sc, | ||
int | pl_from, | ||
int | pl_to, | ||
const char * | suffix | ||
) |
check in all directories from pl_from to pl_to for a files with versions defined in id0 and the given suffix
if found - add EdbID the scan set
Extrapolate each track of array tracks to layer.Z(), apply layer.Aff() and prepare id.pred.root
void EdbScanProc::MergeSetSBT | ( | EdbID | id, |
EdbScanSet & | ss | ||
) |
void EdbScanProc::OptimizeScanPath | ( | EdbPattern & | pin, |
EdbPattern & | pout, | ||
int | brick | ||
) |
input: pin - predictions pattern
output: pout - predictions pattern with optimized path (should be empty at the beginning)
bool EdbScanProc::PrepareSetStructure | ( | EdbScanSet & | sc | ) |
input: sc with brick and all id's defined
function -check or create the directory structure for this brick, -create par-files for all plates -create aff.par files for all couples in the defined order
void EdbScanProc::PrepareVolumesPred | ( | int | id[4], |
EdbPattern & | points, | ||
int | before = 5 , |
||
int | after = 5 , |
||
int | pmin = 1 , |
||
int | pmax = 57 , |
||
EdbScanSet * | sc = 0 |
||
) |
Create prediction patterns for the stopping points in the segments of the pattern "points".
For each point should be correctly defined (eID ePID eX eY eSX eSY).
Input: idIN - identifier for predictions to be created
points - stopping points in form of the segments (last found segment)
before,after - number of plates before and after stopping point
pmin,pmax - brick limits (normally 1-57)
sc - EdbScanSet with affine transformations
Output: x.x.x.x.pred.root for all necessary plates
void EdbScanProc::Print | ( | ) |
bool EdbScanProc::ProjectFound | ( | int | id1[4], |
int | id2[4] | ||
) |
take xp.xp.xp.xp.found.root and produce yp.yp.yp.yp.pred.root using the AFF/xp_yp.par
read affine tranformation from file, into layer
|
inline |
|
inline |
int EdbScanProc::ReadFoundTrack | ( | EdbScanSet & | ss, |
EdbTrackP & | track, | ||
int | flag = -1 |
||
) |
read track.ID() from pieces in sc.IDS .found.root and apply transformations from sc
int EdbScanProc::ReadFoundTracks | ( | EdbScanSet & | ss, |
EdbPVRec & | ali, | ||
int | flag = -1 |
||
) |
read all tracks from found.root listed in sc.IDS and apply transformations from sc.eB
return the total number of segments added
int EdbScanProc::ReadManFoundTracks | ( | EdbScanSet & | ss, |
EdbPVRec & | ali, | ||
int | flag = -1 |
||
) |
read all tracks from *man.found.txt listed in sc.IDS and apply transformations from sc.eB
return the total number of segments added
int EdbScanProc::ReadMarksSet | ( | EdbMarksSet & | ms, |
int | brick, | ||
const char * | filename, | ||
char | spacer = '_' , |
||
char | shape = 'S' |
||
) |
Reads map file and copy its informations into an EdbMarksSet object
With "spacer" you can choose the character which is assumed to be
between the words in the map file. Default is '_'
|
inline |
int EdbScanProc::ReadPatCP | ( | EdbPattern & | pat, |
int | id[4], | ||
TCut | c = "1" |
||
) |
read CP file ("base" segments) applying all cuts and transformations from x.x.x.x.in.par
the Z of the pat and all segments will be z of layer 0 defined in the par file(s)
int EdbScanProc::ReadPatCPnopar | ( | EdbPattern & | pat, |
const char * | file, | ||
TCut | cut = "1" , |
||
EdbMask * | erase_mask = 0 , |
||
bool | read_mt = false |
||
) |
int EdbScanProc::ReadPatCPnopar | ( | EdbPattern & | pat, |
EdbID | id, | ||
TCut | cut = "1" , |
||
bool | do_erase = false , |
||
bool | read_mt = false |
||
) |
int EdbScanProc::ReadPatRoot | ( | EdbPattern & | pred, |
int | id[4], | ||
const char * | suffix, | ||
int | flag = -1 |
||
) |
read root predictions file as .../bXXXXXX/pYYY/a.a.a.a.suffix
flag convention:
-1 read all: basetracks, microtracks and holes (extrapolated predictions)
>=0 read only segments with this flag
-11 read basetracks or microtracks, skip holes (expected behaviour for display users)
int EdbScanProc::ReadPatTXT | ( | const char * | file, |
EdbPattern & | pred, | ||
int | flag = -1 |
||
) |
read ascii predictions file as .../bXXXXXX/pYYY/a.a.a.a.suffix
man - for manual check by sysal
|
inline |
int EdbScanProc::ReadPatTXT | ( | EdbPattern & | pred, |
int | id[4], | ||
const char * | suffix, | ||
int | flag = -1 |
||
) |
int EdbScanProc::ReadPiece | ( | EdbDataPiece & | piece, |
EdbPattern & | pat | ||
) |
assuming that piece was initialised correctly
|
inline |
|
inline |
TObjArray * EdbScanProc::ReadSBTracks | ( | EdbID | id | ) |
EdbScanSet * EdbScanProc::ReadScanSet | ( | EdbID | id | ) |
int EdbScanProc::ReadScanSetCP | ( | EdbID | id, |
EdbPVRec & | ali, | ||
TCut | c = "1" , |
||
bool | do_erase = true , |
||
bool | do_assemble = true , |
||
int | minplate = -1000 , |
||
int | maxplate = -1000 |
||
) |
read data for scanset defined with id apply cut c and fill ali
if(do_erase) - exclude segmets from the erase mask if it is exist (default is true)
if(do_assemble) - read affine parfiles (default is true)
int EdbScanProc::ReadScanSetCP | ( | EdbScanSet & | ss, |
EdbPVRec & | ali, | ||
TCut | c = "1" , |
||
bool | do_erase = true , |
||
int | minplate = -1000 , |
||
int | maxplate = -1000 |
||
) |
read data from scanset sc with cut c and fill ali
sc.eIDS is used as an id list
sc.eB is used to get the brick geometry and affine transformations - must be filled before
if(do_erase) - exclude segmets from the erase mask if it is exist (default is true)
EdbScanSet * EdbScanProc::ReadScanSetGlobal | ( | EdbID | id, |
bool | x_marks | ||
) |
read scan set and use map.OL and map.XG files to obtain transformations in global OPERA RS
int EdbScanProc::ReadTracksTree | ( | const char * | name, |
EdbPVRec & | ali, | ||
TCut | cut = "1" |
||
) |
get from couples trees and set in the ali the uncorrected basetracks
int EdbScanProc::RemoveDublets | ( | EdbPattern & | pin, |
EdbPattern & | pout, | ||
int | brick | ||
) |
input: pin - predictions pattern
output: pout - predictions pattern with dublets removed
int EdbScanProc::RemoveFile | ( | EdbID | id, |
const char * | suffix | ||
) |
remove file
int EdbScanProc::ScanAreas | ( | EdbScanClient::ScanType | st, |
EdbScanClient & | scan, | ||
EdbPattern & | pred, | ||
int | id[4], | ||
const char * | opt = "NOCLCLFRAMESUM" |
||
) |
int EdbScanProc::ScanAreas | ( | EdbScanClient::ScanType | st, |
EdbScanClient & | scan, | ||
int | id[4], | ||
int | flag = -1 , |
||
const char * | opt = "NOCLCLFRAMESUM" |
||
) |
bool EdbScanProc::SetAFF0 | ( | int | id1[4], |
int | id2[4] | ||
) |
bool EdbScanProc::SetAFFDZ | ( | int | id1[4], |
int | id2[4], | ||
float | dz | ||
) |
void EdbScanProc::SetDefaultCondBT | ( | EdbScanCond & | cond | ) |
void EdbScanProc::SetDefaultCondMT | ( | EdbScanCond & | cond | ) |
void EdbScanProc::SetServerRunName | ( | const char * | fname_ | ) |
int EdbScanProc::TestAl | ( | const char * | cpfile1, |
const char * | cpfile2, | ||
TCut & | cut, | ||
float | dz, | ||
EdbAffine2D * | aff = 0 |
||
) |
int EdbScanProc::TestAl | ( | EdbPattern & | p1, |
EdbPattern & | p2 | ||
) |
int EdbScanProc::TestAl | ( | int | id1[4], |
int | id2[4] | ||
) |
int EdbScanProc::TrackSetBT | ( | EdbScanSet & | sc, |
TEnv & | cenv | ||
) |
bool EdbScanProc::UpdateAFFPar | ( | EdbID | id1, |
EdbID | id2, | ||
EdbLayer & | l, | ||
EdbAffine2D * | aff0 = 0 |
||
) |
update the aff par file with the values defined in the EdbLayer
update the plate par file with the values defined in the EdbLayer
in this function the geometry of the brick of idset is updated with the affine transformations
found for the couple idset1 idset2 (same plate rescanning transformations)
in this function the geometry of the brick of idset is updated with the affine transformations
found for plate-to-plate alignment of idset
void EdbScanProc::UpdateSetWithAff | ( | EdbID | idset, |
EdbAffine2D | aff | ||
) |
void EdbScanProc::UpdateSetWithPlatePar | ( | EdbScanSet & | ss | ) |
bool EdbScanProc::WaitFileReady | ( | const char * | fname_ | ) |
|
inline |
|
inline |
int EdbScanProc::WriteMarksSet | ( | EdbMarksSet & | ms, |
int | brick, | ||
const char * | filename, | ||
char | spacer = '_' , |
||
char | shape = 'S' , |
||
int | plate = 1 |
||
) |
Reads an EdbMarksSet object and uses its content to write a map file
With "spacer" you can choose the character that you want to insert
between the words in the map file. Default is '_'
int EdbScanProc::WritePatRoot | ( | EdbPattern & | pred, |
int | id[4], | ||
const char * | suffix, | ||
int | flag = -1 |
||
) |
write root predictions file as .../bXXXXXX/pYYY/a.a.a.a.suffix
|
inline |
int EdbScanProc::WritePatTXT | ( | EdbPattern & | pred, |
int | id[4], | ||
const char * | suffix, | ||
int | flag = -1 |
||
) |
write ascii predictions file as .../bXXXXXX/pYYY/a.a.a.a.suffix
man - for manual check by sysal
|
inline |
|
inline |
int EdbScanProc::WriteSBcndTXT | ( | int | id[4], |
const char * | suffix = "man.sbt.txt" |
||
) |
write ascii found candidates file as .../bXXXXXX/pYYY/a.a.a.a.suffix
int EdbScanProc::WriteSBTracks | ( | TObjArray & | tracks, |
EdbID | id | ||
) |
int EdbScanProc::WriteScanSet | ( | EdbID | id, |
EdbScanSet & | ss | ||
) |
TString EdbScanProc::eParDir |
directory path for off-line processing parameters
TString EdbScanProc::eProcDirClient |
directory path for root data
TString EdbScanProc::eProcDirServer |
directory path for root data
|
private |
EdbRun file name that is created by scanserver side.