Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase efficiency at IIHE #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion bin/hzz2l2v/runHZZ2l2vAnalysis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,16 @@ int main(int argc, char* argv[])

printf("Progressing Bar :0%% 20%% 40%% 60%% 80%% 100%%\n");
for(unsigned int f=0;f<urls.size();f++){
TFile* file = TFile::Open(urls[f].c_str() );

TString namePath = "";
namePath += f;
TString copyCmd = "";
copyCmd += TString("dccp ") + urls[f].c_str() + " $TMPDIR/"+namePath+".root ;";
printf("Copy the file: %s", copyCmd.Data());
system(copyCmd.Data());
TFile* file = TFile::Open("$TMPDIR/"+namePath+".root");

//TFile* file = TFile::Open(urls[f].c_str() );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il vaut mieux copier avant la boucle et modifier la liste urls avec les path locaux,
car il y a d'autres boucles sur les fichiers de url défini avant (les boucles sont faites dans des fonctions externes... pour compter le nombre d'évenement, le PU, etc)

fwlite::Event ev(file);
printf("Scanning the ntuple %2i/%2i :", (int)f+1, (int)urls.size());
int iev=0;
Expand Down
4 changes: 2 additions & 2 deletions scripts/runAnalysisOverSamples.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def getFileList(procData,DefaultNFilesPerJob):
list = [x for x in list if ".root" in x] #make sure that we only consider root files
for i in range(0,len(list)):
if IsOnLocalTier:
if (hostname.find("iihe.ac.be")!=-1): list[i] = "dcap://maite.iihe.ac.be:/pnfs/iihe/cms/ph/sc4"+list[i]
if (hostname.find("iihe.ac.be")!=-1): list[i] = "dcap://maite.iihe.ac.be/pnfs/iihe/cms/ph/sc4"+list[i]
elif(hostname.find("ucl.ac.be" )!=-1): list[i] = "/storage/data/cms"+list[i]
else: list[i] = "root://eoscms//eos/cms"+list[i]
else:
Expand All @@ -121,7 +121,7 @@ def getFileList(procData,DefaultNFilesPerJob):
NFilesPerJob = max(1,len(list)/split)
else:
NFilesPerJob = DefaultNFilesPerJob
if((len(list)/NFilesPerJob)>100):NFilesPerJob=len(list)/100; #make sure the number of jobs isn't too big
#if((len(list)/NFilesPerJob)>100):NFilesPerJob=len(list)/100; #make sure the number of jobs isn't too big

for g in range(0, len(list), NFilesPerJob):
groupList = ''
Expand Down