updated up to GeneralSort
This commit is contained in:
parent
245a9b408a
commit
6059036c15
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
@ -129,7 +129,8 @@
|
||||||
"SimTransfer.C": "cpp",
|
"SimTransfer.C": "cpp",
|
||||||
"httpaccess.C": "cpp",
|
"httpaccess.C": "cpp",
|
||||||
"httpcontrol.C": "cpp",
|
"httpcontrol.C": "cpp",
|
||||||
"SimTransfer2.C": "cpp"
|
"SimTransfer2.C": "cpp",
|
||||||
|
"haha.C": "cpp"
|
||||||
},
|
},
|
||||||
|
|
||||||
"better-comments.multilineComments": true,
|
"better-comments.multilineComments": true,
|
||||||
|
|
|
@ -34,23 +34,21 @@ Bool_t GeneralSort::Process(Long64_t entry){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
multi = 0;
|
b_evID->GetEntry(entry);
|
||||||
b_event_ID->GetEntry(entry);
|
|
||||||
b_multi->GetEntry(entry);
|
b_multi->GetEntry(entry);
|
||||||
b_bd->GetEntry(entry);
|
b_bd->GetEntry(entry);
|
||||||
b_ch->GetEntry(entry);
|
b_ch->GetEntry(entry);
|
||||||
b_e->GetEntry(entry);
|
b_e->GetEntry(entry);
|
||||||
b_e_t->GetEntry(entry);
|
b_e_t->GetEntry(entry);
|
||||||
|
|
||||||
for( int i = 0 ; i < multi; i++){
|
for( unsigned int i = 0 ; i < multi; i++){
|
||||||
|
|
||||||
int detID = mapping::map[bd[i]][ch[i]];
|
int detID = mapping::map[bd[i]][ch[i]];
|
||||||
int detType = mapping::FindDetTypeIndex(detID);
|
int detType = mapping::FindDetTypeIndex(detID);
|
||||||
int low = (i == 0 ? 0 : mapping::detMaxID[detType-1]);
|
int low = (i == 0 ? 0 : mapping::detMaxID[detType-1]);
|
||||||
int reducedDetID = detID - low;
|
int reducedDetID = detID - low;
|
||||||
|
|
||||||
eE[detType][reducedDetID] = e[i] * mapping::detParity[detType];
|
eE[detType][reducedDetID] = e[i] * mapping::detParity[detType];
|
||||||
eT[detType][reducedDetID] = e_t[i];
|
eT[detType][reducedDetID] = e_t[i];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//@===================================== Trace
|
//@===================================== Trace
|
||||||
|
@ -63,7 +61,7 @@ Bool_t GeneralSort::Process(Long64_t entry){
|
||||||
|
|
||||||
arr->Clear("C");
|
arr->Clear("C");
|
||||||
|
|
||||||
for( int i = 0; i < multi; i++){
|
for( unsigned int i = 0; i < multi; i++){
|
||||||
int detID = mapping::map[bd[i]][ch[i]];
|
int detID = mapping::map[bd[i]][ch[i]];
|
||||||
|
|
||||||
|
|
||||||
|
@ -152,7 +150,7 @@ void GeneralSort::Terminate(){
|
||||||
if( !isParallel){
|
if( !isParallel){
|
||||||
stpWatch.Start(kFALSE);
|
stpWatch.Start(kFALSE);
|
||||||
saveFile->cd();
|
saveFile->cd();
|
||||||
newSaveTree->Print("toponly");
|
// newSaveTree->Print("toponly");
|
||||||
newSaveTree->Write();
|
newSaveTree->Write();
|
||||||
saveFile->Close();
|
saveFile->Close();
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,10 +62,10 @@ public :
|
||||||
|
|
||||||
// Declaration of leaf types
|
// Declaration of leaf types
|
||||||
ULong64_t evID;
|
ULong64_t evID;
|
||||||
Int_t multi;
|
UInt_t multi;
|
||||||
Int_t bd[100]; //[multi]
|
UShort_t bd[100]; //[multi]
|
||||||
Int_t ch[100]; //[multi]
|
UShort_t ch[100]; //[multi]
|
||||||
Int_t e[100]; //[multi]
|
UShort_t e[100]; //[multi]
|
||||||
ULong64_t e_t[100]; //[multi]
|
ULong64_t e_t[100]; //[multi]
|
||||||
UShort_t lowFlag[100]; //[multi]
|
UShort_t lowFlag[100]; //[multi]
|
||||||
UShort_t highFlag[100]; //[multi]
|
UShort_t highFlag[100]; //[multi]
|
||||||
|
@ -73,7 +73,7 @@ public :
|
||||||
Int_t trace[100][2500]; //[multi]
|
Int_t trace[100][2500]; //[multi]
|
||||||
|
|
||||||
// List of branches
|
// List of branches
|
||||||
TBranch *b_event_ID; //!
|
TBranch *b_evID; //!
|
||||||
TBranch *b_multi; //!
|
TBranch *b_multi; //!
|
||||||
TBranch *b_bd; //!
|
TBranch *b_bd; //!
|
||||||
TBranch *b_ch; //!
|
TBranch *b_ch; //!
|
||||||
|
@ -250,7 +250,12 @@ void GeneralSort::DecodeOption(){
|
||||||
isParallel = false;
|
isParallel = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("|%s| %d %s %d \n", option.Data(), traceMethod, saveFileName.Data(), isParallel);
|
|
||||||
|
// printf(" option: |%s|\n", option.Data());
|
||||||
|
// printf("trace method: %d \n", traceMethod);
|
||||||
|
PrintTraceMethod();
|
||||||
|
printf(" Parallel: %d \n", isParallel);
|
||||||
|
printf(" save file: %s \n", saveFileName.Data());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,7 +267,7 @@ void GeneralSort::Init(TTree *tree){
|
||||||
fChain = tree;
|
fChain = tree;
|
||||||
fChain->SetMakeClass(1);
|
fChain->SetMakeClass(1);
|
||||||
|
|
||||||
fChain->SetBranchAddress("evID", &evID, &b_event_ID);
|
fChain->SetBranchAddress("evID", &evID, &b_evID);
|
||||||
fChain->SetBranchAddress("multi", &multi, &b_multi);
|
fChain->SetBranchAddress("multi", &multi, &b_multi);
|
||||||
fChain->SetBranchAddress("bd", bd, &b_bd);
|
fChain->SetBranchAddress("bd", bd, &b_bd);
|
||||||
fChain->SetBranchAddress("ch", ch, &b_ch);
|
fChain->SetBranchAddress("ch", ch, &b_ch);
|
||||||
|
@ -308,7 +313,7 @@ void GeneralSort::PrintTraceMethod(){
|
||||||
const char* traceMethodStr;
|
const char* traceMethodStr;
|
||||||
switch(traceMethod) {
|
switch(traceMethod) {
|
||||||
case -1 : traceMethodStr = "Ignore Trace"; break;
|
case -1 : traceMethodStr = "Ignore Trace"; break;
|
||||||
case 0 : traceMethodStr = "Copy"; break;
|
case 0 : traceMethodStr = "None and Copy Trace"; break;
|
||||||
case 1 : traceMethodStr = "Fit"; break;
|
case 1 : traceMethodStr = "Fit"; break;
|
||||||
case 2 : traceMethodStr = "Trapezoid"; break;
|
case 2 : traceMethodStr = "Trapezoid"; break;
|
||||||
default: traceMethodStr = "Unknown"; break;
|
default: traceMethodStr = "Unknown"; break;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
|
|
||||||
#include "TTree.h"
|
#include "TTree.h"
|
||||||
#include "TProof.h"
|
|
||||||
#include "TChain.h"
|
#include "TChain.h"
|
||||||
#include "TMacro.h"
|
#include "TMacro.h"
|
||||||
#include "TFile.h"
|
#include "TFile.h"
|
||||||
|
#include "TProof.h"
|
||||||
|
|
||||||
void GeneralSortAgent(Int_t runNum, int nWorker = 1, int traceMethod = -1){
|
void GeneralSortAgent(Int_t runNum, int nWorker = 1, int traceMethod = -1){
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ void GeneralSortAgent(Int_t runNum, int nWorker = 1, int traceMethod = -1){
|
||||||
if( abs(nWorker) == 1){
|
if( abs(nWorker) == 1){
|
||||||
|
|
||||||
option.Form("%d,../root_data/gen_run%03d.root,%d", traceMethod, runNum, 0);
|
option.Form("%d,../root_data/gen_run%03d.root,%d", traceMethod, runNum, 0);
|
||||||
chain->Process("../armory/GeneralSort.C+", option);
|
chain->Process("../Armory/GeneralSort.C+", option);
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ void GeneralSortAgent(Int_t runNum, int nWorker = 1, int traceMethod = -1){
|
||||||
|
|
||||||
chain->SetProof();
|
chain->SetProof();
|
||||||
option.Form("%d,../root_data/gen_run%03d.root,%d", traceMethod, runNum, 1);
|
option.Form("%d,../root_data/gen_run%03d.root,%d", traceMethod, runNum, 1);
|
||||||
chain->Process("../armory/GeneralSort.C+", option);
|
chain->Process("../Armory/GeneralSort.C+", option);
|
||||||
}
|
}
|
||||||
|
|
||||||
//========== open the output root and copy teh timestamp Marco
|
//========== open the output root and copy teh timestamp Marco
|
||||||
|
|
|
@ -33,7 +33,7 @@ function ShowRunSize {
|
||||||
echo 'Please set run number '
|
echo 'Please set run number '
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
source $SOLARISANADIR/working/expName.sh
|
source $SOLARISANADIR/data_raw/expName.sh
|
||||||
RUN=$1
|
RUN=$1
|
||||||
if [ ${RUN} = "latest" ]; then
|
if [ ${RUN} = "latest" ]; then
|
||||||
RUN=${runID}
|
RUN=${runID}
|
||||||
|
@ -44,5 +44,5 @@ function ShowRunSize {
|
||||||
elif [ ${runLen} -eq 2 ]; then
|
elif [ ${runLen} -eq 2 ]; then
|
||||||
RUN="0"${RUN}
|
RUN="0"${RUN}
|
||||||
fi
|
fi
|
||||||
du -hc $SOLARISANADIR/data_raw/data/${expName}_${RUN}_*.sol
|
du -hc $SOLARISANADIR/data_raw/${expName}_${RUN}_*.sol
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user